Triumvirate C++ API 0.5.0
Three-point clustering measurements in large-scale structure analyses.
Loading...
Searching...
No Matches
trv::ParameterSet Class Reference

Parameter set. More...

#include <parameters.hpp>

+ Collaboration diagram for trv::ParameterSet:

Public Member Functions

 ParameterSet ()=default
 Construct a parameter set.
 
 ~ParameterSet ()=default
 Destroy the parameter set.
 
 ParameterSet (const ParameterSet &other)
 Construct a copied parameter set.
 
int read_from_file (char *parameter_filepath)
 Read parameters from a file.
 
int validate ()
 Validate parameters.
 
int print_to_file (char *out_parameter_filepath)
 Print out extracted parameters to a file in the output measurement directory.
 
int print_to_file ()
 Print out extracted parameters to the default file path in the output measurement directory.
 

Public Attributes

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 = 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
 
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"
 
std::string norm_convention = "particle"
 
std::string shape = "diag"
 
std::string binning = "lin"
 
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 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
 
std::string fftw_wisdom_file_b
 backward-transform wisdom file path
 
std::string save_binned_vectors = "false"
 
int verbose = 20
 

Detailed Description

Parameter set.

This reads parameters from a file, stores and prints out the extracted parameters, and validates the parameters.

Definition at line 55 of file parameters.hpp.

Constructor & Destructor Documentation

◆ ParameterSet() [1/2]

trv::ParameterSet::ParameterSet ( )
default

Construct a parameter set.

◆ ~ParameterSet()

trv::ParameterSet::~ParameterSet ( )
default

Destroy the parameter set.

◆ ParameterSet() [2/2]

trv::ParameterSet::ParameterSet ( const ParameterSet & other)

Construct a copied parameter set.

Parameters
otherParameter set to be copied.

Definition at line 33 of file parameters.cpp.

Member Function Documentation

◆ read_from_file()

int trv::ParameterSet::read_from_file ( char * parameter_filepath)

Read parameters from a file.

Parameters
parameter_filepathParameter file path.
Returns
Validation exit status.

Definition at line 84 of file parameters.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ validate()

int trv::ParameterSet::validate ( )

Validate parameters.

Returns
Exit status.
Exceptions
trv::sys::InvalidParameterErrorWhen a parameter is invalid.
Note
This method is called by trv::ParameterSet::read_from_file().

Definition at line 407 of file parameters.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_to_file() [1/2]

int trv::ParameterSet::print_to_file ( char * out_parameter_filepath)

Print out extracted parameters to a file in the output measurement directory.

Parameters
out_parameter_filepathPrintout parameter file path.
Returns
Exit status.

Definition at line 1062 of file parameters.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ print_to_file() [2/2]

int trv::ParameterSet::print_to_file ( )

Print out extracted parameters to the default file path in the output measurement directory.

Returns
Exit status.

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 1158 of file parameters.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ catalogue_dir

std::string trv::ParameterSet::catalogue_dir

catalogue directory

Definition at line 62 of file parameters.hpp.

◆ measurement_dir

std::string trv::ParameterSet::measurement_dir

measurement/output directory

Definition at line 64 of file parameters.hpp.

◆ data_catalogue_file

std::string trv::ParameterSet::data_catalogue_file

data catalogue file

Definition at line 66 of file parameters.hpp.

◆ rand_catalogue_file

std::string trv::ParameterSet::rand_catalogue_file

random catalogue file

Definition at line 68 of file parameters.hpp.

◆ catalogue_columns

std::string trv::ParameterSet::catalogue_columns

catalogue data columns (comma-separated without space)

Definition at line 70 of file parameters.hpp.

◆ output_tag

std::string trv::ParameterSet::output_tag

output tag

Definition at line 72 of file parameters.hpp.

◆ boxsize

double trv::ParameterSet::boxsize[3] = {0., 0., 0.}

box size (in Mpc/h) in each dimension

Definition at line 80 of file parameters.hpp.

◆ ngrid

int trv::ParameterSet::ngrid[3] = {0, 0, 0}

grid number in each dimension

Definition at line 82 of file parameters.hpp.

◆ alignment

std::string trv::ParameterSet::alignment = "centre"

box alignment: {"centre" (default), "pad"}

Definition at line 86 of file parameters.hpp.

◆ padscale

std::string trv::ParameterSet::padscale = "box"

padding scale (if alignment is "pad"): {"box" (default), "grid"}

Definition at line 88 of file parameters.hpp.

◆ padfactor

double trv::ParameterSet::padfactor = 0.

padding factor

Definition at line 90 of file parameters.hpp.

◆ assignment

std::string trv::ParameterSet::assignment = "tsc"

mesh assignment scheme: {"ngp", "cic", "tsc" (default), "pcs"}

Definition at line 94 of file parameters.hpp.

◆ interlace

std::string trv::ParameterSet::interlace = "false"

interlacing switch: {"true"/"on", "false"/"off" (default)}

Definition at line 96 of file parameters.hpp.

