libpappsomspp
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 > m_scanNumber")
99 throw PappsoException(
101 "ERROR unable to get number of peaks in TimsFrameBase for scan number %1")
110 "ERROR unable to getMassSpectrumSPtr in TimsFrameBase for scan number %1")
115 std::size_t scanNumEnd)
const
118 QObject::tr(
"ERROR unable to cumulateScanToTrace in TimsFrameBase for scan "
119 "number begin %1 end %2")
166 std::vector<double> X;
182 alglib::real_1d_array polynom_array;
185 polynom_array.setcontent(X.size(), &(X[0]));
187 catch(alglib::ap_error &error)
191 QObject::tr(
"ERROR in alglib::polynom_array.setcontent :\n%1")
192 .arg(error.msg.c_str()));
204 alglib::complex_1d_array m;
205 alglib::polynomialsolverreport rep;
209 alglib::polynomialsolve(polynom_array, X.size() - 1, m, rep);
211 catch(alglib::ap_error &error)
213 qDebug() <<
" X.size() - 1 = " << X.size() - 1;
221 QObject::tr(
"ERROR in alglib::polynomialsolve :\n%1")
222 .arg(error.msg.c_str()));
231 QObject::tr(
"ERROR in TimsFrame::getMzFromTof m.size() == 0"));
237 QObject::tr(
"ERROR in TimsFrame::getMzFromTof m[0].y!= 0"));
240 return pow(m[0].x, 2);
251 qDebug() <<
"mz=" <<
mz;
254 qDebug() <<
"tof ( m_mzCalibrationArr[0])=" << tof;
257 qDebug() <<
"tof=" << tof;
259 qDebug() <<
"tof=" << tof;
261 qDebug() <<
"tof=" << tof;
263 qDebug() <<
"tof=" << tof;
265 qDebug() <<
"index=" << tof;
266 return (quint32)std::round(tof);
279 qDebug() <<
" m_msMsType=" << type;
309 [[maybe_unused]]
double C5,
315 if(tims_model_type != 2)
318 "ERROR in TimsFrame::setTimsCalibration tims_model_type != 2"));
342 QObject::tr(
"ERROR in TimsFrame::getVoltageTransformation invalid tims "
343 "calibration, v < m_timsVmin"));
350 QObject::tr(
"ERROR in TimsFrame::getVoltageTransformation invalid tims "
351 "calibration, v > m_timsVmax"));
371 double temp = 1 / one_over_k0;
377 return (std::size_t)std::round(temp);
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
double getVoltageTransformation(std::size_t scanNum) const
std::size_t getId() const
virtual MassSpectrumSPtr getMassSpectrumSPtr(std::size_t scanNum) const
std::size_t getScanNumFromOneOverK0(double one_over_k0) const
get the scan number from a given 1/Ko mobility value
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