Nemo Commands

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

nemo

nemo produces object catalogs and filtered maps using the parameter settings given in the YAML-format configuration file.

usage: nemo [-h] [-S] [-I] [-f FORCEDCATALOGFILENAME] [-M] [-T] [-n] [-v]
            configFileName

Positional Arguments

configFileName

A .yml configuration file.

Named Arguments

-S, --calc-selection-function

Calculate the completeness in terms of cluster mass, assuming the scaling relation parameters given in the .yml config file. Output will be written under the nemoOutput/selFn directory. This switch overrides the calcSelFn parameter in the .yml config file.

Default: False

-I, --run-source-injection-test

Run a source injection test, using the settings given in the .yml config file. Output will be written under the nemoOutput/diagnostics (raw data) and nemoOutput/selFn directories (position recovery model fits). This switch overrides the sourceInjectionTest parameter in the .yml config file.

Default: False

-f, --forced-photometry-catalog

If given, instead of detecting objects, perform forced photometry in the filtered maps at object locations given in the catalog. The catalog must contain at least the following columns: name, RADeg, decDeg.

-M, --mpi

Enable MPI. If you want to use this, run with e.g., mpiexec -np 4 nemo configFile.yml -M

Default: False

-T, --tiling-check

Runs until the tiling stage, then exits, providing info on the number of tiles used, and writing tile coordinates to the selFn/ directory.

Default: False

-n, --no-strict-errors

Disable strict exception handling (applies under MPI only, i.e., must be used with the -M switch). If you use this option, you will get the full traceback when a Python Exception is triggered, but the code may not terminate. This is due to the Exception handling in mpi4py.

Default: False

-v, --version

show program’s version number and exit

nemoMass

nemoMass infers cluster masses based on their SZ signal as measured by nemo. Cosmological and scaling relation parameters are set in the YAML-format configuration file.

usage: nemoMass [-h] [-c CATFILENAME] [-o OUTFILENAME] [-Q QSOURCE]
                [-x XMATCHARCMIN] [-z ZCOLUMNNAME] [-e ZERRCOLUMNNAME] [-F]
                [-M] [-n] [-v]
                configFileName

Positional Arguments

configFileName

A .yml configuration file.

Named Arguments

-c, --catalog

Catalog file name (.fits format). The catalog must contain at least the following columns: name, RADeg, decDeg, redshift, redshiftErr. If the catalog contains fixed_y_c, fixed_err_y_c columns, then these will be used to infer mass estimates. If not, ‘forced photometry’ mode will be enabled, and the fixed_y_c, fixed_err_y_c values will be extracted from the filtered maps.

-o, --output

Output catalog file name (.fits format). If not given, the name of the output catalog file will be based on either configFileName or catFileName.

-Q, --Q-source

Source of the Q function data - either ‘fit’ (the ‘classic’ method), ‘injection’ (for Q based on source injection test results), or ‘hybrid’ (uses the ‘fit’ method for scales smaller than the reference filter scale, and the ‘injection’ method for scales larger than the reference filter scale).

Default: “fit”

-x, --x-match-arcmin

Specifies the cross-match radius (in arcmin) to use when matching the redshift catalog onto the cluster candidate catalog.

Default: 2.5

-z, --z-column

Specifies the name of the redshift column in the input catalog.

-e, --z-error-column

Specifies the name of the redshift uncertainty column in the input catalog.

-F, --forced-photometry

Perform forced photometry. This is automatically enabled if the catalog does not contain the fixed_y_c, fixed_err_y_c columns. Use this switch to force using this mode even if the catalog already contains fixed_y_c, fixed_err_y_c columns (e.g., for doing forced photometry on one ACT map using positions of clusters found in another, deeper map).

Default: False

-M, --mpi

Enable MPI. If you want to use this, run with e.g., mpiexec -np 4 nemoMass configFile.yml -M

Default: False

-n, --no-strict-errors

Disable strict exception handling (applies under MPI only, i.e., must be used with the -M switch). If you use this option, you will get the full traceback when a Python Exception is triggered, but the code may not terminate. This is due to the Exception handling in mpi4py.

Default: False

-v, --version

show program’s version number and exit

nemoMask

nemoMask creates a mask image from a SAOImage DS9 region file.

usage: nemoMask [-h] [-o OUTFILENAME] [-v] regionFileName templateMapFileName

Positional Arguments

regionFileName

DS9 region file used to define the mask. This must contain polygon regions, with coordinates given in decimal degrees.

templateMapFileName

A FITS image file, from which the pixelization and coordinate system of the output mask will be set. Usually this would be the map that you want to apply a mask to.

Named Arguments

-o, --output

The name of the file for the output mask (FITS format, PLIO_1 compression). If not given, regionFileName will be used (replacing the extension .reg with .fits)

