GRALE
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions
grale::GravitationalLens Class Reference

Base class for gravitational lens implementations. More...

#include <gravitationallens.h>

Inheritance diagram for grale::GravitationalLens:
Inheritance graph
[legend]

List of all members.

Public Types

enum  LensType {
  Gaussian, MultiplePlummers, Plummer, Pointmass,
  SIS, NSIE, NSIS, SIE,
  Square, MultipleSquares, MultipleGaussians, MassSheet,
  Composite, MassDisk, Profile, PolynomialMassProfile,
  MultipleWendland, DeflectionGrid, NFW, EllipticNFW,
  Sersic, EllipticSersic
}
 Specific lens types. More...

Public Member Functions

LensType getLensType () const
 Returns the type of the lens.
virtual bool init (double D_d, const GravitationalLensParams *pLensParams=0)
 Initializes the lens with parameters params, setting its angular diameter distance to D_d.
bool traceTheta (double D_s, double D_ds, Vector2D< double > theta, Vector2D< double > *pBeta) const
 Calculates the result of the lens equation.
virtual bool getAlphaVector (Vector2D< double > theta, Vector2D< double > *pAlpha) const =0
 Calculates the deflection angle for a given vector theta and stores the result in alpha.
virtual bool getAlphaVectorDerivatives (Vector2D< double > theta, double &axx, double &ayy, double &axy) const
 Calculate derivatives of the deflection angle.
virtual double getInverseMagnification (double D_s, double D_ds, Vector2D< double > theta) const
 Returns the inverse magnification factor for a specific direction.
virtual double getSurfaceMassDensity (Vector2D< double > theta) const =0
 Returns the surface mass density for a specific direction.
double getLensDistance () const
 Returns the D_d parameter used in the GravitationalLens::init function.
void setLensDistance (double D_d)
 Changes the lens distance.
const GravitationalLensParamsgetLensParameters () const
 Returns a pointer to a copy of the lens parameters used in the GravitationalLens::init function.
virtual void setDerivativeAngularDistanceScale (double distanceScale)
 Sets a distance scale to be used when estimating the derivatives of the function beta(theta) numerically.
bool write (serut::SerializationInterface &si) const
 Writes the current lens to a serut::SerializationInterface instance.
bool save (const std::string &fileName) const
 Writes the current lens to a file.
GravitationalLenscreateCopy () const
 Creates a copy of the current lens instance.

Static Public Member Functions

static double getInverseMagnification (double D_s, double D_ds, double axx, double ayy, double axy)
 Calculate inverse magnification from derivatives of deflection angle.
static void getShearInfo (double D_s, double D_ds, double axx, double ayy, double axy, double *pShearAngle, double *pShearSize)
 Calculate shear size and angle from derivatives of the deflection angle.
static void getShearInfo (double gamma1, double gamma2, double *pShearAngle, double *pShearSize)
 Calculate shear size and angle from shear components.
static bool read (serut::SerializationInterface &si, GravitationalLens **pLens, std::string &errorString)
 Reads a lens instance from a serut::SerializationInterface object and stores the lens in lens; an error message is stored in errstr if the function is not successful.
static bool load (const std::string &fileName, GravitationalLens **pLens, std::string &errorString)
 Loads a lens instance from a file and stores the lens in lens.

Protected Member Functions

 GravitationalLens (LensType t)
 Meant to be used by a specific lens implementation.
virtual bool processParameters (const GravitationalLensParams *params)=0
 Specific lens implementations implement this function to process the parameters specified in the GravitationalLens::init function.

Detailed Description


Member Enumeration Documentation

Enumerator:
Gaussian 

A lens with a Gaussian density distribution.

MultiplePlummers 

A lens consisting of multiple Plummer distributions.

Plummer 

A lens with a Plummer density profile.

Pointmass 

A point mass lens.

SIS 

A Singular Isothermal Sphere (SIS).

NSIE 

A Non-Singular Isothermal Ellipse (NSIE).

NSIS 

A Non-Singular Isothermal Sphere (NSIS).

SIE 

A Singular Isothermal Ellipse (SIE).

Square 

A lens with a square-shaped mass distribution.

MultipleSquares 

A lens consisting of multiple square-shaped distributions.

MultipleGaussians 

A lens consisting of multiple Gaussian density distributions.

MassSheet 

A sheet of constant mass density.

Composite 

A lens composed of other lenses.

MassDisk 

A disk of constant mass density.

Profile 

A circularly symmetric lens with a specific density profile.

PolynomialMassProfile 

A circularly symmetric lens with a total mass profile composed of several polynomials.

MultipleWendland 

A lens based on multiple Wendland W7,3 functions.

DeflectionGrid 

A lens based on gridded deflection vector information.

NFW 

A symmetric projected NFW profile.

EllipticNFW 

An elliptical generalization of the symmetric NFW profile.

Sersic 

A symmetric Sersic profile.

EllipticSersic 

An elliptical generalization of the symmetric Sersic profile.


Constructor & Destructor Documentation

grale::GravitationalLens::GravitationalLens ( LensType  t)
protected

Member Function Documentation

GravitationalLens* grale::GravitationalLens::createCopy ( ) const
static double grale::GravitationalLens::getInverseMagnification ( double  D_s,
double  D_ds,
double  axx,
double  ayy,
double  axy 
)
inlinestatic
virtual double grale::GravitationalLens::getInverseMagnification ( double  D_s,
double  D_ds,
Vector2D< double >  theta 
) const
virtual

Returns the inverse magnification factor for a specific direction.

Parameters:
D_sAngular diameter distance between source and observer.
D_dsAngular diameter distance between source and lens.
thetaThe direction for which the factor should be calculated.
double grale::GravitationalLens::getLensDistance ( ) const
inline
const GravitationalLensParams* grale::GravitationalLens::getLensParameters ( ) const
inline
LensType grale::GravitationalLens::getLensType ( ) const
inline
static void grale::GravitationalLens::getShearInfo ( double  D_s,
double  D_ds,
double  axx,
double  ayy,
double  axy,
double *  pShearAngle,
double *  pShearSize 
)
inlinestatic
static void grale::GravitationalLens::getShearInfo ( double  gamma1,
double  gamma2,
double *  pShearAngle,
double *  pShearSize 
)
inlinestatic
virtual double grale::GravitationalLens::getSurfaceMassDensity ( Vector2D< double >  theta) const
pure virtual
static bool grale::GravitationalLens::load ( const std::string &  fileName,
GravitationalLens **  pLens,
std::string &  errorString 
)
static

an error message is stored in errstr if the function is not successful.

bool grale::GravitationalLens::save ( const std::string &  fileName) const
void grale::GravitationalLens::setLensDistance ( double  D_d)
inline
bool grale::GravitationalLens::traceTheta ( double  D_s,
double  D_ds,
Vector2D< double >  theta,
Vector2D< double > *  pBeta 
) const

Calculates the result of the lens equation.

Parameters:
D_sAngular diameter distance between source and observer.
D_dsAngular diameter distance between source and lens.
thetatheta-vector for which the lens equation should be calculated.
pBetaThe result of the lens equation is stored here.
bool grale::GravitationalLens::write ( serut::SerializationInterface &  si) const

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