Chopping and nodding in Scopesim¶
This notebook demonstrates how to use the ChopNodCombiner effect in Scopesim. Both chopping and nodding are currently defined as two-point patterns, where the throw direction is given as a 2D vector (dx, dy) in metis["chop_nod"].meta["chop_offsets"] and metis["chop_nod"].meta["nod_offsets"]. For parallel nodding, the two vectors are parallel (typically nod_offset = - chop_offset, giving a three-point pattern), for perpendicular nodding, the vectors are orthogonal.
[ ]:
from matplotlib import pyplot as plt
import scopesim as sim
sim.bug_report()
# Edit this path if you have a custom install directory, otherwise comment it out.
sim.link_irdb("../../../../")
If you haven’t got the instrument packages yet, uncomment the following cell.
[ ]:
# sim.download_packages(["METIS", "ELT", "Armazones"])
[ ]:
cmd = sim.UserCommands(use_instrument="METIS", set_modes=["img_n"])
metis = sim.OpticalTrain(cmd)
metis["chop_nod"].include = True
metis["reference_pixel_mask"].include = False # Hack: this would mess up the chop/nod results
The default is perpendicular nodding, with the chop throw in the x-direction and the nod throw in the y direction.
[ ]:
print("Chop offsets:", metis.cmds[metis["chop_nod"].meta["chop_offsets"]])
print("Nod offsets: ", metis.cmds[metis["chop_nod"].meta["nod_offsets"]])
[ ]:
src = sim.source.source_templates.star()
metis.observe(src)
imghdul = metis.readout(exptime=1)[0]
[ ]:
plt.imshow(imghdul[1].data, origin="lower", vmin=-3e3, vmax=3e3)
plt.colorbar();
For parallel nodding, turn the nod throw into the x-direction as well.
[ ]:
metis["chop_nod"].meta["nod_offsets"] = [-3, 0]
imghdu_par = metis.readout(exptime=1)[0][1]
[ ]:
plt.imshow(imghdu_par.data, origin="lower", vmin=-3e3, vmax=3e3)
plt.colorbar();
Other four-point patterns are possible:
[ ]:
metis["chop_nod"].meta["nod_offsets"] = [-3, 3]
imghdu_3 = metis.readout(exptime=1)[0][1]
plt.imshow(imghdu_3.data, origin="lower", vmin=-3e3, vmax=3e3)
plt.colorbar();
[ ]:
metis["chop_nod"].meta["chop_offsets"] = [-3, 2]
metis["chop_nod"].meta["nod_offsets"] = [2, 3]
imghdu_4 = metis.readout(exptime=1)[0][1]
plt.imshow(imghdu_4.data, origin="lower", vmin=-3e3, vmax=3e3)
plt.colorbar();