|
Triumvirate C++ API 0.5.0
Three-point clustering measurements in large-scale structure analyses.
|
Particle catalogue. More...
#include <particles.hpp>
Collaboration diagram for trv::ParticleCatalogue:Public Member Functions | |
| ParticleCatalogue (int verbose=-1) | |
| Construct the particle catalogue with initial values. | |
| ~ParticleCatalogue () | |
| Destruct the particle catalogue. | |
| void | initialise_particles (const int num) |
| Initialise particle data container. | |
| void | finalise_particles () |
| Finalise particle data container. | |
| void | reset_particles () |
| Reset particle data container. | |
| ParticleData & | operator[] (const int pid) |
| Return individual particle information. | |
| int | load_catalogue_file (const std::string &catalogue_filepath, const std::string &catalogue_columns, double volume=0.) |
| Read in a catalogue file. | |
| int | load_particle_data (std::vector< double > x, std::vector< double > y, std::vector< double > z, std::vector< double > nz, std::vector< double > ws, std::vector< double > wc) |
| Read in particle data. | |
| void | calc_total_weights () |
| Calculate total overall weight of particles. | |
| void | calc_pos_extents (bool init=true) |
| Calculate the extents of particle positions. | |
| void | offset_coords (const double dpos[3]) |
| Offset particle positions by a given vector. | |
| void | offset_coords_for_periodicity (const double boxsize[3]) |
| Offset particle positions for periodic boundary conditions. | |
Static Public Member Functions | |
| static void | centre_in_box (ParticleCatalogue &catalogue, const double boxsize[3]) |
| Centre a catalogue in a box. | |
| static void | centre_in_box (ParticleCatalogue &catalogue, ParticleCatalogue &catalogue_ref, const double boxsize[3]) |
| Centre a pair of catalogues in a box. | |
| static void | pad_in_box (ParticleCatalogue &catalogue, const double boxsize[3], const double boxsize_pad[3]) |
| Pad a catalogue in a box. | |
| static void | pad_in_box (ParticleCatalogue &catalogue, ParticleCatalogue &catalogue_ref, const double boxsize[3], const double boxsize_pad[3]) |
| Pad a pair of catalogues in a box. | |
| static void | pad_grids (ParticleCatalogue &catalogue, const double boxsize[3], const int ngrid[3], const double ngrid_pad[3]) |
| Pad a catalogue in a box. | |
| static void | pad_grids (ParticleCatalogue &catalogue, ParticleCatalogue &catalogue_ref, const double boxsize[3], const int ngrid[3], const double ngrid_pad[3]) |
| Pad a catalogue in a box. | |
Public Attributes | |
| std::string | source |
| catalogue source | |
| ParticleData * | pdata |
| particle data | |
| int | ntotal |
| total number of particles | |
| double | wtotal |
| total overall weight of particles | |
| double | wstotal |
| total sample weight of particles | |
| double | pos_min [3] |
| minimum values of particle coordinates | |
| double | pos_max [3] |
| maximum values of particle coordinates | |
| double | pos_span [3] |
| span of particle coordinates | |
Particle catalogue.
The catalogue object contains particle data and summary information, as well as methods for computing its attributes.
Definition at line 68 of file particles.hpp.
|
explicit |
Construct the particle catalogue with initial values.
| verbose | Logger verbosity (default is -1 for no change). |
verbose is optional and used to control the logging level when an instance is created as a standalone without ParameterSet . Definition at line 37 of file particles.cpp.
Here is the call graph for this function:| trv::ParticleCatalogue::~ParticleCatalogue | ( | ) |
Destruct the particle catalogue.
Definition at line 54 of file particles.cpp.
Here is the call graph for this function:| void trv::ParticleCatalogue::initialise_particles | ( | const int | num | ) |
Initialise particle data container.
| num | Number of data units (i.e. particles). |
Definition at line 56 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::ParticleCatalogue::finalise_particles | ( | ) |
Finalise particle data container.
Definition at line 77 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::ParticleCatalogue::reset_particles | ( | ) |
Reset particle data container.
This is an explicit method to free the resources occupied by trv::ParticleCatalogue::pdata and may be called outside the class destructor.
Definition at line 81 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| ParticleData & trv::ParticleCatalogue::operator[] | ( | const int | pid | ) |
Return individual particle information.
| pid | Particle index. |
Definition at line 94 of file particles.cpp.
| int trv::ParticleCatalogue::load_catalogue_file | ( | const std::string & | catalogue_filepath, |
| const std::string & | catalogue_columns, | ||
| double | volume = 0. ) |
Read in a catalogue file.
| catalogue_filepath | Catalogue file path. |
| catalogue_columns | Catalogue data column names (comma-separated without space). |
| volume | Catalogue volume (default is 0.) used for computing the default 'nz' value when the field is missing. |
Definition at line 103 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| int trv::ParticleCatalogue::load_particle_data | ( | std::vector< double > | x, |
| std::vector< double > | y, | ||
| std::vector< double > | z, | ||
| std::vector< double > | nz, | ||
| std::vector< double > | ws, | ||
| std::vector< double > | wc ) |
Read in particle data.
| x,y,z,nz,ws,wc | Particle data by column. |
Definition at line 266 of file particles.cpp.
Here is the call graph for this function:| void trv::ParticleCatalogue::calc_total_weights | ( | ) |
Calculate total overall weight of particles.
Definition at line 323 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::ParticleCatalogue::calc_pos_extents | ( | bool | init = true | ) |
Calculate the extents of particle positions.
| init | Initialisation flag (default is true). |
Definition at line 357 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::ParticleCatalogue::offset_coords | ( | const double | dpos[3] | ) |
Offset particle positions by a given vector.
The position specified by the input vector is the new origin.
| dpos | (Subtractive) offset position vector. |
Definition at line 411 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:| void trv::ParticleCatalogue::offset_coords_for_periodicity | ( | const double | boxsize[3] | ) |
Offset particle positions for periodic boundary conditions.
| boxsize | Periodic box size in each dimension. |
Definition at line 431 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Centre a catalogue in a box.
| catalogue | Particle catalogue. |
| boxsize | Box size in each dimension. |
Definition at line 454 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Centre a pair of catalogues in a box.
The secondary catalogue's centre is used as the reference point to also offset the primary catalogue's particle positions.
| catalogue | Primary particle catalogue. |
| catalogue_ref | Secondary reference particle catalogue. |
| boxsize | Box size in each dimension. |
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 485 of file particles.cpp.
Here is the call graph for this function:
|
static |
Pad a catalogue in a box.
The amount of padding is a fraction of the box size.
| catalogue | Particle catalogue. |
| boxsize | Box size in each dimension. |
| boxsize_pad | Box size padding factor in each dimension. |
Definition at line 533 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Pad a pair of catalogues in a box.
The amount of padding is a fraction of the box size.
The secondary catalogue's extents are used as the reference points to also offset the primary catalogue's particle positions.
| catalogue | Primary particle catalogue. |
| catalogue_ref | Secondary reference particle catalogue. |
| boxsize | Box size in each dimension. |
| boxsize_pad | Box size padding factor in each dimension. |
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 562 of file particles.cpp.
Here is the call graph for this function:
|
static |
Pad a catalogue in a box.
The amount of padding is a multiple of the mesh grid size.
| catalogue | Particle catalogue. |
| boxsize | Box size in each dimension. |
| ngrid | Grid number in each dimension. |
| ngrid_pad | Grid number factor for padding. |
Definition at line 608 of file particles.cpp.
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Pad a catalogue in a box.
The amount of padding is a multiple of the mesh grid size.
The secondary catalogue's extents are used as the reference points to also offset the primary catalogue's particle positions.
| catalogue | Primary particle catalogue. |
| catalogue_ref | Secondary reference particle catalogue. |
| boxsize | Box size in each dimension. |
| ngrid | Grid number in each dimension. |
| ngrid_pad | Grid number factor for padding. |
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 625 of file particles.cpp.
Here is the call graph for this function:| std::string trv::ParticleCatalogue::source |
catalogue source
Definition at line 70 of file particles.hpp.
| ParticleData* trv::ParticleCatalogue::pdata |
particle data
Definition at line 72 of file particles.hpp.
| int trv::ParticleCatalogue::ntotal |
total number of particles
Definition at line 74 of file particles.hpp.
| double trv::ParticleCatalogue::wtotal |
total overall weight of particles
Definition at line 75 of file particles.hpp.
| double trv::ParticleCatalogue::wstotal |
total sample weight of particles
Definition at line 76 of file particles.hpp.
| double trv::ParticleCatalogue::pos_min[3] |
minimum values of particle coordinates
Definition at line 78 of file particles.hpp.
| double trv::ParticleCatalogue::pos_max[3] |
maximum values of particle coordinates
Definition at line 79 of file particles.hpp.
| double trv::ParticleCatalogue::pos_span[3] |
span of particle coordinates
Definition at line 80 of file particles.hpp.