Points and Containers (C++)

Point

Point

struct catana::Point

Representation of a particle in 3-dimensional space in spherical coordinates.

Public Functions

Point()

Default constructor.

Point(const double &x, const double &y, const double &z)

Construct from cartesian coordinates.

Public Members

double r

radius r>0

pointing p

angular position p (HEALPix pointing)

From cartesian coordinates

Warning

doxygenfunction: Unable to resolve multiple matches for function “catana::point_from_box_position” with arguments (const double&, const double&, const double&, const double&, const double&) in doxygen xml output for project “catana” from directory: ./xml/. Potential matches:

- Point catana::point_from_box_position(const double&, const double&, const double&, const double&)
- template <class FLOAT_TYPE>
  Point catana::point_from_box_position(const FLOAT_TYPE *, const double&)

Warning

doxygenfunction: Unable to resolve multiple matches for function “catana::point_from_box_position” with arguments (const FLOAT_TYPE *, const double&, const double&) in doxygen xml output for project “catana” from directory: ./xml/. Potential matches:

- Point catana::point_from_box_position(const double&, const double&, const double&, const double&)
- template <class FLOAT_TYPE>
  Point catana::point_from_box_position(const FLOAT_TYPE *, const double&)

From spherical coordinates

Warning

doxygenfunction: Unable to resolve multiple matches for function “catana::point_from_spherical_position” with arguments (const double&, const double&, const double&, const double&) in doxygen xml output for project “catana” from directory: ./xml/. Potential matches:

- Point catana::point_from_spherical_position(const double&, const double&, const double&)
- template <class FLOAT_TYPE>
  Point catana::point_from_spherical_position(const FLOAT_TYPE *)

Warning

doxygenfunction: Unable to resolve multiple matches for function “catana::point_from_spherical_position” with arguments (const FLOAT_TYPE *, const double&) in doxygen xml output for project “catana” from directory: ./xml/. Potential matches:

- Point catana::point_from_spherical_position(const double&, const double&, const double&)
- template <class FLOAT_TYPE>
  Point catana::point_from_spherical_position(const FLOAT_TYPE *)

PointContainer

PointContainer

class catana::PointContainer

Container of Point: std::vector<Point>

Inherits from std::vector< Point >

Public Functions

void add_point(const Point &point)

Add an point to PointContainer.

Subsampling

void catana::create_point_container_subset(PointContainer &point_container, const size_t &n)

Creates a random subset of the Point Container such that N points remain.

This is a Fisher-Yates shuffle (stopped after N iterations). See: https://en.wikipedia.org/wiki/Fisher–Yates_shuffle

PixelizedPointContainer

class catana::PixelizedPointContainer

A HEALPix Map of PixelPoints.

Warning

DO NOT CHANGE SIZE (push_back, resize, etc) of underlying std::vector once constructed!

Inherits from std::vector< PixelPoints >

Public Functions

PixelizedPointContainer(unsigned int nside)

Construct for given nside.

The instance will have size nside2npix(nside) (see HEALPix documentation). Each PixelPoints will have size 0.

PixelizedPointContainer(unsigned int nside, const PointContainer &oc)

Construct for given nside from an existing PointContainer.

The instance will have size nside2npix(nside) (see HEALPix documentation) Each Pixel is assigned the according Points from PointContainer

void add_point(const Point&)

Add point to PixelizedPointContainer.

unsigned int get_nside() const

Get the NSide.

size_t get_npoints() const

Get number of points stored within PixelizedPointContainer (i.e. sum points over all pixels)

Eigen::ArrayXi get_countmap() const

Get a HEALPix map (RING ordered) with the value of each pixel representing the number of points in it.

const Healpix_Base &get_hp_base() const

Get the associated Healpix_Base instance.