From b08e8566c351a6cda7f75515eb521359f8798a90 Mon Sep 17 00:00:00 2001 From: fcneirad Date: Mon, 5 Sep 2022 17:50:11 +0200 Subject: [PATCH] updated CMB magnitude velocity and treatment of stars velocity dispersion --- include/velocities.hpp | 2 +- src/normal_source/velocities.cpp | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/include/velocities.hpp b/include/velocities.hpp index b45a237..7a7c6bc 100644 --- a/include/velocities.hpp +++ b/include/velocities.hpp @@ -39,7 +39,7 @@ namespace gerlumph { const double l0_deg = 122.9320; // in deg const double two_pi = 2.0*3.14159265358979323846; - const double v_apex = 387; // km/s + const double v_apex = 371; // km/s, updated magnitude from Fixsen et al. 1996 // We move towards (l,b)=(264.4,48.4) (Kogut et al. 1993), so everything is moving towards the opposite direction const double l_dip_deg = 264.4 - 180; // in deg const double b_dip_deg = -48.4; // in deg diff --git a/src/normal_source/velocities.cpp b/src/normal_source/velocities.cpp index ad51484..80c4726 100644 --- a/src/normal_source/velocities.cpp +++ b/src/normal_source/velocities.cpp @@ -42,12 +42,12 @@ void velocityComponents::createVelocitiesK04(int seed,double ra,double dec,doubl this->pec[i].phi = getUniform(-180,180); this->disp[i].v = velDisp(sigma_disp,epsilon,z_l,D_s,D_l); - this->disp[i].phi = getUniform(-180,180); + //this->disp[i].phi = getUniform(-180,180); // no longer needed - double vtot_x = this->pec[i].v*cos(this->pec[i].phi*this->d2r) + this->disp[i].v*cos(this->disp[i].phi*this->d2r) + this->cmb[i].v*cos(this->cmb[i].phi*this->d2r); - double vtot_y = this->pec[i].v*sin(this->pec[i].phi*this->d2r) + this->disp[i].v*sin(this->disp[i].phi*this->d2r) + this->cmb[i].v*sin(this->cmb[i].phi*this->d2r); - this->tot[i].v = sqrt( pow(vtot_x,2) + pow(vtot_y,2) ); + double vtot_x = this->pec[i].v*cos(this->pec[i].phi*this->d2r) + this->cmb[i].v*cos(this->cmb[i].phi*this->d2r); + double vtot_y = this->pec[i].v*sin(this->pec[i].phi*this->d2r) + this->cmb[i].v*sin(this->cmb[i].phi*this->d2r); + this->tot[i].v = sqrt( pow(vtot_x,2) + pow(vtot_y,2) ) + this->disp[i].v; // the vel disp of the stars adds directly to the magnitude of the effective transverse velocity this->tot[i].phi = atan2(vtot_y,vtot_x)*this->r2d; } }