PrivateindexSample number since the start of the run, for the template phase.
Private ReadonlypendingScratch array for the despiker's outputs.
ReadonlyplanPrivate Readonlyratio11Ends the segment before missing absent samples of the same run: appends the held
outputs and restarts the despike window, and advances the sample count so the
templates, which are kept, stay in phase.
PrivatefinishRuns the template stages on one despiked sample and appends it. Both templates are read before the sample updates them. Each learns from the sample minus the other's current template, so neither soaks up the other wave while they are young.
Appends the outputs still held back by the despike window.
Takes one raw sample (NaN for a missing one) and appends the outputs it completes.
Drops everything, including the templates, for a new run.
Despike and template stages, on raw volts. Takes one input at a time and appends outputs, in input order, to the array it is given: nothing for the first
delaySamplesinputs of a segment, then one per input; flush appends the rest.