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
30 stars 27 forks source link

Script to check DL3 fits file validity #117

Closed TarekHC closed 6 years ago

TarekHC commented 6 years ago

Apart from a good example DL3 file (that will come soon with the HESS + joint-Crab data release, it would be nice to have a simple python script that checks if the HDUs contain the required header keywords.

Anyone is welcome to do this!

cdeil commented 6 years ago

Agreed it would be very nice to have a lint tool for DL3 or any of the formats described here.

As I mentioned e.g. in https://github.com/open-gamma-ray-astro/gamma-astro-data-formats/pull/36#issuecomment-406786259 , I think it would be better to put this in Gammapy than here in the spec repo. At least I can say that if anyone would be willing to work on this, it would be very welcome in Gammapy (https://github.com/gammapy/gammapy/issues/1321).

In Gammapy there's already some things that we have to clean up in the next months anyways, e.g. https://github.com/gammapy/gammapy/blob/622f24324c70d3b7514d58e12ca6601599d3293b/gammapy/data/event_list.py#L929

It's pretty common to have linters not published / maintained with the spec, but as part of software projects that work with that data. E.g. for FITS there's the FITS standard, and then there's https://heasarc.gsfc.nasa.gov/ftools/caldb/help/ftverify.html For VOTable there's the standard, and then there's http://docs.astropy.org/en/stable/api/astropy.io.votable.validate.html

This spec repo already has very low contribution levels, and it might die for the DL3 part soon if the effort continues within CTA, as a rewrite or fork. So adding things here, I'm just worried that no-one will extend and maintain it as the formats evolve.

That said: if someone makes a PR here with a script, and no-one has time to put in the effort to polish it some more and put it in Gammapy, I think we should of course merge it. Something is better than nothing.

maxnoe commented 6 years ago

So it seems this is a duplicate of #42

cdeil commented 6 years ago

Yes, closing this one.