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

Change OBS_ID keyword from integer to string #64

Open jknodlseder opened 8 years ago

jknodlseder commented 8 years ago

The event list extension has an OBS_ID keyword that is currently defined as integer. This comes from the original event list format specification from Karl. It appears however that OGIP has in the meantime switched to a string, see for example https://heasarc.gsfc.nasa.gov/docs/heasarc/ofwg/docs/general/ogip_94_001/ogip_94_001.html which says:

OBSERVATION ID: Sequence numbers are commonly used by missions to identify 'uniquely' a particular dataset. The definition of the sequence number is not unique across mission and typically depend upon the different way a dataset is identified within that mission. Although sequence number suggests a numerical value only, past mission had given the sequence number as a mixture of numerical and character values. To avoid a proliferation of keywords to store the sequence number value, the OGIP recommend to use OBS_ID. The keywords value is a string, to allow back compatability with the already archived mission. The OBS_ID keyword value can be used by database software.

So I would propose to change the OBS_ID keyword from integer to string.

cdeil commented 8 years ago

@jknodlseder - A few questions:

Just to give the counter-argument why we might want to keep int:

My impression is that int is simpler and more convenient and is in place, so I don't see the advantage of doing the change.

@jknodlseder - if you're available I'll put this on the agenda for next Tuesday's IACT DL3 telcon: https://github.com/open-gamma-ray-astro/2016-04_IACT_DL3_Meeting/blob/master/notes/2016-09-06-IACT_DL3_Telcon.md

cdeil commented 6 years ago

@jknodlseder - Do you still think CTA / IACT DL3 data should change OBS_ID to be a string instead of an int?

It would be quite a big breaking change, at least in Gammapy we work with OBS_ID as integer in several places, and presumably in ctools you do as well?

@kosack - Is there a plan for this in CTA already? Should discussions continue here on the DL3 spec, or is there a different spec / process now in CTA?