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
31
33 OPENMS_DLLAPI extern const std::string NamesOfDriftTimeUnit[(size_t) DriftTimeUnit::SIZE_OF_DRIFTTIMEUNIT];
34
37 OPENMS_DLLAPI DriftTimeUnit toDriftTimeUnit(const std::string& dtu_string);
38
41 OPENMS_DLLAPI const std::string& driftTimeUnitToString(const DriftTimeUnit value);
42
46 enum class IMFormat
47 {
48 NONE,
49 IM_PEAK,
51 UNKNOWN,
53 };
55 OPENMS_DLLAPI extern const std::string NamesOfIMFormat[(size_t) IMFormat::SIZE_OF_IMFORMAT];
56
59 OPENMS_DLLAPI IMFormat toIMFormat(const std::string& IM_format);
62 OPENMS_DLLAPI const std::string& imFormatToString(const IMFormat value);
63
66 enum class IMPeakType
67 {
70 UNKNOWN,
72 };
73
75 OPENMS_DLLAPI extern const std::string NamesOfIMPeakType[(size_t) IMPeakType::SIZE_OF_IMPEAKTYPE];
76
81 OPENMS_DLLAPI IMPeakType toIMPeakType(const std::string& im_peak_type);
82
87 OPENMS_DLLAPI const std::string& imPeakTypeToString(IMPeakType im_peak_type);
88
89 class OPENMS_DLLAPI IMTypes
90 {
91 public:
93 inline static constexpr double DRIFTTIME_NOT_SET = -1.0;
94
98 static IMFormat determineIMFormat(const MSExperiment& exp, int ms_level);
99
109
117 };
118
119};
120
Definition IMTypes.h:90
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 ...
static IMFormat determineIMFormat(const MSExperiment &exp, int ms_level)
In-Memory representation of a mass spectrometry run.
Definition MSExperiment.h:49
The representation of a 1D spectrum.
Definition MSSpectrum.h:44
@ UNKNOWN
Unknown or unrecognized ion type.
Main OpenMS namespace.
Definition openswathalgo/include/OpenMS/OPENSWATHALGO/DATAACCESS/ISpectrumAccess.h:19
IMFormat
Definition IMTypes.h:47
@ IM_SPECTRUM
conventional spectrum with one precursor IM value (i.e. has one IM annotation per spectrum via getDri...
@ IM_PEAK
full TIMS frame / per-scan IM-resolved data: ion mobility is annotated per peak in a float data array
const std::string & imPeakTypeToString(IMPeakType im_peak_type)
converts an IMPeakType to a string
DriftTimeUnit
Drift time unit for ion mobility.
Definition IMTypes.h:23
@ CCS
collisional cross section (square angstrom)
@ 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)
IMPeakType
Definition IMTypes.h:67
@ IM_CENTROIDED
IM data after centroiding in the IM dimension.
@ IM_PROFILE
raw/unprocessed IM data (e.g. full TIMS frame before IM centroiding)
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)
const std::string NamesOfIMPeakType[(size_t) IMPeakType::SIZE_OF_IMPEAKTYPE]
Names of IMPeakType entries.
DIM_UNIT
Definition CommonEnums.h:20
IMPeakType toIMPeakType(const std::string &im_peak_type)
converts a string to IMPeakType