]> git.tdb.fi Git - ext/subsurface.git/commitdiff
Make pressure plot shading by sac rate consistent
authorDirk Hohndel <dirk@hohndel.org>
Sat, 19 Nov 2011 19:43:37 +0000 (14:43 -0500)
committerDirk Hohndel <dirk@hohndel.org>
Sat, 19 Nov 2011 20:12:30 +0000 (15:12 -0500)
Some parts of the existing code used the depth at the time of the sample
to calculate the sac rate - it makes much more sense to use the average
depth. But that requires us to loop over the entries and average the
individual sac rates per segment instead of just using the beginning and
end depth of the multi-segment interval we use for smoothing purposes.

This may seem like a subtle detail, but it does in fact matter when we
plot the synthetic tank pressure values that we create when we have no
tank pressure data in the samples.

Another detail we change here is to not artificially start with a forward
looking segment of the full SAC_WINDOW but instead just start with the
first two data points and then simply let the time window grow until it
hits SAC_WINDOW - at which point it becomes a sliding window.

Signed-off-by: Dirk Hohndel <dirk@hohndel.org>

No differences found