diff --git a/nway-calibrate-cutoff.py b/nway-calibrate-cutoff.py index 9f03eb5..9b21cde 100644 --- a/nway-calibrate-cutoff.py +++ b/nway-calibrate-cutoff.py @@ -88,6 +88,6 @@ def error(self, message): i = numpy.min(numpy.where(mask)[0]) #print(i) print('For a false detection rate of <%d%%' % (rate*100)) - print('--> use only counterparts with p_any>%.2f (%.2f%% of matches)' % (cutoffs[i], efficiency[i])) + print('--> use only counterparts with p_any>%.2f (%.2f%% of matches)' % (cutoffs[i], efficiency[i]*100)) diff --git a/nway-create-fake-catalogue.py b/nway-create-fake-catalogue.py index bc4215a..1b9875e 100644 --- a/nway-create-fake-catalogue.py +++ b/nway-create-fake-catalogue.py @@ -148,6 +148,9 @@ def greatarc_interpolate(posa, posb, f): dmask = d[b_nearest] * 60 * 60 > radius #d = d[dmask] b_nearest = b_nearest[dmask] + + assert len(b_nearest)>0, "Method failed: No sources found nearby, could not interpolate a fake source." + #print('have %d neighbors' % len(b_nearest)) b_nearest = b_nearest[:100] #print('distances:', d[b_nearest] * 60 * 60)