Skip to content

Commit

Permalink
fix bug with param defaults
Browse files Browse the repository at this point in the history
  • Loading branch information
gbrammer committed Dec 17, 2024
1 parent f1599cf commit 3c906a6
Showing 1 changed file with 9 additions and 5 deletions.
14 changes: 9 additions & 5 deletions eazy/hdf5.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,8 @@ def __init__(self, h5file, verbose=True):
Ode0=self.param['OMEGA_L'],
Tcmb0=2.725, Ob0=0.048)

param_defaults = param.EazyParam(verbose=False)

if 'ADD_CGM' in self.param:
if self.param['ADD_CGM'] in utils.TRUE_VALUES:
self.add_cgm = True
Expand All @@ -357,18 +359,20 @@ def __init__(self, h5file, verbose=True):

else:
self.param['ADD_CGM'] = False

defaults = param.EazyParam(verbose=False)

self.sigmoid_params = (
defaults['SIGMOID_PARAM1'],
defaults['SIGMOID_PARAM2'],
defaults['SIGMOID_PARAM3']
param_defaults['SIGMOID_PARAM1'],
param_defaults['SIGMOID_PARAM2'],
param_defaults['SIGMOID_PARAM3']
)

self.add_cgm = False
self.max_fuv_wav = 1300

for par in param_defaults.param_names:
if par not in self.param:
self.param[par] = param_defaults[par]

Check warning on line 374 in eazy/hdf5.py

View check run for this annotation

Codecov / codecov/patch

eazy/hdf5.py#L374

Added line #L374 was not covered by tests

self.set_tempfilt()


Expand Down

0 comments on commit 3c906a6

Please sign in to comment.