Skip to content

Commit

Permalink
change to base_config.yaml and params_io to accommodate camb up…
Browse files Browse the repository at this point in the history
…date
  • Loading branch information
samueldmcdermott committed Sep 29, 2023
1 parent 2d2196f commit 8c840ed
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 44 deletions.
15 changes: 9 additions & 6 deletions deepcmbsim/params_io.py
Original file line number Diff line number Diff line change
Expand Up @@ -192,11 +192,14 @@ def _camb_params_to_dict(cambparams_instance):
def _nested_dict_diff(d1, d2):
diff_dict = {}
for k, v in d1.items():
if type(v) == dict:
for k_inner, v_inner in v.items():
if d2[k][k_inner] != v_inner:
diff_dict[k] = {k_inner: v_inner}
if k in d2.keys():
if type(v) == dict:
for k_inner, v_inner in v.items():
if d2[k][k_inner] != v_inner:
diff_dict[k] = {k_inner: v_inner}
else:
if d2[k] != v:
diff_dict[k] = v
else:
if d2[k] != v:
diff_dict[k] = v
diff_dict[k] = v
return diff_dict
1 change: 1 addition & 0 deletions deepcmbsim/settings/base_config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -141,6 +141,7 @@ Do21cm : False
transfer_21cm_cl : False
Log_lvalues : False
use_cl_spline_template : True
min_l_logl_sampling : 5000
SourceWindows : []
CustomSources:
num_custom_sources : 0
Expand Down
68 changes: 30 additions & 38 deletions notebooks/simcmb_example.ipynb

Large diffs are not rendered by default.

0 comments on commit 8c840ed

Please sign in to comment.