Skip to content

Commit

Permalink
Bug fix inc_spec type in get_residuals
Browse files Browse the repository at this point in the history
  • Loading branch information
Tomas Stolker committed May 12, 2020
1 parent 3e265a1 commit 2c956de
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions species/util/phot_util.py
Expand Up @@ -215,7 +215,7 @@ def get_residuals(datatype: str,
readmodel = None

for key in objectbox.spectrum:
if key in inc_spec:
if isinstance(inc_spec, bool) or key in inc_spec:
wavel_range = (0.9*objectbox.spectrum[key][0][0, 0],
1.1*objectbox.spectrum[key][0][-1, 0])

Expand Down Expand Up @@ -279,7 +279,7 @@ def get_residuals(datatype: str,

if res_spec is not None:
for key in objectbox.spectrum:
if key in inc_spec:
if isinstance(inc_spec, bool) or key in inc_spec:
print(f' - {key}: min: {np.amin(res_spec[key]):.2f}, '
f'max: {np.amax(res_spec[key]):.2f}')

Expand Down

0 comments on commit 2c956de

Please sign in to comment.