As a followup to the coaddition fixes in PR #2377, we want to run a post-Kibo prod that will start with symlinks to Kibo spectra files and run coadds and everything downstream of that.
However, ztile calls desispec.scripts.group_spectra.main (desi_group_spectra) to write both the spectra and the coadd files in a single call, since normally this is more efficient to avoid re-reading the spectra files with a separate call to desi_coadd_spectra. But the side effect here is that desi_ztile overwrites the spectra link with a re-gathers spectra file, wasting both time and disk space.
Add hooks in ztile to recognize the case where spectra.fits.gz exists but coadd.fits does not, and only call desi_coadd_spectra in that case instead of desi_group_spectra.
As a followup to the coaddition fixes in PR #2377, we want to run a post-Kibo prod that will start with symlinks to Kibo spectra files and run coadds and everything downstream of that.
However, ztile calls desispec.scripts.group_spectra.main (desi_group_spectra) to write both the spectra and the coadd files in a single call, since normally this is more efficient to avoid re-reading the spectra files with a separate call to desi_coadd_spectra. But the side effect here is that desi_ztile overwrites the spectra link with a re-gathers spectra file, wasting both time and disk space.
Add hooks in ztile to recognize the case where spectra.fits.gz exists but coadd.fits does not, and only call desi_coadd_spectra in that case instead of desi_group_spectra.