Test ADC wheel¶
This notebook demonstrates how to use the various atmospheric dispersion correctors in METIS. Note that the action of an adc is currently restricted to a transmission loss. The implementation of the geometric differential refraction residuals will follow at a later stage.
[1]:
import scopesim as sim
sim.bug_report()
# Edit this path if you have a custom install directory, otherwise comment it out.
sim.rc.__config__["!SIM.file.local_packages_path"] = "../../../../"
Python:
3.9.7 (default, Sep 28 2021, 17:45:03)
[GCC 9.3.0]
scopesim : 0.4.0
numpy : 1.22.3
scipy : 1.8.0
astropy : 5.0.1
matplotlib : 3.5.1
synphot : 1.1.1
skycalc_ipy : version number not available
requests : 2.27.1
bs4 : 4.10.0
yaml : 6.0
Operating system: Linux
Release: 5.11.0-1019-aws
Version: #20~20.04.1-Ubuntu SMP Tue Sep 21 10:40:39 UTC 2021
Machine: x86_64
[2]:
import numpy as np
from matplotlib import pyplot as plt
%matplotlib inline
If you haven’t got the instrument packages yet, uncomment the following cell
[3]:
# sim.download_package(["instruments/METIS", "telescopes/ELT", "locations/Armazones"])
[4]:
cmd = sim.UserCommands(use_instrument="METIS", set_modes=['img_lm'])
The ADC to use is defined by "!OBS.adc"
. This can be set to false
when no ADC is in the path. The default for LM band imaging is
[5]:
cmd["!OBS.adc"]
[5]:
'const_90'
[6]:
src = sim.source.source_templates.empty_sky()
[7]:
metis = sim.OpticalTrain(cmd)
The effect metis['adc_wheel']
works the same way as e.g. metis['filter_wheel']
. The following ADCs are now available (yes, there’s only one) and can be selected with metis['adc_wheel'].change_adc()
as demonstrated below.
[8]:
metis['adc_wheel'].adcs
[8]:
{'const_90': TERCurve: "const_90"}
Run a simulation with the ADC in the path:
[9]:
metis.observe(src, update=True)
implane_adc = metis.image_planes[0].data
Now remove the ADC from the path by changing to False
. Run the simulation without the ADC:
[10]:
metis['adc_wheel'].change_adc(False)
[11]:
metis.observe(src, update=True)
implane_no_adc = metis.image_planes[0].data
Compare the image plane simulated with and without the ADC. The ratio should be equal to the throughput of the ADC (90 per cent):
[12]:
med_adc = np.median(implane_adc)
med_no_adc = np.median(implane_no_adc)
print("With ADC: {:.1f}".format(np.median(med_adc)))
print("Without ADC: {:.1f}".format(np.median(med_no_adc)))
print("Ratio: {:.1f}".format(med_adc/med_no_adc))
With ADC: 251483.7
Without ADC: 279426.4
Ratio: 0.9