0.5.2
🐛 Bug Fixes
Speed up `trks_stats` by a factor of 5 @willgraf (#84)
trks_stats
is used to calculate various statistics on a trks file. The old implementation ended up calling np.unique
inside a double for loop, which caused the runtime to spike. These changes update the internal logic to greatly improve the runtime (namely, by separating the logic into two different for loops, updating the time complexity from O(batch * frames * cells) to O(batch*(frames+cells)).
Some example times on the current registry tracking data (all times include time to run load_trks
):
test.trks
from 227s to 47sval.trks
from 549s to 110strain.trks
from 1968s to 386s