-v, --version

show program’s version number and exit

nemoMock

nemoMock generates random catalogs, using the selection function files produced by nemo. Cosmological and scaling relation parameters are set in the YAML-format configuration file.

usage: nemoMock [-h] [-c CONFIGFILENAME] [-N NUMMOCKS] [-C] [-S SNRCUT]
                [-Q QSOURCE] [-v]
                selFnDir mocksDir

Positional Arguments

selFnDir

Directory containing files needed for computing the selection function.

mocksDir

Output directory where mock catalogs will be written.

Named Arguments

-c, --config

A .yml configuration file. If this is not given, the config.yml file in selFnDir will be used.

-N, --number-of-mocks

Number of mock catalogs to make. If this is not given, the value from makeMockCatalogs parameter in the config file will be used.

-C, --combine-mocks

Combine the mocks into one large catalog (use this to make oversampled mock catalogs).

Default: False

-S, --SNR-cut

Include only clusters with fixed_SNR > this value.

Default: 4.0

-Q, --Q-source

Source of the Q function data - either ‘fit’ (the ‘classic’ method) or ‘injection’ (for Q based on source injection test results).

Default: “fit”

-v, --version

show program’s version number and exit

nemoModel

nemoModel generates model images, i.e., signal-only maps containing either clusters or sources.

usage: nemoModel [-h] [-f OBSFREQGHZ] [-s SCALE] [-p PROFILE] [-C] [-S SEED]
                 [-N ADDNOISE] [-k LKNEE] [-A ADDMAP]
                 [--add-map-scaling ADDMAPSCALING] [--split-noise-test] [-T]
                 [-a TCMBALPHA] [-M] [-n] [-v]
                 catalog maskFileName beamFileName outputFileName

Positional Arguments

catalog

Either the path to a Nemo FITS-table format catalog, or ‘pointsources-N’ (to generate a test catalog of N point sources that will be inserted into the map, e.g., pointsources-1000 will insert 1000 sources). If the latter, the catalog will be written to outputFileName_inputCatalog.fits (with the .fits extension stripped from outputFileName). If the former, cosmological parameters may be specified in the FITS header using the OM0, OB0, H0, SIGMA8, NS keywords (used only for cluster models at the moment).

maskFileName

A FITS image file, containing a mask of the desired sky area. Non-zero values in the mask are used to define tiles (typically 10 x 5 deg), which are processed in parallel if MPI is enabled (see -M switch). The output sky model image will have the same pixelization as the mask image.

beamFileName

A file containing the beam profile, in the standard format used by ACT.

outputFileName

The name of the output file that will contain the sky model image.

Named Arguments

-f, --frequency-GHz

If the nemo catalog contains SZ-selected clusters, the SZ signal will be evaluted at the given frequency, ignoring relativistic effects (default: 150.0).

Default: 150.0

-s, --scale-signals

Scale the input y_c values of clusters in the catalog by this factor.

Default: 1.0

-p, --profile

For cluster models only - select the profile to use: ‘A10’ (Arnaud et al. 2010 UPP models) or ‘B12’ (Battaglia et al. 2012 models). The mass and redshift used to set the shape and scale of the cluster model uses the ‘template’ column in the Nemo catalog, if the ‘true_M500c’, ‘true_fixed_y_c’, and ‘true_Q’ columns are not present. This requires the filter labels that appear in the ‘template’ column to be in the format ‘Profile_M{$MASS}_z{$REDSHIFT}’, with the decimal point replaced by the letter ‘p’ (e.g., ‘Arnaud_M2e14_z0p4’, as in the example config files for Nemo).

Default: “A10”

-C, --add-cmb

Add a realization of the cosmic microwave background to the map. Use –cmb-seed to set the random seed to the same value if creating sets of maps at different frequencies. Note that this is very memory intensive for large maps, and is a serial operation.

Default: False

-S, --seed

Random seed used only for generating (optional) cosmic microwave background or source catalog realizations (i.e., the seed is not used for noise realizations).

-N, --add-noise

If a random cosmic microwave background realization had been added, add white noise. If a number is given, uniform per-pixel white noise at the specified level is added. If a number followed by ‘sb’ is given (e.g., 40sb), then constant surface brightness noise (per square arcmin) is added, adjusting for varying pixel scale across the map (if present). Otherwise, a path to an inverse variance map can be given (must have the same pixelization as the supplied mask).

Default: 0.0

-k, --lknee

Must be used with -N (–add-noise) and -C (–add-cmb). If given, 1/f noise with power spectrum N_l = (1 + l/lknee)^-3) will be generated and added to the map (see Appendix A of MacCrann et al. 2023). Reasonable values to use are 2000 for ACT f090, and 3000 for ACT f150.

-A, --add-map

