mirror of
https://github.com/yosata/fourierOptics.git
synced 2026-10-29 20:51:10 +00:00
Added descriptions to all scripts, checked functioning
This commit is contained in:
1 parent
9ce4b7045f
commit
7cbaec6ff9
48 files changed
+262
-255
No files matched your search
@@ -1,14 +1,22 @@
|
||||
#!/usr/bin/env Python3
|
||||
import numpy as np
|
||||
from pdb import set_trace
|
||||
import matplotlib.pyplot as plt
|
||||
from matplotlib.ticker import FormatStrFormatter
|
||||
from matplotlib.colors import LogNorm
|
||||
import time
|
||||
import sys
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Analyses/Python/Analytical/Fourier Optics')
|
||||
from fourierOptics import *
|
||||
from scipy import interpolate
|
||||
import sys
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Documents/Published/FourierOptics GitHub release/')
|
||||
from fourierOptics import *
|
||||
|
||||
'''
|
||||
Description:
|
||||
This early script simulates a dispersed PSF. By rotating the
|
||||
ADC prisms we can inspect the change in the dispersion.
|
||||
The theoretical best position of the ADC did not result in
|
||||
an undispersed PSF, for some reason.
|
||||
'''
|
||||
|
||||
|
||||
def perform_padding(A, xs, ys):
|
||||
assert A.shape[0] <= xs and A.shape[1] <= ys, 'New size is smaller than array size.'
|
||||
@@ -101,10 +109,11 @@ if __name__ == '__main__':
|
||||
|
||||
ELT_ADC = ADCObject()
|
||||
|
||||
# optAngle = ELT_ADC.find_optimum_angle(17.9, lList[0], lList[-1])
|
||||
# print(optAngle)
|
||||
optAngle = ELT_ADC.find_optimum_angle(17.9, lList[0], lList[-1])
|
||||
print(optAngle)
|
||||
print('ADC angle now set to {:.4f}'.format(ELT_ADC.theta))
|
||||
# ELT_ADC.set_orientation(180)
|
||||
ELT_ADC.set_orientation(-optAngle+90)
|
||||
|
||||
ELT_CAM = ParaxialLens(CA=89.2, f=4278.32701, name='MCD-CAM')
|
||||
|
||||
@@ -147,8 +156,8 @@ if __name__ == '__main__':
|
||||
wf *= ELT_MIRROR.phase_delay(x,y,l, paraxial=True)
|
||||
Exyz, x, y = fou.fresnel_propagation(wf, xin, yin, dz=ELT_MIRROR.f, oversample=None,
|
||||
show=False, save=False)#, outputCoordinates=coordinatesList[0], apply_interpolation=False)
|
||||
save_variable('./data/ELT_FP_{}.pkl'.format(l*1000), [Exyz, x, y])
|
||||
set_trace()
|
||||
# save_variable('./data/ELT_FP_{}.pkl'.format(l*1000), [Exyz, x, y])
|
||||
|
||||
# From ELT-FP to MCD-COL
|
||||
print('Propagating from ELT-IFP to MCD-COL', end='\r')
|
||||
Exyz2, x2, y2 = fou.fresnel_propagation(Exyz, x, y, dz=ELT_COL.f, oversample=None,
|
||||
@@ -245,9 +254,6 @@ if __name__ == '__main__':
|
||||
# plt.savefig(save, bbox_inches='tight', transparent=True)
|
||||
plt.show()
|
||||
|
||||
set_trace()
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user