Skip to content

Commit

Permalink
Merge pull request #134 from joezuntz/cmbshift
Browse files Browse the repository at this point in the history
Add CMB shift parameter calculation to camb
  • Loading branch information
joezuntz authored Jul 12, 2024
2 parents da7dcd7 + 9a6b59b commit 1adfc6a
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
4 changes: 4 additions & 0 deletions boltzmann/camb/camb_interface.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@

DEFAULT_A_S = 2.1e-9

C_KMS = 299792.458

# See this table for description:
#https://camb.readthedocs.io/en/latest/transfer_variables.html#transfer-variables
Expand Down Expand Up @@ -430,6 +431,9 @@ def save_derived_parameters(r, block):
for k, v in derived.items():
block[names.distances, k] = v
block[names.distances, 'rs_zdrag'] = block[names.distances, 'rdrag']
zstar = derived['zstar']
shift = r.angular_diameter_distance(zstar) * (1 + zstar) * (p.omegam * p.H0**2)**0.5 / C_KMS
block[names.distances, "cmbshift"] = shift

p.omegal = 1 - p.omegam - p.omk
p.ommh2 = p.omegam * p.h**2
Expand Down
3 changes: 3 additions & 0 deletions boltzmann/camb/module.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -513,6 +513,9 @@ outputs:
thetarseq:
meaning: Angle 100 r_s(eq)/DA(zstar)
type: real
cmbshift:
meaning: CMB shift parameter equation 69 of Komatsu et al 2009
type: real
growth_parameters:
z:
meaning: Redshift samples of other values in this section, (all if mode=power
Expand Down

0 comments on commit 1adfc6a

Please sign in to comment.