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] [-n] 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
- -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
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] [-z ZCOLUMNNAME]
[-e ZERRCOLUMNNAME] [-F] [-M] [-n]
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.
- -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
nemoSelFn
nemoSelFn calculates mass completeness summary statistics and generates files needed to compute the selection function from the results of a nemo cluster detection run. Usually this command is not needed as nemo can be set to do this task by setting calcSelFn: True in the YAML-format configuration file.
usage: nemoSelFn [-h] [-M] configFileName
Positional Arguments
- configFileName
A .yml configuration file.
Named Arguments
- -M, --mpi
- Enable MPI. If you
want to use this, run with e.g., mpiexec -np 4 nemoSelFn configFile.yml -M
Default: False
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]
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
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 ADDWHITENOISE] [--split-noise-test] [-T] [-a TCMBALPHA]
[-M] [-n]
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).
- 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-white-noise
If a random cosmic microwave background realization had been added, add uniform per-pixel white noise at the specified level.
Default: 0.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
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]
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
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]
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