14#include "lens_halos.h"
54class LensHaloBaseNSIE :
public LensHalo{
59 virtual void abstractfunction() = 0;
61 virtual ~LensHaloBaseNSIE();
64 PosType getSigma_crit(){
return Sigma_crit;}
66 PosType get_to(){
return to;}
68 PosType get_Dl(){
return Dl;}
70 PosType get_MpcToAsec(){
return MpcToAsec;}
75 virtual PosType get_sigma(){
return sigma;};
79 virtual PosType get_fratio(){
return fratio;};
81 virtual PosType get_pa(){
return pa;};
83 virtual PosType get_rcore(){
return rcore;};
108 void PrintLens(
bool show_substruct,
bool show_stars);
109 void error_message1(std::string name,std::string filename);
111 virtual void force_halo(PosType *alpha,KappaType *kappa,KappaType *gamma,KappaType *phi,PosType
const *xcm,
bool subtract_point=
false,PosType screening = 1);
120 PosType getHost_Dl(){
return Dl;}
124 PosType getPerturb_beta(){
return perturb_beta;}
126 EllipMethod getEllipMethod(){
return main_ellip_method;}
128 int getPerturb_Nmodes(){
return perturb_Nmodes;}
129 PosType *perturb_modes;
131 std::size_t Nparams()
const;
132 PosType getParam(std::size_t p)
const;
133 PosType setParam(std::size_t p, PosType value);
135 void printCSV(std::ostream& out,
bool header =
false)
const;
138 KappaType phiNSIE(PosType
const *xt,PosType f,PosType bc,PosType theta);
140 float get_zsourceref() {
return zsource_reference ; }
146 void operator=(
const LensHaloBaseNSIE &h){};
147 LensHaloBaseNSIE(
const LensHaloBaseNSIE &h){};
172 PosType perturb_beta;
173 PosType *perturb_rms;
175 bool substruct_implanted;
182 float zsource_reference;
188 PosType
RandomFromTable(PosType *table,
unsigned long Ntable,
long *seed);
189 void rotation(
float *xout,
float *xin,PosType theta);
190 void rotation(PosType *xout,PosType
const *xin,PosType theta);
193void alphaNSIE(PosType *alpha,
double const *xt,PosType f,PosType bc,PosType theta);
194KappaType
kappaNSIE(PosType
const *xt,PosType f,PosType bc,PosType theta);
195void gammaNSIE(KappaType *gam,
double const *xt,PosType f,PosType bc,PosType theta);
196KappaType invmagNSIE(PosType *x,PosType f,PosType bc,PosType theta,
float *gam,
float kap);
198PosType
rmaxNSIE(PosType sigma,PosType mass,PosType f,PosType rc );
200void quadMomNSIE(
float mass,
float Rsize,
float f,
float rc,
float theta,PosType *quad);
205void alphaPowLaw(PosType *alpha,PosType *x,PosType R,PosType mass,PosType beta,PosType *center,PosType Sigma_crit);
206KappaType kappaPowLaw(PosType *x,PosType R,PosType mass,PosType beta,PosType *center,PosType Sigma_crit);
207void gammaPowLaw(KappaType *gamma,PosType *x,PosType R,PosType mass,PosType beta,PosType *center,PosType Sigma_crit);
208KappaType phiPowLaw(PosType *x,PosType R,PosType mass,PosType beta,PosType *center,PosType Sigma_crit);
213void alphaNFW(PosType *alpha,PosType *x,PosType Rtrunc,PosType mass,PosType r_scale
214 ,PosType *center,PosType Sigma_crit);
215KappaType kappaNFW(PosType *x,PosType Rtrunc,PosType mass,PosType r_scale
216 ,PosType *center,PosType Sigma_crit);
217void gammaNFW(KappaType *gamma,PosType *x,PosType Rtrunc,PosType mass,PosType r_scale
218 ,PosType *center,PosType Sigma_crit);
222double lens_expand(
double beta,
double *mod,
int Nmodes,PosType
const *x,PosType *alpha,KappaType *gamma,KappaType *phi);
The cosmology and all the functions required to calculated quantities based on the cosmology.
Definition cosmo.h:52
A base class for all types of lensing "halos" which are any mass distribution that cause lensing.
Definition lens_halos.h:56
Definition utilities.h:39
PosType RandomFromTable(PosType *table, unsigned long Ntable, long *seed)
Generates a random deviates drawn fEinstein_rom appEinstein_roximately the same as the values of tabl...
Definition randomize_lens.cpp:445
void rotation(float *xout, float *xin, PosType theta)
Rotates 2 dimensional point without changing input point.
Definition nsie.cpp:192
KappaType kappaNSIE(PosType const *xt, PosType f, PosType bc, PosType theta)
Convergence for non-singular isothermal ellipsoid, units or .
Definition nsie.cpp:88
PosType rmaxNSIE(PosType sigma, PosType mass, PosType f, PosType rc)
Elliptical radius of a NonSingular Isothermal Ellipsoid.
Definition nsie.cpp:151
void quadMomNSIE(float mass, float Rsize, float f, float rc, float theta, PosType *quad)
Definition nsie.cpp:353
void alphaNSIE(PosType *alpha, PosType const *xt, PosType f, PosType bc, PosType theta)
Deflection angle for non-singular isothermal ellipsoid in units of Einstein radii.
Definition nsie.cpp:14
PosType ellipticRadiusNSIE(PosType const *x, PosType f, PosType pa)
Elliptical radius given f and position angle of model.
Definition nsie.cpp:164
void gammaNSIE(KappaType *gam, PosType const *xt, PosType f, PosType bc, PosType theta)
Shear for non-singular isothermal ellipsoid, units or .
Definition nsie.cpp:111