zCluster Commands

The zCluster package includes a number of command-line programs, each of which is described below.

zCluster

zCluster estimates galaxy cluster photometric redshifts for objects in a user-supplied cluster catalog.

usage: zCluster [-h] [-o OUTLABEL] [-w WEIGHTSTYPE] [-R MAXRMPC] [-m MASK]
                [-a ALGORITHM] [-i MAXITER] [-c CACHEDIR] [-F] [-M]
                [-e MAXMAGERROR] [-E ZPERROR] [-f] [-z ZPRIORMIN]
                [-Z ZPRIORMAX] [-b ABSMAGCUT] [-n NAME] [-t TEMPLATESDIR] [-d]
                [-W] [-P] [-X ADDEXTRAPHOTO]
                [--min-background-area-Mpc2 MINBACKGROUNDAREAMPC2]
                [-B BCKCATALOGFILENAME] [-A BCKAREADEG2]
                [-C CREDENTIALSFILENAME]
                catalogFileName database

Positional Arguments

catalogFileName

A .fits table or a .csv file with at least the columns ‘name’, ‘RADeg’, ‘decDeg’.

database

The photometric database to use. Options are ‘SDSSDR12’, ‘S82’ (for SDSS DR7 Stripe 82 co-add); ‘CFHTLenS’; ‘DESDR1’, ‘DESDR2’, ‘DESY3’ [experimental; requires access to proprietary DES data]; ‘PS1’ [experimental]; ‘DECaLSDR8’, ‘DECaLSDR9’; or the path to a .fits table with columns in the appropriate format (‘ID’, ‘RADeg’, ‘decDeg’, and magnitude column names in the form ‘u_MAG_AUTO’, ‘u_MAGERR_AUTO’ etc.).

Named Arguments

-o, --output-label

Label to use for outputs (default: catalogFileName_database, stripped of file extension). A redshift catalog called zCluster_outLabel.fits will be created. Cached results for each entry in the input cluster catalog and associated plots will be written into the directory outLabel/, together with a log file that records the arguments used for running zCluster.

-w, --weights-type

Radial weighting type. Options are ‘NFW’, ‘flat’, or ‘radial’ (default: NFW).

Default: “NFW”

-R, --max-radius-Mpc

Maximum radius in Mpc within which to calculate delta statistic for each cluster (default: 0.5).

Default: 0.5

-m, --mask

Path to mask image (FITS format with WCS) that defines valid survey area.

-a, --algorithm

Algorithm to use for the maximum likelihood redshift. Options are ‘max’ or ‘odds’ (default: odds).

Default: “odds”

-i, --max-iter

Maximum number of iterations for finding the cluster redshift and optical position based on projected density map (default: 1).

Default: 1

-c, --cachedir

Cache directory location (default: $HOME/.zCluster/cache). Downloaded photometric catalogs will be stored here.

-F, --fetch-only-and-cache

Only fetch and cache galaxy catalogs - i.e., do not run photo-z estimation. This is useful if you are running on a compute cluster where compute nodes do not have internet access (allows a first run with -F, followed by a second run under MPI to compute the photo-zs in parallel).

Default: False

-M, --mpi

Enable MPI. If you want to use this, run zCluster using something like: mpirun –np 4 zCluster …

Default: False

-e, --max-mag-error

Maximum acceptable photometric error (in magnitudes; default: 0.25).

Default: 0.25

-E, --photometric-zero-point-error

Global photometric zero point uncertainty in magnitudes, applied to all bands (default: 0). Added in quadrature to the photometric uncertainties in the catalog.

Default: 0.0

-f, --fit-for-zero-point-offsets

If the input catalog contains a z_spec column, use those galaxies to fit for magnitude zero point offsets. These will then be applied when estimating galaxy photometric redshifts.

Default: False

-z, --z-prior-min

Set minimum redshift of prior.

-Z, --z-prior-max

Set maximum redshift of prior.

-b, --absmag-cut

Set absolute (r-band) magnitude cut to use in magnitude-based prior. If a single number is given, p(z) for objects brighter than this limit will be set to 0. If a list of numbers is given (e.g., [-15,-24]), p(z) will be set to 0 for objects outside of the absolute magnitude range.

Default: -24.0

-n, --name

Find photo-z of only the named cluster in the catalog.

-t, --templates-directory

Specify a directory containing a custom set of spectral templates.

-d, --write-density-maps

Write out a .fits image projected density map (within delta z = +/- 0.1 of the best fit redshift) for each cluster.

Default: False

-W, --write-galaxy-catalogs

Write out a .fits format galaxy catalog and DS9 .reg file for each cluster.

Default: False

-P, --write-plots

Write out a .pdf plot of n(z) for each cluster.

Default: False

-X, --add-extra-photometry

