Skip to content

Commit

Permalink
switching to cobaya yaml loader
Browse files Browse the repository at this point in the history
  • Loading branch information
sgiardie committed Sep 19, 2024
1 parent 922aebb commit f06f356
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions mflike/foreground.py
Original file line number Diff line number Diff line change
Expand Up @@ -734,14 +734,11 @@ def _bandpass_construction(self, _initialize=False, **params):
## that should be applied to any beam profile
###########################################################################
def _read_yaml_file(self, file_path):
import yaml


from cobaya.yaml import yaml_load_file

filename = "%s.yaml" % file_path
if not os.path.exists("%s.yaml" % file_path):
raise ValueError("File " + filename + " does not exist!")

with open(filename, "r") as f:
file = yaml.load(f, Loader=yaml.Loader)
file = yaml_load_file(file_name = filename)

return file

Expand Down

0 comments on commit f06f356

Please sign in to comment.