GLAMERDOC++
Gravitational Lensing Code Library
Public Member Functions | List of all members
LensHaloFit Class Reference

LensHalo class primarily used for fitting point source lenses. More...

#include <analytic_lens.h>

Inherits LensHaloBaseNSIE.

Public Member Functions

 LensHaloFit (const COSMOLOGY &cosmo, int MyNmodes, PosType beta, PosType zlensref, PosType zsourceref)
 Creates a AnaLens which initially has no mass, Use FindLensSimple() to give it mass.
 
void PrintLens (bool show_substruct, bool show_stars)
 
void FindLensSimple (int Nimages, Point *image_positions, double *y, double **dx_sub)
 Wrapper that allows simple lens to be found with a single lens with a single source and translates result into data structures used in the other code. More...
 
bool SafeFindLensSimple (int Nimages, Point *image_positions, double *y, double **dx_sub, int SafetyNum, PosType PixelSizeRad, std::vector< std::vector< PosType >> &PrecisionBackTracedPos, std::vector< std::vector< PosType >> &alphaTab, bool verbose)
 Same as FindLensSimple but with some tests in it. More...
 
void FindLensSimple (ImageInfo *imageinfo, int Nimages, double *y, double **dx_sub)
 Wrapper that allows simple lens to be found with a single lens with a single source and translates result into data structures used in the other code. More...
 
virtual PosType get_sigma ()
 get the velocity dispersion
 
virtual PosType get_fratio ()
 get the axis ratio
 
virtual PosType get_pa ()
 get the position angle
 
virtual PosType get_rcore ()
 get the core radius
 
void setNmodes (int my_Nmodes)
 set the number of perturbation modes – Does the same as LensHaloBaseNSIE::getPerturb_Nmodes().
 
int getNmodes ()
 get the number of perturbation modes
 
void set_perturbmodes (PosType *ListModes, const int Nmodes)
 set the perturbation modes More...
 
void get_perturbmodes (PosType *ListModes, const int Nmodes)
 get the perturbation modes More...
 
void get_perturbmodes (std::vector< PosType > &ListModes)
 Gets the perturbation modes in the LensHaloFit. More...
 
double * getq ()
 get the ouput of ElliptisizeLens :
 
void set_sigma (PosType my_sigma)
 set the velocity dispersion
 

Detailed Description

LensHalo class primarily used for fitting point source lenses.

The model is a power law with axial modes made to be as elliptical as possible.

Member Function Documentation

◆ FindLensSimple() [1/2]

void LensHaloFit::FindLensSimple ( ImageInfo imageinfo,
int  Nimages,
double *  y,
double **  dx_sub 
)

Wrapper that allows simple lens to be found with a single lens with a single source and translates result into data structures used in the other code.

The lens is centered on [0,0] source position in lens is updated along with all the modes.

Parameters
imageinfoPositions of images relative to center of lens. Only imageinfo[].centoid[] is used. Centroids must be in radians.
Nimagesinput number of images
youtput source position
dx_subdx_sub[Nimages][2] pre-calculated deflections caused by substructures or external masses at each image (in radians)

◆ FindLensSimple() [2/2]

void LensHaloFit::FindLensSimple ( int  Nimages,
Point image_positions,
double *  y,
double **  dx_sub 
)

Wrapper that allows simple lens to be found with a single lens with a single source and translates result into data structures used in the other code.

The lens is centered on [0,0] source position in lens is updated along with all the modes.

Parameters
NimagesNumber of images to be fit
image_positionsArray of points with point[i].x set to the image positions
youtput source position
dx_subdx_sub[Nimages][2] pre-calculated deflections caused by substructures or external masses at each image

◆ get_perturbmodes() [1/2]

void LensHaloFit::get_perturbmodes ( PosType *  ListModes,
const int  Nmodes 
)

get the perturbation modes

Gets the perturbation modes in the LensHaloFit.

◆ get_perturbmodes() [2/2]

void LensHaloFit::get_perturbmodes ( std::vector< PosType > &  ListModes)

Gets the perturbation modes in the LensHaloFit.

◆ SafeFindLensSimple()

bool LensHaloFit::SafeFindLensSimple ( int  Nimages,
Point image_positions,
double *  y,
double **  dx_sub,
int  SafetyNum,
PosType  PixelSizeRad,
std::vector< std::vector< PosType >> &  PrecisionBackTracedPos,
std::vector< std::vector< PosType >> &  alphaTab,
bool  verbose 
)

Same as FindLensSimple but with some tests in it.



Parameters
NimagesNumber of images to be fit
image_positionsArray of points with point[i].x set to the image positions
youtput source position
dx_subdx_sub[Nimages][2] pre-calculated deflections caused by substructures or external masses at each image
SafetyNuminteger of the number of time you want to check the modes
PixelSizeRadPixel size in radians used for the maps
PrecisionBackTracedPosTable that will receive the back-traced images uncertainty (in units of PixelSizeRad).
alphaTabTable that will receive the deviation angle in radians
verboseverbose mode switch

◆ set_perturbmodes()

void LensHaloFit::set_perturbmodes ( PosType *  ListModes,
const int  Nmodes 
)

set the perturbation modes

Sets the perturbation modes in the LensHaloFit.


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