-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtemperaturecorrection.h
More file actions
77 lines (45 loc) · 1.76 KB
/
temperaturecorrection.h
File metadata and controls
77 lines (45 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
#ifndef TEMPERATURECORRECTION_H
#define TEMPERATURECORRECTION_H
#include <iostream>
#include "computetaylor.h"
#include <vector>
#include <numeric>
#include <QMap>
#include "common/math/polynomials/singleVariablePolynomial.h"
// This is intended as a specialized class
// That applies temperature correction to Echelles by evaluating a taylor polynomial
// created by using the computeTaylor class
class TemperatureCorrection
{
public:
TemperatureCorrection();
void storePixelandWavelengthOrderTable();
void retrieveBetas(int id);
void calculateShifts();
std::vector<double> findCorrectedWavelengthAndYValue(int OL, double x);
std::vector<double> findKClosestValue(std::vector<double> unsortedVector, double numberOfInterest, int k);
void printCSV();
double interpolatePoint(double x1, double x2, double x);
std::vector<double> calculateMeanAndStDev(std::vector<double> inputVector);
void truncateData(int numberofPointstoCutfromSides);
ComputeTaylor taylorPolynomialX;
ComputeTaylor taylorPolynomialY;
std::vector<double> betasX;
std::vector<double> betasY;
//Storage container in the form
//QMap<order,vector<pair<Yvalue,Wavelength>>
QMap<int, std::vector<pair<double,double>>> unCorrected;
QMap<int,std::vector<double>> wavelength;
QMap<int,std::vector<double>> newWavelength;
QMap<int,std::vector<double>> pixelY;
QMap<int,std::vector<double>> xPlusDeltaX;
QMap<int,std::vector<double>> yPlusDeltaY;
QMap<int,std::vector<double>> correctedY;
QMap<int,std::vector<double>> splineCheckMap;
// Variables
double X_mean=(2048.0/2.0)-1.0;
double Y_mean=(508.0/2.0)-1.0;
double OL_mean=19.0;
double temperature_mean=31.1843;
};
#endif // TEMPERATURECORRECTION_H