Skip to content
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

Streamline prod zcatalog creation #2360

Open
sbailey opened this issue Sep 6, 2024 · 3 comments
Open

Streamline prod zcatalog creation #2360

sbailey opened this issue Sep 6, 2024 · 3 comments
Labels

Comments

@sbailey
Copy link
Contributor

sbailey commented Sep 6, 2024

For Kibo, the redshift catalogs were generated by hand by cutting and pasting commands like

salloc -N 1 -C cpu -A desi -t 04:00:00 -q interactive
cd $DESI_SPECTRO_REDUX/$SPECPROD

SURVEY=cmx
PROGRAM=other
desi_zcatalog -i /dvs_ro/cfs/cdirs/desi/spectro/redux/$SPECPROD/healpix/$SURVEY/$PROGRAM/ \
              -o zcatalog/v1/zpix-$SURVEY-$PROGRAM.fits -g healpix --nproc 64 |& tee zcatalog/v1/logs/zpix-$SURVEY-$PROGRAM.log

SURVEY=sv1
PROGRAM=other
desi_zcatalog -i /dvs_ro/cfs/cdirs/desi/spectro/redux/$SPECPROD/healpix/$SURVEY/$PROGRAM/ \
              -o zcatalog/v1/zpix-$SURVEY-$PROGRAM.fits -g healpix --nproc 64 |& tee zcatalog/v1/logs/zpix-$SURVEY-$PROGRAM.log

for SURVEY in sv1 sv2 sv3 main special; do
  for PROGRAM in dark bright backup; do
    echo ----- $SURVEY $PROGRAM -----
    nohup desi_zcatalog -i /dvs_ro/cfs/cdirs/desi/spectro/redux/$SPECPROD/healpix/$SURVEY/$PROGRAM/ \
                        -o zcatalog/v1/zpix-$SURVEY-$PROGRAM.fits -g healpix --nproc 64 &>> zcatalog/v1/logs/zpix-$SURVEY-$PROGRAM.log
  done
done

The particular combination of SURVEY,PROGRAM was derived from what exists in the tiles-kibo.csv file and then typed into bash by hand. This could be standardized and streamlined into a single job that reads tiles-kibo.csv to know what to do and generate any missing zcatalog files.

@sbailey
Copy link
Contributor Author

sbailey commented Sep 12, 2024

Additionally, Kibo required post-facto adding of units and column descriptions with annotate_fits -C $DESIDATAMODEL/py/desidatamodel/data/column_descriptions.csv ... . Make sure that is included in the wrapper, or otherwise automatically part of desi_zcatalog.

@sbailey
Copy link
Contributor Author

sbailey commented Sep 13, 2024

Now that @stephjuneau in desihub/desidatamodel#196 provided column descriptions that are short enough to be useful for comments, desispec.scripts.zcatalog could start propagating those comments into write_bintable. Thanks to @weaverba137 for noticing that zcatalog could be passing comments but wasn't.

@weaverba137
Copy link
Member

I've already incorporated the change into the read-zbest branch. Note that there are still a few cases where the column name is so long that the short description is still truncated, such as PSF_TO_FIBER_SPECFLUX or, especially, MEAN_PSF_TO_FIBER_SPECFLUX.

I've also found some columns that are missing descriptions:

  • FIRSTNIGHT
  • NUMEXP
  • NUMTILE
  • MIN_MJD
  • MAX_MJD
  • MEAN_MJD
  • IN_COADD_B
  • IN_COADD_R
  • IN_COADD_Z

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants