Vespucci  1.0.0
TestSession Class Reference

The TestSession class Loads mock datasets for testing classes. More...

#include <testsession.h>

Public Member Functions

 TestSession ()
 
void LoadMockData (QString manifest_path)
 
QSharedPointer< VespucciDatasetDatasetAt (int row)
 
void GetData (mat &spectra, vec &abscissa, vec &x, vec &y)
 
void GenerateMockData (mat &spectra, vec &abscissa, vec &x, vec &y, mat &peak_data, mat &baselines)
 TestSession::GenerateMockData. More...
 
vec GenerateLinearBaseline (double min, double max, uword size)
 
vec GenerateRamanBaseline (double a0, double a1, double a2, const vec &abscissa)
 
vec GenerateGaussian (vec abscissa, vec centers, vec fwhm, vec intensities)
 
vec GenerateLorentzian (vec abscissa, vec centers, vec fwhm, vec intensities)
 

Detailed Description

The TestSession class Loads mock datasets for testing classes.

Definition at line 29 of file testsession.h.

Constructor & Destructor Documentation

TestSession::TestSession ( )

Definition at line 22 of file testsession.cpp.

Member Function Documentation

QSharedPointer<VespucciDataset> TestSession::DatasetAt ( int  row)
arma::vec TestSession::GenerateGaussian ( vec  abscissa,
vec  centers,
vec  fwhm,
vec  intensities 
)

Definition at line 105 of file testsession.cpp.

arma::vec TestSession::GenerateLinearBaseline ( double  min,
double  max,
uword  size 
)

Definition at line 95 of file testsession.cpp.

vec TestSession::GenerateLorentzian ( vec  abscissa,
vec  centers,
vec  fwhm,
vec  intensities 
)
void TestSession::GenerateMockData ( mat &  spectra,
vec &  abscissa,
vec &  x,
vec &  y,
mat &  peak_data,
mat &  baselines 
)

TestSession::GenerateMockData.

Parameters
spectra
abscissa
x
yGenerate mock spectra This is a matrix containing 100 spectra in columns. The abscissa will consist of 100 to 4000 cm-1 with 4096 elements 50 spectra will have Gaussian peaks 50 spectra will have Lorentzian peaks For each peak type, there will be 5 unique spectra, each with 5 different baselines Peak centers will be uniformly distributed from 200 to 3800 cm-1 Peak widths will be uniformly distributed from 5 to 100 cm-1 Peak intensities will be uniformly distributed from 1000 to 50000 a.u. Basline types:
  • None
  • Typical Raman baseline (generated from linear regression of a quadratic function to 100 Si Raman signals)
  • Fluorescent Raman baseline (generated from linear regression of a quadratic function to 100 highly-fluorescent Rhodamine-6G Raman signals)
  • Average of typical and fluorescent baseline
  • Linear baseline from 0 to 25000 a.u.

Mock spectra for IR and MS signals will be created in the future

Definition at line 52 of file testsession.cpp.

arma::vec TestSession::GenerateRamanBaseline ( double  a0,
double  a1,
double  a2,
const vec &  abscissa 
)

Definition at line 100 of file testsession.cpp.

void TestSession::GetData ( mat &  spectra,
vec &  abscissa,
vec &  x,
vec &  y 
)
void TestSession::LoadMockData ( QString  manifest_path)

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