36 qrot_invers = h.qrot_invers;
40 inclination = h.inclination;
49 qrot_invers = h.qrot_invers;
53 inclination = h.inclination;
60 void reorient(
float my_inclination,
float my_PA){
61 inclination = my_inclination;
64 Quaternion<> R = Quaternion<>::q_z_rotation(zpa)*Quaternion<>::q_x_rotation(inclination)*qrot_invers;
66 qrot_invers = Quaternion<>::q_x_rotation(-inclination)*Quaternion<>::q_z_rotation(-zpa);
79 std::vector<ParticleType<T> > &particles;
81 void rotate_all(Quaternion<T> &R){
82 Quaternion<T> q(1,0,0,0);
83 for(
auto &p : particles){
84 q[0] = 0; q[1] = p[0]; q[2] = p[1]; q[3] = p[2];
86 p[0] = q[1]; p[1] = q[2]; p[2] = q[3];
90 Utilities::Geometry::Quaternion<T> qrot_invers;
104 ,
float my_inclination
112qrot_invers(1,0,0,0),Rscale(disk_scale),Rhight(Rperp),zpa(my_PA),
113inclination(my_inclination)
117 size_t N = (size_t)(mass/mass_res + 1);
123 double dt = PI + PI*ran()/10.;
127 double deltaF = 1.0/(N-1);
129 for(
auto &p : particles){
139 x = x + deltaF*exp(x)/x;
147 p.x[0] = r*cos(theta);
148 p.x[1] = r*sin(theta);
150 p.x[2] = -Rhight * log( 1 - ran() );
151 p.x[2] *= 2*(int)(2*ran()) - 1;
163 Quaternion<T> R = Quaternion<T>::q_z_rotation(zpa) * Quaternion<T>::q_y_rotation(inclination);
165 qrot_invers = R.conj();
168 LensHalo::setMass(mass);
176 LensHalo::Rmax = -8 * Rscale * log(1 - (
float)(N-1) / N );
177 LensHalo::setRsize( LensHalo::Rmax );
LensHaloDisk(double mass, double disk_scale, double Rperp, double mass_res, float my_PA, float my_inclination, Utilities::RandomNumbers_NR &ran, float redshift, const COSMOLOGY &cosmo, int Nsmooth=64)
Definition disk.h:98
A class that represents the lensing by a collection of simulation particles.
Definition particle_halo.h:41
void set_up(float redshift, const COSMOLOGY &cosmo, Point_2d theta_rotate, double max_range, bool recenter, bool verbose)
Definition particle_halo.h:342
TreeQuadParticles is a class for calculating the deflection, kappa and gamma by tree method.
Definition quadTree.h:47