53 mat &peak_data, mat &baselines)
61 abscissa = linspace(100, 4000, 4096);
62 spectra = zeros(4096, 100);
63 vec coords = linspace(0, 9, 10);
65 while (y.n_rows < 100)
66 y = join_vert(y, coords);
70 while (x.n_rows < 100)
71 x = join_vert(x, (x_row++) * ones(10));
72 mat unique_baselines(4096, 5);
73 unique_baselines.col(0) = zeros(4096);
76 unique_baselines.col(3) = 0.5 * (unique_baselines.col(1), unique_baselines.col(2));
77 unique_baselines.col(4) = linspace(0, 25000, 4096);
78 vec peak_centers = (3600 * randu<vec>(4096)) + (200 * ones(4096));
79 vec peak_intensities = (49000 * randu<vec>(4096)) + (1000 * ones(4096));
80 vec peak_fwhm = (95 * randu<vec>(4096)) + (5 * ones(4096));
81 for (uword i = 0; i < 50; ++i){
82 for (uword j = 0; j < 5; ++j){
83 vec peak_center = peak_centers.col(j);
84 vec peak_intensity = peak_intensities.col(j);
85 vec peak_width = peak_fwhm.col(j);
86 for (uword k = 0; k < 5; ++j){
87 vec baseline = baselines.col(k);
88 baselines.col(i) = baseline;
97 return linspace(min, max, size);
102 return a0 + a1*abscissa + a2*arma::pow(abscissa, 2);
vec GenerateLinearBaseline(double min, double max, uword size)
vec GenerateRamanBaseline(double a0, double a1, double a2, const vec &abscissa)
VESPUCCI_EXPORT arma::uword max(arma::uword a, arma::uword b)
Vespucci::Math::max.
vec GenerateGaussian(vec abscissa, vec centers, vec fwhm, vec intensities)
VESPUCCI_EXPORT arma::uword min(arma::uword a, arma::uword b)
Vespucci::Math::min.
void GenerateMockData(mat &spectra, vec &abscissa, vec &x, vec &y, mat &peak_data, mat &baselines)
TestSession::GenerateMockData.