OpenMS
Loading...
Searching...
No Matches
IMTypes Class Reference

#include <OpenMS/IONMOBILITY/IMTypes.h>

Collaboration diagram for IMTypes:
[legend]

Static Public Member Functions

static IMFormat determineIMFormat (const MSExperiment &exp, int ms_level)
 
static IMFormat determineIMFormat (const MSSpectrum &spec)
 Checks for existence of a single driftTime (using spec.getDriftTime()) or an ion-mobility float data array (using spec.hasIMData())
 
static DIM_UNIT fromIMUnit (const DriftTimeUnit from)
 

Static Public Attributes

static constexpr double DRIFTTIME_NOT_SET = -1.0
 If drift time for a spectrum is unavailable (i.e. not an IM spectrum), it will have this value.
 

Member Function Documentation

◆ determineIMFormat() [1/2]

static IMFormat determineIMFormat ( const MSExperiment exp,
int  ms_level 
)
static

Checks only spectra of the given MS level for their IM format and returns the common type. If no spectra of ms_level exist or none have IM data, IMFormat::NONE is returned.

Exceptions
Exception::InvalidValueif spectra of the given MS level have different IM formats

◆ determineIMFormat() [2/2]

static IMFormat determineIMFormat ( const MSSpectrum spec)
static

Checks for existence of a single driftTime (using spec.getDriftTime()) or an ion-mobility float data array (using spec.hasIMData())

If neither is found, IMFormat::NONE is returned. If a single drift time (== IMFormat::IM_SPECTRUM) is found, but no unit, a warning is issued.

Exceptions
Exception::InvalidValueif IM values are annotated as single drift time and float array in the given spectrum

◆ fromIMUnit()

static DIM_UNIT fromIMUnit ( const DriftTimeUnit  from)
static
Parameters
fromDrift unit to convert from
Returns
A more general DIM_UNIT (or exception)
Exceptions
Exception::ConversionErrorif from has invalid value (e.g. 'NONE')

Referenced by TOPPViewBase::showCurrentPeaksAsIonMobility().

Member Data Documentation

◆ DRIFTTIME_NOT_SET

constexpr double DRIFTTIME_NOT_SET = -1.0
inlinestaticconstexpr

If drift time for a spectrum is unavailable (i.e. not an IM spectrum), it will have this value.