Vespucci  1.0.0
Vespucci Namespace Reference

A namespace for "global" functions, including math functions. More...

Namespaces

 External
 
 Math
 A namespace for math functions relating to linear least squares regression.
 

Classes

struct  GlobalGradient
 

Functions

bool SavePlot (QCustomPlot *plot, QString filename)
 Vespucci::SavePlot. More...
 
void SetQCPFonts (QCustomPlot *plot, const QFont &font)
 Vespucci::SetQCPFonts. More...
 
QProgressDialog * DisplayProgressDialog (QWidget *parent, QString title, QString text)
 
bool KeysAreEqual (QStringList &keys1, QStringList &keys2)
 
QVector< double > FromArmaVec (const arma::vec &data)
 
VESPUCCI_EXPORT bool SaveHDF5Obj (std::map< std::string, arma::mat * > objects, const std::string filename)
 
VESPUCCI_EXPORT bool SaveOldVespucciBinary (std::string filename, const arma::mat &spectra, const arma::vec &x, const arma::vec &y, const arma::vec &abscissa)
 Vespucci::SaveVespucciBinary. More...
 
VESPUCCI_EXPORT bool SaveText (std::string basename, const arma::mat &spectra, const arma::vec &x, const arma::vec &y, const arma::vec &abscissa, arma::file_type type)
 
VESPUCCI_EXPORT bool StitchDatasets (const arma::field< arma::field< arma::mat > > &datasets, arma::mat &spectra, arma::vec &x, arma::vec &y, arma::vec &abscissa)
 Vespucci::StitchDatasets. More...
 
VESPUCCI_EXPORT void ResetDataset (arma::mat &spectra, arma::vec &x, arma::vec &y, arma::vec &abscissa)
 
VESPUCCI_EXPORT std::string CleanString (const std::string &in)
 Vespucci::CleanString. More...
 

Detailed Description

A namespace for "global" functions, including math functions.

Function Documentation

std::string Vespucci::CleanString ( const std::string &  in)

Vespucci::CleanString.

Parameters
in
Returns
Remove any tabs or commas from an input string so armadillo parses it properly. This function is probably not necessary

Definition at line 240 of file vespucci.cpp.

QProgressDialog * Vespucci::DisplayProgressDialog ( QWidget *  parent,
QString  title,
QString  text 
)

Definition at line 156 of file global.cpp.

QVector< double > Vespucci::FromArmaVec ( const arma::vec &  data)

Definition at line 180 of file global.cpp.

bool Vespucci::KeysAreEqual ( QStringList &  keys1,
QStringList &  keys2 
)

Definition at line 168 of file global.cpp.

void Vespucci::ResetDataset ( arma::mat &  spectra,
arma::vec &  x,
arma::vec &  y,
arma::vec &  abscissa 
)

Definition at line 226 of file vespucci.cpp.

VESPUCCI_EXPORT bool Vespucci::SaveHDF5Obj ( std::map< std::string, arma::mat * >  objects,
const std::string  filename 
)
bool Vespucci::SaveOldVespucciBinary ( std::string  filename,
const arma::mat &  spectra,
const arma::vec &  x,
const arma::vec &  y,
const arma::vec &  abscissa 
)

Vespucci::SaveVespucciBinary.

Parameters
spectra
x
y
abscissa
Returns

Definition at line 36 of file vespucci.cpp.

bool Vespucci::SavePlot ( QCustomPlot plot,
QString  filename 
)

Vespucci::SavePlot.

Parameters
plot
filename
Returns

Definition at line 30 of file global.cpp.

bool Vespucci::SaveText ( std::string  basename,
const arma::mat &  spectra,
const arma::vec &  x,
const arma::vec &  y,
const arma::vec &  abscissa,
arma::file_type  type 
)

Definition at line 59 of file vespucci.cpp.

void Vespucci::SetQCPFonts ( QCustomPlot plot,
const QFont &  font 
)

Vespucci::SetQCPFonts.

Parameters
plot
font

Definition at line 136 of file global.cpp.

bool Vespucci::StitchDatasets ( const arma::field< arma::field< arma::mat > > &  datasets,
arma::mat &  spectra,
arma::vec &  x,
arma::vec &  y,
arma::vec &  abscissa 
)

Vespucci::StitchDatasets.

Parameters
datasets
spectraConcatenated spectra
xConcatenated x
yConcatenated y
abscissaThe spectral abscissa
Returns
Whether or not stitching operation was successful.

Each dataset must have the following format: dataset(0) = spectra; dataset(1) = abscissa; dataset(2) = x; dataset(3) = y; Datasets will be concatenated by "row blocks", which correspond to rows in datasets.

Each row block must have the same number of unique y values. Every dataset in a row block must have the same number of unique x values. Each dataset must have the same number of elements in the abscissa. If the above criteria are not met, the matrices are reset and the function returns false.

The spatial resolution is assumed to be identical for all datasets and is taken to be the difference between the largest and second-largest unique values in datasets(0,0). The spatial resolution is assumed to be the same for both x and y.

Row blocks are built from left to right. The dataset is constructed by layering row blocks from the bottom to the top.

For each dataset in a row block, x values are offset so that the minimum x value of a dataset is higher by one spatial resolution unit than the maximum of the previous dataset in the row block. Y values are offset by row block so that the minimum y value of a row block is higher by one spatial resolution unit than the maximum value of the previous block.

Definition at line 114 of file vespucci.cpp.