Skip to content

Commit

Permalink
one_time.ipynb: Python 3 compatibility
Browse files Browse the repository at this point in the history
  • Loading branch information
ickc committed May 7, 2019
1 parent d36085c commit 560b041
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions notebooks/one_time.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@
"M.set(common_settings)\n",
"M.compute()\n",
"derived = M.get_current_derived_parameters(['z_rec','tau_rec','conformal_age'])\n",
"#print derived.viewkeys()\n",
"#print(derived.keys())\n",
"z_rec = derived['z_rec']\n",
"z_rec = int(1000.*z_rec)/1000. # round down at 4 digits after coma\n",
"M.struct_cleanup() # clean output\n",
Expand All @@ -111,7 +111,7 @@
"# load transfer functions at recombination\n",
"#\n",
"one_time = M.get_transfer(z_rec)\n",
"print one_time.viewkeys()\n",
"print(one_time.keys())\n",
"k = one_time['k (h/Mpc)']\n",
"Theta0 = 0.25*one_time['d_g']\n",
"phi = one_time['phi']\n",
Expand All @@ -129,7 +129,7 @@
"# Hubble crossing (k = 2 pi a H), sound horizon crossing (k = 2pi / rs)\n",
"#\n",
"background = M.get_background() # load background table\n",
"#print background.viewkeys()\n",
"#print(background.keys())\n",
"#\n",
"background_tau = background['conf. time [Mpc]'] # read confromal times in background table\n",
"background_z = background['z'] # read redshift\n",
Expand Down

0 comments on commit 560b041

Please sign in to comment.