This notebook explains how you can use the ADC.py analytic ADC model for some quick simulations. For the model to be representative, the following assumptions must apply:
The ADC.py model is really not made for very general use, so it will likely require some editing in the source code by the user to make it work for a different instrument than MICADO.
We first start by importing the necessary files. Here we'll use the AstroAtmosphere
package to calculate the atmospheric dispersion, but a manual input is also possible.
import numpy as np
import ADC
import AstroAtmosphere
Then we calculate the atmospheric dispersion for a given set of conditions.
# 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.6e6
Now, we initialize the ADC class. We can calculate the dispersion in sky angles, i.e. in terms of the Field of View of the telescope, for a given rotation of the ADC prisms. In this case, if we set $\theta=30$ degrees, we find that the ADC produces 58 milli arc seconds of dispersion in H-band.
# 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))
Of course, we're often much more interested in the optimum positioning of the ADC given an amount of atmospheric dispersion. This is done as follows.
# 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))