legacysurvey / legacypipe

Image reduction pipeline for the DESI Legacy Imaging Surveys, using the Tractor framework
BSD 3-Clause "New" or "Revised" License
37 stars 22 forks source link

Propagate units from Tractor catalogs to sweeps + target files #649

Closed geordie666 closed 4 years ago

geordie666 commented 4 years ago

The sweeps currently don't retain units (because the header is written with fitsio, which doesn't automatically retain the TUNITX keywords).

Perhaps the easiest fix will be to construct a list of strings corresponding to the units from the TUNITX keywords (which are read as part of the header from the Tractor catalogs) and then pass the kwarg units=["a", "list", "of", "units"] here:

https://github.com/legacysurvey/legacypipe/blob/6e63294cf7d38d93cfe204862a71e0efe02c8ed8/bin/generate-sweep-files.py#L248

geordie666 commented 4 years ago

Also, while doing this, add the git-hash to the headers of the generated files.

geordie666 commented 4 years ago

Addressed in #652. Note that the question of units for target files was handled separately in desitarget #638.