This notebook demonstrates how to use the various slits in METIS. They are defined in a SlitWheel effect, which works in the same way as FilterWheel. The notebook uses imaging mode to show the slits directly.

[ ]:
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"] = "../../../../"
[ ]:
from matplotlib import pyplot as plt
%matplotlib inline

If you haven’t got the instrument packages yet, uncomment the following cell.

[ ]:
# sim.download_package(["instruments/METIS", "telescopes/ELT", "locations/Armazones"])
[ ]:
cmd = sim.UserCommands(use_instrument="METIS", set_modes=['img_lm'])

In imaging mode, "!OBS.slit" is false by default, i.e. there is no slit in the path. However, slits can be used in imaging as well by setting !OBS.slit to one of the slits available in the METIS package.

[ ]:
cmd['!OBS.slit'] = "C-38_1"
[ ]:
src = sim.source.source_templates.empty_sky()
[ ]:
metis = sim.OpticalTrain(cmd)

The following slits are now available and can be selected with metis['slit_wheel'].change_slit() as demonstrated below.

[ ]:
metis['slit_wheel'].slits
[ ]:
implanes = dict()
for slit in metis['slit_wheel'].slits:
    metis['slit_wheel'].change_slit(slit)
    metis.observe(src, update=True)
    implanes[slit] = metis.image_planes[0].data
[ ]:
plt.figure(figsize=(15, 5))
for i, slit in enumerate(metis['slit_wheel'].slits):
    plt.subplot(2, 3, i+1)
    plt.imshow(implanes[slit][600:1450,], origin='lower')
    plt.title("Slit " + slit)