Skip to content

Commit

Permalink
try except to catch bad lmfit params setup
Browse files Browse the repository at this point in the history
  • Loading branch information
tim committed Sep 6, 2021
1 parent ec32ec6 commit 2693141
Showing 1 changed file with 15 additions and 10 deletions.
25 changes: 15 additions & 10 deletions AegeanTools/source_finder.py
Expand Up @@ -2109,16 +2109,21 @@ def _fit_island(self, island_data):

self.log.debug("=====")
self.log.debug("Island ({0})".format(isle_num))
params = self.estimate_lmfit_parinfo(
idata,
rms,
icurve,
beam,
innerclip,
outerclip,
offsets=[xmin, ymin],
max_summits=max_summits,
)
try:
params = self.estimate_lmfit_parinfo(
idata,
rms,
icurve,
beam,
innerclip,
outerclip,
offsets=[xmin, ymin],
max_summits=max_summits,
)
except:
self.log.debug("Estimaste lfit params failed, setting to None")
params = None

# params = estimate_parinfo_image()
# islands at the edge of a region of nans
# result in no components
Expand Down

0 comments on commit 2693141

Please sign in to comment.