GLAMERDOC++
Gravitational Lensing Code Library
Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
ImageFinding::CriticalCurve Struct Reference

Structure to contain information and functions for critical curves and caustics. More...

#include <grid_maintenance.h>

Collaboration diagram for ImageFinding::CriticalCurve:
Collaboration graph
[legend]

Public Member Functions

 CriticalCurve (const CriticalCurve &p)
 
CriticalCurve & operator= (const CriticalCurve &p)
 
bool inCausticCurve (Point_2d &x)
 return true if x is inside or on the border of the caustic curve
 
bool intersectingCausticCurve (Point_2d &x, double r)
 returns true if a circle of radius r around the point x intersects with the caustic curve
 
bool inCriticalCurve (Point_2d &x)
 return true if x is inside or on the border of the critical curve
 
bool EntirelyinCausticCurve (Point_2d &x, PosType sourceRadius)
 return true if x is strictly inside (entirely) the caustic curve
 
bool EntirelyinCriticalCurve (Point_2d x, PosType sourceRadius)
 return true if x is strictly inside (entirely) the critical curve
 
void RandomSourcesWithinCaustic (int N, std::vector< Point_2d > &y, Utilities::RandomNumbers_NR &rng)
 Returns a vector of random point within the caustic. It is more efficient to call this once for many point rather than repeatedly one at a time. More...
 
Point_2d RandomSourceWithinCaustic (Utilities::RandomNumbers_NR &rng)
 
void RandomSourcesNearCaustic (double R, int N, std::vector< Point_2d > &y, Utilities::RandomNumbers_NR &rng)
 Returns a vector of random point within distance R or filly within the caustic. More...
 
Point_2d RandomSourceNearCaustic (double R, Utilities::RandomNumbers_NR &rng)
 Returns a random point within distance R or filly within the caustic. More...
 
void RandomSourceStrictlyWithinCaustic (int N, std::vector< Point_2d > &y, Utilities::RandomNumbers_NR &rng, PosType sourceRadius, PosType distSourceToCaustic)
 Returns a vector of random point strictly within the caustic (i.e. not touching the border). It is more efficient to call this once for many point rather than repeatedly one at a time. More...
 
void CritRange (Point_2d &p1, Point_2d &p2) const
 find rectangular region enclosing critical curve
 
void CausticRange (Point_2d &p1, Point_2d &p2) const
 find rectangular region enclosing caustic curve
 
void CriticalRadius (PosType &rmax, PosType &rmin, PosType &rave) const
 find 3 measures of the critical curve radius
 
void CausticRadius (PosType &rmax, PosType &rmin, PosType &rave) const
 find 3 measures of the caustic curve radius
 
double AreaNearCaustic (double R)
 returns an estimate of the area inside and within distance R of the caustic More...
 

Static Public Member Functions

static void print (std::string filename, std::vector< ImageFinding::CriticalCurve > &critcurves)
 print the critical curves and caustic curves to a csv file
 

Public Attributes

std::vector< RAY > critcurve
 
std::vector< Point_2d > caustic_curve_outline
 
std::vector< Point_2d > caustic_curve_intersecting
 
std::vector< Point_2d > ellipse_curve
 
PosType z_source
 
CritType type
 type of caustic, 0 -not defined, 1 -radial, 2 - tangential,3 - pseudo
 
int caustic_intersections
 estimated number of intersections of the caustic, -1 if not set
 
Point_2d critical_center
 center of critical curve
 
Point_2d caustic_center
 center of caustic curve
 
PosType critical_area
 area of critical curve (radians^2)
 
PosType caustic_area
 area of caustic curve (radians^2)
 
PosType contour_ell
 axis ratio of a contour defined by the ratio of the max to min distance between center (as given by hull alg) and contour
 
PosType ellipse_area
 area of an ellipse with axis ratio contour_ell and major axis = max distance between center (as given by hull alg) and contour
 
bool touches_edge
 touches the edge of the gridded region
 
int crit_id
 id of the critical curve
 

Detailed Description

Structure to contain information and functions for critical curves and caustics.

Member Function Documentation

◆ AreaNearCaustic()

double ImageFinding::CriticalCurve::AreaNearCaustic ( double  R)

returns an estimate of the area inside and within distance R of the caustic

Parameters
Rdistance in radians

◆ RandomSourceNearCaustic()

Point_2d ImageFinding::CriticalCurve::RandomSourceNearCaustic ( double  R,
Utilities::RandomNumbers_NR &  rng 
)

Returns a random point within distance R or filly within the caustic.

Parameters
rngrandom number generator

◆ RandomSourcesNearCaustic()

void ImageFinding::CriticalCurve::RandomSourcesNearCaustic ( double  R,
int  N,
std::vector< Point_2d > &  y,
Utilities::RandomNumbers_NR &  rng 
)

Returns a vector of random point within distance R or filly within the caustic.

Parameters
Nnumber of points needed
youtput vector of points
rngrandom number generator

◆ RandomSourceStrictlyWithinCaustic()

void ImageFinding::CriticalCurve::RandomSourceStrictlyWithinCaustic ( int  N,
std::vector< Point_2d > &  y,
Utilities::RandomNumbers_NR &  rng,
PosType  sourceRadius,
PosType  distSourceToCaustic 
)

Returns a vector of random point strictly within the caustic (i.e. not touching the border). It is more efficient to call this once for many point rather than repeatedly one at a time.

Returns N source positions which are not overlapping with the caustic lines. i.e. the distance between the caustic line and the center of the source is larger than radius of the source.

Parameters
Nnumber of points needed
youtput vector of points
rngrandom number generator
sourceRadiusradius of the source
distSourceToCausticdistance wanted between the source and the caustic line (must be larger than sourceRadius)

◆ RandomSourcesWithinCaustic()

void ImageFinding::CriticalCurve::RandomSourcesWithinCaustic ( int  N,
std::vector< Point_2d > &  y,
Utilities::RandomNumbers_NR &  rng 
)

Returns a vector of random point within the caustic. It is more efficient to call this once for many point rather than repeatedly one at a time.

step for walking tree by iteration instead of recursion

bool TreeStruct::TreeWalkStep(bool allowDescent){

if(allowDescent && current->child1 != NULL){ moveToChild(1); return true; } if(allowDescent && current->child2 != NULL){ moveToChild(2); return true; }

if(current->brother != NULL){ current = current->brother; return true; }

return false; }

Parameters
Nnumber of points needed
youtput vector of points
rngrandom number generator

◆ RandomSourceWithinCaustic()

Point_2d ImageFinding::CriticalCurve::RandomSourceWithinCaustic ( Utilities::RandomNumbers_NR &  rng)
Parameters
rngrandom number generator

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