Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add CMB shift parameter calculation to camb #134

Merged
merged 2 commits into from
Jul 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading