diff --git a/.github/workflows/contexts.yml b/.github/workflows/contexts.yml index e97084bb5..02bb18a66 100644 --- a/.github/workflows/contexts.yml +++ b/.github/workflows/contexts.yml @@ -46,7 +46,7 @@ jobs: CRDS_SERVER_URL: https://roman-crds.stsci.edu run: > echo "pmap=$( - curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 | + curl -s -X POST -d '{"jsonrpc": "1.0", "method": "get_default_context", "params": ["${{ env.OBSERVATORY }}", "latest"], "id": 1}' ${{ env.CRDS_SERVER_URL }}/json/ --retry 8 | python -c "import sys, json; print(json.load(sys.stdin)['result'])" )" >> $GITHUB_OUTPUT - run: if [[ ! -z "${{ steps.roman_crds_context.outputs.pmap }}" ]]; then echo ${{ steps.roman_crds_context.outputs.pmap }}; else exit 1; fi diff --git a/changes/1097.roman.rst b/changes/1097.roman.rst new file mode 100644 index 000000000..c2f4bba58 --- /dev/null +++ b/changes/1097.roman.rst @@ -0,0 +1 @@ +Adds new reference mapping templates for Aperture Correction (apcorr) and AB-Vega Offset (aboffset) diff --git a/crds/roman/specs/combined_specs.json b/crds/roman/specs/combined_specs.json index d1ff574a1..b35449d05 100644 --- a/crds/roman/specs/combined_specs.json +++ b/crds/roman/specs/combined_specs.json @@ -24,6 +24,35 @@ } }, "wfi":{ + "abvegaoffset":{ + "classes":[ + "Match", + "UseAfter" + ], + "derived_from":"Autogenerated via API on 2024-11-05", + "extra_keys":null, + "file_ext":".asdf", + "filekind":"abvegaoffset", + "filetype":"ABVEGAOFFSET", + "instrument":"wfi", + "ld_tpn":"wfi_abvegaoffset.ld_tpn", + "mapping":"REFERENCE", + "name":"wfi_abvegaoffset.rmap", + "observatory":"roman", + "parkey":[ + [ + "ROMAN.META.INSTRUMENT.DETECTOR" + ], + [ + "ROMAN.META.EXPOSURE.START_TIME" + ] + ], + "sha1sum":"edb07f3085387c4fbb8c17b698ac8f9ed96bade9", + "suffix":"abvegaoffset", + "text_descr":"AB-Vega Magnitude Offset", + "tpn":"wfi_abvegaoffset.tpn", + "unique_rowkeys":null + }, "all":{ "extra_keys":null, "file_ext":".asdf", @@ -37,6 +66,35 @@ "tpn":"wfi_all.tpn", "unique_rowkeys":null }, + "apcorr":{ + "classes":[ + "Match", + "UseAfter" + ], + "derived_from":"Autogenerated via API on 2024-11-05", + "extra_keys":null, + "file_ext":".asdf", + "filekind":"apcorr", + "filetype":"APCORR", + "instrument":"wfi", + "ld_tpn":"wfi_apcorr.ld_tpn", + "mapping":"REFERENCE", + "name":"wfi_apcorr.rmap", + "observatory":"roman", + "parkey":[ + [ + "ROMAN.META.INSTRUMENT.DETECTOR" + ], + [ + "ROMAN.META.EXPOSURE.START_TIME" + ] + ], + "sha1sum":"fdd9264c777ad225a6b5ed24fafe56818b2d294d", + "suffix":"apcorr", + "text_descr":"Aperture Correction", + "tpn":"wfi_apcorr.tpn", + "unique_rowkeys":null + }, "area":{ "classes":[ "Match", diff --git a/crds/roman/specs/wfi_abvegaoffset.rmap b/crds/roman/specs/wfi_abvegaoffset.rmap new file mode 100644 index 000000000..57b955151 --- /dev/null +++ b/crds/roman/specs/wfi_abvegaoffset.rmap @@ -0,0 +1,20 @@ +header = { + 'classes' : ('Match', 'UseAfter'), + 'derived_from' : 'Autogenerated via API on 2024-11-05', + 'file_ext' : '.asdf', + 'filekind' : 'abvegaoffset', + 'filetype' : 'ABVEGAOFFSET', + 'instrument' : 'wfi', + 'ld_tpn' : 'wfi_abvegaoffset.ld_tpn', + 'mapping' : 'REFERENCE', + 'name' : 'wfi_abvegaoffset.rmap', + 'observatory' : 'roman', + 'parkey' : (('ROMAN.META.INSTRUMENT.DETECTOR',), ('ROMAN.META.EXPOSURE.START_TIME',)), + 'sha1sum' : 'edb07f3085387c4fbb8c17b698ac8f9ed96bade9', + 'suffix' : 'abvegaoffset', + 'text_descr' : 'AB-Vega Magnitude Offset', + 'tpn' : 'wfi_abvegaoffset.tpn', +} + +selector = Match({ +}) diff --git a/crds/roman/specs/wfi_apcorr.rmap b/crds/roman/specs/wfi_apcorr.rmap new file mode 100644 index 000000000..fb0a8c922 --- /dev/null +++ b/crds/roman/specs/wfi_apcorr.rmap @@ -0,0 +1,20 @@ +header = { + 'classes' : ('Match', 'UseAfter'), + 'derived_from' : 'Autogenerated via API on 2024-11-05', + 'file_ext' : '.asdf', + 'filekind' : 'apcorr', + 'filetype' : 'APCORR', + 'instrument' : 'wfi', + 'ld_tpn' : 'wfi_apcorr.ld_tpn', + 'mapping' : 'REFERENCE', + 'name' : 'wfi_apcorr.rmap', + 'observatory' : 'roman', + 'parkey' : (('ROMAN.META.INSTRUMENT.DETECTOR',), ('ROMAN.META.EXPOSURE.START_TIME',)), + 'sha1sum' : 'fdd9264c777ad225a6b5ed24fafe56818b2d294d', + 'suffix' : 'apcorr', + 'text_descr' : 'Aperture Correction', + 'tpn' : 'wfi_apcorr.tpn', +} + +selector = Match({ +}) diff --git a/test/core/test_reftypes.py b/test/core/test_reftypes.py index a988fb789..1907b8934 100644 --- a/test/core/test_reftypes.py +++ b/test/core/test_reftypes.py @@ -221,7 +221,9 @@ def test_reftypes_jwst_get_filekinds(default_shared_state): @mark.core def test_reftypes_roman_get_filekinds(default_shared_state): types = reftypes.get_types_object("roman") - assert {'all', 'flat'}.issubset(types.get_filekinds("wfi")) is True + wfi_filekinds = types.get_filekinds("wfi") + expected_types = ['abvegaoffset', 'all', 'apcorr', 'area', 'dark', 'distortion', 'flat', 'gain', 'inverselinearity', 'ipc', 'linearity', 'mask', 'pars-assignwcsstep', 'pars-darkcurrentstep', 'pars-dqinitstep', 'pars-exposurepipeline', 'pars-flatfieldstep', 'pars-fluxstep', 'pars-highlevelpipeline', 'pars-jumpstep', 'pars-linearitystep', 'pars-outlierdetectionstep', 'pars-photomstep', 'pars-rampfitstep', 'pars-refpixstep', 'pars-resamplestep', 'pars-saturationstep', 'pars-skymatchstep', 'pars-sourcedetectionstep', 'pars-tweakregstep', 'photom', 'readnoise', 'refpix', 'saturation'] + assert sorted(wfi_filekinds) == sorted(expected_types) @mark.hst