Vespucci  1.0.0
Vespucci::Math::Quantification Namespace Reference

A namespace for math functions relating to peak quantification. More...

Functions

VESPUCCI_EXPORT double FindBandwidth (const arma::vec &X, arma::uword min_index, arma::uword max_index, arma::vec &midline, arma::vec &baseline, double abscissa_step)
 Vespucci::Math::Quantification::FindBandwidth. More...
 
VESPUCCI_EXPORT arma::vec FindBandwidthMat (const arma::mat &X, arma::vec abscissa, double &min, double &max, arma::mat &midlines, arma::mat &baselines, arma::uvec &boundaries)
 Vespucci::Math::Quantification::FindBandwidthMat. More...
 
VESPUCCI_EXPORT arma::mat CorrelationMat (const arma::mat &X, const arma::mat &control)
 
VESPUCCI_EXPORT double IntegratePeak (const arma::vec &X, arma::uword min_index, arma::uword max_index, double abscissa_step, arma::vec &baseline, bool correct_baseline)
 Vespucci::Math::Quantification::IntegratePeak. More...
 
VESPUCCI_EXPORT arma::vec IntegratePeakMat (const arma::mat &X, const arma::vec &abscissa, double &min, double &max, arma::mat &baselines, arma::uvec &boundaries, bool correct_baseline)
 Vespucci::Math::Quantification::IntegratePeakMat. More...
 
VESPUCCI_EXPORT arma::mat IntegratePeaksMat (const arma::mat &X, const arma::vec &abscissa, double &first_min, double &first_max, double &second_min, double &second_max, arma::mat &first_baselines, arma::mat &second_baselines, arma::uvec &boundaries)
 Vespucci::Math::Quantification::IntegratePeaksMat. More...
 
VESPUCCI_EXPORT arma::vec IntegratePeakMat (const arma::mat &X, const arma::vec &abscissa, double &min, double &max, arma::field< arma::vec > &baselines, arma::uvec &boundaries, arma::uword bound_window, bool correct_baseline)
 Vespucci::Math::Quantification::IntegratePeakMat. More...
 
VESPUCCI_EXPORT arma::mat IntegratePeaksMat (const arma::mat &X, const arma::vec &abscissa, double &first_min, double &first_max, double &second_min, double &second_max, arma::field< arma::vec > &first_baselines, arma::field< arma::vec > &second_baselines, arma::uvec &boundaries, arma::uword bound_window)
 Vespucci::Math::Quantification::IntegratePeaksMat. More...
 
VESPUCCI_EXPORT double FindPeakMax (const arma::vec &X, arma::uword min_index, arma::uword max_index, arma::uword &position)
 Vespucci::Math::Quantification::FindPeakMax. More...
 
VESPUCCI_EXPORT arma::vec FindPeakMaxMat (const arma::mat &X, arma::vec abscissa, double &min, double &max, arma::vec &positions)
 Vespucci::Math::Quantification::FindPeakMaxMat. More...
 
VESPUCCI_EXPORT arma::mat FindPeakMaxesMat (const arma::mat &X, arma::vec abscissa, double &first_min, double &first_max, double &second_min, double &second_max, arma::mat positions)
 Vespucci::Math::Quantification::FindPeakMaxesMat. More...
 
VESPUCCI_EXPORT arma::rowvec QuantifyPeak (const arma::vec &spectrum, const arma::vec &abscissa, double &min, double &max, arma::uword bound_window, arma::mat &total_baseline, arma::mat &inflection_baseline)
 Vespucci::Math::Quantification::QuantifyPeak Performs empirical analysis of peak shape and magnitude. More...
 
VESPUCCI_EXPORT arma::mat QuantifyPeakMat (const arma::mat &spectra, const arma::vec &abscissa, double &min, double &max, arma::uword bound_window, arma::mat &total_baselines, arma::field< arma::mat > &inflection_baselines)
 
VESPUCCI_EXPORT arma::mat ConvertInflectionBaselines (const arma::field< arma::mat > &inflection_baselines)
 Vespucci::Math::Quantification::ConvertInflectionBaselines. More...
 
VESPUCCI_EXPORT arma::rowvec FitGaussianPeak (const arma::vec &spectrum, const arma::vec &abscissa, double &min, double &max, arma::mat &baseline, arma::mat &fit, arma::rowvec &params, arma::mat residuals)
 Vespucci::Math::Quantification::FitGaussianPeak Fit and analyze data with a Gaussian function. More...
 
VESPUCCI_EXPORT arma::mat FitGaussianPeakMat (const arma::mat &spectra, const arma::vec &abscissa, double &min, double &max, arma::mat &baselines, arma::mat &fits, arma::mat &params, arma::mat &residuals)
 
VESPUCCI_EXPORT arma::rowvec FitLorentzianPeak (const arma::vec &spectrum, const arma::vec &abscissa, double &min, double &max, arma::mat &baseline, arma::mat &fit, arma::rowvec &params, arma::mat residuals)
 Vespucci::Math::Quantification::FitLorentzianPeak. More...
 
