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,23 +0,0 @@
|
||||
import numpy as np
|
||||
import sys
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Documents/Published/FourierOptics GitHub release/')
|
||||
# sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Analyses/Python/Analytical/Fourier Optics')
|
||||
from fourierOptics import *
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Initiate MICADO paraxial model
|
||||
mcd = ParaxialMICADO()
|
||||
# mcd.plot_ray_trace()
|
||||
|
||||
print(mcd.platescale)
|
||||
# Initiate WFE object
|
||||
wfe = WavefrontError(mcd.n, mcd.m)
|
||||
|
||||
# Generate PSD surfaces
|
||||
psd = wfe.generate_height_map(200e-6, 2, 1)
|
||||
|
||||
# Add it to ADC-P1
|
||||
mcd.ELT_ADC.p1.add_wavefront_error(psd)
|
||||
|
||||
# Generate the PSF and plot it
|
||||
E, x, y = mcd.propagate(l=1.35e-3,surface=-1, zoom=True, show=True) # image_output=[-.4,.4,-.4,.4]
|
||||
@@ -1,8 +1,16 @@
|
||||
import numpy as np
|
||||
import sys
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Analyses/Python/Analytical/Fourier Optics')
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Documents/Published/FourierOptics GitHub release/')
|
||||
from fourierOptics import *
|
||||
|
||||
'''
|
||||
Description:
|
||||
This script generates a point spread function of the MICADO optical model.
|
||||
During the setup a wavefront error of 200 nm RMS is added to the first
|
||||
prisms of the MICADO atmospheric dispersion corrector.
|
||||
'''
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Initiate MICADO paraxial model
|
||||
mcd = ParaxialMICADO()
|
||||
|
||||
@@ -1,9 +1,21 @@
|
||||
import numpy as np
|
||||
import sys
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Analyses/Python/Analytical/Fourier Optics')
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Documents/Published/FourierOptics GitHub release/')
|
||||
from fourierOptics import *
|
||||
|
||||
|
||||
'''
|
||||
Description:
|
||||
This script generates a point spread function of the MICADO optical model.
|
||||
Here we apply a Bahtinov mask to the pupil and simulate a broadband PSF,
|
||||
done through the summation of multiple (here: 15) wavelength slices.
|
||||
When there is atmospheric dispersion, the diffraction speckles created by the
|
||||
Bahtinov mask will start to point to a location outside the zeroth order
|
||||
PSF core.
|
||||
Here, atmospheric dispersion is modelled as a wavelength dependent phase
|
||||
tilt.
|
||||
'''
|
||||
|
||||
if __name__ == '__main__':
|
||||
# Initiate MICADO paraxial model
|
||||
mcd = ParaxialMICADO()
|
||||
|
||||
@@ -1,8 +1,17 @@
|
||||
import numpy as np
|
||||
import sys
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Analyses/Python/Analytical/Fourier Optics')
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Documents/Published/FourierOptics GitHub release/')
|
||||
from fourierOptics import *
|
||||
from pdb import set_trace
|
||||
|
||||
|
||||
'''
|
||||
Description:
|
||||
This script generates nine points in a small field to illustrate the
|
||||
most basic form of off-axis propagation.
|
||||
For larger off-axis distances the hx and hy values should directly
|
||||
be supplied to the propagate function.
|
||||
'''
|
||||
|
||||
|
||||
def field_angle(hx, hy):
|
||||
fx = hx * 0.0075
|
||||
@@ -14,14 +23,6 @@ if __name__ == '__main__':
|
||||
# Initializing MICADO paraxial model
|
||||
mcd = ParaxialMICADO()
|
||||
wfe = WavefrontError(mcd.n, mcd.m)
|
||||
|
||||
# Uncomment to load in WFE (coma)
|
||||
# Problem here is that the field of view is too small to see
|
||||
# a radial effect...
|
||||
# xin, yin = load_variable('../adc_data_coordinates.pkl')
|
||||
# adcObj = ADC_surfaces(xin,yin)
|
||||
# zern = wfe.zernike_cartesian([0,0,0,0,0,0,0,100e-5], adcObj.xz, adcObj.yz, rescale=False)
|
||||
# mcd.ELT_ADC.p1.add_wavefront_error(zern)
|
||||
|
||||
# Setup
|
||||
l = 1.49e-3
|
||||
|
||||
@@ -1,9 +1,14 @@
|
||||
import numpy as np
|
||||
import sys
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Analyses/Python/Analytical/Fourier Optics')
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Documents/Published/FourierOptics GitHub release/')
|
||||
from fourierOptics import *
|
||||
import matplotlib.pyplot as plt
|
||||
from pdb import set_trace
|
||||
|
||||
'''
|
||||
Description:
|
||||
This script generates the amplitude and phase information of all surfaces
|
||||
in the MICADO paraxial model in a nicely presented form.
|
||||
'''
|
||||
|
||||
if __name__ == '__main__':
|
||||
plt.rc('font', family='serif')
|
||||
|
||||
@@ -1,10 +1,16 @@
|
||||
import numpy as np
|
||||
import sys
|
||||
# sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Analyses/Python/Analytical/Fourier Optics')
|
||||
sys.path.insert(0, '/Users/joost/Dropbox/Werk/PhD/Documents/Published/FourierOptics GitHub release/')
|
||||
from fourierOptics import *
|
||||
import matplotlib.pyplot as plt
|
||||
from pdb import set_trace
|
||||
|
||||
'''
|
||||
Description:
|
||||
This script generates the amplitude and phase information of all surfaces
|
||||
in the MICADO paraxial model in a nicely presented form.
|
||||
'''
|
||||
|
||||
|
||||
|
||||
if __name__ == '__main__':
|
||||
plt.rc('font', family='serif')
|
||||
@@ -13,13 +19,9 @@ if __name__ == '__main__':
|
||||
# Initiate MICADO paraxial model
|
||||
mcd = ParaxialMICADO(n=3001, m=3001, dpix=50)
|
||||
|
||||
# Generate the PSF and plot it
|
||||
# E, x, y = mcd.propagate(l=1.35e-3,surface=-1, zoom=True, show=True, save='all')
|
||||
|
||||
confList = [ ( 1, [-0.4, 0.4, -0.4, 0.4], '02_fourier_ELT-IFP.pdf'),
|
||||
( 2, [-50, 50, -50, 50], '03_fourier_ELT-COL.pdf'),
|
||||
( 4, [-50, 50, -50, 50], '04_fourier_ELT-MCD-ADC-P2.pdf'),
|
||||
# (-1, [-1.2, 1.2, -1.2, 1.2], '05_fourier_ELT-MCD-DET.pdf')]
|
||||
(-1, [-1.2/2.669, 1.2/2.669, -1.2/2.669, 1.2/2.669], '05_fourier_ELT-MCD-DET.pdf')]
|
||||
|
||||
|
||||
@@ -50,4 +52,4 @@ if __name__ == '__main__':
|
||||
_fig.colorbar(_im2, ax=_ax2, label='Phase')
|
||||
plt.tight_layout()
|
||||
# plt.savefig('01_fourier_ELT-M1.pdf', bbox_inches='tight', transparent=True)
|
||||
plt.close()#show()
|
||||
plt.show()
|
||||
Reference in new issue
Block a user