-
Notifications
You must be signed in to change notification settings - Fork 0
/
OpticalSetup.cpp
63 lines (53 loc) · 1.79 KB
/
OpticalSetup.cpp
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
/*
* OpticalSetup.cpp
*
* Created on: Feb 19, 2014
* Author: dailos
*/
//Rename as OpticalSetup
#include <cmath>
#include "OpticalSetup.h"
#include <iostream>
OpticalSetup::OpticalSetup()
{
workingLambda_ = 4.69600e-7;
pixelSizeArcsec_ = 0.072;
telescopeDiameter_ = 0.475; //(meters)
defocusTranslationAlongOpticalAxis_ = 0.0082; //(meters)
focalLength_ = 0.475; //(meters)
}
OpticalSetup::OpticalSetup(const unsigned long& imageSize)
{
workingLambda_ = 4.69600e-7;
pixelSizeArcsec_ = 0.072;
telescopeDiameter_ = 0.475; //(meters)
defocusTranslationAlongOpticalAxis_ = 0.0082; //(meters)
focalLength_ = 22.35; //(meters)
imageSize_ = imageSize;
double pixelSizeRadians = (pixelSizeArcsec_ * 3.141516) / (180.0 * 3600.0);
double cutoffFrequencyRadians = telescopeDiameter_ / workingLambda_; //Angular cutoff frequency
double sampleIntervalRadians = 1.0 / (imageSize_ * pixelSizeRadians);
pupilRadiousPixels_ = cutoffFrequencyRadians / (2.0 * sampleIntervalRadians);
unsigned long cutoffPixelFineTuning = 1.0; //Constant to decrese cutoff effective value
cutoffPixel_ = 2.0 * pupilRadiousPixels_; // - cutoffPixelFineTuning;
const double pi = 3.14159265359;
//k == 1 means phase shift at the edge of the aperture equal to pi radians or 1/2 waves (two times the diversity peak to peak)
k_ = (-1.0) * std::pow(telescopeDiameter_/focalLength_,2.0) * defocusTranslationAlongOpticalAxis_/(workingLambda_ * 4.0);
diversity_ptp_ = 0.985;
}
OpticalSetup::~OpticalSetup()
{
// TODO Auto-generated destructor stub
}
/*
//Mats setup:
workingLambda_ = 4.69600e-7;
pixelSizeArcsec_ = 0.072;
telescopeDiameter_ = 0.475; //(meters)
a4_ = -1.97;
//Joseantonio setup:
workingLambda_ = 5250.6e-10; //(meters)
pixelSizeArcsec_ = 0.055;
telescopeDiameter_ = 1.0; //(meters)
a4_ = -2.21209;
*/