pds-data-dictionaries / PDS4-LDD-Issue-Repo

Issue repository for tracking all PDS4 Discipline Dictionary-related issues, new feature requests, and releases.
Apache License 2.0
2 stars 1 forks source link

[ldd-spectral] Add Support for IRAF Spectral World Coordinates #184

Open acraugh opened 2 years ago

acraugh commented 2 years ago

Problem Spectra resulting from echelle gratings are generally presented as images displaying many spectral orders spread non-linearly across the surface of the detector. The calculations required to determine which pixels comprise which spectrum and what the wavelength is at the pixel vary from order to order. There seems to be only one software suite used by the community to extract linear spectra from these input data, regardless of the source of the data. That software is IRAF, now being maintained by the community.

IRAF outputs data in FITS format, and defines a "World Coordinate System" for echelle spectra which is encoded into string values in the FITS header. The IRAF software parses the values from the string using hard-coded knowledge of what is in the string. Attempts to find any other software that can read, write, or parse these strings failed. This presents a problem for archiving, because the data become highly software-dependent. Although it is possible to find documentation that describes the encoding in the strings, it is a logically complex process with many decision points and with internal dependence on field values for determining interpretation.

Describe the solution you'd like Expand the Spectral Discipline Namespace to include a class hierarchy to contain the IRAF Spectral World Coordinates. This would remove some of the dependence on the IRAF software for further analyzing the data; incorporate a de facto community standard into a well-documented structure within PDS4; and (one hopes) encourage new development to use these metadata in other analytical environment, reducing the problematic software dependence of these data.

Describe alternatives you've considered The Spectral World Coordinates are a completely different system for deriving bin parameters than that currently in the Spectral namespace, so a separate dictionary was considered. But this would likely be administered by the same steward, and the other observational parameters required are not different because of the data format, so a separate namespace option was rejected.

LDD Dictionary Version This will be considered a minor version update, since the change is backwards-compatible for existing users.

PDS4 IM Version Target build is B13.0

Need-by Date SBN is anticipating data that will require these classes in 2022, but is prepared to accept the data without them rather than hold up archiving for the data preparer. SBN plans to develop python code to perform the task of interpreting the FITS header strings into PDS4 label fields. We plan to run it ourselves the first time to validate operation, versioning the data set if necessary.

Additional context The paper defining the Spectral World Coordinate System is: [Valdes, Francisco. (1993). The IRAF/NOAO Spectral World Coordinate Systems.](https://www.researchgate.net/publication/2308651_The_IRAFNOAO_Spectral_World_Coordinate_Systems]( )