Skip to content
Snippets Groups Projects
Commit b4443bf6 authored by chad.hanna's avatar chad.hanna
Browse files

far.py: choose upper interval of extinction model smarter

parent 0553174c
No related branches found
No related tags found
No related merge requests found
......@@ -731,7 +731,10 @@ WHERE
# that have too small a count to have been well measured,
# and/or can't be modelled correctly by this fit anyway.
mode, = zl.argmax()
mask = (x < mode) | (zl.at_centres() < zl[mode,] - 15.)
zlcumsum = zl.array.cumsum()
assert zlcumsum[-1] > 1000, "Need at least 1000 zero lag events to compute extinction model"
one_hundred_events_lr = x[zlcumsum.searchsorted(zlcumsum[-1] - 100)]
mask = (x < mode) | (x > one_hundred_events_lr)
zl = numpy.ma.masked_array(zl.array, mask)
bg = numpy.ma.masked_array(bg, mask)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment