libpappsomspp
Library for mass spectrometry
pappso::TimsFrameBase Class Reference

#include <timsframebase.h>

Inheritance diagram for pappso::TimsFrameBase:
pappso::TimsFrame pappso::TimsFrameType1

Public Member Functions

 TimsFrameBase (std::size_t timsId, quint32 scanNum)
 constructor for binary independant tims frame More...
 
 TimsFrameBase (const TimsFrameBase &other)
 
virtual ~TimsFrameBase ()
 
virtual bool hasSameCalibrationData (const TimsFrameBase &other) const
 tells if 2 tims frame has the same calibration data Usefull to know if raw data can be handled between frames More...
 
virtual std::size_t getNbrPeaks (std::size_t scanNum) const
 get the number of peaks in this spectrum need the binary file More...
 
virtual std::size_t getTotalNumberOfScans () const
 get the number of scans contained in this frame each scan represents an ion mobility slice More...
 
virtual quint32 getMaximumRawMassIndex () const
 get the maximum raw mass index contained in this frame More...
 
virtual MassSpectrumSPtr getMassSpectrumSPtr (std::size_t scanNum) const
 get Mass spectrum with peaks for this scan number need the binary file More...
 
virtual Trace cumulateScanToTrace (std::size_t scanNumBegin, std::size_t scanNumEnd) const
 cumulate spectrum given a scan number range need the binary file More...
 
virtual void cumulateScansInRawMap (std::map< quint32, quint32 > &rawSpectrum, std::size_t scanNumBegin, std::size_t scanNumEnd) const
 cumulate scan list into a trace into a raw spectrum map More...
 
bool checkScanNum (std::size_t scanNum) const
 check that this scan number exists More...
 
void setAccumulationTime (double accumulation_time_ms)
 
void setMzCalibration (double T1_frame, double T2_frame, double digitizerTimebase, double digitizerDelay, double C0, double C1, double C2, double C3, double C4, double T1_ref, double T2_ref, double dC1, double dC2)
 
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)
 
void setTime (double time)
 
void setMsMsType (quint8 type)
 
unsigned int getMsLevel () const
 
double getTime () const
 
std::size_t getId () const
 
double getDriftTime (std::size_t scanNum) const
 get drift time of a scan number in milliseconds More...
 
double getOneOverK0Transformation (std::size_t scanNum) const
 get 1/K0 value of a given scan (mobility value) More...
 
std::size_t getScanNumFromOneOverK0 (double one_over_k0) const
 get the scan number from a given 1/Ko mobility value More...
 
double getVoltageTransformation (std::size_t scanNum) const
 get voltage for a given scan number More...
 
pappso::Trace getTraceFromCumulatedScans (std::map< quint32, quint32 > &accumulated_scans) const
 transform accumulation of raw scans into a real mass spectrum More...
 
pappso::Trace getTraceFromCumulatedScansBuiltinCentroid (std::map< quint32, quint32 > &accumulated_scans) const
 transform accumulation of raw scans into a real mass spectrum with a simple centroid on raw integers More...
 
virtual const MzCalibrationInterfaceSPtrgetMzCalibrationInterfaceSPtr () const final
 get the MzCalibration model to compute mz and TOF for this frame More...
 
void setMzCalibrationInterfaceSPtr (MzCalibrationInterfaceSPtr mzCalibration)
 
virtual std::vector< quint32 > getScanIndexList (std::size_t scanNum) const
 get raw index list for one given scan index are not TOF nor m/z, just index on digitizer More...
 
virtual std::vector< quint32 > getScanIntensities (std::size_t scanNum) const
 get raw intensities without transformation from one scan it needs intensity normalization More...
 
virtual Trace getIonMobilityTraceByMzIndexRange (std::size_t mz_index_lower_bound, std::size_t mz_index_upper_bound, XicExtractMethod method) const
 get a mobility trace cumulating intensities inside the given mass index range More...
 

