check_obs_hdu¶
- solarnet_metadata.validation.check_obs_hdu(header: Header, is_obs: bool = False) Tuple[bool, List[str]][source]¶
Check and validate the OBS_HDU keyword in a FITS header.
This function validates whether a header contains a properly formatted OBS_HDU keyword (with value 0 or 1) and reconciles any discrepancies between the header value and the provided is_obs parameter.
- Parameters:
header (fits.Header) – The FITS header to check for OBS_HDU keyword.
is_obs (bool, default False) – Initial assumption about whether this is an observation HDU.
- Returns:
is_obs (bool) – The resolved observation HDU status, potentially modified based on the header’s OBS_HDU value.
validation_findings (List[str]) – A list of validation issues found; empty if OBS_HDU is valid.
Notes
If there are discrepancies between the provided is_obs parameter and the header’s OBS_HDU value, this function will override is_obs to match the header and log appropriate warnings.