diff --git a/projects/infer/infer/postprocess.py b/projects/infer/infer/postprocess.py index cff748eb4..e106165f3 100644 --- a/projects/infer/infer/postprocess.py +++ b/projects/infer/infer/postprocess.py @@ -39,8 +39,16 @@ def __init__( # offset our initial time both by the psd data # that we're going to slough off as well as by - # the filter settle-in and integration time - self.t0 = t0 + psd_length - fduration / 2 - integration_window_length + # the filter settle-in and integration time, plus + # one inference step since the first output is + # produced from a full window ending one step in + self.t0 = ( + t0 + + psd_length + - fduration / 2 + - integration_window_length + + 1 / inference_sampling_rate + ) self.offset = int(psd_length * inference_sampling_rate) # convert our window lengths to sample units diff --git a/projects/infer/tests/test_postprocess.py b/projects/infer/tests/test_postprocess.py index bf7b37512..a537621b2 100644 --- a/projects/infer/tests/test_postprocess.py +++ b/projects/infer/tests/test_postprocess.py @@ -11,4 +11,4 @@ def test_postprocessor(): integration_window_length=0.5, cluster_window_length=0.2, ) - assert postprocessor.t0 == 9.0 + assert postprocessor.t0 == 9.01