VESPUCCI_EXPORT arma::mat FitLorentzianPeakMat (const arma::mat &spectra, const arma::vec &abscissa, double &min, double &max, arma::mat &baselines, arma::mat &fits, arma::mat &params, arma::mat &residuals)
 Vespucci::Math::Quantification::FitLorentzianPeakMat. More...
 
VESPUCCI_EXPORT arma::rowvec FitVoigtPeak (const arma::vec &spectrum, const arma::vec &abscissa, double &min, double &max, arma::mat &baseline, arma::mat &fit, arma::rowvec &params, arma::mat residuals)
 Vespucci::Math::Quantification::FitVoigtPeak. More...
 
VESPUCCI_EXPORT arma::mat FitVoigtPeakMat (const arma::mat &spectra, const arma::vec &abscissa, double &min, double &max, arma::mat &baselines, arma::mat &fits, arma::mat &params, arma::mat &residuals)
 Vespucci::Math::Quantification::FitVoigtPeakMat. More...
 

Detailed Description

A namespace for math functions relating to peak quantification.

Function Documentation

arma::mat Vespucci::Math::Quantification::ConvertInflectionBaselines ( const arma::field< arma::mat > &  inflection_baselines)

Vespucci::Math::Quantification::ConvertInflectionBaselines.

Parameters
inflection_baselines
Returns
Create a matrix containing inflection point baselines. If a baseline does not contain a value for a particular abscissa point, the value is NaN first column will be the abscissa

Definition at line 198 of file quantification.cpp.

arma::mat Vespucci::Math::Quantification::CorrelationMat ( const arma::mat &  X,
const arma::mat &  control 
)

Definition at line 22 of file correlation.cpp.

double Vespucci::Math::Quantification::FindBandwidth ( const arma::vec &  X,
arma::uword  min_index,
arma::uword  max_index,
arma::vec &  midline,
arma::vec &  baseline,
double  abscissa_step 
)

Vespucci::Math::Quantification::FindBandwidth.

Parameters
X
min_index
max_index
midline
abscissa_step
Returns
Finds the full-width at half maximum of a peak bound by min_index and max_index

Definition at line 32 of file bandwidth.cpp.

arma::vec Vespucci::Math::Quantification::FindBandwidthMat ( const arma::mat &  X,
arma::vec  abscissa,
double &  min,
double &  max,
arma::mat &  midlines,
arma::mat &  baselines,
arma::uvec &  boundaries 
)

Vespucci::Math::Quantification::FindBandwidthMat.

Parameters
X
abscissa
min
max
midlines
baselines
Returns
Finds the bandwidth of every column of a arma::matrix.

Definition at line 93 of file bandwidth.cpp.

double Vespucci::Math::Quantification::FindPeakMax ( const arma::vec &  X,
arma::uword  min_index,
arma::uword  max_index,
arma::uword &  position 
)

Vespucci::Math::Quantification::FindPeakMax.

Parameters
X
min_index
max_index
position
Returns
Finds the maximum of a peak bound by min_index and max_index

Definition at line 31 of file maximum.cpp.

arma::mat Vespucci::Math::Quantification::FindPeakMaxesMat ( const arma::mat &  X,
arma::vec  abscissa,
double &  first_min,
double &  first_max,
double &  second_min,
double &  second_max,
arma::mat  positions 
)

Vespucci::Math::Quantification::FindPeakMaxesMat.

Parameters
X
abscissa
first_min
first_max
second_min
second_max
positions
Returns
Finds two peaks in the manner of FindPeakMaxMat

Definition at line 84 of file maximum.cpp.

arma::vec Vespucci::Math::Quantification::FindPeakMaxMat ( const arma::mat &  X,
arma::vec  abscissa,
double &  min,
double &  max,
arma::vec &  positions 
)

Vespucci::Math::Quantification::FindPeakMaxMat.

Parameters
X
abscissa
min
max
positions
Returns
Iterates FindPeakMat over the columns of a arma::matrix. Finds the indices of specified min and max inputs

Definition at line 50 of file maximum.cpp.

arma::rowvec Vespucci::Math::Quantification::FitGaussianPeak ( const arma::vec &  spectrum,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::mat &  baseline,
arma::mat &  fit,
arma::rowvec &  params,
arma::mat  residuals 
)

Vespucci::Math::Quantification::FitGaussianPeak Fit and analyze data with a Gaussian function.

Parameters
spectrum
abscissa
min
max
baseline
fit
params
residuals
Returns

Definition at line 238 of file quantification.cpp.

arma::mat Vespucci::Math::Quantification::FitGaussianPeakMat ( const arma::mat &  spectra,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::mat &  baselines,
arma::mat &  fits,
arma::mat &  params,
arma::mat &  residuals 
)

Definition at line 279 of file quantification.cpp.

arma::rowvec Vespucci::Math::Quantification::FitLorentzianPeak ( const arma::vec &  spectrum,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::mat &  baseline,
arma::mat &  fit,
arma::rowvec &  params,
arma::mat  residuals 
)

Vespucci::Math::Quantification::FitLorentzianPeak.