Protected Attributes

quint32 m_scanNumber
 total number of scans contained in this frame More...
 
std::size_t m_timsId
 Tims frame database id (the SQL identifier of this frame) More...
 
double m_accumulationTime = 0
 accumulation time in milliseconds More...
 
quint8 m_msMsType = 0
 
double m_time = 0
 retention time More...
 
double m_timsDvStart = 0
 
double m_timsSlope
 
double m_timsTtrans = 0
 
double m_timsNdelay = 0
 
double m_timsVmin = 0
 
double m_timsVmax = 0
 
double m_timsC6 = 0
 
double m_timsC7 = 0
 
MzCalibrationInterfaceSPtr msp_mzCalibration = nullptr
 

Detailed Description

Todo:
write docs

Definition at line 47 of file timsframebase.h.

Constructor & Destructor Documentation

◆ TimsFrameBase() [1/2]

pappso::TimsFrameBase::TimsFrameBase ( std::size_t  timsId,
quint32  scanNum 
)

constructor for binary independant tims frame

Parameters
timsIdtims frame identifier in the database
scanNumthe total number of scans contained in this frame

Definition at line 38 of file timsframebase.cpp.

39{
40 qDebug() << timsId;
41 m_timsId = timsId;
42
43 m_scanNumber = scanNum;
44}
quint32 m_scanNumber
total number of scans contained in this frame
std::size_t m_timsId
Tims frame database id (the SQL identifier of this frame)

References m_scanNumber, and m_timsId.

◆ TimsFrameBase() [2/2]

pappso::TimsFrameBase::TimsFrameBase ( const TimsFrameBase other)

Copy constructor

Parameters
otherTODO

Definition at line 46 of file timsframebase.cpp.

47{
48}

◆ ~TimsFrameBase()

pappso::TimsFrameBase::~TimsFrameBase ( )
virtual

Destructor

Definition at line 50 of file timsframebase.cpp.

51{
52}

Member Function Documentation

◆ checkScanNum()

bool pappso::TimsFrameBase::checkScanNum ( std::size_t  scanNum) const

check that this scan number exists

Parameters
scanNumscan number in the frame in the order it lies in binary file, from 0 to N-1

Definition at line 102 of file timsframebase.cpp.

103{
104 if(scanNum >= m_scanNumber)
105 {
107 QObject::tr("Invalid scan number : scanNum %1 > m_scanNumber %2")
108 .arg(scanNum)
109 .arg(m_scanNumber));
110 }
111
112 return true;
113}

References m_scanNumber.

Referenced by pappso::TimsFrame::getMassSpectrumSPtr(), pappso::TimsFrameType1::getMassSpectrumSPtr(), pappso::TimsFrame::getNbrPeaks(), pappso::TimsFrame::getScanIndexList(), pappso::TimsFrameType1::getScanIndexList(), pappso::TimsFrame::getScanIntensities(), and pappso::TimsFrameType1::getScanIntensities().

◆ cumulateScansInRawMap()

void pappso::TimsFrameBase::cumulateScansInRawMap ( std::map< quint32, quint32 > &  rawSpectrum,
std::size_t  scanNumBegin,
std::size_t  scanNumEnd 
) const
virtual

cumulate scan list into a trace into a raw spectrum map

Parameters
rawSpectrumsimple map of integers to cumulate raw counts
scanNumBeginscan number in the frame in the order it lies in binary file, from 0 to N-1
scanNumEndscan number in the frame in the order it lies in binary file, from 0 to N-1

Reimplemented in pappso::TimsFrame.

Definition at line 149 of file timsframebase.cpp.

153{
154 throw PappsoException(
155 QObject::tr(
156 "ERROR unable to cumulateScansInRawMap in TimsFrameBase for scan "
157 "number begin %1 end %2")
158 .arg(scanNumBegin)
159 .arg(scanNumEnd));
160}

◆ cumulateScanToTrace()

Trace pappso::TimsFrameBase::cumulateScanToTrace ( std::size_t  scanNumBegin,
std::size_t  scanNumEnd 
) const
virtual

cumulate spectrum given a scan number range need the binary file

Parameters
scanNumBeginscan number in the frame in the order it lies in binary file, from 0 to N-1
scanNumEndscan number in the frame in the order it lies in binary file, from 0 to N-1

Reimplemented in pappso::TimsFrame.

Definition at line 139 of file timsframebase.cpp.

141{
142 throw PappsoException(
143 QObject::tr("ERROR unable to cumulateScanToTrace in TimsFrameBase for scan "
144 "number begin %1 end %2")
145 .arg(scanNumBegin)
146 .arg(scanNumEnd));
147}

◆ getDriftTime()

double pappso::TimsFrameBase::getDriftTime ( std::size_t  scanNum) const

get drift time of a scan number in milliseconds

Parameters
scanNumscan number in the frame in the order it lies in binary file, from 0 to N-1
Returns
time in milliseconds of mobility delay (drift time)

Definition at line 248 of file timsframebase.cpp.

249{
250 return (m_accumulationTime / (double)m_scanNumber) * ((double)scanNum);
251}
double m_accumulationTime
accumulation time in milliseconds

References m_accumulationTime, and m_scanNumber.

◆ getId()

std::size_t pappso::TimsFrameBase::getId ( ) const

◆ getIonMobilityTraceByMzIndexRange()

Trace pappso::TimsFrameBase::getIonMobilityTraceByMzIndexRange ( std::size_t  mz_index_lower_bound,
std::size_t  mz_index_upper_bound,
XicExtractMethod  method 
) const
virtual

get a mobility trace cumulating intensities inside the given mass index range

Parameters
mz_index_lower_boundraw mass index lower bound
mz_index_upper_boundraw mass index upper bound
methodmax or sum intensities

Definition at line 497 of file timsframebase.cpp.

501{
502 Trace im_trace;
503 DataPoint data_point;
504 for(quint32 i = 0; i < m_scanNumber; i++)
505 {
506 data_point.x = i;
507 data_point.y = 0;
508 qDebug() << "m_scanNumber=" << m_scanNumber << " i=" << i;
509 std::vector<quint32> index_list = getScanIndexList(i);
510 auto it_lower = std::find_if(index_list.begin(),
511 index_list.end(),
512 [mz_index_lower_bound](quint32 to_compare) {
513 if(to_compare < mz_index_lower_bound)
514 {
515 return false;
516 }
517 return true;
518 });
519
520
521 if(it_lower == index_list.end())
522 {
523 }
524 else
525 {
526
527
528 auto it_upper =
529 std::find_if(index_list.begin(),
530 index_list.end(),
531 [mz_index_upper_bound](quint32 to_compare) {
532 if(mz_index_upper_bound >= to_compare)
533 {
534 return false;
535 }
536 return true;
537 });
538 std::vector<quint32> intensity_list = getScanIntensities(i);
539 for(int j = std::distance(index_list.begin(), it_lower);
540 j < std::distance(index_list.begin(), it_upper);
541 j++)
542 {
543 if(method == XicExtractMethod::sum)
544 {
545 data_point.y += intensity_list[j];
546 }
547 else
548 {
549 data_point.y =
550 std::max((double)intensity_list[j], data_point.y);
551 }
552 }
553 }
554 im_trace.push_back(data_point);
555 }
556 qDebug();
557 return im_trace;
558}
virtual std::vector< quint32 > getScanIndexList(std::size_t scanNum) const
get raw index list for one given scan index are not TOF nor m/z, just index on digitizer
virtual std::vector< quint32 > getScanIntensities(std::size_t scanNum) const
get raw intensities without transformation from one scan it needs intensity normalization
@ sum
sum of intensities

