diff --git a/crds/tmt/__init__.py b/crds/tmt/__init__.py index 536b6b36f..59deedee2 100644 --- a/crds/tmt/__init__.py +++ b/crds/tmt/__init__.py @@ -23,4 +23,3 @@ USEAFTER_KEYWORDS = ("META.OBSERVATION.DATE", "META.OBSERVATION.TIME") # Dataset keywords matching in UseAfter selectors DEFAULT_SELECTORS = ("Match", "UseAfter") # Normal selector hierarchy in rmap - diff --git a/crds/tmt/gen_system_crdscfg.py b/crds/tmt/gen_system_crdscfg.py index 2b670df94..70dbb8eca 100644 --- a/crds/tmt/gen_system_crdscfg.py +++ b/crds/tmt/gen_system_crdscfg.py @@ -13,6 +13,7 @@ import sys import re import fnmatch +import os.path # ---------------------------------------------------------------------------------------------- @@ -20,19 +21,20 @@ # ---------------------------------------------------------------------------------------------- -from jwst import version -from jwst.stpipe import cmdline as jwst_cmdline +from jwst import __version__ as jwst_version +from jwst.stpipe import pipeline +from jwst import pipeline as pipepkg # ---------------------------------------------------------------------------------------------- import crds -from crds.core import log, exceptions, utils, timestamp +from crds.core import log, exceptions, utils, timestamp, pysh from crds.core.log import srepr # ---------------------------------------------------------------------------------------------- VERSION_RE_STR = r"(\d+\.\d+.\d+).*" -CAL_VER = re.match(r"^" + VERSION_RE_STR, version.__version__).group(1) +CAL_VER = re.match(r"^" + VERSION_RE_STR, jwst_version).group(1) GENERATION_DATE = timestamp.now("T").split(".")[0] @@ -52,15 +54,15 @@ def __init__(self, input_yaml): self.pipeline_cfgs_to_steps = {} self.steps_to_reftypes = {} self.generate_pipeline_info() - self.exptypes_to_cfgs = { exp_type : self.exptype_to_pipelines(exp_type) + self.exptypes_to_cfgs = { exp_type : self.exptype_to_pipelines(exp_type) for exp_type in self.exp_types } - self.exptypes_to_reftypes = { exp_type : self.exptype_to_reftypes(exp_type) + self.exptypes_to_reftypes = { exp_type : self.exptype_to_reftypes(exp_type) for exp_type in self.exp_types } def get_body(self): """Load the input_yaml as a CRDS Struct and return it.""" - return utils.Struct(yaml.load(self.input_yaml)) - + return utils.Struct(yaml.safe_load(self.input_yaml)) + def get_updated_yaml(self): """Modify the input_yaml to replace the cal code version and generation date, useful for updating an existing reference and running it through this generator. @@ -77,18 +79,31 @@ def get_updated_yaml(self): else: input_body += [line] return "\n".join(input_body).split(REFERENCE_DIVIDER)[0] + "\n" + REFERENCE_DIVIDER + "\n" - + def generate_pipeline_info(self): """Based on the input YAML and JWST cal code, generate the mappings: pipeline_cfgs_to_steps steps_to_reftypes """ + pysh.sh("rm -rf configs") + pysh.sh("collect_pipeline_cfgs configs") self.pipeline_cfgs_to_steps["skip_2b.cfg"] = [] for pipeline_cfg in self.loaded_cfg.pipeline_cfgs: - steps_to_reftypes = jwst_cmdline.steps_to_reftypes_from_config(pipeline_cfg) + log.info("Processing", repr(pipeline_cfg)) + cfgdir = "configs" # os.path.dirname(pipepkg.__file__) or "" + cfgpath = os.path.join(cfgdir, pipeline_cfg) + p = pipeline.Pipeline.from_config_file(cfgpath) + steps_to_reftypes = {} + for name, stepcfg in p.steps.items(): + if stepcfg.get("skip", True): + log.info("Considering", repr(name), "skip") + else: + log.info("Considering", repr(name), "keep") + step = p.step_defs[name] # class + steps_to_reftypes[name] = step.reference_file_types self.pipeline_cfgs_to_steps[pipeline_cfg] = sorted(list(steps_to_reftypes.keys())) self.steps_to_reftypes.update(steps_to_reftypes) - + def generate_output_yaml(self): """Generate the SYSTEM CRDSCFG reference YAML.""" output_yaml = self.get_updated_yaml() @@ -97,14 +112,14 @@ def generate_output_yaml(self): output_yaml += yaml.dump({"exptypes_to_pipelines" : self.exptypes_to_cfgs}) + "\n" output_yaml += yaml.dump({"exptypes_to_reftypes" : self.exptypes_to_reftypes}) + "\n" return output_yaml - + def __str__(self): return self.generate_output_yaml() - + def exptype_to_pipelines(self, exp_type): """For a given EXP_TYPE string, return a list of reftypes needed to process that EXP_TYPE through the data levels appropriate for that EXP_TYPE. - + Return [reftypes... ] """ pipelines = [] @@ -116,15 +131,15 @@ def exptype_to_reftypes(self, exp_type): """Return all reftypes associated with processing all steps of all pipelines for `exp_type`.""" # with log.error_on_exception("Failed exptype_to_reftypes for", srepr(exp_type)): reftypes = [] - for pipeline in self.exptype_to_pipelines(exp_type): + for pipeline in self.exptype_to_pipelines(exp_type): reftypes.extend(self.get_pipeline_types(pipeline, exp_type)) reftypes = sorted(list(set(reftypes))) return reftypes - + def get_level_pipeline(self, level, exp_type): """Interpret the level_pipeline_exptypes data structure relative to processing `level` and `exp_type` to determine a pipeline .cfg file. - + Return [ pipeline .cfg ] or [] """ pipeline_exptypes = self.loaded_cfg.level_pipeline_exptypes[level] @@ -135,16 +150,16 @@ def get_level_pipeline(self, level, exp_type): return [pipeline] log.error("Unhandled EXP_TYPE", srepr(exp_type), "for", srepr(level)) return [] - + # raise exceptions.CrdsPipelineCfgDeterminationError("Unhandled EXP_TYPE", srepr(exp_type)) - + def get_pipeline_types(self, pipeline, exp_type): """Based on a pipeline .cfg filename and an EXP_TYPE, look up the Steps corresponding to the .cfg and extrapolate those to the reftypes used by those Steps. If there are exceptions to the reftypes assigned for a particular Step that depend on EXP_TYPE, return the revised types for that Step instead. - + Return [reftypes, ...] """ steps = self.pipeline_cfgs_to_steps[pipeline] @@ -160,8 +175,8 @@ def get_pipeline_types(self, pipeline, exp_type): found = False for exptype_pattern in exptypes: if glob_match(exptype_pattern, exp_type): - log.verbose("Adding exceptional types", more_reftypes, - "for step", srepr(step), "case", srepr(exptype_pattern), + log.verbose("Adding exceptional types", more_reftypes, + "for step", srepr(step), "case", srepr(exptype_pattern), "based on exp_type", srepr(exp_type)) found = True reftypes.extend(more_reftypes) @@ -171,7 +186,7 @@ def get_pipeline_types(self, pipeline, exp_type): else: raise exceptions.CrdsPipelineTypeDeterminationError("Unhandled EXP_TYPE for exceptional Step", srepr(step)) return reftypes - + # -------------------------------------------------------------------------------------- def glob_match(expr, value): diff --git a/crds/tmt/jwst_system_crdscfg_b7.5.yaml b/crds/tmt/jwst_system_crdscfg_b7.5.yaml new file mode 100644 index 000000000..ff48bff06 --- /dev/null +++ b/crds/tmt/jwst_system_crdscfg_b7.5.yaml @@ -0,0 +1,2392 @@ +# +# This reference is used by the CRDS reprocessing recommendation system to define: +# +# 1. The calibration code pipelines (.cfg files) nominally used for each EXP_TYPE for +# applicable levels of data. +# +# 2. The reference types required to process each EXP_TYPE. +# +# This file contains a combination of MANUAL inputs used by the generation algorithms +# to create the fields used at runtime: exptypes_to_pipelines and exptypes_to_reftypes. +# +# Regeneration is performed by updating the MANUAL sections of a reference file +# and installing applicable calibration code and then doing: +# +# $ python -m crds.jwst.gen_system_crdscfg old_reference.yaml > new_reference.yaml +# +# The update concept is to take the last good reference, modify the MANUAL inputs +# as appropriate, then do the above to complete the regeneration process. +# +# HOWEVER: If at some stage it becomes difficult to regenerate automatically, the only +# fields used functionally for reprocessing are exptypes_to_pipelines and exptypes_to_reftypes. +# Thus it should be possible to substitute direct edits to those fields for automatic generation +# if automatic generation becomes problematic. +# + +meta: + author: CRDS + description: "Used to determine cal code pipeline sequences and reference types for CRDS reprocessing." + history: "Generated from calibration code .cfg files and EXP_TYPE/LEVEL mapping." + instrument: SYSTEM + pedigree: GROUND + reftype: CRDSCFG + telescope: JWST + useafter: 1900-01-01T00:00:00 + calibration_software_version: 0.16.0 + crds_version: 7.4.1.7 + generation_date: 2020-05-04T17:54:17 + +# ---------------------------------------------------------------------------------------------- +# MANUAL UPDATE REQUIRED +# +# Exhastive list of pipeline .cfg's to process for steps and reftypes during generation. +# +# ---------------------------------------------------------------------------------------------- + +pipeline_cfgs: [calwebb_dark.cfg, calwebb_detector1.cfg, calwebb_guider.cfg, + calwebb_image2.cfg, calwebb_nrslamp-spec2.cfg, calwebb_spec2.cfg, + calwebb_tso-image2.cfg, calwebb_tso-spec2.cfg, calwebb_tso1.cfg, + calwebb_wfs-image2.cfg] + +# ---------------------------------------------------------------------------------------------- +# MANUAL UPDATE REQUIRED +# +# Exhastive list of exp_type values +# +# ---------------------------------------------------------------------------------------------- + +exp_types: [FGS_DARK, FGS_FOCUS, FGS_IMAGE, FGS_INTFLAT, FGS_SKYFLAT, + FGS_ACQ1, FGS_ACQ2, FGS_FINEGUIDE, FGS_ID-IMAGE, FGS_ID-STACK, FGS_TRACK, + MIR_4QPM, MIR_CORONCAL, MIR_DARKALL, MIR_DARKIMG, MIR_DARKMRS, + MIR_FLATALL, MIR_FLATIMAGE, MIR_FLATIMAGE-EXT, MIR_FLATMRS, MIR_FLATMRS-EXT, + MIR_IMAGE, MIR_LRS-FIXEDSLIT, MIR_LRS-SLITLESS, MIR_LYOT, MIR_MRS, + MIR_TACONFIRM, MIR_TACQ, + NIS_AMI, NIS_DARK, NIS_EXTCAL, NIS_FOCUS, NIS_IMAGE, NIS_LAMP, + NIS_SOSS, NIS_TACQ, NIS_TACONFIRM, NIS_WFSS, + NRC_CORON, NRC_DARK, NRC_FLAT, NRC_FOCUS, NRC_GRISM, NRC_IMAGE, NRC_WFSS, + NRC_LED, NRC_WFSC, NRC_TACONFIRM, NRC_TACQ, NRC_TSGRISM, NRC_TSIMAGE, + NRS_AUTOFLAT, NRS_AUTOWAVE, NRS_BRIGHTOBJ, NRS_CONFIRM, NRS_DARK, + NRS_FIXEDSLIT, NRS_FOCUS, NRS_IFU, NRS_IMAGE, NRS_LAMP, NRS_MIMF, + NRS_MSASPEC, NRS_MSATA, NRS_TACONFIRM, NRS_TACQ, NRS_TASLIT, NRS_WATA] + +# ---------------------------------------------------------------------------------------------- +# MANUAL UPDATE REQUIRED +# +# Order is important since the first pattern matching an exp_type in any given level wins. +# +# For each level, CRDS searches for a matching EXP_TYPE using glob matching, searching +# in order from top to bottom, using the first match only. Each level will contribute one +# .cfg for a given EXP_TYPE. +# +# skip_2b.cfg is a placeholder with no steps. +# ---------------------------------------------------------------------------------------------- + +levels: [ level2a, level2b] + +level_pipeline_exptypes: + level2a: + - calwebb_dark.cfg: [FGS_DARK, MIR_DARK, MIR_DARKIMG, MIR_DARKMRS, MIR_DARKALL, NRC_DARK, NIS_DARK, NRS_DARK] + + - calwebb_guider.cfg: [FGS_ID-STACK, FGS_ID-IMAGE, FGS_ACQ1, FGS_ACQ2, FGS_TRACK, FGS_FINEGUIDE] + + - calwebb_tso1.cfg: [MIR_LRS-SLITLESS, NRC_TSGRISM, NRC_TSIMAGE, NIS_SOSS, NRS_BRIGHTOBJ] + + - calwebb_detector1.cfg: ["*"] + + level2b: + - calwebb_spec2.cfg: [MIR_LRS-FIXEDSLIT, MIR_MRS, NRS_FIXEDSLIT, NRS_MSASPEC, NRS_IFU, + NRS_AUTOWAVE, NIS_WFSS, NRC_WFSS, NRC_GRISM] + + - calwebb_nrslamp-spec2.cfg: [MIR_LRS-FIXEDSLIT, MIR_MRS, NRS_FIXEDSLIT, NRS_MSASPEC, NRS_IFU, + NRS_AUTOWAVE, NIS_WFSS, NRC_WFSS] + + - calwebb_tso-spec2.cfg: [MIR_LRS-SLITLESS, NRC_TSGRISM, NIS_SOSS, NRS_BRIGHTOBJ] + + - calwebb_image2.cfg: [NRC_IMAGE, NRC_TACQ, NRC_CORON, NRC_FOCUS, NRC_WFSC, NRC_TACONFIRM, + + MIR_IMAGE, MIR_TACQ, MIR_LYOT, MIR_4QPM, MIR_CORONCAL, MIR_TACONFIRM, + + NIS_IMAGE, NIS_FOCUS, NIS_AMI, NIS_TACQ, NIS_TACONFIRM, + + NRS_IMAGE, NRS_FOCUS, NRS_MIMF, NRS_BOTA, NRS_TACQ, NRS_TASLIT, NRS_TACONFIRM, NRS_CONFIRM, + NRS_WATA, NRS_MSATA, + + FGS_IMAGE, FGS_FOCUS] + + - calwebb_tso-image2.cfg: [NRC_TSIMAGE] + + - skip_2b.cfg: ["*DARK*", "*FLAT*", "*LED*", "*LAMP*", NRS_AUTOWAVE, FGS_ACQ1, FGS_ACQ2, + FGS_FINEGUIDE, FGS_ID-IMAGE, FGS_ID-STACK, FGS_TRACK, NIS_EXTCAL] + +# ---------------------------------------------------------------------------------------------- +# +# MANUAL UPDATE REQUIRED +# +# This section defines types for exceptional steps that do not use all of their defined types +# depending on EXP_TYPE. +# +# CRDS searches the cases top-to-bottom looking for an EXP_TYPE that glob-matches and +# returns the first match. The return value is used instead of the value from steps_to_reftypes. +# +# ---------------------------------------------------------------------------------------------- + +pipeline_exceptions: + + meta.visit.tsovisit: + default_missing: F + dont_replace: ["F", "FALSE", "NONE", "OFF"] + calwebb_detector1.cfg: calwebb_tso1.cfg + calwebb_image2.cfg: calwebb_tso-image2.cfg + calwebb_spec2.cfg: calwebb_tso-spec2.cfg + outlier_detection.cfg: outlier_detection_tso.cfg + + meta.instrument.lamp_state: + default_missing: F + dont_replace: ["F", "FALSE", "NONE", "OFF"] + calwebb_spec2.cfg: calwebb_nrslamp-spec2.cfg + + meta.visit.title: + default: UNDEFINED + do_replace: [".*WFSC.*"] + calwebb_image2.cfg: calwebb_wfs-image2.cfg + +steps_to_reftypes_exceptions: [] + # flat_field: + # - case1: + # exp_types: [NRS_FIXEDSLIT, NRS_IFU, NRS_MSASPEC, NRS_BRIGHTOBJ] + # reftypes: [dflat, fflat, sflat] + # - case2: + # exp_types: ["NRS_*"] + # reftypes: [flat, dflat, fflat, sflat] + # - case3: + # exp_types: ["*"] + # reftypes: [flat] + +# ---------------------------------------------------------------------------------------------- +# +# AUTOMATICALLY GENERATED (or... was anyway) from here down +# +# This section defines mappings generated by reflecting on the JWST cal code distribution +# +# ---------------------------------------------------------------------------------------------- + + + + + + + +# vvvvvvvv GENERATED vvvvvvvv +pipeline_cfgs_to_steps: + calwebb_dark.cfg: + - dq_init + - firstframe + - group_scale + - lastframe + - linearity + - refpix + - rscd + - saturation + - superbias + calwebb_detector1.cfg: + - dark_current + - dq_init + - firstframe + - gain_scale + - group_scale + - jump + - lastframe + - linearity + - persistence + - ramp_fit + - refpix + - rscd + - saturation + - superbias + calwebb_guider.cfg: + - dq_init + - flat_field + - guider_cds + calwebb_image2.cfg: + - assign_wcs + - bkg_subtract + - flat_field + - photom + - resample + calwebb_nrslamp-spec2.cfg: + - assign_wcs + - barshadow + - bkg_subtract + - cube_build + - extract_1d + - extract_2d + - msa_flagging + - resample_spec + - srctype + calwebb_spec2.cfg: + - assign_wcs + - barshadow + - bkg_subtract + - cube_build + - extract_1d + - extract_2d + - flat_field + - fringe + - imprint_subtract + - msa_flagging + - pathloss + - photom + - resample_spec + - srctype + - straylight + calwebb_tso-image2.cfg: + - assign_wcs + - flat_field + - photom + calwebb_tso-spec2.cfg: + - assign_wcs + - cube_build + - extract_1d + - extract_2d + - flat_field + - photom + - srctype + calwebb_tso1.cfg: + - dark_current + - dq_init + - gain_scale + - group_scale + - jump + - linearity + - ramp_fit + - refpix + - rscd + - saturation + - superbias + calwebb_wfs-image2.cfg: + - assign_wcs + - bkg_subtract + - flat_field + - photom + skip_2b.cfg: [] + +steps_to_reftypes: + assign_wcs: + - distortion + - filteroffset + - specwcs + - regions + - wavelengthrange + - camera + - collimator + - disperser + - fore + - fpa + - msa + - ote + - ifupost + - ifufore + - ifuslicer + barshadow: + - barshadow + bkg_subtract: + - wfssbkg + - wavelengthrange + cube_build: + - cubepar + - resol + dark_current: + - dark + dq_init: + - mask + extract_1d: + - extract1d + extract_2d: + - wavecorr + - wavelengthrange + firstframe: &id001 [] + flat_field: + - flat + - fflat + - sflat + - dflat + fringe: + - fringe + gain_scale: + - gain + group_scale: *id001 + guider_cds: *id001 + imprint_subtract: *id001 + jump: + - gain + - readnoise + lastframe: *id001 + linearity: + - linearity + msa_flagging: + - msaoper + pathloss: + - pathloss + persistence: + - trapdensity + - trappars + - persat + photom: + - photom + - area + ramp_fit: + - readnoise + - gain + refpix: + - refpix + resample: &id002 + - drizpars + resample_spec: *id002 + rscd: + - rscd + saturation: + - saturation + srctype: *id001 + straylight: + - regions + superbias: + - superbias + +exptypes_to_pipelines: + FGS_ACQ1: + - calwebb_guider.cfg + - skip_2b.cfg + FGS_ACQ2: + - calwebb_guider.cfg + - skip_2b.cfg + FGS_DARK: + - calwebb_dark.cfg + - skip_2b.cfg + FGS_FINEGUIDE: + - calwebb_guider.cfg + - skip_2b.cfg + FGS_FOCUS: + - calwebb_detector1.cfg + - calwebb_image2.cfg + FGS_ID-IMAGE: + - calwebb_guider.cfg + - skip_2b.cfg + FGS_ID-STACK: + - calwebb_guider.cfg + - skip_2b.cfg + FGS_IMAGE: + - calwebb_detector1.cfg + - calwebb_image2.cfg + FGS_INTFLAT: + - calwebb_detector1.cfg + - skip_2b.cfg + FGS_SKYFLAT: + - calwebb_detector1.cfg + - skip_2b.cfg + FGS_TRACK: + - calwebb_guider.cfg + - skip_2b.cfg + MIR_4QPM: + - calwebb_detector1.cfg + - calwebb_image2.cfg + MIR_CORONCAL: + - calwebb_detector1.cfg + - calwebb_image2.cfg + MIR_DARKALL: + - calwebb_dark.cfg + - skip_2b.cfg + MIR_DARKIMG: + - calwebb_dark.cfg + - skip_2b.cfg + MIR_DARKMRS: + - calwebb_dark.cfg + - skip_2b.cfg + MIR_FLATALL: + - calwebb_detector1.cfg + - skip_2b.cfg + MIR_FLATIMAGE: + - calwebb_detector1.cfg + - skip_2b.cfg + MIR_FLATIMAGE-EXT: + - calwebb_detector1.cfg + - skip_2b.cfg + MIR_FLATMRS: + - calwebb_detector1.cfg + - skip_2b.cfg + MIR_FLATMRS-EXT: + - calwebb_detector1.cfg + - skip_2b.cfg + MIR_IMAGE: + - calwebb_detector1.cfg + - calwebb_image2.cfg + MIR_LRS-FIXEDSLIT: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + MIR_LRS-SLITLESS: + - calwebb_tso1.cfg + - calwebb_tso-spec2.cfg + MIR_LYOT: + - calwebb_detector1.cfg + - calwebb_image2.cfg + MIR_MRS: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + MIR_TACONFIRM: + - calwebb_detector1.cfg + - calwebb_image2.cfg + MIR_TACQ: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NIS_AMI: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NIS_DARK: + - calwebb_dark.cfg + - skip_2b.cfg + NIS_EXTCAL: + - calwebb_detector1.cfg + - skip_2b.cfg + NIS_FOCUS: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NIS_IMAGE: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NIS_LAMP: + - calwebb_detector1.cfg + - skip_2b.cfg + NIS_SOSS: + - calwebb_tso1.cfg + - calwebb_tso-spec2.cfg + NIS_TACONFIRM: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NIS_TACQ: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NIS_WFSS: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + NRC_CORON: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRC_DARK: + - calwebb_dark.cfg + - skip_2b.cfg + NRC_FLAT: + - calwebb_detector1.cfg + - skip_2b.cfg + NRC_FOCUS: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRC_GRISM: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + NRC_IMAGE: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRC_LED: + - calwebb_detector1.cfg + - skip_2b.cfg + NRC_TACONFIRM: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRC_TACQ: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRC_TSGRISM: + - calwebb_tso1.cfg + - calwebb_tso-spec2.cfg + NRC_TSIMAGE: + - calwebb_tso1.cfg + - calwebb_tso-image2.cfg + NRC_WFSC: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRC_WFSS: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + NRS_AUTOFLAT: + - calwebb_detector1.cfg + - skip_2b.cfg + NRS_AUTOWAVE: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + NRS_BRIGHTOBJ: + - calwebb_tso1.cfg + - calwebb_tso-spec2.cfg + NRS_CONFIRM: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_DARK: + - calwebb_dark.cfg + - skip_2b.cfg + NRS_FIXEDSLIT: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + NRS_FOCUS: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_IFU: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + NRS_IMAGE: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_LAMP: + - calwebb_detector1.cfg + - skip_2b.cfg + NRS_MIMF: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_MSASPEC: + - calwebb_detector1.cfg + - calwebb_spec2.cfg + NRS_MSATA: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_TACONFIRM: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_TACQ: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_TASLIT: + - calwebb_detector1.cfg + - calwebb_image2.cfg + NRS_WATA: + - calwebb_detector1.cfg + - calwebb_image2.cfg + +exptypes_to_reftypes: + FGS_ACQ1: + - dflat + - fflat + - flat + - mask + - sflat + FGS_ACQ2: + - dflat + - fflat + - flat + - mask + - sflat + FGS_DARK: + - linearity + - mask + - refpix + - rscd + - saturation + - superbias + FGS_FINEGUIDE: + - dflat + - fflat + - flat + - mask + - sflat + FGS_FOCUS: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + FGS_ID-IMAGE: + - dflat + - fflat + - flat + - mask + - sflat + FGS_ID-STACK: + - dflat + - fflat + - flat + - mask + - sflat + FGS_IMAGE: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + FGS_INTFLAT: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + FGS_SKYFLAT: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + FGS_TRACK: + - dflat + - fflat + - flat + - mask + - sflat + MIR_4QPM: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + MIR_CORONCAL: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + MIR_DARKALL: + - linearity + - mask + - refpix + - rscd + - saturation + - superbias + MIR_DARKIMG: + - linearity + - mask + - refpix + - rscd + - saturation + - superbias + MIR_DARKMRS: + - linearity + - mask + - refpix + - rscd + - saturation + - superbias + MIR_FLATALL: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + MIR_FLATIMAGE: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + MIR_FLATIMAGE-EXT: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + MIR_FLATMRS: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + MIR_FLATMRS-EXT: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + MIR_IMAGE: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + MIR_LRS-FIXEDSLIT: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + MIR_LRS-SLITLESS: + - area + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - wavecorr + - wavelengthrange + MIR_LYOT: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + MIR_MRS: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + MIR_TACONFIRM: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + MIR_TACQ: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NIS_AMI: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NIS_DARK: + - linearity + - mask + - refpix + - rscd + - saturation + - superbias + NIS_EXTCAL: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + NIS_FOCUS: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NIS_IMAGE: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NIS_LAMP: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + NIS_SOSS: + - area + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - wavecorr + - wavelengthrange + NIS_TACONFIRM: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NIS_TACQ: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NIS_WFSS: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + NRC_CORON: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRC_DARK: + - linearity + - mask + - refpix + - rscd + - saturation + - superbias + NRC_FLAT: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + NRC_FOCUS: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRC_GRISM: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + NRC_IMAGE: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRC_LED: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + NRC_TACONFIRM: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRC_TACQ: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRC_TSGRISM: + - area + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - wavecorr + - wavelengthrange + NRC_TSIMAGE: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - wavelengthrange + NRC_WFSC: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRC_WFSS: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + NRS_AUTOFLAT: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + NRS_AUTOWAVE: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + NRS_BRIGHTOBJ: + - area + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - wavecorr + - wavelengthrange + NRS_CONFIRM: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_DARK: + - linearity + - mask + - refpix + - rscd + - saturation + - superbias + NRS_FIXEDSLIT: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + NRS_FOCUS: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_IFU: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + NRS_IMAGE: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_LAMP: + - dark + - gain + - linearity + - mask + - persat + - readnoise + - refpix + - rscd + - saturation + - superbias + - trapdensity + - trappars + NRS_MIMF: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_MSASPEC: + - area + - barshadow + - camera + - collimator + - cubepar + - dark + - dflat + - disperser + - distortion + - drizpars + - extract1d + - fflat + - filteroffset + - flat + - fore + - fpa + - fringe + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - msaoper + - ote + - pathloss + - persat + - photom + - readnoise + - refpix + - regions + - resol + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavecorr + - wavelengthrange + - wfssbkg + NRS_MSATA: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_TACONFIRM: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_TACQ: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_TASLIT: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + NRS_WATA: + - area + - camera + - collimator + - dark + - dflat + - disperser + - distortion + - drizpars + - fflat + - filteroffset + - flat + - fore + - fpa + - gain + - ifufore + - ifupost + - ifuslicer + - linearity + - mask + - msa + - ote + - persat + - photom + - readnoise + - refpix + - regions + - rscd + - saturation + - sflat + - specwcs + - superbias + - trapdensity + - trappars + - wavelengthrange + - wfssbkg + + diff --git a/crds/tmt/locate.py b/crds/tmt/locate.py index 7cb11dd36..8395afe0e 100644 --- a/crds/tmt/locate.py +++ b/crds/tmt/locate.py @@ -35,7 +35,6 @@ get_all_tpninfos = TYPES.get_all_tpninfos from crds.tmt.pipeline import header_to_reftypes, header_to_pipelines -from crds.tmt.pipeline import get_reftypes, get_pipelines # ======================================================================= @@ -112,7 +111,7 @@ def get_file_properties(filename): >> get_file_properties("test_data/s7g1700gl_dead.fits") """ - if rmap.is_mapping(filename): + if config.is_mapping(filename): try: return decompose_newstyle_name(filename)[2:4] except Exception: @@ -338,13 +337,13 @@ def reference_keys_to_dataset_keys(rmapping, header): # variables so they need to be incidentally defined. This currently doesn't # work out if the rmap doesn't use them. Condition variables are eval'ed in # expressions. - + if "SUBARRAY" not in header: header["SUBARRAY"] = header["META.SUBARRAY.NAME"] = "UNDEFINED" - + if "EXP_TYPE" not in header: header["EXP_TYPE"] = header["META.EXPOSURE.TYPE"] = "UNDEFINED" - + if "USEAFTER" not in header and "META.USEAFTER" in header: header["USEAFTER"] = header["META.USEAFTER"] if "USEAFTER" not in header and "META.USEAFTER" in header: @@ -362,7 +361,7 @@ def reference_keys_to_dataset_keys(rmapping, header): header["TIME-OBS"] = header["META.OBSERVATION.TIME"] = reformatted[1] log.verbose("reference_to_dataset output header:\n", log.PP(header), verbosity=80) - + return header # ============================================================================= @@ -475,7 +474,7 @@ def locate_dir(instrument, mode=None): # XXXX the first translation should be the FITS keyword assuming there is one!! CROSS_STRAPPED_KEYWORDS = { - + # META.REF_FILE.X is now obsolete but retained for backward compatibility. # it was replaced by META.X @@ -493,7 +492,7 @@ def locate_dir(instrument, mode=None): "META.CALIBRATION_SOFTWARE_VERSION" : ["CAL_VER", "CALIBRATION_SOFTWARE_VERSION"], "META.OBSERVATION.DATE" : ["DATE-OBS"], "META.OBSERVATION.TIME" : ["TIME-OBS"], - + # These should all be stock DM:FITS, automatic # "META.INSTRUMENT.BAND" : ["BAND"], @@ -510,7 +509,7 @@ def locate_dir(instrument, mode=None): # "META.SUBARRAY.YSIZE" : ["SUBSIZE2"], # "META.SUBARRAY.FASTAXIS" : ["FASTAXIS"], # "META.SUBARRAY.SLOWAXIS" : ["SLOWAXIS"], - + # "META.EXPOSURE.TYPE" : ["EXP_TYPE"], # "META.EXPOSURE.READPATT" : ["READPATT"], @@ -602,6 +601,9 @@ def _hack_fits_translation(model_key): log.append_crds_filter(add_fits_keywords) +def disable_fits_annotations(): + log.remove_crds_filter(add_fits_keywords) + # ============================================================================ def test(): @@ -609,4 +611,3 @@ def test(): import doctest from . import locate return doctest.testmod(locate) - diff --git a/crds/tmt/pipeline.py b/crds/tmt/pipeline.py index 53936a118..4ca93f82b 100644 --- a/crds/tmt/pipeline.py +++ b/crds/tmt/pipeline.py @@ -7,11 +7,15 @@ >>> header_to_reftypes(test_header("0.7.0", "NRS_BRIGHTOBJ")) ['area', 'camera', 'collimator', 'dark', 'disperser', 'distortion', 'drizpars', 'extract1d', 'filteroffset', 'fore', 'fpa', 'fringe', 'gain', 'ifufore', 'ifupost', 'ifuslicer', 'ipc', 'linearity', 'mask', 'msa', 'ote', 'pathloss', 'photom', 'readnoise', 'refpix', 'regions', 'rscd', 'saturation', 'specwcs', 'straymask', 'superbias', 'v2v3', 'wavelengthrange'] ->>> header_to_reftypes(test_header("0.7.0", "MIR_IMAGE")) -['area', 'camera', 'collimator', 'dark', 'disperser', 'distortion', 'filteroffset', 'flat', 'fore', 'fpa', 'gain', 'ifufore', 'ifupost', 'ifuslicer', 'ipc', 'linearity', 'mask', 'msa', 'ote', 'photom', 'readnoise', 'refpix', 'regions', 'rscd', 'saturation', 'specwcs', 'superbias', 'v2v3', 'wavelengthrange'] +>>> header_to_reftypes(test_header("0.13.0", "MIR_IMAGE")) +['area', 'camera', 'collimator', 'dark', 'dflat', 'disperser', 'distortion', 'drizpars', 'fflat', 'filteroffset', 'flat', 'fore', 'fpa', 'gain', 'ifufore', 'ifupost', 'ifuslicer', 'linearity', 'mask', 'msa', 'ote', 'persat', 'photom', 'readnoise', 'refpix', 'regions', 'rscd', 'saturation', 'sflat', 'specwcs', 'superbias', 'trapdensity', 'trappars', 'wavelengthrange', 'wfssbkg'] ->>> header_to_reftypes(test_header("0.7.0", "MIR_LRS-FIXEDSLIT")) -['area', 'camera', 'collimator', 'dark', 'disperser', 'distortion', 'drizpars', 'extract1d', 'filteroffset', 'flat', 'fore', 'fpa', 'fringe', 'gain', 'ifufore', 'ifupost', 'ifuslicer', 'ipc', 'linearity', 'mask', 'msa', 'ote', 'pathloss', 'photom', 'readnoise', 'refpix', 'regions', 'rscd', 'saturation', 'specwcs', 'straymask', 'superbias', 'v2v3', 'wavelengthrange'] + +>>> header = test_header("0.13.0", "MIR_LRS-FIXEDSLIT") +>>> header_to_pipelines(header) +['calwebb_detector1.cfg', 'calwebb_nrslamp-spec2.cfg'] +>>> header_to_reftypes(header) +['barshadow', 'camera', 'collimator', 'cubepar', 'dark', 'disperser', 'distortion', 'drizpars', 'extract1d', 'filteroffset', 'fore', 'fpa', 'gain', 'ifufore', 'ifupost', 'ifuslicer', 'linearity', 'mask', 'msa', 'msaoper', 'ote', 'persat', 'readnoise', 'refpix', 'regions', 'resol', 'rscd', 'saturation', 'specwcs', 'superbias', 'trapdensity', 'trappars', 'wavecorr', 'wavelengthrange', 'wfssbkg'] >>> header_to_pipelines(test_header("0.7.0", "FGS_DARK")) ['calwebb_dark.cfg', 'skip_2b.cfg'] @@ -19,19 +23,33 @@ >>> header_to_pipelines(test_header("0.7.0", "NRS_BRIGHTOBJ")) ['calwebb_sloper.cfg', 'calwebb_spec2.cfg'] +>>> header = test_header("0.13.0", "MIR_IMAGE", tsovisit="F") +>>> header_to_pipelines(header) +['calwebb_detector1.cfg', 'calwebb_image2.cfg'] + +>>> header = test_header("0.13.0", "MIR_IMAGE", tsovisit="T") +>>> header_to_pipelines(header) +['calwebb_tso1.cfg', 'calwebb_tso-image2.cfg'] + >>> header_to_pipelines(test_header("0.7.0", "MIR_IMAGE")) ['calwebb_sloper.cfg', 'calwebb_image2.cfg'] - + >>> header_to_pipelines(test_header("0.7.0", "MIR_LRS-FIXEDSLIT")) ['calwebb_sloper.cfg', 'calwebb_spec2.cfg'] +>>> header = test_header("0.13.8", "MIR_IMAGE", visitype="GENERIC") +>>> _get_pipelines("MIR_IMAGE", "0.13.8", "jwst_0552.pmap") +['calwebb_detector1.cfg', 'calwebb_image2.cfg'] +>>> header_to_pipelines(header) +['calwebb_detector1.cfg', 'calwebb_image2.cfg'] + +>>> header = test_header("0.13.8", "MIR_IMAGE", visitype="PRIME_WFSC_ROUTINE") +>>> header_to_pipelines(header) +['calwebb_detector1.cfg', 'calwebb_wfs-image2.cfg'] + >>> _get_missing_calver("0.7.0") '0.7.0' ->>> s = _get_missing_calver(None) ->>> isinstance(s, str) -True - >>> s = _get_missing_calver() >>> isinstance(s, str) True @@ -53,6 +71,9 @@ >>> os.path.basename(_get_config_refpath("jwst_0477.pmap", "0.10.1")) 'jwst_system_crdscfg_b7.2.yaml' + +>>> os.path.basename(_get_config_refpath("jwst_0552.pmap", "0.13.8")) +'jwst_system_crdscfg_b7.4.yaml' """ import os.path @@ -61,19 +82,21 @@ # import yaml DEFERRED +from pkg_resources import parse_version + # -------------------------------------------------------------------------------------- -# from jwst import version DEFERRED +# from jwst import __version__ DEFERRED # -------------------------------------------------------------------------------------- import crds -from crds.core import log, utils +from crds.core import log, utils, config from crds.core.log import srepr from crds.client import api # -------------------------------------------------------------------------------------- -def test_header(calver, exp_type): +def test_header(calver, exp_type, tsovisit="F", lamp_state="OFF", visitype="GENERIC"): """Create a header-like dictionary from `calver` and `exp_type` to support testing header-based functions. """ @@ -82,19 +105,22 @@ def test_header(calver, exp_type): "REFTYPE" : "CRDSCFG", "META.CALIBRATION_SOFTWARE_VERSION" : calver, "META.EXPOSURE.TYPE" : exp_type, + "META.VISIT.TSOVISIT" : tsovisit, + "META.INSTRUMENT.LAMP_STATE" : lamp_state, + "META.VISIT.TITLE" : visitype, } return header # -------------------------------------------------------------------------------------- def _get_missing_calver(cal_ver=None): - """If `cal_ver` is None, return the calibration software version for + """If `cal_ver` is None, return the calibration software version for the installed version of calibration code. Otherwise return `cal_ver` unchanged. """ if cal_ver is None: - from jwst import version - cal_ver = version.__version__ + from jwst import __version__ as calver2 + return calver2 return cal_ver def _get_missing_context(context=None): @@ -102,7 +128,7 @@ def _get_missing_context(context=None): return context unchanged. """ return "jwst-operational" if context is None else context - + # -------------------------------------------------------------------------------------- def header_to_reftypes(header, context=None): @@ -111,22 +137,16 @@ def header_to_reftypes(header, context=None): Return a list of reftype names. """ - with log.warn_on_exception("Failed determining exp_type, cal_ver from header", log.PP(header)): + with log.warn_on_exception("Failed determining reftypes for", log.PP(header)): exp_type, cal_ver = _header_to_exptype_calver(header) - return get_reftypes(exp_type, cal_ver, context) - return [] - -def get_reftypes(exp_type, cal_ver=None, context=None): - """Given `exp_type` and `cal_ver` and `context`, locate the appropriate SYSTEM CRDSCFG - reference file and determine the reference types required to process every pipeline Step - nominally associated with that exp_type. - """ - context = _get_missing_context(context) - cal_ver = _get_missing_calver(cal_ver) - with log.warn_on_exception("Failed determining required reftypes from", - "EXP_TYPE", srepr(exp_type), "CAL_VER", srepr(cal_ver)): config_manager = _get_config_manager(context, cal_ver) - return config_manager.exptype_to_reftypes(exp_type) + pipelines = header_to_pipelines(header, context) + reftypes = set() + for cfg in pipelines: + steps = config_manager.pipeline_cfgs_to_steps[cfg] + for step in steps: + reftypes |= set(config_manager.steps_to_reftypes[step]) + return sorted(list(reftypes)) return [] # This is potentially an external interface to system data processing (SDP) / the archive pipeline. @@ -134,21 +154,45 @@ def header_to_pipelines(header, context=None): """Given a dataset `header`, extract the EXP_TYPE or META.EXPOSURE.TYPE keyword from and use it to look up the pipelines required to process it. - Return a list of reftype names. + Return a list of pipeline .cfg names. """ with log.augment_exception("Failed determining exp_type, cal_ver from header", log.PP(header)): exp_type, cal_ver = _header_to_exptype_calver(header) - return get_pipelines(exp_type, cal_ver, context) - -def get_pipelines(exp_type, cal_ver=None, context=None): + config_manager = _get_config_manager(context, cal_ver) + pipelines = _get_pipelines(exp_type, cal_ver, context) # uncorrected + if config_manager.pipeline_exceptions: # correction based on extra non-EXP_TYPE params + pipelines2 = [] + for cfg in pipelines: + for param, exceptions in config_manager.pipeline_exceptions.items(): + exceptions = dict(exceptions) + dont_replace = exceptions.pop("dont_replace", []) + do_replace = exceptions.pop("do_replace", []) + default_missing = exceptions.pop("default_missing", "UNDEFINED") + paramval = header.get(param.upper(), default_missing) + for dont in dont_replace: + if re.match(config.complete_re(dont), paramval): + break + else: + if dont_replace: + cfg = exceptions.get(cfg, cfg) + for do in do_replace: + if re.match(config.complete_re(do), paramval): + cfg = exceptions.get(cfg, cfg) + pipelines2.append(cfg) + pipelines = pipelines2 + log.verbose("Applicable pipelines for", srepr(exp_type), "are", srepr(pipelines)) + return pipelines + +def _get_pipelines(exp_type, cal_ver=None, context=None): """Given `exp_type` and `cal_ver` and `context`, locate the appropriate SYSTEM CRDSCFG reference file and determine the sequence of pipeline .cfgs required to process that exp_type. + + NOTE: This is an uncorrected result, config_manager.pipeline_exceptions is used to + alter this based on other header parameters. """ - context = _get_missing_context(context) - cal_ver = _get_missing_calver(cal_ver) with log.augment_exception("Failed determining required pipeline .cfgs for", - "EXP_TYPE", srepr(exp_type), "CAL_VER", srepr(cal_ver)): + "EXP_TYPE", srepr(exp_type)): config_manager = _get_config_manager(context, cal_ver) return config_manager.exptype_to_pipelines(exp_type) @@ -157,17 +201,15 @@ def reftype_to_pipelines(reftype, cal_ver=None, context=None): reference file and determine the sequence of pipeline .cfgs required to process that exp_type. """ - context = _get_missing_context(context) - cal_ver = _get_missing_calver(cal_ver) with log.augment_exception("Failed determining required pipeline .cfgs for", - "EXP_TYPE", srepr(reftype), "CAL_VER", srepr(cal_ver)): + "REFTYPE", srepr(reftype)): config_manager = _get_config_manager(context, cal_ver) return config_manager.reftype_to_pipelines(reftype) - def _header_to_exptype_calver(header): """Given dataset `header`, return the EXP_TYPE and CAL_VER values.""" cal_ver = header.get("META.CALIBRATION_SOFTWARE_VERSION", header.get("CAL_VER")) + cal_ver = _get_missing_calver(cal_ver) exp_type = header.get("META.EXPOSURE.TYPE", header.get("EXP_TYPE", "UNDEFINED")) return exp_type, cal_ver @@ -183,7 +225,7 @@ def _load_refpath(context, refpath): """Given `context` and SYSTEM CRDSCFG reference at `refpath`, construct a CrdsCfgManager.""" import yaml with open(refpath) as opened: - crdscfg = yaml.load(opened) + crdscfg = yaml.safe_load(opened) return CrdsCfgManager(context, refpath, crdscfg) # -------------------------------------------------------------------------------------- @@ -196,21 +238,26 @@ def _load_refpath(context, refpath): ('0.9.1', "jwst_system_crdscfg_b7.1.1.yaml"), ('0.9.3', "jwst_system_crdscfg_b7.1.3.yaml"), ('0.10.0', "jwst_system_crdscfg_b7.2.yaml"), - ('999.0.0', "jwst_system_crdscfg_b7.2.yaml"), # latest backstop + ('0.13.0', "jwst_system_crdscfg_b7.3.yaml"), + ('0.13.8', "jwst_system_crdscfg_b7.4.yaml"), + ('0.16.0', "jwst_system_crdscfg_b7.5.yaml"), + ('999.0.0', "jwst_system_crdscfg_b7.5.yaml"), # latest backstop ] - + def _get_config_refpath(context, cal_ver): """Given CRDS `context` and calibration s/w version `cal_ver`, identify the applicable SYSTEM CRDSCFG reference file, cache it, and return the file path. """ + context = _get_missing_context(context) + cal_ver = _get_missing_calver(cal_ver) i = 0 while (i < len(REFPATHS)-1 and not _versions_lt(cal_ver, REFPATHS[i+1][0])): i += 1 refpath = os.path.join(HERE, REFPATHS[i][1]) try: # Use a normal try/except because exceptions are expected. header = { - "META.INSTRUMENT.NAME" : "SYSTEM", - "META.CALIBRATION_SOFTWARE_VERSION": cal_ver + "META.INSTRUMENT.NAME" : "SYSTEM", + "META.CALIBRATION_SOFTWARE_VERSION": cal_ver } pmap = crds.get_symbolic_mapping(context) imap = pmap.get_imap("system") @@ -227,16 +274,6 @@ def _get_config_refpath(context, cal_ver): "to determine applicable default reftypes for", srepr(cal_ver)) return refpath -def _digits_only(version): - """ - >>> _digits_only("0.7.7") - (0, 7, 7) - >>> _digits_only("0.10.1a1") - (0, 10, 1) - """ - match = re.match("([0-9.]+).*", version) - return tuple([int(dig) for dig in match.group(1).split(".") if dig]) - def _versions_lt(v1, v2): """Compare two semantic version numbers and account for issues like '10' < '9'. Return True IFF `v1` < `v2`. @@ -274,12 +311,28 @@ def _versions_lt(v1, v2): >>> _versions_gte("0.10.1", "0.10.1dev20000") True """ - v1, v2 = _digits_only(v1), _digits_only(v2) - return v1 < v2 + return _reduce_ver(v1) < _reduce_ver(v2) def _versions_gte(v1, v2): """""" - return not _versions_lt(v1, v2) + return _reduce_ver(v1) >= _reduce_ver(v2) + +def _reduce_ver(ver): + """ + >>> _reduce_ver("1") + (1, 0, 0) + >>> _reduce_ver("1.2") + (1, 2, 0) + >>> _reduce_ver("1.2.3") + (1, 2, 3) + >>> _reduce_ver("1.2.3.4") + (1, 2, 3) + """ + ver = parse_version(ver).base_version + parts = ver.split(".") + while len(parts) < 3: + parts.append("0") + return tuple(map(int, parts))[:3] class CrdsCfgManager: """The CrdsCfgManager handles using SYSTEM CRDSCFG information to compute things.""" @@ -287,7 +340,10 @@ def __init__(self, context, refpath, crdscfg): self._context = context self._refpath = refpath self._crdscfg = utils.Struct(crdscfg) - + self.pipeline_exceptions = self._crdscfg.get("pipeline_exceptions", {}) + self.pipeline_cfgs_to_steps = self._crdscfg.get("pipeline_cfgs_to_steps", {}) + self.steps_to_reftypes = self._crdscfg.get("steps_to_reftypes", {}) + def exptype_to_reftypes(self, exp_type): """For a given EXP_TYPE string, return a list of reftypes needed to process that EXP_TYPE through the data levels appropriate for that EXP_TYPE. @@ -295,21 +351,18 @@ def exptype_to_reftypes(self, exp_type): Return [reftypes, ... ] """ reftypes = self._crdscfg.exptypes_to_reftypes[exp_type] - log.verbose("Applicable reftypes for", srepr(exp_type), + log.verbose("Applicable reftypes for", srepr(exp_type), "determined by", srepr(os.path.basename(self._refpath)), "are", srepr(reftypes)) return reftypes def exptype_to_pipelines(self, exp_type): - """For a given EXP_TYPE string, return a list of pipeline .cfg's needed to + """For a given EXP_TYPE string, return a list of pipeline .cfg's needed to process that EXP_TYPE through the appropriate data levels. Return [.cfg's, ... ] """ pipelines = self._crdscfg.exptypes_to_pipelines[exp_type] - log.verbose("Applicable pipelines for", srepr(exp_type), - "determined by", srepr(os.path.basename(self._refpath)), - "are", srepr(pipelines)) return pipelines def reftype_to_pipelines(self, reftype): @@ -329,7 +382,7 @@ def invert_list_mapping(mapping): for key, values in mapping.items(): for value in values: inverted[value].add(key) - return { key:list(sorted(values)) + return { key:list(sorted(values)) for (key,values) in inverted.items() } def scan_exp_type_coverage(): @@ -340,9 +393,20 @@ def scan_exp_type_coverage(): if exp_type in ["ANY","N/A"]: continue with log.warn_on_exception("failed determining reftypes for", repr(exp_type)): - reftypes = get_reftypes(exp_type) + reftypes = _get_reftypes(exp_type) log.verbose("Reftypes for", repr(exp_type), "=", repr(reftypes)) +def _get_reftypes(exp_type, cal_ver=None, context=None): + """Given `exp_type` and `cal_ver` and `context`, locate the appropriate SYSTEM CRDSCFG + reference file and determine the reference types required to process every pipeline Step + nominally associated with that exp_type. + """ + with log.warn_on_exception("Failed determining required reftypes from", + "EXP_TYPE", srepr(exp_type)): + config_manager = _get_config_manager(context, cal_ver) + return config_manager.exptype_to_reftypes(exp_type) + return [] + def test(): """Run the module doctests.""" import doctest diff --git a/crds/tmt/schema.py b/crds/tmt/schema.py index 71532d297..7e63081b4 100644 --- a/crds/tmt/schema.py +++ b/crds/tmt/schema.py @@ -1,5 +1,5 @@ """This module defines functions for loading JWST's data model schema files which -describe reference parameters and their values. The schema files are used to +describe reference parameters and their values. The schema files are used to validate reference and rmap parameters to screen out illegal values. The primary functions provided by this module are: @@ -20,7 +20,7 @@ import crds from crds.core import log, utils, heavy_client, config -from crds.certify import TpnInfo +from crds.certify.generic_tpn import TpnInfo # ==================================================================================== @@ -44,7 +44,7 @@ def get_exptypes(instrument=None): if value.startswith(INSTR_PREFIX[instrument.lower()])]) def get_schema_tpninfos(refpath): - """Load the list of TPN info tuples corresponding to `instrument` and + """Load the list of TPN info tuples corresponding to `instrument` and `filekind` from it's .tpn file. """ with log.warn_on_exception("Failed loading schema constraints for", repr(refpath)): @@ -106,7 +106,7 @@ def _load_schema(schema_name=None): return model.schema def _schema_to_flat(schema): - """Load the specified data model schema and return a flat dictionary from + """Load the specified data model schema and return a flat dictionary from data model dotted path strings to TpnInfo objects. """ flat = _x_schema_to_flat(schema) @@ -128,12 +128,12 @@ def _x_schema_to_flat(schema): if feature in schema: log.verbose_warning("Schema item has unhandled feature {}.", verbosity=80) return None - + if "anyOf" in schema and "type" in schema["anyOf"]: schema_type = schema["anyOf"]["type"] else: schema_type = schema.get("type", "null") - + if schema_type == "object": subprops = schema["properties"] for prop in subprops: @@ -166,13 +166,13 @@ def type_or_null(names): OPTIONAL_TYPES = type_or_null(BASIC_TYPES) # -# Only the first character of the field is stored, i.e. Header == H +# Only the first character of the field is stored, i.e. Header == H # -# name = field identifier -# keytype = (Header|Group|Column) -# datatype = (Integer|Real|Logical|Double|Character) -# presence = (Optional|Required) -# values = [...] +# name = field identifier +# keytype = (Header|Group|Column) +# datatype = (Integer|Real|Logical|Double|Character) +# presence = (Optional|Required) +# values = [...] # # TpnInfo = namedtuple("TpnInfo", "name,keytype,datatype,presence,values") # @@ -182,7 +182,7 @@ def type_or_null(names): "INTEGER" : ("I", "O"), "NUMBER" : ("D", "O"), "BOOLEAN" : ("L", "O"), - + ("STRING", "NULL") : ("C", "O"), ("INTEGER", "NULL") : ("I", "O"), ("NUMBER", "NULL") : ("D", "O"), @@ -205,7 +205,7 @@ def _flat_to_tpns(flat=None, schema_name=None): value = tuple(value) datatype = SCHEMA_TYPE_TO_TPN.get(value, None) if datatype is not None: - tpn = TpnInfo(name=basekey.upper(), keytype="H", datatype=datatype[0], + tpn = TpnInfo(name=basekey.upper(), keytype="H", datatype=datatype[0], presence=datatype[1], values=legal_values) log.verbose("Adding tpn constraint from DM schema:", repr(tpn), verbosity=65) tpns.append(tpn) @@ -233,7 +233,7 @@ def _get_fits_to_dm(schema=None): def dm_to_fits(key): """Return the FITS keyword for DM `key` or None. - + >>> dm_to_fits('META.SUBARRAY.NAME') 'SUBARRAY' """ @@ -244,7 +244,7 @@ def dm_to_fits(key): def fits_to_dm(key): """Return the DM keyword for FITS `key` or None. - + >>> fits_to_dm('SUBARRAY') 'META.SUBARRAY.NAME' """ @@ -260,4 +260,3 @@ def main(): if __name__ == "__main__": main() -