desihub / desispec

DESI spectral pipeline
BSD 3-Clause "New" or "Revised" License
33 stars 24 forks source link

fix healpix=0 headers #2271

Closed sbailey closed 1 month ago

sbailey commented 1 month ago

This PR fixes a bug in header keyword propagation for healpix=0. Previously

if args.healpix:
    spectra.meta['SPGRP'] = 'healpix'
    spectra.meta['SPGRPVAL'] = args.healpix
    ...

was filling in the healpix headers for all healpix except 0, because 0 evaluates to False. I changed this to if args.healpix is not None, i.e. if the option is set on the command line, propagate the value.

I intend to self-merge, tag, and then re-run Jura healpix 0 to fix the headers (because otherwise they also crash the summary catalog creation code).