References getScanIndexList(), getScanIntensities(), m_scanNumber, pappso::sum, pappso::DataPoint::x, and pappso::DataPoint::y.

◆ getMassSpectrumSPtr()

MassSpectrumSPtr pappso::TimsFrameBase::getMassSpectrumSPtr ( std::size_t  scanNum) const
virtual

get Mass spectrum with peaks for this scan number need the binary file

Parameters
scanNumscan number in the frame in the order it lies in binary file, from 0 to N-1

Reimplemented in pappso::TimsFrame, and pappso::TimsFrameType1.

Definition at line 131 of file timsframebase.cpp.

132{
133 throw PappsoException(
134 QObject::tr(
135 "ERROR unable to getMassSpectrumSPtr in TimsFrameBase for scan number %1")
136 .arg(scanNum));
137}

◆ getMaximumRawMassIndex()

quint32 pappso::TimsFrameBase::getMaximumRawMassIndex ( ) const
virtual

get the maximum raw mass index contained in this frame

Definition at line 461 of file timsframebase.cpp.

462{
463 quint32 max_value = 0;
464 for(quint32 i = 0; i < m_scanNumber; i++)
465 {
466 qDebug() << "m_scanNumber=" << m_scanNumber << " i=" << i;
467 std::vector<quint32> index_list = getScanIndexList(i);
468 auto it = std::max_element(index_list.begin(), index_list.end());
469 if(it != index_list.end())
470 {
471 max_value = std::max(max_value, *it);
472 }
473 }
474 return max_value;
475}

References getScanIndexList(), and m_scanNumber.

◆ getMsLevel()

unsigned int pappso::TimsFrameBase::getMsLevel ( ) const

Definition at line 176 of file timsframebase.cpp.

177{
178 if(m_msMsType == 0)
179 return 1;
180 return 2;
181}

References m_msMsType.

◆ getMzCalibrationInterfaceSPtr()

const MzCalibrationInterfaceSPtr & pappso::TimsFrameBase::getMzCalibrationInterfaceSPtr ( ) const
finalvirtual

get the MzCalibration model to compute mz and TOF for this frame

Definition at line 428 of file timsframebase.cpp.

429{
430 if(msp_mzCalibration == nullptr)
431 {
432
434 QObject::tr("ERROR in %1, %2, %3 msp_mzCalibration is null")
435 .arg(__FILE__)
436 .arg(__FUNCTION__)
437 .arg(__LINE__));
438 }
439 return msp_mzCalibration;
440}
MzCalibrationInterfaceSPtr msp_mzCalibration

References msp_mzCalibration.

Referenced by pappso::TimsFrame::XicComputeStructure::XicComputeStructure(), pappso::TimsFrame::cumulateScanToTrace(), pappso::TimsFrame::getMassSpectrumSPtr(), pappso::TimsFrameType1::getMassSpectrumSPtr(), getTraceFromCumulatedScans(), and getTraceFromCumulatedScansBuiltinCentroid().

◆ getNbrPeaks()

std::size_t pappso::TimsFrameBase::getNbrPeaks ( std::size_t  scanNum) const
virtual

get the number of peaks in this spectrum need the binary file

Parameters
scanNumscan number in the frame in the order it lies in binary file, from 0 to N-1

Reimplemented in pappso::TimsFrame, and pappso::TimsFrameType1.

Definition at line 116 of file timsframebase.cpp.

117{
118 throw PappsoException(
119 QObject::tr(
120 "ERROR unable to get number of peaks in TimsFrameBase for scan number %1")
121 .arg(scanNum));
122}

◆ getOneOverK0Transformation()

double pappso::TimsFrameBase::getOneOverK0Transformation ( std::size_t  scanNum) const

get 1/K0 value of a given scan (mobility value)

Parameters
scanNumscan number in the frame in the order it lies in binary file, from 0 to N-1

Definition at line 254 of file timsframebase.cpp.

