Open dkirkby opened 4 years ago
When coadding cframes for a single tile, I agree that one might expect/wish them to retain the FIBER order of the input files. However, coadds can also apply to spectra files or cframes from different tiles, where a coadded target is on different fibers and thus doesn't have a uniquely defined input FIBER.
So that's the underlying reason that the coadds don't preserve input order. While acknowledging that that is a pain for this tile-based coadd use-case, I'm inclined to leave it as-is so that people don't get into the habit of assuming that it will always be row-matched with the inputs because that won't be true in the future with more general DESI observations and coadds.
FWIW, the coadds are sorted by TARGETID.
Opinions?
I don't see any datamodel doc for the SV0 coadd files but I notice that fibers in the BRZ_* arrays are not sorted in order of increasing FIBER number, so permuted relative to arrays in (C)FRAME files. Is this deliberate or could we preserve the (C)FRAME ordering to make it easier to match the individual spectra contributing to a coadd?
To reproduce this feature / problem: