-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Support reading zbest redshift files #2374
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, Ben. I didn't sift through every line close enough to understand every detail, but the changes look good. I ran a few tests under this branch that passed. All tests seem to work as expected.
I ran the following:
read_redrock('/global/cfs/cdirs/desi/spectro/redux/daily/tiles/cumulative/2184/20210516/zbest-0-2184-thru20210516.fits', group='cumulative', recoadd_fibermap=True, pertile=True)
read_redrock('/global/cfs/cdirs/desi/spectro/redux/daily/tiles/cumulative/2184/20210516/zbest-6-2184-thru20210516.fits', group='cumulative', recoadd_fibermap=True, pertile=True)
read_redrock('/global/cfs/cdirs/desi/spectro/redux/daily/tiles/cumulative/6198/20240409/redrock-0-6198-thru20240409.fits', group='cumulative', recoadd_fibermap=True, pertile=True)
and
read_redrock('/global/cfs/cdirs/desi/spectro/redux/daily/tiles/cumulative/6198/20240409/redrock-6-6198-thru20240409.fits', group='cumulative', recoadd_fibermap=True, pertile=True)
.
At the data telecon on 2024-09-24, there appeared to be a consensus that we should not put additional effort toward recovering data missing from The second open question is also mentioned in desihub/desidatamodel#199. |
I verified with runs of this branch and main, that the switch from numpy structured arrays to astropy Table has negligible impact on the overall runtime for desi_zcatalog and that they produce identical catalogs, i.e. nothing funny with bytes vs. strings, masked values, etc. |
Some early tiles in the
daily
specprod havezbest
instead ofredrock
files. To support loadingdaily
into a database, these need to be read bydesispec.scripts.zcatalog
. In this PR:read_redrock
detects whether azbest
file is being opened and attempts to reconstruct its output as best as possible to match aredrock
file.Open questions:
MEAN_PSF_TO_FIBER_SPECFLUX
in the (coadded) fibermap table or the entireTSNR2
table missing fromzbest
files?read_redrock
always converts the per-exposure fibermap into aastropy.table.Table
. Previously, the per-exposure fibermap would only be aTable
ifrecoadd_fibermap=True
. We need to determine whether this introduces a significant performance overhead.FIRSTNIGHT
NUMEXP
NUMTILE
MIN_MJD
MAX_MJD
MEAN_MJD
IN_COADD_(B|R|Z)
, in theEXP_FIBERMAP
HDU.Some additional operational testing should probably be done before merging.