Class ParameterSet#

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()#

Validate parameters.

Note

This method is called by trv::ParameterSet::read_from_file().

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 columns (comma-separated without space)

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 number in each dimension

std::string alignment = "centre"#

box alignment: {“centre” (default), “pad”}

std::string padscale = "box"#

padding scale (if alignment is “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#

box volume (in Mpc^3/h^3)

int 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#

coordinte 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 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” form three-point measurements

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)}