◆ volume

double trv::ParameterSet::volume = 0.

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

Definition at line 99 of file parameters.hpp.

◆ nmesh

long long trv::ParameterSet::nmesh

number of mesh grid cells

Definition at line 100 of file parameters.hpp.

◆ assignment_order

int trv::ParameterSet::assignment_order = 0

order of the assignment scheme

Definition at line 102 of file parameters.hpp.

◆ catalogue_type

std::string trv::ParameterSet::catalogue_type

catalogue type: {"survey", "random", "sim", "none"}

Definition at line 110 of file parameters.hpp.

◆ statistic_type

std::string trv::ParameterSet::statistic_type

statistic type: {"powspec", "2pcf", "2pcf-win", "bispec", "3pcf", "3pcf-win", "3pcf-win-wa", "modes", "pairs"}

Definition at line 113 of file parameters.hpp.

◆ npoint

std::string trv::ParameterSet::npoint

N-point case: {"2pt", "3pt", "none"}

Definition at line 116 of file parameters.hpp.

◆ space

std::string trv::ParameterSet::space

coordinate space: {"fourier", "config"}

Definition at line 117 of file parameters.hpp.

◆ ell1

int trv::ParameterSet::ell1 = 0

spherical degree associated with the first wavevector

Definition at line 121 of file parameters.hpp.

◆ ell2

int trv::ParameterSet::ell2 = 0

spherical degree associated with the second wavevector

Definition at line 123 of file parameters.hpp.

◆ ELL

int trv::ParameterSet::ELL = 0

spherical degree associated with the line of sight

Definition at line 125 of file parameters.hpp.

◆ i_wa

int trv::ParameterSet::i_wa = 0

first order of the wide-angle correction term

Definition at line 127 of file parameters.hpp.

◆ j_wa

int trv::ParameterSet::j_wa = 0

second order of the wide-angle correction term

Definition at line 128 of file parameters.hpp.

◆ form

std::string trv::ParameterSet::form = "diag"

form of the bispectrum measurement: {"full", "diag" (default), "off-diag", "row"}

Definition at line 134 of file parameters.hpp.

◆ norm_convention

std::string trv::ParameterSet::norm_convention = "particle"

normalisation convention: {"none", "particle" (default), "mesh", "mesh-mixed"}

Definition at line 138 of file parameters.hpp.

◆ shape

std::string trv::ParameterSet::shape = "diag"

shape of the 3PCF measurement: {"full", "diag" (default), "off-diag", "row", "triu"}

Definition at line 143 of file parameters.hpp.

◆ binning

std::string trv::ParameterSet::binning = "lin"

binning scheme: {"lin" (default), "log", "linpad", "logpad", "custom"}

Definition at line 148 of file parameters.hpp.

◆ bin_min

double trv::ParameterSet::bin_min = 0.

measurement range minimum (in Mpc/h or h/Mpc)

Definition at line 150 of file parameters.hpp.

◆ bin_max

double trv::ParameterSet::bin_max = 0.

measurement range maximum (in Mpc/h or h/Mpc)

Definition at line 151 of file parameters.hpp.

◆ num_bins

int trv::ParameterSet::num_bins = 0

number of measurement bins

Definition at line 154 of file parameters.hpp.

◆ idx_bin

int trv::ParameterSet::idx_bin = 0

fixed bin index in "off-fiag"/"row" form three-point measurements

Definition at line 156 of file parameters.hpp.

◆ fftw_scheme

std::string trv::ParameterSet::fftw_scheme = "measure"

FFTW scheme: {"estimate", "measure" (default), "patient"}.

Definition at line 163 of file parameters.hpp.

◆ fftw_planner_flag

unsigned trv::ParameterSet::fftw_planner_flag = FFTW_MEASURE

derived FFTW planner flag

Definition at line 166 of file parameters.hpp.

◆ use_fftw_wisdom

std::string trv::ParameterSet::use_fftw_wisdom = "false"

use FFTW wisdom: {"false" (default), <path-to-dir>}

Definition at line 169 of file parameters.hpp.

◆ fftw_wisdom_file_f

std::string trv::ParameterSet::fftw_wisdom_file_f

derived FFTW wisdom file paths

forward-transform wisdom file path

Definition at line 172 of file parameters.hpp.

◆ fftw_wisdom_file_b

std::string trv::ParameterSet::fftw_wisdom_file_b

backward-transform wisdom file path

Definition at line 173 of file parameters.hpp.

◆ save_binned_vectors

std::string trv::ParameterSet::save_binned_vectors = "false"

save flag/path for detailed binning of vectors: {"true", "false" (default), <relpath-to-file>}

Definition at line 178 of file parameters.hpp.

◆ verbose

int trv::ParameterSet::verbose = 20

logging verbosity level: {0 (NSET), 10 (DBUG), 20 (STAT) (default), 30 (INFO), 40 (WARN), 50 (ERRO)}

Definition at line 182 of file parameters.hpp.


The documentation for this class was generated from the following files: