rmjarvis / Piff

PSFs In the Full FOV. A software package for modeling the point-spread function (PSF) across the full field of view (FOV). Documentation:
http://rmjarvis.github.io/Piff/
Other
58 stars 13 forks source link

Write piff_version in the HSM output file header #148

Closed rmjarvis closed 1 year ago

rmjarvis commented 1 year ago

I realized on the Y6 telecon that my idea for people being able to check the piff version of an HSM catalog won't work right, because we aren't actually planning to remake the piff files -- just the HSM files.

So this adds piff_version in the header of the HSM catalog file, which one can get by reading with header=True:

data, header = fitsio.read(hsm_file_name, header=True)

Then header['PIFF_VERSION'] can be used to programmatically decide what to do with the data. E.g. don't fix T values if piff_version >= '1.3'.

I also did the same thing in a few other places, which is overkill I'm sure, but I wanted to make sure people can find the version as easily as possible if they need to know it. :)