Skip to content

Commit

Permalink
restored previous behaviour of produce_defaults function
Browse files Browse the repository at this point in the history
  • Loading branch information
comane committed May 16, 2024
1 parent 76fe516 commit d9a9475
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions validphys2/src/validphys/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -1407,14 +1407,14 @@ def produce_defaults(
if isinstance(filter_defaults, FilterDefaults):
filter_defaults = filter_defaults.to_dict()

if q2min is not None and filter_defaults["q2min"] != q2min:
raise ConfigError("q2min defined multiple times with different values")
if w2min is not None and filter_defaults["w2min"] != w2min:
raise ConfigError("w2min defined multiple times with different values")

if maxTau is not None and filter_defaults["maxTau"] != maxTau:
raise ConfigError("maxTau defined multiple times with different values")
if q2min is not None and "q2min" in filter_defaults and q2min != filter_defaults["q2min"]:
raise ConfigError("q2min defined multiple times with different values")

if w2min is not None and "w2min" in filter_defaults and w2min != filter_defaults["w2min"]:
raise ConfigError("w2min defined multiple times with different values")

if maxTau is not None and filter_defaults["maxTau"] != maxTau:
raise ConfigError("maxTau defined multiple times with different values")

if default_filter_settings_recorded_spec_ is not None:
filter_defaults = FilterDefaults(**default_filter_settings_recorded_spec_[default_filter_settings])
Expand Down

0 comments on commit d9a9475

Please sign in to comment.