open-gamma-ray-astro / gamma-astro-data-formats

Data formats for gamma-ray astronomy
https://gamma-astro-data-formats.readthedocs.io
Creative Commons Attribution 4.0 International
29 stars 27 forks source link

Uniform dtype in spec (tform -> type) #115

Closed cdeil closed 5 years ago

cdeil commented 5 years ago

This PR changes the notation for dtype in the EVENTS and GTI spec from the FITS tform to a type of just float or int, and float64 for times.

This achieves consistency with all other specs we have, where dtypes are written that way. IMO it's also more readable, pretty much no-one knows the cryptic FITS type codes by heart. Also it couples the spec less tighly to FITS, e.g. if someone wants to use HDF5 or ECSV to store some data using this format, that works just fine.

Note that we still have the notes how to look up the FITS type codes if someone needs those (e.g. when writing code that uses CFITSIO directly?): https://github.com/open-gamma-ray-astro/gamma-astro-data-formats/blob/master/source/general/notes.rst