Parameters
spectrum
abscissa
min
max
baseline
fit
params
residuals
Returns

Definition at line 353 of file quantification.cpp.

arma::mat Vespucci::Math::Quantification::FitLorentzianPeakMat ( const arma::mat &  spectra,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::mat &  baselines,
arma::mat &  fits,
arma::mat &  params,
arma::mat &  residuals 
)

Vespucci::Math::Quantification::FitLorentzianPeakMat.

Parameters
spectra
abscissa
min
max
baselines
fits
params
residuals
Returns

Definition at line 406 of file quantification.cpp.

arma::rowvec Vespucci::Math::Quantification::FitVoigtPeak ( const arma::vec &  spectrum,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::mat &  baseline,
arma::mat &  fit,
arma::rowvec &  params,
arma::mat  residuals 
)

Vespucci::Math::Quantification::FitVoigtPeak.

Parameters
spectrum
abscissa
min
max
baseline
fit
params
residuals
Returns

Definition at line 481 of file quantification.cpp.

arma::mat Vespucci::Math::Quantification::FitVoigtPeakMat ( const arma::mat &  spectra,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::mat &  baselines,
arma::mat &  fits,
arma::mat &  params,
arma::mat &  residuals 
)

Vespucci::Math::Quantification::FitVoigtPeakMat.

Parameters
spectra
abscissa
min
max
baselines
fits
params
residuals
Returns

Definition at line 536 of file quantification.cpp.

double Vespucci::Math::Quantification::IntegratePeak ( const arma::vec &  X,
arma::uword  min_index,
arma::uword  max_index,
double  abscissa_step,
arma::vec &  baseline,
bool  correct_baseline 
)

Vespucci::Math::Quantification::IntegratePeak.

Parameters
X
min_index
max_index
abscissa_step
baseline
Returns
Takes a Riemann sum under a peak defined by certain indices

Definition at line 31 of file integration.cpp.

arma::vec Vespucci::Math::Quantification::IntegratePeakMat ( const arma::mat &  X,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::mat &  baselines,
arma::uvec &  boundaries,
bool  correct_baseline 
)

Vespucci::Math::Quantification::IntegratePeakMat.

Parameters
X
abscissa
min
max
baselines
Returns
Finds the index of specified start and end values, then calls IntegratePeak on each column of the arma::matrix

Definition at line 57 of file integration.cpp.

arma::vec Vespucci::Math::Quantification::IntegratePeakMat ( const arma::mat &  X,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::field< arma::vec > &  baselines,
arma::uvec &  boundaries,
arma::uword  bound_window,
bool  correct_baseline 
)

Vespucci::Math::Quantification::IntegratePeakMat.

Parameters
X
abscissa
min
max
baselines
boundaries
bound_window
Returns
Performs single peak Riemann sum integration. If find_boundaries is true, then will estimate the actual boundaries

Definition at line 147 of file integration.cpp.

arma::mat Vespucci::Math::Quantification::IntegratePeaksMat ( const arma::mat &  X,
const arma::vec &  abscissa,
double &  first_min,
double &  first_max,
double &  second_min,
double &  second_max,
arma::mat &  first_baselines,
arma::mat &  second_baselines,
arma::uvec &  boundaries 
)

Vespucci::Math::Quantification::IntegratePeaksMat.

Parameters
X
abscissa
first_min
first_max
second_min
second_max
first_baselines
second_baselines
Returns
Performs two peak integrations

Definition at line 91 of file integration.cpp.

arma::mat Vespucci::Math::Quantification::IntegratePeaksMat ( const arma::mat &  X,
const arma::vec &  abscissa,
double &  first_min,
double &  first_max,
double &  second_min,
double &  second_max,
arma::field< arma::vec > &  first_baselines,
arma::field< arma::vec > &  second_baselines,
arma::uvec &  boundaries,
arma::uword  bound_window 
)

Vespucci::Math::Quantification::IntegratePeaksMat.

Parameters
X
abscissa
first_min
first_max
second_min
second_max
first_baselines
second_baselines
boundaries
bound_window
Returns

Definition at line 199 of file integration.cpp.

arma::rowvec Vespucci::Math::Quantification::QuantifyPeak ( const arma::vec &  spectrum,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::uword  bound_window,
arma::mat &  total_baseline,
arma::mat &  inflection_baseline 
)

Vespucci::Math::Quantification::QuantifyPeak Performs empirical analysis of peak shape and magnitude.

Parameters
spectrum
abscissa
min
max
bound_window
baseline
Returns
row vector with following quantities: Peak Center Intensity Corrected Intensity Riemann Sum Corrected Riemann Sum Riemann Sum between inflection points Corrected Riemann Sum between inflextion points Empirical Full-width at half maximum.

Definition at line 42 of file quantification.cpp.

arma::mat Vespucci::Math::Quantification::QuantifyPeakMat ( const arma::mat &  spectra,
const arma::vec &  abscissa,
double &  min,
double &  max,
arma::uword  bound_window,
arma::mat &  total_baselines,
arma::field< arma::mat > &  inflection_baselines 
)

Definition at line 153 of file quantification.cpp.