Class ParameterSet#
Defined in File parameters.hpp
Class Documentation#
-
class ParameterSet#
Parameter set.
This reads parameters from a file, stores and prints out the extracted parameters, and validates the parameters.
Public Functions
-
ParameterSet() = default#
Construct a parameter set.
-
~ParameterSet() = default#
Destroy the parameter set.
-
ParameterSet(const ParameterSet &other)#
Construct a copied parameter set.
- Parameters:
other – Parameter set to be copied.
-
int read_from_file(char *parameter_filepath)#
Read parameters from a file.
- Parameters:
parameter_filepath – Parameter file path.
- Returns:
Validation exit status.
-
int validate(bool init = false)#
Validate parameters.
Note
This method is called by trv::ParameterSet::read_from_file().
- Parameters:
init – Initialisation flag.
- Throws:
trv::sys::InvalidParameterError – When a parameter is invalid.
- Returns:
Exit status.
-
int print_to_file(char *out_parameter_filepath)#
Print out extracted parameters to a file in the output measurement directory.
- Parameters:
out_parameter_filepath – Printout parameter file path.
- Returns:
Exit status.
-
int print_to_file()#
Print out extracted parameters to the default file path in the output measurement directory.
This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.
- Returns:
Exit status.
Public Members
-
std::string catalogue_dir#
catalogue directory
-
std::string measurement_dir#
measurement/output directory
-
std::string data_catalogue_file#
data catalogue file
-
std::string rand_catalogue_file#
random catalogue file
-
std::string catalogue_columns#
catalogue data column names (comma-separated list without space or attribute name string)
-
std::string catalogue_dataset#
catalogue dataset name/path (HDF5 catalogue files only)
-
std::string output_tag#
output tag
-
double boxsize[3] = {0., 0., 0.}#
box size (in Mpc/h) in each dimension
-
int ngrid[3] = {0, 0, 0}#
grid cell number in each dimension
-
double expand = 1.#
box expansion factor (if
boxsizeis not given)
-
double cutoff_nyq = 0.#
Nyquist cutoff wavenumber or separation (in Mpc/h or h/Mpc)
Nyquist cutoff (in Mpc/h or h/Mpc)
-
std::string alignment = "centre"#
box alignment: {“centre” (default), “pad”}
-
std::string padscale = "box"#
padding scale (if
alignmentis “pad”): {“box” (default), “grid”}
-
double padfactor = 0.#
padding factor
-
std::string assignment = "tsc"#
mesh assignment scheme: {“ngp”, “cic”, “tsc” (default), “pcs”}
-
std::string interlace = "false"#
interlacing switch: {“true”/”on”, “false”/”off” (default)}
-
double volume = 0.#
box volume (in Mpc^3/h^3)
-
long long nmesh#
number of mesh grid cells
-
int assignment_order = 0#
order of the assignment scheme
-
std::string catalogue_type#
catalogue type: {“survey”, “random”, “sim”, “none”}
-
std::string statistic_type#
statistic type: {“powspec”, “2pcf”, “2pcf-win”, “bispec”, “3pcf”, “3pcf-win”, “3pcf-win-wa”, “modes”, “pairs”}
-
std::string npoint#
N-point case: {“2pt”, “3pt”, “none”}
-
std::string space#
coordinate space: {“fourier”, “config”}
-
int ell1 = 0#
spherical degree associated with the first wavevector
-
int ell2 = 0#
spherical degree associated with the second wavevector
-
int ELL = 0#
spherical degree associated with the line of sight
-
int i_wa = 0#
first order of the wide-angle correction term
-
int j_wa = 0#
second order of the wide-angle correction term
-
std::string form = "diag"#
form of the bispectrum measurement: {“full”, “diag” (default), “off-diag”, “row”}
-
std::string norm_convention = "particle"#
normalisation convention: {“none”, “particle” (default), “mesh”, “mesh-mixed”}
-
std::string shape = "diag"#
shape of the 3PCF measurement: {“full”, “diag” (default), “off-diag”, “row”, “triu”}
-
std::string binning = "lin"#
binning scheme: {“lin” (default), “log”, “linpad”, “logpad”, “custom”}
-
double bin_min = 0.#
measurement range minimum (in Mpc/h or h/Mpc)
-
double bin_max = 0.#
measurement range maximum (in Mpc/h or h/Mpc)
-
int num_bins = 0#
number of measurement bins
-
int idx_bin = 0#
fixed bin index in “off-fiag”/”row”
formthree-point measurements
-
std::string fftw_scheme = "measure"#
FFTW scheme: {“estimate”, “measure” (default), “patient”}.
-
unsigned fftw_planner_flag = FFTW_MEASURE#
derived FFTW planner flag
-
std::string use_fftw_wisdom = "false"#
use FFTW wisdom: {“false” (default), <path-to-dir>}
-
std::string fftw_wisdom_file_f#
derived FFTW wisdom file paths
forward-transform wisdom file path
-
std::string fftw_wisdom_file_b#
backward-transform wisdom file path
-
std::string save_binned_vectors = "false"#
save flag/path for detailed binning of vectors: {“true”, “false” (default), <relpath-to-file>}
-
int verbose = 20#
logging verbosity level: {0 (NSET), 10 (DBUG), 20 (STAT) (default), 30 (INFO), 40 (WARN), 50 (ERRO)}
-
std::string progbar = "false"#
display a progress bar: {“true”, “false” (default), <int-%-point>}
-
ParameterSet() = default#