Skip to content

Commit

Permalink
add CMB shift parameter calculation to camb
Browse files Browse the repository at this point in the history
  • Loading branch information
joezuntz committed Jul 12, 2024
1 parent da7dcd7 commit a4fb14d
Showing 1 changed file with 4 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

0 comments on commit a4fb14d

Please sign in to comment.