diff --git a/AegeanTools/source_finder.py b/AegeanTools/source_finder.py index 91b4bf6a..6958d909 100755 --- a/AegeanTools/source_finder.py +++ b/AegeanTools/source_finder.py @@ -480,7 +480,9 @@ def fit_islands_parinfo(models, im, rms, wcshelper): return islands -def priorized_islands_parinfo(sources, im, wcshelper, stage=3): +def priorized_islands_parinfo( + sources, im, wcshelper, stage=3, +): """ Turn a list of sources into a set of islands and parameter estimates which can then be characterised. @@ -507,6 +509,7 @@ def priorized_islands_parinfo(sources, im, wcshelper, stage=3): islands : [:class:`AegeanTools.models.ComponentSource`, ...] a list of components """ + return def characterise_islands( @@ -517,7 +520,8 @@ def characterise_islands( wcshelper, err_type="best", max_summits=None, - do_islandfit=False): + do_islandfit=False, +): """ Do the source characterisation based on the initial estimate of the island properties. @@ -2105,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