da3d4e0e
dmayerich
Initial commit.
|
1
2
3
4
5
6
7
8
9
10
|
#ifndef GLOBALS_H
#define GLOBALS_H
#include <vector>
#include <string>
#include <iostream>
#include "PerformanceData.h"
#include <complex>
using namespace std;
|
52a5fe9d
dmayerich
Added double supp...
|
11
12
|
typedef float rtsFloat;
|
da3d4e0e
dmayerich
Initial commit.
|
13
|
struct SpecPair{
|
52a5fe9d
dmayerich
Added double supp...
|
14
15
|
double nu;
double A;
|
da3d4e0e
dmayerich
Initial commit.
|
16
17
18
|
};
struct Material{
|
52a5fe9d
dmayerich
Added double supp...
|
19
|
vector<double> nu;
|
bfe3f56b
dmayerich
Fixed Linux compa...
|
20
|
vector<complex<double> > eta;
|
da3d4e0e
dmayerich
Initial commit.
|
21
22
23
24
25
26
27
28
29
|
string name;
};
enum SpecType {AbsorbanceSpecType, IntensitySpecType};
enum OpticsType {TransmissionOpticsType, ReflectionOpticsType};
extern PerformanceData PD;
|
bfe3f56b
dmayerich
Fixed Linux compa...
|
30
|
extern vector<vector<SpecPair> > RefSpectrum;
|
da3d4e0e
dmayerich
Initial commit.
|
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
|
extern int currentSpec;
extern vector<SpecPair> SimSpectrum;
//IO Functions
vector<SpecPair> LoadSpectrum(string filename);
vector<SpecPair> SetReferenceSpectrum(char* text);
void SaveState();
void LoadState();
void SetDefaults();
void SaveSimulation(string fileName);
void SaveK(string fileName);
void SaveN(string fileName);
void LoadMaterial(string fileNameK, string fileNameN, string materialName);
void LoadMaterial(string fileNameK, string materialName);
//Display Functions
void FitDisplay();
//Update Functions
void UpdateDisplay();
void SimulateSpectrum();
|
52a5fe9d
dmayerich
Added double supp...
|
52
53
54
|
void cudaKramersKronig(double* cpuN, double* cpuK, int nVals, double nuStart, double nuEnd, double nOffset);
void cudaComputeSpectrum(double* cpuI, double* cpuB, double* alpha,
int Nl, int nLambda, double oThetaI, double oThetaO, double cThetaI, double cThetaO, int nSamples);
|
da3d4e0e
dmayerich
Initial commit.
|
55
56
|
//Window Parameters
|
52a5fe9d
dmayerich
Added double supp...
|
57
58
59
60
61
|
extern double nuMin;
extern double nuMax;
extern double aMin;
extern double aMax;
extern double dNu;
|
da3d4e0e
dmayerich
Initial commit.
|
62
63
64
65
66
67
68
69
|
extern bool dispRefSpec;
extern bool dispSimSpec;
extern bool dispSimK;
extern bool dispMatK;
extern bool dispSimN;
extern bool dispMatN;
extern SpecType dispSimType;
extern bool dispNormalize;
|
52a5fe9d
dmayerich
Added double supp...
|
70
|
extern double dispNormFactor;
|
da3d4e0e
dmayerich
Initial commit.
|
71
72
|
|
52a5fe9d
dmayerich
Added double supp...
|
73
74
|
extern double dispScaleK;
extern double dispScaleN;
|
da3d4e0e
dmayerich
Initial commit.
|
75
76
|
//material parameters
|
52a5fe9d
dmayerich
Added double supp...
|
77
78
79
|
extern double radius;
extern double baseIR;
extern double cA;
|
da3d4e0e
dmayerich
Initial commit.
|
80
81
82
83
84
85
86
87
88
89
90
|
extern vector<SpecPair> EtaK;
extern vector<SpecPair> EtaN;
extern bool applyMaterial;
//extern vector<SpecPair> KMaterial;
//extern vector<SpecPair> NMaterial;
extern vector<Material> MaterialList;
extern int currentMaterial;
void ChangeAbsorbance();
void SetMaterial();
//optical parameters
|
52a5fe9d
dmayerich
Added double supp...
|
91
92
93
94
|
extern double cNAi;
extern double cNAo;
extern double oNAi;
extern double oNAo;
|
da3d4e0e
dmayerich
Initial commit.
|
95
96
97
98
99
|
extern OpticsType opticsMode;
extern bool pointDetector;
extern int objectiveSamples;
//fitting parameters
|
52a5fe9d
dmayerich
Added double supp...
|
100
|
extern double minMSE;
|
da3d4e0e
dmayerich
Initial commit.
|
101
102
|
extern int maxFitIter;
void EstimateMaterial();
|
52a5fe9d
dmayerich
Added double supp...
|
103
104
|
extern double scaleI0;
extern double refSlope;
|
da3d4e0e
dmayerich
Initial commit.
|
105
|
|
52a5fe9d
dmayerich
Added double supp...
|
106
|
double ComputeDistortion();
|
da3d4e0e
dmayerich
Initial commit.
|
107
108
109
110
|
void MinimizeDistortion();
#endif
|