validate_file¶
- solarnet_metadata.validation.validate_file(file_path: Path, warn_empty_keyword: bool = False, warn_no_comment: bool = False, warn_data_type: bool = False, warn_missing_optional: bool = False, schema: SOLARNETSchema | None = None) List[str][source]¶
Validates a FITS file against the SOLARNET schema requirements.
This function performs multiple validation checks: 1. Verifies all required keywords are present based on HDU type 2. Checks for pattern-based keywords when specified in the schema 3. Validates each keyword, value, and comment according to FITS standards 4. Optionally validates data types against the schema specifications
- Parameters:
file_path (Path) – The path to the FITS file to validate.
warn_empty_keyword (bool, default False) – Whether to report warnings for empty keywords.
warn_no_comment (bool, default False) – Whether to report warnings for keywords missing comments.
warn_data_type (bool, default False) – Whether to validate and report warnings about incorrect data types.
warn_missing_optional (bool, default False) – Whether to report warnings for optional keywords that aren’t included.
schema (Optional[SOLARNETSchema], default None) – The schema to validate against. If None, the default SOLARNET schema is used.
- Returns:
validation_findings – A list of validation issues found; empty if the file is valid.
- Return type:
List[str]