Skip to content

Commit

Permalink
Check ValueError not TypeError for Test Data with New Chebyshev Polyn…
Browse files Browse the repository at this point in the history
…omial
  • Loading branch information
TheSkyentist committed May 31, 2024
1 parent 9c2a0f1 commit 6a8027b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions grizli/jwst_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -1409,7 +1409,7 @@ def initialize_jwst_image(filename, verbose=True, max_dq_bit=14, orig_keys=ORIG_
try:
_ = exposure_oneoverf_correction(filename, in_place=True,
**oneoverf_kwargs)
except TypeError:
except ValueError:
# Should only fail for test data
utils.log_exception(utils.LOGFILE, traceback)
msg = f'exposure_oneoverf_correction: failed for {filename}'
Expand All @@ -1423,7 +1423,7 @@ def initialize_jwst_image(filename, verbose=True, max_dq_bit=14, orig_keys=ORIG_
_ = exposure_oneoverf_correction(filename, in_place=True,
axis=-1,
**oneoverf_kwargs)
except TypeError:
except ValueError:
# Should only fail for test data
utils.log_exception(utils.LOGFILE, traceback)
msg = f'exposure_oneoverf_correction: axis=-1 failed for {filename}'
Expand Down

0 comments on commit 6a8027b

Please sign in to comment.