spacetelescope / mirage

This code can be used to generate simulated NIRCam, NIRISS, or FGS data
https://mirage-data-simulator.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
39 stars 41 forks source link

Add input 1D spectrum and transmission curve to FITS file for `SossSim` #768

Closed hover2pi closed 2 years ago

hover2pi commented 2 years ago

Validation of of extracted spectra are very important so storing this information in the final output would be very beneficial so users can make direct comparisons. Put STAR and PLANET extension in the output FITS file(s).

hover2pi commented 2 years ago

@bhilbert4 Do you know offhand if this would be problematic for jwst pipeline processing, e.g. where extra extensions in the FITS file(s) will break something? I was thinking of adding this to the mirage.ramp_generator.obs_generator.save_fits method so the input stellar and planetary 1d spectra can be saved with the simulation. Does this set off any alarms in your experience? Thanks!

bhilbert4 commented 2 years ago

I just ran a simple test case through the pipeline. It looks like it's ok to have an extra extension in the uncal file. The level 1 pipeline completed successfully. The caveat is that the extra extension is stripped out of the rate file output by the pipeline. So I think the jwst datamodels are ok reading in a file with extra information, but I think they are strict about not allowing extensions/information that is not explicitly in the datamodel definition to make it into the output.

hover2pi commented 2 years ago

Added in #773