mirror of
https://gitlab.astro-wise.org/micado/atmosphericmodel.git
synced 2026-10-29 20:51:05 +00:00
5.1 KiB
5.1 KiB
In [5]:
import numpy as np
import ADC
import AstroAtmosphereIn [6]:
# Atmospheric conditions
T = 288.15 # k
P = 101325 # Pa
H = 0.3
xc = 400 # ppm
lat = -25 # degrees
h = 2500 # m
l1 = 1.49 # micron, start H-band
l2 = 1.78 # micron, end H-band
zenith = 30 # degrees
# Initializing dispersion model
at = AstroAtmosphere.Observatory()
rho = at.rho(p=P, T=T, RH=H, xc=xc)
disp = AstroAtmosphere.dispersion(lat, h)
disp.setReducedHeight(P, rho)
# Calculation of indices of refraction at l1 and l2
n1 = at.n_tph(l=l1, T=T, p=P, RH=H, xc=xc)
n2 = at.n_tph(l=l2, T=T, p=P, RH=H, xc=xc)
# Calculation of atmospheric dispersion in milli arc sec
dispersion = disp.cassini(n1, n2, zenith)*3.6e6In [7]:
# Initialize ADC object
adc = ADC.ADC()
# Calculate the dispersion for a given rotation
theta = 30 # degrees
adc.setOrientation(theta)
adcDispersion = adc.calculateDispersion(l1,l2)[1]
print(
'The dispersion of the ADC for {:.0f} degrees of rotation: {:.3f} mas'\
.format(theta, adcDispersion))The dispersion of the ADC for 30 degrees of rotation: 58.011 mas
In [8]:
# Optimize for atmospheric dispersion, given wavelength range {l1,l2}
adcOptimumAngle = adc.optimize(dispersion, l1, l2)
adcDispersionOptimized = adc.calculateDispersion(l1,l2)[1]
print('The atmospheric dispersion: {:.3f} mas'.format(dispersion) )
print('The optimum ADC angle in this case: {:.1f} degrees'.format(adcOptimumAngle))
print('The residual dispersion: {:.3f} mas'.format(dispersion - adcDispersionOptimized))
The atmospheric dispersion: 24.771 mas The optimum ADC angle in this case: 68.1 degrees The residual dispersion: 0.000 mas