AstarVienna / METIS_Simulations

Scripts for simulating METIS with ScopeSim
1 stars 0 forks source link

TPL.ID and TPL.NAME all have same value #32

Closed hugobuddel closed 3 months ago

hugobuddel commented 4 months ago

From Lars in https://jira.eso.org/browse/MET-2301 , see also #31

The FITS keywords TPL.ID and TPL.NAME identify the observing template to which a given file belongs, see ESO-044156.

However, while the files in this delivery cover a range of different types of data, in each file the two keywords both have the same value, namely: METIS_img_lm_obs_GenericOffset

hugobuddel commented 4 months ago

TPL.ID and TPL.NAME is derived from !OBS.tplname: https://github.com/AstarVienna/irdb/blob/e6d87dc41406aeab2e2864857b7ec3d37705735f/METIS/headers/FITS_common_keywords.yaml#L58-L65

        TPL:
          # Standard template keywords, however, these are not all included
          # in the template manual.
          # TODO: Expand with more standard template keywords.
          ID:  "!OBS.tplname"
          NAME: "!OBS.tplname"

and !OBS.tplname is defined in default.yaml https://github.com/AstarVienna/irdb/blob/e6d87dc41406aeab2e2864857b7ec3d37705735f/METIS/default.yaml#L46C3-L46C10

  tplname: "METIS_img_lm_obs_GenericOffset"

Simplest short-term solution is to add the tplname to recipes.yaml: https://github.com/AstarVienna/METIS_Simulations/blob/main/ESO/recipes.yaml

Longer term solution would be to make a mode for each template, and then define the FITS header keywords for that mode, or something like that.

gotten commented 3 months ago

I am working on this at the moment. After studying ScopeSim and IRDB I came to the same conclusion that tplname can be defined in the recipes.yaml. I should have looked here first :)

gotten commented 3 months ago

just tested; the proposed solution works in a small scale test.

hugobuddel commented 3 months ago

You probably figured out how to add new header keywords to the IRDB, so time well spent!

Note that I think the pipeline should just ignore the template name, we only need the DPR keywords.