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

Isotropic coordinate binning. More...

#include <dataobjs.hpp>

+ Collaboration diagram for trv::Binning:

Public Member Functions

 Binning (std::string space, std::string scheme)
 Construct binnng from bin specification.
 
 Binning (trv::ParameterSet &params)
 Construct binning from a parameter set.
 
void set_bins (double coord_min, double coord_max, int nbin)
 Set bins.
 
void set_bins ()
 Set bins.
 
void set_bins (double boxsize_max, int ngrid_min)
 Construct binning from a mesh grid.
 
void set_bins (std::vector< double > bin_edges)
 Set bins from custom bin edges.
 

Public Attributes

std::string space
 coordinate space
 
std::string scheme
 binning scheme
 
double bin_min
 lowest bin edge
 
double bin_max
 highest bin edge
 
int num_bins
 number of bins
 
std::vector< double > bin_edges
 bin edges
 
std::vector< double > bin_centres
 bin centres
 
std::vector< double > bin_widths
 bin widths
 

Detailed Description

Isotropic coordinate binning.

This sets up isotropic wavenumber or separation bins in configuration or Fourier space.

Definition at line 58 of file dataobjs.hpp.

Constructor & Destructor Documentation

◆ Binning() [1/2]

trv::Binning::Binning ( std::string space,
std::string scheme )
explicit

Construct binnng from bin specification.

Parameters
spaceCoordinate space, one of {"fourier", "config"}.
schemeBinning scheme, one of {"lin", "log", "linpad", "logpad"}.

Definition at line 39 of file dataobjs.cpp.

+ Here is the caller graph for this function:

◆ Binning() [2/2]

trv::Binning::Binning ( trv::ParameterSet & params)
explicit

Construct binning from a parameter set.

Parameters
paramsParameter set.

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 42 of file dataobjs.cpp.

+ Here is the call graph for this function:

Member Function Documentation

◆ set_bins() [1/4]

void trv::Binning::set_bins ( double coord_min,
double coord_max,
int nbin )

Set bins.

Parameters
coord_minMinimum coordinate in bin range.
coord_maxMaximum coordinate in bin range.
nbinNumber of bins.
Exceptions
trv::sys::InvalidParameterErrorWhen coord_min is negative.
trv::sys::InvalidParameterErrorWhen nbin is non-positive.
Note
If scheme is "lin" or "log", the bin edges are set linearly or log-linearly (i.e. exponentially) in the bin range. If scheme is "linpad", "logpad", 5 linear bins are set from zero (leftmost edge) with width 1.e-3 ("fourier") or 10. ("config") with the remaining bin range divided linearly or log-linearly.

Definition at line 58 of file dataobjs.cpp.

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

◆ set_bins() [2/4]

void trv::Binning::set_bins ( )

Set bins.

The bin properties are inferred from trv::ParameterSet when initialised with trv::Binning::Binning(trv::ParameterSet&).

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 77 of file dataobjs.cpp.

+ Here is the caller graph for this function:

◆ set_bins() [3/4]

void trv::Binning::set_bins ( double boxsize_max,
int ngrid_min )

Construct binning from a mesh grid.

The bin width is given by the grid resolution in configuration space or the fundamental wavenumber in Fourier space. The bin minimum is zero and the bin maximum is half the boxsize in configuration space or the Nyquist wavenumber in Fourier space.

Parameters
boxsize_max(Maximum) box size.
ngrid_min(Minimum) grid cell number.
Attention
trv::Binning::scheme is reset to "lin".

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 86 of file dataobjs.cpp.

◆ set_bins() [4/4]

void trv::Binning::set_bins ( std::vector< double > bin_edges)

Set bins from custom bin edges.

Parameters
bin_edgesCustom bin edges (in ascending order).

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 112 of file dataobjs.cpp.

Member Data Documentation

◆ space

std::string trv::Binning::space

coordinate space

Definition at line 60 of file dataobjs.hpp.

◆ scheme

std::string trv::Binning::scheme

binning scheme

Definition at line 61 of file dataobjs.hpp.

◆ bin_min

double trv::Binning::bin_min

lowest bin edge

Definition at line 62 of file dataobjs.hpp.

◆ bin_max

double trv::Binning::bin_max

highest bin edge

Definition at line 63 of file dataobjs.hpp.

◆ num_bins

int trv::Binning::num_bins

number of bins

Definition at line 64 of file dataobjs.hpp.

◆ bin_edges

std::vector<double> trv::Binning::bin_edges

bin edges

Definition at line 65 of file dataobjs.hpp.

◆ bin_centres

std::vector<double> trv::Binning::bin_centres

bin centres

Definition at line 66 of file dataobjs.hpp.

◆ bin_widths

std::vector<double> trv::Binning::bin_widths

bin widths

Definition at line 67 of file dataobjs.hpp.


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