Chopping and nodding in Scopesim

This notebook demonstrates how to use the ChopNod 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.

[ ]:
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_packages(["METIS", "ELT", "Armazones"])
[ ]:
cmd = sim.UserCommands(use_instrument="METIS", set_modes=['img_n'])
[ ]:
metis = sim.OpticalTrain(cmd)
metis['chop_nod'].include = True

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, update=True)
imghdu = metis.readout()[0][1]
[ ]:
plt.imshow(imghdu.data, origin='lower', vmin=-5e7, vmax=5e7)
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()[0][1]
[ ]:
plt.imshow(imghdu_par.data, origin='lower', vmin=-5e7, vmax=5e7)

Other four-point patterns are possible:

[ ]:
metis['chop_nod'].meta['nod_offsets'] = [-3, 3]
imghdu_3 = metis.readout()[0][1]
plt.imshow(imghdu_3.data, origin='lower', vmin=-5e7, vmax=5e7)
[ ]:
metis['chop_nod'].meta['chop_offsets'] = [-3, 2]
metis['chop_nod'].meta['nod_offsets'] = [2, 3]
imghdu_4 = metis.readout()[0][1]
plt.imshow(imghdu_4.data, origin='lower', vmin=-5e7, vmax=5e7)