libpappsomspp
Library for mass spectrometry
Toggle main menu visibility
Loading...
Searching...
No Matches
mzcalibrationinterface.h
Go to the documentation of this file.
1
/**
2
* \file pappsomspp/vendors/tims/mzcalibration/mzcalibrationinterface.h
3
* \date 11/11/2020
4
* \author Olivier Langella
5
* \brief handles different ways to compute m/z using calibration parameters
6
*/
7
8
/*******************************************************************************
9
* Copyright (c) 2020 Olivier Langella <Olivier.Langella@u-psud.fr>.
10
*
11
* This file is part of the PAPPSOms++ library.
12
*
13
* PAPPSOms++ is free software: you can redistribute it and/or modify
14
* it under the terms of the GNU General Public License as published by
15
* the Free Software Foundation, either version 3 of the License, or
16
* (at your option) any later version.
17
*
18
* PAPPSOms++ is distributed in the hope that it will be useful,
19
* but WITHOUT ANY WARRANTY; without even the implied warranty of
20
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
21
* GNU General Public License for more details.
22
*
23
* You should have received a copy of the GNU General Public License
24
* along with PAPPSOms++. If not, see <http://www.gnu.org/licenses/>.
25
*
26
******************************************************************************/
27
28
#pragma once
29
30
#include <QtGlobal>
31
#include <memory>
32
#include <vector>
33
34
namespace
pappso
35
{
36
37
class
MzCalibrationInterface
;
38
typedef
std::shared_ptr<MzCalibrationInterface>
MzCalibrationInterfaceSPtr
;
39
/**
40
* @todo write docs
41
*/
42
class
MzCalibrationInterface
43
{
44
public
:
45
/**
46
* Default constructor
47
*/
48
MzCalibrationInterface
(
double
digitizerTimebase,
double
digitizerDelay);
49
50
/**
51
* Destructor
52
*/
53
virtual
~MzCalibrationInterface
();
54
55
/**
56
* Assignment operator
57
*
58
* @param other TODO
59
* @return TODO
60
*/
61
MzCalibrationInterface
&
operator=
(
const
MzCalibrationInterface
&other);
62
63
/**
64
* @todo write docs
65
*
66
* @param other TODO
67
* @return TODO
68
*/
69
bool
operator==
(
const
MzCalibrationInterface
&other)
const
;
70
71
/** @brief get time of flight from raw index
72
* @param tof_index digitizer x raw value
73
* @return tof time of flight
74
*/
75
double
getTofFromTofIndex
(quint32 tof_index)
const
;
76
77
/** @brief get time of flight from double index
78
*/
79
double
getTofFromTofIndex
(
double
tof_index)
const
;
80
81
82
/** @brief get m/z from time of flight raw index
83
* @param tof_index time of flight
84
* @return m/z value
85
*/
86
virtual
double
getMzFromTofIndex
(quint32 tof_index) = 0;
87
88
/** @brief get raw TOF index of a given m/z
89
* @param mz the mass to transform
90
* @return integer x raw value
91
*/
92
virtual
quint32
getTofIndexFromMz
(
double
mz) = 0;
93
94
95
protected
:
96
double
m_digitizerTimebase
= 0;
97
double
m_digitizerDelay
= 0;
98
99
/** @brief MZ calibration parameters
100
*/
101
std::vector<double>
m_mzCalibrationArr
;
102
};
103
}
// namespace pappso
pappso::MzCalibrationInterface
Definition
mzcalibrationinterface.h:43
pappso::MzCalibrationInterface::getTofFromTofIndex
double getTofFromTofIndex(quint32 tof_index) const
get time of flight from raw index
Definition
mzcalibrationinterface.cpp:51
pappso::MzCalibrationInterface::MzCalibrationInterface
MzCalibrationInterface(double digitizerTimebase, double digitizerDelay)
Definition
mzcalibrationinterface.cpp:34
pappso::MzCalibrationInterface::~MzCalibrationInterface
virtual ~MzCalibrationInterface()
Definition
mzcalibrationinterface.cpp:39
pappso::MzCalibrationInterface::m_mzCalibrationArr
std::vector< double > m_mzCalibrationArr
MZ calibration parameters.
Definition
mzcalibrationinterface.h:101
pappso::MzCalibrationInterface::m_digitizerTimebase
double m_digitizerTimebase
Definition
mzcalibrationinterface.h:96
pappso::MzCalibrationInterface::getMzFromTofIndex
virtual double getMzFromTofIndex(quint32 tof_index)=0
get m/z from time of flight raw index
pappso::MzCalibrationInterface::operator==
bool operator==(const MzCalibrationInterface &other) const
pappso::MzCalibrationInterface::m_digitizerDelay
double m_digitizerDelay
Definition
mzcalibrationinterface.h:97
pappso::MzCalibrationInterface::operator=
MzCalibrationInterface & operator=(const MzCalibrationInterface &other)
pappso::MzCalibrationInterface::getTofIndexFromMz
virtual quint32 getTofIndexFromMz(double mz)=0
get raw TOF index of a given m/z
pappso
tries to keep as much as possible monoisotopes, removing any possible C13 peaks and changes multichar...
Definition
aa.cpp:39
pappso::MzCalibrationInterfaceSPtr
std::shared_ptr< MzCalibrationInterface > MzCalibrationInterfaceSPtr
Definition
mzcalibrationinterface.h:38
pappsomspp
core
vendors
tims
mzcalibration
mzcalibrationinterface.h
Generated on
for libpappsomspp by
1.17.0