Blame view

globals.h 2.78 KB
0c9bf8ae   dmayerich   Case-sensitive er...
1
2
3
4
5
6
  #ifndef GLOBALS_H

  #define GLOBALS_H

  

  #include <vector>

  #include <string>

  #include <iostream>

4198e3be   dmayerich   Added polystyrene.
7
  #include "PerformanceData.h"

0c9bf8ae   dmayerich   Case-sensitive er...
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
78
79
80
81
82
  #include <complex>

  using namespace std;

  

  typedef float rtsFloat;

  

  struct SpecPair{

  	double nu;

  	double A;

  };

  

  struct Material{

  	vector<double> nu;

  	vector<complex<double> > eta;

  	string name;

  };

  

  enum SpecType {AbsorbanceSpecType, IntensitySpecType};

  enum OpticsType {TransmissionOpticsType, ReflectionOpticsType};

  

  extern PerformanceData PD;

  

  

  extern vector<vector<SpecPair> > RefSpectrum;

  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();

  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);

  

  //Window Parameters

  extern double nuMin;

  extern double nuMax;

  extern double aMin;

  extern double aMax;

  extern double dNu;

  extern bool dispRefSpec;

  extern bool dispSimSpec;

  extern bool dispSimK;

  extern bool dispMatK;

  extern bool dispSimN;

  extern bool dispMatN;

  extern SpecType dispSimType;

  extern bool dispNormalize;

  extern double dispNormFactor;

  

  

  extern double dispScaleK;

  extern double dispScaleN;

  

  //material parameters

  extern double radius;

  extern double baseIR;

  extern double cA;

  extern vector<SpecPair> EtaK;

  extern vector<SpecPair> EtaN;

  extern bool applyMaterial;

0c9bf8ae   dmayerich   Case-sensitive er...
83
84
85
86
87
  extern vector<Material> MaterialList;

  extern int currentMaterial;

  void ChangeAbsorbance();

  void SetMaterial();

  

4198e3be   dmayerich   Added polystyrene.
88
89
90
91
92
93
  //source parameters

  extern vector<SpecPair> SourceSpectrum;

  extern vector<SpecPair> SourceResampled;

  void ResampleSource();	//resample a source profile to match the sample points of the current material

  extern bool useSourceSpectrum;

  

0c9bf8ae   dmayerich   Case-sensitive er...
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
  //optical parameters

  extern double cNAi;

  extern double cNAo;

  extern double oNAi;

  extern double oNAo;

  extern OpticsType opticsMode;

  extern bool pointDetector;

  extern int objectiveSamples;

  

  //fitting parameters

  extern double minMSE;

  extern int maxFitIter;

  void EstimateMaterial();

  extern double scaleI0;

  extern double refSlope;

4198e3be   dmayerich   Added polystyrene.
109
110
  

  

39a7d6e9   dmayerich   Added dialog supp...
111
  //distortion maps

0c9bf8ae   dmayerich   Case-sensitive er...
112
  double ComputeDistortion();

4198e3be   dmayerich   Added polystyrene.
113
114
  void DistortionMap(float* distortionMap, int nSteps);

  

39a7d6e9   dmayerich   Added dialog supp...
115
  

0c9bf8ae   dmayerich   Case-sensitive er...
116
117
  

  

4198e3be   dmayerich   Added polystyrene.
118
  #endif