11#include "base_analens.h"
37 float getSigma()
const {
return perturb_modes[0];};
40 Point_2d p(perturb_modes[1],perturb_modes[2]);
47 perturb_modes[1] = Shear[0];
48 perturb_modes[2] = Shear[1];
54 perturb_modes[0] = Sigma;;
57 void force_halo(PosType *alpha,KappaType *kappa,KappaType *gamma,KappaType *phi,PosType
const *xcm,
bool subtract_point=
false,PosType screening = 1.0);
60 perturb_modes[0] = h.perturb_modes[0];
61 perturb_modes[1] = h.perturb_modes[1];
62 perturb_modes[2] = h.perturb_modes[2];
66 if(
this == &h)
return *
this;
68 perturb_modes[0] = h.perturb_modes[0];
69 perturb_modes[1] = h.perturb_modes[1];
70 perturb_modes[2] = h.perturb_modes[2];
76 PosType perturb_modes[3];
77 PosType
lens_expand(PosType *mod,PosType
const *x,PosType *alpha,KappaType *gamma,KappaType *phi);
80class LensHaloKappaDisk:
public LensHalo{
83 LensHaloKappaDisk(
double zlens
89 :
LensHalo(zlens,cosmo),Sigma(Sigma_in)
93 std::cerr <<
"LensHaloKappaDisk: Rmax cannot be <= 0" << std::endl;
94 throw std::invalid_argument(
"Rmax<=0");
96 LensHalo::setMass(PI*Rmax*Rmax*Sigma);
97 LensHalo::Rmax = Rmax;
98 LensHalo::setRsize(Rmax);
103 ~LensHaloKappaDisk(){};
106 float getSigma()
const {
return Sigma;};
108 LensHaloKappaDisk(
const LensHaloKappaDisk &h):
LensHalo(h){
112 LensHaloKappaDisk & operator=(
const LensHaloKappaDisk &h){
113 if(
this == &h)
return *
this;
119 void force_halo(PosType *alpha,KappaType *kappa,KappaType *gamma,KappaType *phi,PosType
const *xcm,
bool subtract_point=
false,PosType screening = 1.0){
124 PosType r=sqrt(xcm[0]*xcm[0] + xcm[1]*xcm[1]);
127 alpha[0] -= Sigma*xcm[0];
128 alpha[1] -= Sigma*xcm[1];
131 tmp_mass = mass/PI/r/r;
132 alpha[0] -= tmp_mass*xcm[0];
133 alpha[1] -= tmp_mass*xcm[1];
135 tmp = 2*tmp_mass/r/r;
136 gamma[0] -= 0.5*(xcm[0]*xcm[0] - xcm[1]*xcm[1])*tmp;
137 gamma[1] -= xcm[0]*xcm[1]*tmp;
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
void setTheta(PosType PosX, PosType PosY)
set the position of the Halo in radians
Definition lens_halos.h:105
LensHalo & operator=(const LensHalo &h)
Definition lens_halos.cpp:169
void set_rsize(float my_rsize)
set radius rsize beyond which interpolation values between alpha_ellip and alpha_iso are computed
Definition lens_halos.h:240
Class for representing points or vectors in 2 dimensions. Not that the dereferencing operator is over...
Definition point.h:48