Skip to content

Commit

Permalink
Merge pull request #669 from Andrew-Robertson/fix_lightconeRedshiftOb…
Browse files Browse the repository at this point in the history
…served

Fix lightcone redshift observed
  • Loading branch information
abensonca authored Aug 19, 2024
2 parents d6740de + 5c6540f commit bd363d5
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions source/nodes.property_extractor.lightcone.F90
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@
!! You should have received a copy of the GNU General Public License
!! along with Galacticus. If not, see <http://www.gnu.org/licenses/>.

!+ Contributions to this file made by: Andrew Robertson, Andrew Benson

use :: Cosmology_Functions, only : cosmologyFunctions, cosmologyFunctionsClass
use :: Geometry_Lightcones, only : geometryLightcone , geometryLightconeClass
use, intrinsic :: ISO_C_Binding , only : c_size_t
Expand Down Expand Up @@ -274,24 +276,21 @@ function lightconeExtract(self,node,time,instance)
& )
lightconeExtract (8 )=self%geometryLightcone_%solidAngle()/degreesToRadians**2
if (self%includeObservedRedshift) then
! Compute the relativistic velocity β=v/c.
! Compute the line-of-sight peculiar velocity divided by the speed of light: β_los=v_los/c.
velocityBeta =+Dot_Product (lightconeExtract(4:6),lightconeExtract(1:3)) &
& /Vector_Magnitude( lightconeExtract(1:3)) &
& *kilo &
& /speedLight
! Compute the observed redshift. This is given by:
! 1 + zₒ = (1 + zₕ) (1 + zₚ),
! where zₒ is observed redshift, zₕ is cosmological redshift (due to Hubble expansion), and zₚ is the peculiar redshift,
! given by
! 1 + zₚ = √[(1+βₚ)/(1-βₚ)]
! where βₚ=vₚ/c is the dimensionless peculiar velocity (e.g. Davis et al.; 2011; ApJ; 741; 67; eqn. 4;
! where zₒ is observed redshift, zₕ is cosmological redshift (due
! to Hubble expansion), and zₚ is the peculiar redshift, given by
! (in the non-relativistic limit) zₚ = β_los (e.g. Davis et al.;
! 2011; ApJ; 741; 67; below eqn. 4;
! https://ui.adsabs.harvard.edu/abs/2011ApJ...741...67D).
lightconeExtract(self%redshiftObservedOffset +1)=+ lightconeExtract(7 ) &
& + (+1.0d0 +lightconeExtract(7 )) &
& *sqrt( &
& +(+1.0d0+velocityBeta) &
& /(+1.0d0-velocityBeta) &
& )
lightconeExtract(self%redshiftObservedOffset+1)= -1.0d0 &
& +(+1.0d0+lightconeExtract(7)) &
& *(+1.0d0+velocityBeta )
end if
if (self%includeAngularCoordinates) then
lightconeExtract(self%angularCoordinatesOffset+1)=atan2( &
Expand Down

0 comments on commit bd363d5

Please sign in to comment.