255{
256 return 1 / (m_timsC6 + (m_timsC7 / getVoltageTransformation(scanNum)));
257}
double getVoltageTransformation(std::size_t scanNum) const
get voltage for a given scan number

References getVoltageTransformation(), m_timsC6, and m_timsC7.

◆ getScanIndexList()

std::vector< quint32 > pappso::TimsFrameBase::getScanIndexList ( std::size_t  scanNum) const
virtual

get raw index list for one given scan index are not TOF nor m/z, just index on digitizer

Reimplemented in pappso::TimsFrame, and pappso::TimsFrameType1.

Definition at line 478 of file timsframebase.cpp.

479{
480 throw PappsoException(
481 QObject::tr(
482 "ERROR unable to getScanIndexList in TimsFrameBase for scan number %1")
483 .arg(scanNum));
484}

Referenced by getIonMobilityTraceByMzIndexRange(), and getMaximumRawMassIndex().

◆ getScanIntensities()

std::vector< quint32 > pappso::TimsFrameBase::getScanIntensities ( std::size_t  scanNum) const
virtual

get raw intensities without transformation from one scan it needs intensity normalization

Reimplemented in pappso::TimsFrame, and pappso::TimsFrameType1.

Definition at line 488 of file timsframebase.cpp.

489{
490 throw PappsoException(
491 QObject::tr(
492 "ERROR unable to getScanIntensities in TimsFrameBase for scan number %1")
493 .arg(scanNum));
494}

Referenced by getIonMobilityTraceByMzIndexRange().

◆ getScanNumFromOneOverK0()

std::size_t pappso::TimsFrameBase::getScanNumFromOneOverK0 ( double  one_over_k0) const

get the scan number from a given 1/Ko mobility value

Parameters
one_over_k0the mobility value to tranform
Returns
integer the scan number in the frame in the order it lies in binary file, from 0 to N-1

Definition at line 261 of file timsframebase.cpp.

262{
263 double temp = 1 / one_over_k0;
264 temp = temp - m_timsC6;
265 temp = temp / m_timsC7;
266 temp = 1 / temp;
267 temp = temp - m_timsDvStart;
268 temp = temp / m_timsSlope + m_timsTtrans + m_timsNdelay;
269 return (std::size_t)std::round(temp);
270}

References m_timsC6, m_timsC7, m_timsDvStart, m_timsNdelay, m_timsSlope, and m_timsTtrans.

◆ getTime()

double pappso::TimsFrameBase::getTime ( ) const

Definition at line 184 of file timsframebase.cpp.

185{
186 return m_time;
187}
double m_time
retention time

References m_time.

◆ getTotalNumberOfScans()

std::size_t pappso::TimsFrameBase::getTotalNumberOfScans ( ) const
virtual

get the number of scans contained in this frame each scan represents an ion mobility slice

Definition at line 125 of file timsframebase.cpp.

126{
127 return m_scanNumber;
128}

References m_scanNumber.

Referenced by pappso::BaseColorMapPlotWidget::addColorMap().

◆ getTraceFromCumulatedScans()

pappso::Trace pappso::TimsFrameBase::getTraceFromCumulatedScans ( std::map< quint32, quint32 > &  accumulated_scans) const

transform accumulation of raw scans into a real mass spectrum

Definition at line 288 of file timsframebase.cpp.

290{
291 qDebug();
292 // qDebug();
293 // add flanking peaks
294 pappso::Trace local_trace;
295
296 MzCalibrationInterface *mz_calibration_p =
298
299
300 DataPoint element;
301 for(auto &scan_element : accumulated_scans)
302 {
303 // intensity normalization
304 element.y = ((double)scan_element.second) * 100.0 / m_accumulationTime;
305
306 // mz calibration
307 element.x = mz_calibration_p->getMzFromTofIndex(scan_element.first);
308
309 local_trace.push_back(element);
310 }
311 local_trace.sortX();
312
313 qDebug();
314 // qDebug();
315 return local_trace;
316}
virtual const MzCalibrationInterfaceSPtr & getMzCalibrationInterfaceSPtr() const final
get the MzCalibration model to compute mz and TOF for this frame
A simple container of DataPoint instances.
Definition: trace.h:147
void sortX()
Definition: trace.cpp:936