Path to a FITS map (same pixelization as the input mask) that will be added to the output sim map. Useful if you want to add extra pre-computed signals to the map (e.g., Galactic dust, large scale noise components etc.). Amplitudes can be modified with the –add-map-scaling parameter.

--add-map-scaling

If given, multiply the map pointed to by –add-map by this factor.

Default: 1.0

--split-noise-test

If set, and -N and -C switches are used, split the map into two sections, with the white noise level doubled in one half of the map.

Default: False

-T, --break-map-into-tiles

Break large maps into tiles using the autotiler function in Nemo. This will be turned on automatically if MPI is enabled (using -M).

Default: False

-a, --tcmb-alpha

Only applies to cluster models. Set this to a non-zero value to generate a model where the CMB temperature varies as T(z) = T0 * (1+z)^{1-TCMBAlpha}. Requires a ‘redshift’ column to be present in the input catalog.

Default: 0.0

-M, --mpi

Enable MPI. If used, the image will be broken into a number of tiles, with one tile per process. If you want to use this, run with e.g., mpiexec -np 4 nemoModel args -M

Default: False

-n, --no-strict-errors

Disable strict exception handling (applies under MPI only, i.e., must be used with the -M switch). If you use this option, you will get the full traceback when a Python Exception is triggered, but the code may not terminate. This is due to the Exception handling in mpi4py.

Default: False

-v, --version

show program’s version number and exit

nemoSpec

nemoSpec extracts spectra (in ΔT with respect to the CMB) at locations given in the catalog, after first matching the angular resolution of the maps to the one with the worst resolution. Two modes are offered: (i) compensated aperture photometry; and (ii) a matched filter. The latter was used in Li et al. (2021).

usage: nemoSpec [-h] [-o OUTFILENAME] [-m METHOD] [-r DISKRADIUSARCMIN] [-w]
                [-z REDSHIFTCATFILENAME] [-M] [-n] [-v]
                configFileName catFileName

Positional Arguments

configFileName

A .yml configuration file.

catFileName

Catalog file name (.fits format). The catalog must contain at least the following columns: name, RADeg, decDeg.

Named Arguments

-o, --output

Output catalog file name (.fits format). If not given, the name of the output catalog file will be based on catFileName.

-m, --method

Method used for extracting the spectrum. Options are: (i) ‘CAP’, which uses a compensated aperture photometry filter (use –radius-arcmin to set the aperture size); (ii) ‘matchedFilter’, which uses a simple single-frequency matched filter on each band, assuming a cluster signal template (this requires the input catalog to have been produced by nemo and contain template names in the format ‘Arnaud_M2e14_z0p4’, for example, in order to choose an appropriate signal scale for each object in the catalog).

Default: “CAP”

-r, --radius-arcmin

CAP method only. Disk aperture radius in arcmin, within which the signal is measured. The background will be estimated in an annulus between diskRadiusArcmin < r < sqrt(2) * diskRadiusArcmin.

Default: 4.0

-w, --write-maps

matchedFilter method only: If set, saves the filtered maps in the nemoSpecCache directory (which is created in the current working directory, if it doesn’t already exist).

Default: False

-z, --redshift-catalog

If given, this FITS table format catalog is cross matched (using 2.5 arcmin radius) against the input catalog specified by catFileName. The analysis is then performed on the subset of objects with redshifts, and a redshift column is added to the output catalog. Note that redshift information is not used in the analysis; this feature is provided for convenience only.

-M, --mpi

Enable MPI. If you want to use this, run with e.g., mpiexec -np 4 nemoSpec configFile.yml -M

Default: False

-n, --no-strict-errors

Disable strict exception handling (applies under MPI only, i.e., must be used with the -M switch). If you use this option, you will get the full traceback when a Python Exception is triggered, but the code may not terminate. This is due to the Exception handling in mpi4py.

Default: False

-v, --version

show program’s version number and exit

nemoCatalogCheck

nemoCatalogCheck cross matches an external catalog against the output produced by nemo, and reports which objects are detected in the nemo catalog, which are missing, and which are outside the survey footprint.

usage: nemoCatalogCheck [-h] [-r MATCHRADIUSARCMIN] [-S FIXEDSNRCUT] [-v]
                        configFileName catalogFileName

Positional Arguments

configFileName

A .yml configuration file. By default, the correspondng nemo output is assumed to be in a directory named configFileName, minus the .yml extension.

catalogFileName

Object catalog to check against nemo output (.fits format). The catalog must contain at least the following columns (alternatives given in brackets): name, RADeg (or ra, RA), decDeg (or dec, DEC).

Named Arguments

-r, --match-radius

Cross-matching radius in arcmin.

Default: 2.5

-S, --fixed-SNR-cut

Cut in fixed_SNR used to select nemo cluster candidates.

Default: 4.0

-v, --version

show program’s version number and exit