spacetelescope / crds

Calibration Reference Data System for HST and JWST.
https://hst-crds.stsci.edu/static/users_guide/index.html
Other
12 stars 28 forks source link

Adding Pattern Translations for Roman Parameter Files #1053

Closed wcschultz closed 3 months ago

wcschultz commented 3 months ago

When running crds certify on a new parameters reference file, I get the following warnings:

CRDS - INFO - ######################################## CRDS - INFO - Certifying '/Users/wschultz/crds_cache/references/roman/wfi/roman_wfi_pars-jumpstep_0001.asdf' (1/1) as 'ASDF' relative to context 'roman_0060.pmap' CRDS - WARNING - CRDS-pattern-like keyword 'META.EXPOSURE.P_EXPTYPE' w/o CRDS translation to corresponding dataset keyword. CRDS - INFO - Pattern-like keyword 'META.EXPOSURE.P_EXPTYPE' may be misspelled or missing its translation in CRDS. Pattern will not be used. CRDS - INFO - The translation for 'META.EXPOSURE.P_EXPTYPE' can be defined in crds.roman.locate or rmap header reference_to_dataset field. CRDS - INFO - If this is not a pattern keyword, adding a translation to 'not-a-pattern' will suppress this warning. CRDS - WARNING - CRDS-pattern-like keyword 'META.INSTRUMENT.P_DETECTOR' w/o CRDS translation to corresponding dataset keyword. CRDS - INFO - Pattern-like keyword 'META.INSTRUMENT.P_DETECTOR' may be misspelled or missing its translation in CRDS. Pattern will not be used. CRDS - INFO - The translation for 'META.INSTRUMENT.P_DETECTOR' can be defined in crds.roman.locate or rmap header reference_to_dataset field. CRDS - INFO - If this is not a pattern keyword, adding a translation to 'not-a-pattern' will suppress this warning. CRDS - WARNING - CRDS-pattern-like keyword 'META.INSTRUMENT.P_OPTICAL_ELEMENT' w/o CRDS translation to corresponding dataset keyword. CRDS - INFO - Pattern-like keyword 'META.INSTRUMENT.P_OPTICAL_ELEMENT' may be misspelled or missing its translation in CRDS. Pattern will not be used. CRDS - INFO - The translation for 'META.INSTRUMENT.P_OPTICAL_ELEMENT' can be defined in crds.roman.locate or rmap header reference_to_dataset field. CRDS - INFO - If this is not a pattern keyword, adding a translation to 'not-a-pattern' will suppress this warning. CRDS - INFO - ######################################## CRDS - INFO - 0 errors CRDS - INFO - 3 warnings CRDS - INFO - 12 infos

This led me to think the META.INSTRUMENT.P_* need to be added to:

https://github.com/spacetelescope/crds/blob/e9a3ee678509a0717d7b7582f08dc18dcde6f6b9/crds/roman/locate.py#L484-L488

With the new update for the Roman Parameter file schema testing, there seems to be a problem with verifying the P_ keywords. For the parameter reference files, it might help to add:

"META.EXPOSURE.P_EXPTYPE" : "META.EXPOSURE.TYPE", "META.INSTRUMENT.P_DETECTOR" : "META.INSTRUMENT.DETECTOR", "META.INSTRUMENT.P_OPTICAL_ELEMENT": "META.INSTRUMENT.OPTICAL_ELEMENT",

I am unsure if this will have trickle down impacts or if the rest of the function needs to include changes to accommodate these additions.