References getMzCalibrationInterfaceSPtr(), pappso::MzCalibrationInterface::getMzFromTofIndex(), m_accumulationTime, pappso::Trace::sortX(), pappso::DataPoint::x, and pappso::DataPoint::y.

◆ getTraceFromCumulatedScansBuiltinCentroid()

pappso::Trace pappso::TimsFrameBase::getTraceFromCumulatedScansBuiltinCentroid ( std::map< quint32, quint32 > &  accumulated_scans) const

transform accumulation of raw scans into a real mass spectrum with a simple centroid on raw integers

Definition at line 319 of file timsframebase.cpp.

321{
322 qDebug();
323 // qDebug();
324 // add flanking peaks
325 std::vector<quint32> keys;
326 transform(begin(accumulated_scans),
327 end(accumulated_scans),
328 back_inserter(keys),
329 [](std::map<quint32, quint32>::value_type const &pair) {
330 return pair.first;
331 });
332 std::sort(keys.begin(), keys.end());
333 pappso::DataPoint data_point_cumul;
334 data_point_cumul.x = 0;
335 data_point_cumul.y = 0;
336
337 pappso::Trace local_trace;
338
339 MzCalibrationInterface *mz_calibration_p =
341
342
343 quint32 last_key = 0;
344
345 for(quint32 key : keys)
346 {
347 if(key == last_key + 1)
348 {
349 // cumulate
350 if(accumulated_scans[key] > accumulated_scans[last_key])
351 {
352 if(data_point_cumul.x == last_key)
353 {
354 // growing peak
355 data_point_cumul.x = key;
356 data_point_cumul.y += accumulated_scans[key];
357 }
358 else
359 {
360 // new peak
361 // flush
362 if(data_point_cumul.y > 0)
363 {
364 // intensity normalization
365 data_point_cumul.y *= 100.0 / m_accumulationTime;
366
367
368 // mz calibration
369 data_point_cumul.x =
370 mz_calibration_p->getMzFromTofIndex(data_point_cumul.x);
371 local_trace.push_back(data_point_cumul);
372 }
373
374 // new point
375 data_point_cumul.x = key;
376 data_point_cumul.y = accumulated_scans[key];
377 }
378 }
379 else
380 {
381 data_point_cumul.y += accumulated_scans[key];
382 }
383 }
384 else
385 {
386 // flush
387 if(data_point_cumul.y > 0)
388 {
389 // intensity normalization
390 data_point_cumul.y *= 100.0 / m_accumulationTime;
391
392
393 // qDebug() << "raw data x=" << data_point_cumul.x;
394 // mz calibration
395 data_point_cumul.x =
396 mz_calibration_p->getMzFromTofIndex(data_point_cumul.x);
397 // qDebug() << "mz=" << data_point_cumul.x;
398 local_trace.push_back(data_point_cumul);
399 }
400
401 // new point
402 data_point_cumul.x = key;
403 data_point_cumul.y = accumulated_scans[key];
404 }
405
406 last_key = key;
407 }
408 // flush
409 if(data_point_cumul.y > 0)
410 {
411 // intensity normalization
412 data_point_cumul.y *= 100.0 / m_accumulationTime;
413
414
415 // mz calibration
416 data_point_cumul.x =
417 mz_calibration_p->getMzFromTofIndex(data_point_cumul.x);
418 local_trace.push_back(data_point_cumul);
419 }
420
421 local_trace.sortX();
422 qDebug();
423 // qDebug();
424 return local_trace;
425}
pappso_double x
Definition: datapoint.h:22
pappso_double y
Definition: datapoint.h:23

