|
pappsomspp
Library for mass spectrometry
|
Go to the documentation of this file.
28 #include "../../../pappsomspp/pappsoexception.h"
29 #include "../../../pappsomspp/exception/exceptionoutofrange.h"
62 double digitizerTimebase,
63 double digitizerDelay,
71 C1 = C1 * temperature_correction;
72 C2 = C2 / temperature_correction;
89 QObject::tr(
"Invalid scan number : scanNum%1 < 0").arg(scanNum));
94 QObject::tr(
"Invalid scan number : scanNum%1 > m_scanNumber")
106 "ERROR unable to get number of peaks in TimsFrameBase for scan number %1")
115 "ERROR unable to getMassSpectrumSPtr in TimsFrameBase for scan number %1")
120 std::size_t scanNumEnd)
const
123 QObject::tr(
"ERROR unable to cumulateScanToTrace in TimsFrameBase for scan "
124 "number begin %1 end %2")
171 std::vector<double> X;
187 alglib::real_1d_array polynom_array;
190 polynom_array.setcontent(X.size(), &(X[0]));
192 catch(alglib::ap_error &error)
196 QObject::tr(
"ERROR in alglib::polynom_array.setcontent :\n%1")
197 .arg(error.msg.c_str()));
209 alglib::complex_1d_array m;
210 alglib::polynomialsolverreport rep;
214 alglib::polynomialsolve(polynom_array, X.size() - 1, m, rep);
216 catch(alglib::ap_error &error)
218 qDebug() <<
" X.size() - 1 = " << X.size() - 1;
226 QObject::tr(
"ERROR in alglib::polynomialsolve :\n%1")
227 .arg(error.msg.c_str()));
236 QObject::tr(
"ERROR in TimsFrame::getMzFromTof m.size() == 0"));
242 QObject::tr(
"ERROR in TimsFrame::getMzFromTof m[0].y!= 0"));
245 return pow(m[0].
x, 2);
256 qDebug() <<
"mz=" <<
mz;
259 qDebug() <<
"tof ( m_mzCalibrationArr[0])=" << tof;
262 qDebug() <<
"tof=" << tof;
264 qDebug() <<
"tof=" << tof;
266 qDebug() <<
"tof=" << tof;
268 qDebug() <<
"tof=" << tof;
270 qDebug() <<
"index=" << tof;
271 return (quint32)std::round(tof);
284 qDebug() <<
" m_msMsType=" << type;
320 if(tims_model_type != 2)
323 "ERROR in TimsFrame::setTimsCalibration tims_model_type != 2"));
347 QObject::tr(
"ERROR in TimsFrame::getVoltageTransformation invalid tims "
348 "calibration, v < m_timsVmin"));
355 QObject::tr(
"ERROR in TimsFrame::getVoltageTransformation invalid tims "
356 "calibration, v > m_timsVmax"));
double m_digitizerTimebase
bool checkScanNum(std::size_t scanNum) const
std::size_t m_timsId
Tims frame database id (the SQL identifier of this frame)
void setTimsCalibration(int tims_model_type, double C0, double C1, double C2, double C3, double C4, double C5, double C6, double C7, double C8, double C9)
unsigned int getMsLevel() const
virtual Trace cumulateScanToTrace(std::size_t scanNumBegin, std::size_t scanNumEnd) const
void setAccumulationTime(double accumulation_time_ms)
void setMzCalibration(double temperature_correction, double digitizerTimebase, double digitizerDelay, double C0, double C1, double C2, double C3)
void setTime(double time)
virtual std::size_t getNbrPeaks(std::size_t scanNum) const
quint32 getRawIndexFromMz(double mz) const
get raw index of a given m/z
double getDriftTime(std::size_t scanNum) const
get drift time of a scan number in milliseconds
double m_accumulationTime
accumulation time in milliseconds
double m_time
retention time
A simple container of DataPoint instances.
double getVoltageTransformation(std::size_t scanNum) const
std::size_t getId() const
virtual MassSpectrumSPtr getMassSpectrumSPtr(std::size_t scanNum) const
handle a single Bruker's TimsTof frame without binary data
TimsFrameBase(std::size_t timsId, quint32 scanNum)
constructor for binary independant tims frame
void setMsMsType(quint8 type)
double getOneOverK0Transformation(std::size_t scanNum) const
get 1/K0 value of a given scan (mobility value)
double getMzFromTof(double tof) const
get m/z from time of flight
quint32 m_scanNumber
total number of scans contained in this frame
double getTofFromIndex(quint32 index) const
get time of flight from raw index
std::vector< double > m_mzCalibrationArr
MZ calibration parameters.
std::shared_ptr< MassSpectrum > MassSpectrumSPtr