If using a user-supplied FITS galaxy photometic catalog, add in additional photometry from the given database (e.g., SDSSDR12, DECaLS - see ‘database’), if available.

--min-background-area-Mpc2

The minimum area of the background region in square Mpc. Candidate redshifts that have less than this minimum background area will be filtered out of the output catalog (default: 11, which corresponds to 50% of the background area for the standard 3-4 Mpc annulus used).

Default: 11

-B, --background-catalog

A .fits table with columns in the appropriate format (‘ID’, ‘RADeg’, ‘decDeg’, and magnitude column names in the form ‘u_MAG_AUTO’, ‘u_MAGERR_AUTO’ etc.) to be used as the background sample for delta estimates. If this is given, the area covered by the background catalog must be given also (-A flag)

-A, --background-area-deg2

The area, in square degrees, covered by the background galaxy catalog given using the -B flag.

-C, --credentials-filename

The location of a file containing username (first line), password (second line), for login to e.g., ESO Portal (this option is only currently used for the KIDSDR3 database option).

zField

zField estimates galaxy photometric redshifts for objects in a user-supplied direction on the sky.

usage: zField [-h] [-r MAXRDEG] [-D DATABASE] [-c CACHEDIR] [-o OUTDIR]
              [-l LABEL] [-t TEMPLATESDIR] [-e MAXMAGERROR] [-E ZPERROR] [-f]
              [-b ABSMAGCUT] [-d] [-z Z] [-dz DZ] [-DS9] [-ErrMap] [-MC MC]
              [-S STELLARMASSMODELDIR] [-p]
              RADeg decDeg

Positional Arguments

RADeg

RA (in decimal degrees) of the centre of the field to fetch.

decDeg

Dec (in decimal degrees) of the centre of the field to fetch.

Named Arguments

-r, --max-radius-deg

Radius in degrees around the given RA, Dec. coordinates within which galaxy photo-zs will be estimated (default = 0.2).

Default: 0.2

-D, --database

The photometric database to use. Options are ‘SDSSDR12’, ‘S82’ (for SDSS DR7 Stripe 82 co-add); ‘CFHTLenS’; ‘DESDR1’, ‘DESDR2’, ‘DESY3’ [experimental; requires access to proprietary DES data]; ‘PS1’ [experimental]; ‘DECaLSDR8’, ‘DECaLSDR9’; or the path to a .fits table with columns in the appropriate format (‘ID’, ‘RADeg’, ‘decDeg’, and magnitude column names in the form ‘u_MAG_AUTO’, ‘u_MAGERR_AUTO’ etc.).

Default: “DECaLSDR8”

-c, --cachedir

Cache directory location (default: $HOME/.zCluster/cache). Downloaded photometric catalogs will be stored here.

-o, --output-directory

Name of the output directory (default: zFieldOutput).

Default: “zFieldOutput”

-l, --label

Optional label to use for output files (default is to use the given RA, Dec coordinates in the output file names).

-t, --templates-directory

Specify a directory containing a custom set of spectral templates.

-e, --max-mag-error

Maximum acceptable photometric error (in magnitudes; default: 0.25).

Default: 0.25

-E, --photometric-zero-point-error

Global photometric zero point uncertainty in magnitudes, applied to all bands (default: 0). Added in quadrature to the photometric uncertainties in the catalog.

Default: 0.0

-f, --fit-for-zero-point-offsets

If the input catalog contains a z_spec column, use those galaxies to fit for magnitude zero point offsets. These will then be applied when estimating galaxy photometric redshifts.

Default: False

-b, --brighter-absmag-cut

Set bright absolute magnitude cut.

Default: -24.0

-d, --write-density-maps

Write out a .fits image projected density map (within –delta-z of the value specified using –redshift).

Default: False

-z, --redshift

Redshift at which to make the density map.

-dz, --delta-z

When making a projected density map, galaxy p(z) distributions are integrated within +/- dz of the given redshift (default: 0.1).

Default: 0.1

-DS9, --write-ds9-regions

Write out a DS9 .reg file corresponding to the fetched photometric catalog.

Default: False

-ErrMap, --make-error-map

Estimate and output uncertainties on the projected density map and associated summary statistics (warning: extremely slow).

Default: False

-MC, --monte-carlo-samples

Number of Monte Carlo samples to use when estimating uncertainties on the projected galaxy density map

Default: 1000

-S, --stellar-mass-model-dir

If given, estimate stellar masses for galaxies using the (for now) BC03-format stellar population models in the given directory. If -z (–redshift) is given, stellar masses will be estimated at the given redshift. Otherwise, the stellar masses will be estimated at the maximum likelihood redshift of each galaxy (although that isn’t actually implemented yet).

-p, --pickle-galaxy-catalog

If given, pickle the galaxy catalog after estimating photo-zs. Use this if you want to e.g. read p(z) for each galaxy from disk for some other analysis.

Default: False