Skip to content

Commit

Permalink
Adding catch to suppress Runtime warnings when using experimental jum…
Browse files Browse the repository at this point in the history
…p ramp
  • Loading branch information
AarynnCarter committed Aug 5, 2024
1 parent 42125e6 commit 8446888
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions spaceKLIP/coron1pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
from scipy.interpolate import interp1d
from skimage.metrics import structural_similarity

import warnings
import logging
log = logging.getLogger(__name__)
log.setLevel(logging.INFO)
Expand Down Expand Up @@ -169,8 +170,10 @@ def process(self,
rate, rateints = (res, None) if self.ramp_fit.skip else res
else:
# Use the experimental fitting procedure
res = self.run_step(self.experimental_jumpramp, input)
rate, rateints = res
with warnings.catch_warnings():
warnings.simplefilter('ignore', RuntimeWarning)
res = self.run_step(self.experimental_jumpramp, input)
rate, rateints = res

if self.rate_int_outliers and rateints is not None:
# Flag additional outliers by comparing rateints and refit ramp
Expand Down

0 comments on commit 8446888

Please sign in to comment.