Fits
Validation of FITS data files
HduMeta
dataclass
HduMeta(uniform: None | ObjectMetadata = None, by_index: dict[int, ObjectMetadata] = dict())
check_file
check_file(hdul: HDUList, spec: Filetype) -> dict[str, list[str]]
Compare FILE to the expectations described by SPEC. Return a semi-structured description of the differences. An empty dict means no significant differences were found.
check_hdu
check_hdu(hdu: _BaseHDU, spec: DataObject, valopts: FiletypeValidationOptions) -> dict[str, list[str]]
Does hdu match spec (possibly skipping some checks as specified
in valopts?
Returns:
-
dict[str, list[str]]–dict like {check_name: failures}. Empty if all checks passed.
check_hdu_array_props
check_hdu_array_props(hdu: _BaseHDU, spec: DataObject, valopts: FiletypeValidationOptions) -> list[str]
Does hdu have the array properties specified in spec?
Returns:
-
list[str]–[] if match is ok, list of failures if not.
check_hdu_meta
check_hdu_meta(hdu: _BaseHDU, spec: DataObject, _valopts: FiletypeValidationOptions) -> dict[str, list[str]]
Check the metadata (i.e. header) of an individual HDU against spec.
check_hdu_schema
check_hdu_schema(hdu: _BaseHDU, spec: DataObject, _valopts: FiletypeValidationOptions) -> dict[str, list[str]]
Does this HDU match the schema specified in spec?
Returns:
-
dict[str, list[str]]–{} if match is ok, dict of failures if not.
check_hdu_type
check_hdu_type(hdu: _BaseHDU, spec: DataObject, _valopts: FiletypeValidationOptions) -> list[str]
Does HDU have the primary / extension type given in spec?
Returns:
-
list[str]–[] if match is ok, list of failures if not.