Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR significantly updates desi_zcatalog to add parallelism and make it easier to use for productions. Relative to current main, this PR changes the script options/usage but does not change the actual outputs other than their sort order. The code changes are big enough that it might be easiest to evaluate the final state and outputs rather than the code diff.
Usage
The updated script supports two modes:
desi_zcatalog --indir ...
: recursively find redrock*.fits files under an arbitrary input directory and stack them. This is useful for creating test redshift catalogs from custom runs of redrock that might be organized outside of the context of a production.desi_zcatalog --group healpix|cumulative|pernight|perexp --survey SURVEY --program PROGRAM ...
uses a standard specprod structure to group either by healpix or tiles.Current main requires a pre-step to generate an ASCII list of tiles to include for each survey,program combination which is a hassle; this PR updates the script to use the tiles file from the production and filter by (survey, program) on-the-fly.
Example outputs
See
/pscratch/sd/s/sjbailey/desi/dev/zcat_options/
ztile-sv2-dark-cumulative-main.fits
, produced with current main with:ztile-sv2-dark-cumulative-pr.fits
, produced with this branch with:fitsdiff verifies that these files are the same except for the CHECKSUM/DATASUM comment timestamps, and the CHECKSUM value (due to the differing timestamps leading to differing CHECKSUMs).
Detail: main stacks the tiles in whatever order they appear in the
--tiles TILES
option; this PR stacks them in whatever order they appear in the$DESI_SPECTRO_REDUX/$SPECPROD/tiles-$SPECPROD.fits
file. In this case I made them match, but in general they could be in a different order. Thecompare.py
script in the same directory re-sorts before comparing, which also passes if the outputs are in a different order.Other example outputs tests stacking healpix and arbitrary input directories using
@weaverba137 I believe this is the last PR I need before making a tag and regenerating iron redshift catalogs for more detailed data review. Please check.