References getMzCalibrationInterfaceSPtr(), pappso::MzCalibrationInterface::getMzFromTofIndex(), m_accumulationTime, pappso::Trace::sortX(), pappso::DataPoint::x, and pappso::DataPoint::y.

◆ getVoltageTransformation()

double pappso::TimsFrameBase::getVoltageTransformation ( std::size_t  scanNum) const

get voltage for a given scan number

Parameters
scanNumscan number in the frame in the order it lies in binary file, from 0 to N-1
Returns
double volt measure

Definition at line 226 of file timsframebase.cpp.

227{
228 double v = m_timsDvStart +
229 m_timsSlope * ((double)scanNum - m_timsTtrans - m_timsNdelay);
230
231 if(v < m_timsVmin)
232 {
234 QObject::tr("ERROR in TimsFrame::getVoltageTransformation invalid tims "
235 "calibration, v < m_timsVmin"));
236 }
237
238
239 if(v > m_timsVmax)
240 {
242 QObject::tr("ERROR in TimsFrame::getVoltageTransformation invalid tims "
243 "calibration, v > m_timsVmax"));
244 }
245 return v;
246}

References m_timsDvStart, m_timsNdelay, m_timsSlope, m_timsTtrans, m_timsVmax, and m_timsVmin.

Referenced by getOneOverK0Transformation().

◆ hasSameCalibrationData()

bool pappso::TimsFrameBase::hasSameCalibrationData ( const TimsFrameBase other) const
virtual

tells if 2 tims frame has the same calibration data Usefull to know if raw data can be handled between frames

Definition at line 273 of file timsframebase.cpp.

274{
275 if((m_timsDvStart == other.m_timsDvStart) &&
276 (m_timsTtrans == other.m_timsTtrans) &&
277 (m_timsNdelay == other.m_timsNdelay) && (m_timsVmin == other.m_timsVmin) &&
278 (m_timsVmax == other.m_timsVmax) && (m_timsC6 == other.m_timsC6) &&
279 (m_timsC7 == other.m_timsC7) && (m_timsSlope == other.m_timsSlope))
280 {
281 return true;
282 }
283 return false;
284}

References m_timsC6, m_timsC7, m_timsDvStart, m_timsNdelay, m_timsSlope, m_timsTtrans, m_timsVmax, and m_timsVmin.

◆ setAccumulationTime()

void pappso::TimsFrameBase::setAccumulationTime ( double  accumulation_time_ms)

Definition at line 55 of file timsframebase.cpp.

56{
57 m_accumulationTime = accumulation_time_ms;
58}

References m_accumulationTime.

◆ setMsMsType()

void pappso::TimsFrameBase::setMsMsType ( quint8  type)

Definition at line 168 of file timsframebase.cpp.

169{
170
171 qDebug() << " m_msMsType=" << type;
172 m_msMsType = type;
173}

References m_msMsType.

◆ setMzCalibration()

void pappso::TimsFrameBase::setMzCalibration ( double  T1_frame,
double  T2_frame,
double  digitizerTimebase,
double  digitizerDelay,
double  C0,
double  C1,
double  C2,
double  C3,
double  C4,
double  T1_ref,
double  T2_ref,
double  dC1,
double  dC2 
)

Definition at line 62 of file timsframebase.cpp.

75{
76
77 /* MzCalibrationModel1 mzCalibration(temperature_correction,
78 digitizerTimebase,
79 digitizerDelay,
80 C0,
81 C1,
82 C2,
83 C3,
84 C4);
85 */
86 msp_mzCalibration = std::make_shared<MzCalibrationModel1>(T1_frame,
87 T2_frame,
88 digitizerTimebase,
89 digitizerDelay,
90 C0,
91 C1,
92 C2,
93 C3,
94 C4,
95 T1_ref,
96 T2_ref,
97 dC1,
98 dC2);
99}

References msp_mzCalibration.

◆ setMzCalibrationInterfaceSPtr()

void pappso::TimsFrameBase::setMzCalibrationInterfaceSPtr ( MzCalibrationInterfaceSPtr  mzCalibration)

Definition at line 443 of file timsframebase.cpp.

445{
446
447 if(mzCalibration == nullptr)
448 {
449
451 QObject::tr("ERROR in %1, %2, %3 msp_mzCalibration is null")
452 .arg(__FILE__)
453 .arg(__FUNCTION__)
454 .arg(__LINE__));
455 }
456 msp_mzCalibration = mzCalibration;
457}

References msp_mzCalibration.

◆ setTime()

void pappso::TimsFrameBase::setTime ( double  time)

Definition at line 162 of file timsframebase.cpp.

163{
164 m_time = time;
165}

References m_time.

◆ setTimsCalibration()

void pappso::TimsFrameBase::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 
)

Definition at line 195 of file timsframebase.cpp.

206{
207 if(tims_model_type != 2)
208 {
209 throw pappso::PappsoException(QObject::tr(
210 "ERROR in TimsFrame::setTimsCalibration tims_model_type != 2"));
211 }
212 m_timsDvStart = C2; // C2 from TimsCalibration
213 m_timsTtrans = C4; // C4 from TimsCalibration
214 m_timsNdelay = C0; // C0 from TimsCalibration
215 m_timsVmin = C8; // C8 from TimsCalibration
216 m_timsVmax = C9; // C9 from TimsCalibration
217 m_timsC6 = C6;
218 m_timsC7 = C7;
219
220
222 (C3 - m_timsDvStart) / C1; // //C3 from TimsCalibration // C2 from
223 // TimsCalibration // C1 from TimsCalibration
224}

References m_timsC6, m_timsC7, m_timsDvStart, m_timsNdelay, m_timsSlope, m_timsTtrans, m_timsVmax, and m_timsVmin.

Member Data Documentation

◆ m_accumulationTime

◆ m_msMsType

quint8 pappso::TimsFrameBase::m_msMsType = 0
protected

Definition at line 243 of file timsframebase.h.

Referenced by getMsLevel(), and setMsMsType().

◆ m_scanNumber

◆ m_time

double pappso::TimsFrameBase::m_time = 0
protected

retention time

Definition at line 247 of file timsframebase.h.

Referenced by pappso::TimsFrame::extractTimsXicListInRtRange(), getTime(), and setTime().

◆ m_timsC6

double pappso::TimsFrameBase::m_timsC6 = 0
protected

◆ m_timsC7

double pappso::TimsFrameBase::m_timsC7 = 0
protected

◆ m_timsDvStart

double pappso::TimsFrameBase::m_timsDvStart = 0
protected

◆ m_timsId

std::size_t pappso::TimsFrameBase::m_timsId
protected

Tims frame database id (the SQL identifier of this frame)

Warning
in sqlite, there is another field called TimsId : this is not that, because it is in fact an offset in bytes in the binary file.

Definition at line 237 of file timsframebase.h.

Referenced by pappso::TimsFrame::TimsFrame(), TimsFrameBase(), pappso::TimsFrameType1::TimsFrameType1(), getId(), and pappso::TimsFrameType1::lzfDecompressScan().

◆ m_timsNdelay

double pappso::TimsFrameBase::m_timsNdelay = 0
protected

◆ m_timsSlope

double pappso::TimsFrameBase::m_timsSlope
protected

◆ m_timsTtrans

double pappso::TimsFrameBase::m_timsTtrans = 0
protected

◆ m_timsVmax

double pappso::TimsFrameBase::m_timsVmax = 0
protected

◆ m_timsVmin

double pappso::TimsFrameBase::m_timsVmin = 0
protected

◆ msp_mzCalibration

MzCalibrationInterfaceSPtr pappso::TimsFrameBase::msp_mzCalibration = nullptr
protected

The documentation for this class was generated from the following files: