Use configurable Time (de-)serialization (from) to FITS
- Dominant language
- Python
- Stars
- 5.3k
- Forks
- 2.2k
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 75
Description
### What is the problem this feature will solve?
We are using existing and are developing new data formats based on FITS, which prescribe time formats.
At the moment, conversion from `astropy.time.Time` to the FITS representation needs to be done "by hand", since astropy only supports storing times as two jd floats without choice of the reference time and the option to only store a single floating point column.
It would be great if we could extend the functions in `astropy.io.fits.fitstime` to support serializing times in the format the FITS standard / FITS time paper describe.
E.g. letting users specify:
* Format (one column / two columns)
* Reference time (e.g. FERMI uses a "Mission Elapsed Time" with reference time 2001-01-01
### Describe the desired outcome
Having configurable functionality in astropy for storing `Time` instances in certain fits defined formats.
I.e.
https://github.com/astropy/astropy/blob/3510bc2ac78ddaea2459b07834efbd09cee767f8/astropy/io/fits/fitstime.py#L535
should gain some keyword arguments to let users define the desired format.
### Additional context
* FITS standard on time, section 9: https://fits.gsfc.nasa.gov/standard40/fits_standard40aa-le.pdf
* FITS time paper: https://www.aanda.org/articles/aa/pdf/2015/02/aa24653-14.pdf
* GADF standard for gamma-ray data, initially based on OGIP: https://gamma-astro-data-formats.readthedocs.io/en/v0.3/general/time.html
Contributor guide
Research direction
Start in astropy/io/fits/fitstime.py around line 535, the function identified in the issue. Read the FITS standard section 9 and the linked FITS time paper to understand the required representations, including one- versus two-column storage and reference times. Done means configurable Time serialization supports the FITS-defined formats described in the issue.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- data
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100