PolishookDavid / LAST_OCS

Code controling the LAST project Observatory
0 stars 0 forks source link

write software version keys in the FITS image headers #28

Closed EastEriq closed 1 month ago

EastEriq commented 1 month ago

I'm writing the ticket here because the code saving the observed images is in this repo.

We need such a feature to better identify the images which were written with code suffering of some known flaw, or without a feature introduced at a given point of time. The date of the observation itself does not tell all the story, because the image may have been written by a computer using this or that workspace set, or by a computer using outdated software.

Issue #27 is an example of this - we have for sure now three observation nights which saved images with an incorrect application of the pointing model - but images taken for the first hour of the night of 5/6/2024 on M1 were taken with a different branch of the code, so the date itself is not eloquent, and this information is not an integral part of the image.

One way I envision in order to implement it, is to add hidden properties to each LAST_Handle object, storing the value of the current git branch, SHA, git_describe. Then, as the header is created, this data is used to generate specific entries for each of the components involved (likely, Unit, camera, focuser, Messenger etc...) which all represented by some subobject of the Unit class.

EranOfek commented 1 month ago

If needed you can use: tools.git.getVersion

EastEriq commented 1 month ago

completed with https://github.com/PolishookDavid/LAST_OCS/commit/16fa4a00b850cc50d304a86d2cbff1932ff3fddc and https://github.com/EastEriq/LAST_Handle/commit/bf7bd10a97884714f0b3dbb054cf976eb9df61fe