Skip to content

Fix Drift equations

Paul edited this page Jun 9, 2021 · 3 revisions

Drift

Two times are selected (t1 and t2). These times are usually the times of two manual measurements.
The script calculates the slope of the manual measurements (mM) and the transducer data at times t1 and t2 (mT).
The drift is the difference in slope between the manual measurements and the transducer measurements (mM - mT) between the two times (m*(t1 - t2)).

Offsets

Offsets are calculated as follows

Scripts

All calculations for drift are done in the Drifting class.

  • breakpoints_calc breaks the transducer data into chunks based on the timing of the manual measurements. Note that sometimes manual measurements are made, but transducer data isn't downloaded. Each chunk is individually drift-corrected.
  • beginning_end collects all the relevant beginning and end points from the manual (M1 at time t1 and M2 at time t2) and transducer data (T1 at time t1 and T2 at time t2)
  • slope_intercept calculates the slopes and intercepts using the above formulas and the beginning and end points from beginning_end
Clone this wiki locally