def cross_strap_header(header): """Set up keyword equivalencies in a copy of `header`. Ensure both FITS and datamodel dotted path variants are defined for each keyword. Also add variations defined by observatory locator module CROSS_STRAPPED_KEYWORDS. """ crossed = dict(header) try: locator = utils.header_to_locator(header) except Exception: log.verbose_warning( "Cannot identify observatory from header. Skipping keyword aliasing") return crossed equivalency_pairs = locator.get_cross_strapped_pairs(header) for pair in equivalency_pairs: _cross_strap_pair(crossed, pair) return crossed
def header_to_pipelines(header, context=None): """Based on `header` and `context` provide the project specific list of calibration code pipelines (.cfg files) used to process a dataset with `header`. """ locator = utils.header_to_locator(header) return locator.header_to_pipelines(header, context)