pept.AdaptiveWindow#
- class pept.AdaptiveWindow(window: float, max_elems: int = 9223372036854775807)[source]#
Bases:
object
Define a sample_size as a time window with a maximum limit of elements. All samples with more than max_elems elements will be shortened.
You can use this as a direct replacement of the sample_size and overlap.
points = pept.PointData(sample_size = pept.AdaptiveWindow(5.5, 200)) points.overlap = AdaptiveWindow(2.)
The adaptive time window approach combines the advantages of fixed sample sizes and time windowing:
Time windows are robust to tracers moving in and out of the field of view, as they simply ignore the time slices where almost no LoRs are recorded.
Fixed sample sizes effectively adapt their spatio-temporal resolution, allowing for higher accuracy when tracers are passing through more active scanner regions.
All samples with more than ideal_elems are shortened, such that time windows are shrinked when the tracer activity permits. There exists an ideal time window such that most samples will have roughly ideal_elems, with a few higher activity ones that are shortened;
OptimizeWindow
finds this ideal time window forpept.AdaptiveWindow
.New in pept-0.5.1
Methods
__init__
(window[, max_elems])