Vespucci  1.0.0
testsession.h
Go to the documentation of this file.
1 /*******************************************************************************
2  Copyright (C) 2014-2016 Wright State University - All Rights Reserved
3  Daniel P. Foose - Maintainer/Lead Developer
4 
5  This file is part of Vespucci.
6 
7  Vespucci is free software: you can redistribute it and/or modify
8  it under the terms of the GNU General Public License as published by
9  the Free Software Foundation, either version 3 of the License, or
10  (at your option) any later version.
11 
12  Vespucci is distributed in the hope that it will be useful,
13  but WITHOUT ANY WARRANTY; without even the implied warranty of
14  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15  GNU General Public License for more details.
16 
17  You should have received a copy of the GNU General Public License
18  along with Vespucci. If not, see <http://www.gnu.org/licenses/>.
19 *******************************************************************************/
20 #ifndef TESTSESSION_H
21 #define TESTSESSION_H
22 #include "../Vespucci/Data/Dataset/vespuccidataset.h"
23 #include "test.h"
24 using namespace std;
25 using namespace arma;
30 {
31 public:
32  TestSession();
33  void LoadMockData(QString manifest_path);
34  QSharedPointer<VespucciDataset> DatasetAt(int row);
35  void GetData(mat &spectra, vec &abscissa, vec &x, vec &y);
36 
37  void GenerateMockData(mat &spectra, vec &abscissa, vec &x, vec &y, mat &peak_data, mat &baselines);
38  vec GenerateLinearBaseline(double min, double max, uword size);
39  vec GenerateRamanBaseline(double a0, double a1, double a2, const vec &abscissa);
40  vec GenerateGaussian(vec abscissa, vec centers, vec fwhm, vec intensities);
41  vec GenerateLorentzian(vec abscissa, vec centers, vec fwhm, vec intensities);
42 private:
43  QVector<QSharedPointer<VespucciDataset> > datasets_;
44  QVector<mat> spectra_;
45  QVector<mat> abscissa_;
46  QVector<mat> x_;
47  QVector<mat> y_;
48 
49 };
50 
51 #endif // TESTSESSION_H
The TestSession class Loads mock datasets for testing classes.
Definition: testsession.h:29
VESPUCCI_EXPORT arma::uword max(arma::uword a, arma::uword b)
Vespucci::Math::max.
Definition: accessory.cpp:237
VESPUCCI_EXPORT arma::uword min(arma::uword a, arma::uword b)
Vespucci::Math::min.
Definition: accessory.cpp:249