Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add IFU (/ METIS LMS) tests and notebooks #374

Open
hugobuddel opened this issue Feb 26, 2024 · 1 comment
Open

Add IFU (/ METIS LMS) tests and notebooks #374

hugobuddel opened this issue Feb 26, 2024 · 1 comment
Labels
bug Something isn't working

Comments

@hugobuddel
Copy link
Collaborator

ScopeSim has proper IFU support since #258 is merged.

However, this is now broken, because we have no tests or demo notebooks for this feature, neither here nor in the irdb.

E.g., based on the comment in #258, we need something like

import scopesim as sim
from astropy import units as u
from matplotlib import pyplot as plt

cmd = sim.UserCommands(use_instrument="METIS", set_modes=['lms'],
                       properties={"!OBS.wavelen": 3.555})
lms = sim.OpticalTrain(cmd)
src = sim.source.source_templates.star(flux=0.01 * u.Jy, x=0, y=0)

lms.observe(src, update=True)
ip = lms.image_planes[0]
plt.imshow(ip.data)

hdul = lms.readout(exptime=3600.)[0]
data_raw = hdul[1].data
plt.imshow(data_raw)

rectified = lms["lms_spectral_traces"].rectify_cube(hdul)
plt.imshow(rectified.data[3,:,:])
plt.imshow(rectified.data[:,3,:])
plt.imshow(rectified.data[:,:,3])

This code works with 2027780 and AstarVienna/irdb@ce56795 , but not with dev_master.

So we should perhaps just start with the above in a notebook in the IRDB and then patch ScopeSim till this works again. Then after that we can add proper tests to ScopeSim itself.

@hugobuddel
Copy link
Collaborator Author

The first exception that is triggered is due to the missing/broken updates to from_currsys as described in #372 (comment) :

ValueError: !-string filename should be resolved upstream: !OBS.trace_file

@teutoburg teutoburg added the bug Something isn't working label Feb 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: 🆕 New
Development

No branches or pull requests

2 participants