xboa
Public Member Functions | Public Attributes | List of all members
BoundingEllipse Class Reference

The BoundingEllipse class defines an arbitrary dimensional ellipse that can be taken as a boundary for VoronoiWeighting. More...

Inherits object.

Public Member Functions

def __init__
 Initialise the bounding ellipse. More...
 
def cut_on_bound
 Iterate over the points, and delete items that are outside the ellipse. More...
 

Public Attributes

 dim
 
 bounding_points
 
 ellipse_det
 
 ellipse_inv
 
 mean
 

Detailed Description

The BoundingEllipse class defines an arbitrary dimensional ellipse that can be taken as a boundary for VoronoiWeighting.

The bounding ellipse is defined by the locus of points $\vec{x}$
$ (\vec{x}-\bar{x})^T \mathbf{V^{-1}} (\vec{x}-\bar{x}) = 1 $
where $\mathbf{V}$ is a matrix defining the ellipse orientation and $ \bar{x} $ is a vector defining the ellipse centroid. The BoundingEllipse can be used to eliminate points outside of the ellipse and define a (finite) set of points distributed about the ellipse boundary.

Definition at line 41 of file _bounding_ellipse.py.

Constructor & Destructor Documentation

def __init__ (   self,
  limit_ellipse,
  limit_mean,
  limit_n_per_dim 
)

Initialise the bounding ellipse.

  • limit_ellipse: defines the ellipse. Should be a numpy.array with shape (dimension, dimension).
  • limit_mean: defines the ellipse centroid. Should be a numpy.array with shape (dimension).
  • limit_n_per_dim: integer that defines the number $n$ of points on the ellipse boundary. xboa will set up points distributed evenly about the ellipse, with the number given by $n^{D}$ where $D$ is the ellipse dimension.

Definition at line 55 of file _bounding_ellipse.py.

Member Function Documentation

def cut_on_bound (   self,
  points_in 
)

Iterate over the points, and delete items that are outside the ellipse.

  • points_in. Set of n points in form of a numpy array with shape (n, dimension). Returns a tuple of (points_out, not_cut_indices) where points_out is a numpy array of shape (m, dimension) containing all points that sit on or inside the ellipse boundary and not_cut_indices is a list of integers of length m corresponding to the position in points_in of each of the m points_out.

Definition at line 91 of file _bounding_ellipse.py.

References BoundingEllipse.mean.

Member Data Documentation

dim

Definition at line 57 of file _bounding_ellipse.py.

bounding_points

Definition at line 68 of file _bounding_ellipse.py.

ellipse_det

Definition at line 76 of file _bounding_ellipse.py.

ellipse_inv

Definition at line 77 of file _bounding_ellipse.py.

mean

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