scieee AI-readable full text Open interactive document viewer

Enabling Standardized Solar Observations: A Python Package for SOLARNET Metadata Compliance

Robbertz, Andrew; Haugan, Stein Vidar Hagfors; Fredvik, Terje; Christe, Steven; Löfdahl, Mats

Abstract

This presentation demonstrates the key features of the package, its applications in streamlining data processing workflows, and highlight its role in fostering greater collaboration within the solar physics community. Attendees will gain insights into how this tool can be leveraged to improve data standardization and reusability in their own research and development.

Full text

Enabling Standardized Solar Observations A Python Package for SOLARNET Metadata Compliance Andrew Robbertz1,2, Stein Vidar Hagfors Haugan3, Terje Fredvik3, Steven Christe1, Mats G. Löfdahl 4 1. NASA Goddard Space Flight Center, Greenbelt, MD, United States 2. General Dynamics Mission Systems, Fairfax, VA, United States 3. Institute of Theoretical Astrophysics, University of Oslo 4. Institute for Solar Physics, Stockholm University SOLARNET Metadata Overview •In development since 2013, the SOLARNET Metadata Recommendations for Solar Observations aims to foster more collaboration and data sharing between both groundbased and space-based Solar observatories. •These recommendations are meant to function as a common reference to which even existing diverse data sets may be related, for ingestion into solar virtual observatories and for analysis by generic software. 1. About file formats 2. Header and Data Units (HDUs) in FITS files 3. The World Coordinate System (WCS) and related keywords 4. Time-related WCS keywords 5. Description of data contents 5.1 Data type/units (BTYPE/BNAME/BUNIT) 5.2 Exposure time, binning factors 5.3 Cadence 5.4 Instrument/data characteristics etc 5.5 Quality aspects 5.6 Data statistics 6. Metadata about affiliation, origin, acquisition, etc 7. Grouping 8. Pipeline processing applied to the data 8.1 Basic description of processing software 8.2 Detailed description of all processing steps 9. Integrity and administrative information 10. Reporting of events detected by the pipeline/spacecraft … and more! 10/17/2025 https://github.com/IHDE-Alliance/solarnet_metadata 2 Community Collaboration •Supporting original authors to create GitHub community repository •Please submit GitHub issues to improve/clarify/extend the documentation! •Latest Recommendations at https://solarnetmetadata.readthedocs.io/ •New: Index mechanism for SOLARNET Keywords. •New: Developing Python package for SOARNET Metadata templating and validation 10/17/2025 https://github.com/IHDE-Alliance/solarnet_metadata 3 The SOLARNET Metadata Package •Currently in Beta development, and seeking for feedback from developers and scientists, the solarnet_metadata Python package currently provides interfaces for: •Templating SOLARNET metadata keywords •Validating FITS files against the SOLARNET recommendations •Read more on our Users Guide: https://solarnetmetadata.readthedocs.io/en/solarnet_metadata_package/userguide/index.html 10/17/2025 https://github.com/IHDE-Alliance/solarnet_metadata 4 Creating Keyword Templates •Templates based on: •Whether the header is the Primary Header •Whether the header is an Observational data header •The Observatory Type (ground-based, earth-orbiting, deep-space) •The Instrument Type (imager, spectrograph) from astropy.io import fits from solarnet_metadata.schema import SOLARNETSchema # Create a schema object schema = SOLARNETSchema() # Get a template for a ground-based imager template: fits.Header = schema.attribute_template( primary=True, obs=True, observatory_type="ground-based", instrument_type="Imager" ) TIMESYS = 'UTC ' / Time system BTYPE = / Data label BUNIT = / Units … EXTEND = / contains extension EXTNAME = / Extension name FILENAME = / Filename NAXIS = / Number of axes OBS_HDU = / Contains obs data ORIGIN = / File originator SOLARNET = / SOLARNET compatibility OBSGEO-X = / Observer X Position OBSGEO-Y = / Observer Y Position OBSGEO-Z = / Observer Z Position 10/17/2025 https://github.com/IHDE-Alliance/solarnet_metadata 5 Validating SOLARNET Metadata •Validate FITS & SOLARNET Metadata for: •Required FITS and SOLARNET keywords must be included based on HDU type (primary, observation) •Header cards that must comply with FITS standards •Keyword values must match one of the valid values if specified •Keyword values must match or be castable to the expected data type from solarnet_metadata.validation import validate_file # Validate the FITS file validation_findings: List[str] = validate_file( file_path="/path/to/your/file.fits" ) # Print the validation findings print("Validation issues found:") for finding in validation_findings: print(finding) Validation issues found: Primary Header: Value for 'DATE' cannot be cast to data type 'date': Invalid isoformat string: 'Friday Afternoon’ OBS Header 1: Missing Required Attribute: CNAMEia. No pattern match for CNAMEia with pattern CNAME(?P<i>[1-9])(?P<a>[A-Z])? OBS Header 1: Missing Required keyword: SOLARNET OBS Header 2: Value 'PartiallyCompliant' for keyword 'SOLARNET' is not in the list of valid values: [1.0, 0.5, 0]. 10/17/2025 https://github.com/IHDE-Alliance/solarnet_metadata 6 Customizations •You can define mission-specific or instrument-specific requirements to be included in the SOLARNET metadata package. •Layers defined in YAML files for human and machine readability SOLARNETSchema class Default SOLARNET Metadata Mission-Group Layer 1 Mission-Specific Layer 2 Instrument Specific Layer N … Schema Layering Engine attribute_name: data_type: <string> default: <string> description: <string> human_readable: <string> required: <string> valid_values: <list> origin: <string> ... 10/17/2025 https://github.com/IHDE-Alliance/solarnet_metadata 7 We Want Your Feedback! •Please help us improve the package through feature requests and bug reports! •This is still in Beta development, so we’re expecting a little quirkiness 10/17/2025 https://github.com/IHDE-Alliance/solarnet_metadata 8 THANK YOU! Email: [email protected] 10/17/2025 9 https://github.com/IHDE-Alliance/solarnet_metadata