OpenMS
Loading...
Searching...
No Matches
IMTypes.h
Go to the documentation of this file.
1// Copyright (c) 2002-present, OpenMS Inc. -- EKU Tuebingen, ETH Zurich, and FU Berlin
2// SPDX-License-Identifier: BSD-3-Clause
3//
4// --------------------------------------------------------------------------
5// $Maintainer: Chris Bielow $
6// $Authors: Chris Bielow $
7// --------------------------------------------------------------------------
8
9#pragma once
10
12#include <OpenMS/OpenMSConfig.h>
13
14#include <string>
15
16namespace OpenMS
17{
18 class MSExperiment;
19 class MSSpectrum;
20
30
32 OPENMS_DLLAPI extern const std::string NamesOfDriftTimeUnit[(size_t) DriftTimeUnit::SIZE_OF_DRIFTTIMEUNIT];
33
36 OPENMS_DLLAPI DriftTimeUnit toDriftTimeUnit(const std::string& dtu_string);
37
40 OPENMS_DLLAPI const std::string& driftTimeUnitToString(const DriftTimeUnit value);
41
47 enum class IMFormat
48 {
49 NONE,
52 MIXED,
54 UNKNOWN,
56 };
58 OPENMS_DLLAPI extern const std::string NamesOfIMFormat[(size_t) IMFormat::SIZE_OF_IMFORMAT];
59
62 OPENMS_DLLAPI IMFormat toIMFormat(const std::string& IM_format);
65 OPENMS_DLLAPI const std::string& imFormatToString(const IMFormat value);
66
67 class OPENMS_DLLAPI IMTypes
68 {
69 public:
71 inline static constexpr double DRIFTTIME_NOT_SET = -1.0;
72
78
88
95 static DIM_UNIT fromIMUnit(const DriftTimeUnit from);
96 };
97
98};
99
Definition IMTypes.h:68
static IMFormat determineIMFormat(const MSExperiment &exp)
static DIM_UNIT fromIMUnit(const DriftTimeUnit from)
static IMFormat determineIMFormat(const MSSpectrum &spec)
Checks for existence of a single driftTime (using spec.getDriftTime()) or an ion-mobility float data ...
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
IMFormat
Definition IMTypes.h:48
@ CENTROIDED
ion mobility of peaks after centroiding in IM dimension. Ion mobility is annotated in a single float ...
@ MIXED
an MSExperiment contains both CONCATENATED and MULTIPLE_SPECTRA
@ CONCATENATED
ion mobility frame is stacked in a single spectrum (i.e. has an IM float data array)
@ UNKNOWN
ion mobility format not yet determined.
@ MULTIPLE_SPECTRA
ion mobility is recorded as multiple spectra per frame (i.e. has one IM annotation per spectrum)
DriftTimeUnit
Drift time unit for ion mobility.
Definition IMTypes.h:23
@ MILLISECOND
milliseconds
@ VSSC
volt-second per square centimeter (i.e. 1/K_0)
@ FAIMS_COMPENSATION_VOLTAGE
compensation voltage
const std::string & imFormatToString(const IMFormat value)
IMFormat toIMFormat(const std::string &IM_format)
const std::string NamesOfIMFormat[(size_t) IMFormat::SIZE_OF_IMFORMAT]
Names of IMFormat.
const std::string & driftTimeUnitToString(const DriftTimeUnit value)
const std::string NamesOfDriftTimeUnit[(size_t) DriftTimeUnit::SIZE_OF_DRIFTTIMEUNIT]
Names of IM Units. Should be usable as axis annotation.
DriftTimeUnit toDriftTimeUnit(const std::string &dtu_string)
DIM_UNIT
Definition CommonEnums.h:20