Skip to content

Commit

Permalink
add dark energy running in CambSettings.write
Browse files Browse the repository at this point in the history
  • Loading branch information
apetri committed May 9, 2016
1 parent f510d51 commit 1aa82bf
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion lenstools/simulations/camb.py
Original file line number Diff line number Diff line change
Expand Up @@ -169,11 +169,19 @@ def write(self,output_root,cosmology,redshifts):
#Hubble constant
s.write("hubble = {0:.6f}\n".format(cosmology.h * 100))

#Dark energy parameters
if hasattr(cosmology,"w0"):
w0 = cosmology.w0
else:
w0 = -1.0
w0 = -1.

if hasattr(cosmology,"wa"):
wa = cosmology.wa
else:
wa = 0.

s.write("w = {0:.6f}\n".format(w0))
s.write("wa = {0:.6f}\n".format(wa))

s.write("\n\n#####################################\n\n")

Expand Down

0 comments on commit 1aa82bf

Please sign in to comment.