def _invert_instr_dict(dct): """Invert a set of nested dictionaries of the form {instr: {key: val}} to create a dict of the form {instr: {val: key}}. """ inverted = {} for instr in dct: inverted[instr] = utils.invert_dict(dct[instr]) return inverted
def _get_fits_to_dm(schema=None): """Return mapping from FITS keyword to DM dotted path string.""" return utils.invert_dict(_get_dm_to_fits(schema))