DESILS-LRG¶
The kszx.desils_lrg module is based on data products from
Zhou et al 2023, “DESI LRG samples for cross-correlation”,
https://arxiv.org/abs/2309.06443.
- Data files are mostly found here:
- With the exception of the randoms, which are here:
https://data.desi.lbl.gov/public/ets/target/catalogs/dr9/0.49.0/randoms/
- kszx.desils_lrg.read_galaxies(extended, download=False)¶
Reads LRGs with no imaging weights or quality cuts, and returns a Catalog object.
After calling this function, you’ll probably want to call
compute_imaging_weights()and/orapply_quality_cuts(). You’ll also want to callCatalog.apply_redshift_cut()to retrict to an appropriate redshift range.Function arguments:
extended(boolean): determines whether “extended” or “main” catalog is read.download(boolean): if True, then all needed data files will be auto-downloaded.
Returns a
kszx.Catalogobject, with the following columns:ra_deg, dec_deg, z, zerr, # sky location, redshift, redshift error pz_bin, # in {1,2,3,4} nobs_{g,r,z}, ebv, lrg_mask, maskbits # for quality cuts photsys, galdepth_{g,r,z}, psfsize_{g,r,z} # for imaging weights
- kszx.desils_lrg.read_randoms(ix_list, download=False)¶
Reads LRG random catalog with no quality cuts, and returns a Catalog object.
After calling this function, you’ll probably want to call
apply_quality_cuts(). Note that DESILS-LRG randoms do not have redshifts!Function arguments:
ix_list(list): a list of integers \(0 \le i < 200\). The DESILS-LRG randoms are split across 200 source files, and this argument determines which source files will be read.download(boolean): if True, then all needed data files will be auto-downloaded.
Returns a
kszx.Catalogobject, obtained by combining randoms from all source files inix_list, with the following columns:ra_deg, dec_deg, # sky location but no redshift nobs_{g,r,z}, ebv, lrg_mask, maskbits # for quality cuts
- kszx.desils_lrg.compute_imaging_weights(gcat, extended, ebv=True, download=False)¶
Adds a ‘weights’ column to the Catalog (usually called just after read_galaxies()).
Note that this function can be called on the output of
read_galaxies(), but not the output ofread_randoms().Function arguments:
gcat: aCatalogobject, obtained by callingkszx.desils_lrg.read_galaxies().extended(boolean): Slightly different imaging weights should be used for the “main” and “extended” DESILS-LRG samples, and this argument selects between them. (Note thatextendedis also an argument toread_galaxies().)ebv(boolean): The DESILS-LRG data products define two sets of imaging weights, which do or do not use the E(B-V) column. This argument selects between them.download(boolean): if True, then all needed data files will be auto-downloaded.
Reference:
Note: in addition to the
weightscolumn, this function also addsgaldepth_gmag_ebv,galdepth_rmag_ebv, andgaldepth_zmag_ebvcolumns to the Catalog (following the python script referenced above.)
- kszx.desils_lrg.apply_quality_cuts(catalog, min_nobs=2, max_ebv=0.15, max_stardens=2500, lrg_mask=True, maskbits=True, island_mask=True, mask_negative_zerr=True, download=True)¶
Applies LRG quality cuts in-place to a catalog (usually called just after read_galaxies() or read_randoms()).
Function arguments:
catalog: aCatalogobject, obtained by callingkszx.desils_lrg.read_galaxies()orkszx.desils_lrg.read_randoms().min_nobs(integer): min allowed value for NOBS_G, NOBS_R, NOBS_Z. Default value (2) comes from the references below.max_ebv(float): max allowed value for E(B-V). Default value (0.15) comes from the references below.max_stardens(float): max allowed stellar density (in deg^{-2})). Note that stellar density isn’t in the catalogs, and will be inferred from an external data product. Default value (2500) comes from the references below.lrg_mask(boolean): whether to apply ‘lrg_mask’ column from catalog. (See third reference below.)maskbits(boolean): whether to apply DESILS mask bits 1 (BRIGHT), 12 (GALAXY), and 13 (CLUSTER). This is strictly weaker thanlrg_mask. (See fourth reference below.)island_mask(boolean): If True, then some islands in the NGC will be masked.mask_negative_zerr(boolean): If True, galaxies with photo-z error < 0 will be masked. (This flag was added by Kendrick, and is not in Rongpu’s original script. Note that there are ~3000 such galaxies in the extended catalog, and only 2 of them pass the other qualtiy cuts.)download(boolean): if True, then all needed data files will be auto-downloaded.
Reference:
- kszx.desils_lrg.read_stardens_map(download=False)¶
Returns nside=64 ring-ordered healpix map, cached between calls to read_stardens_map().
Intended as a helper for apply_quality_cuts(), but may be independently useful.