fix: a cursor readout quotes the nearest stored sample, not a value between two
The crosshair and the cursors pane's mix values are one library call, and it interpolated linearly between the two samples bracketing the pointer. That is wrong twice over here. Ingest decimation is a boxcar average over `time_stride` samples, so a number computed between two stored samples is a second, undeclared estimate laid over the first that nothing on screen or in an export holds. And past the sample spacing the polyline is a line the renderer drew, so quoting a point on it reports the drawing rather than the data. The fix is upstream and unconditional (plotter c028f48): `crosshair_span()`'s `t` selects the nearer end instead of blending, with a tie reading the earlier sample. `CrosshairRow::marker` is placed from the same y, so the dot follows the quoted sample. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
ec93a9831d
commit
d03c9fb443
5 files changed
+37
-7
No files matched your search
@@ -749,6 +749,19 @@ far the largest file.
|
||||
again until the next latch. `PlotArea::create()` is handed `App::placeholder_plot`,
|
||||
never a row: the area keeps a reference to the plot it was created with, and a rebuild
|
||||
destroys every row.
|
||||
- **A readout quotes a stored sample, never a value between two of them.** The hover
|
||||
crosshair and the cursors pane's `mix` values are one call, `Plot::crosshair_value()`, and it
|
||||
reports the **nearer** of the two samples bracketing the x (a tie reads the earlier). Upstream
|
||||
interpolated linearly, and that is wrong twice over here: ingest decimation is a *boxcar
|
||||
average* over `time_stride` samples, so a number between two stored samples is a second
|
||||
estimate laid over the first that nothing on screen or in an export holds; and past the sample
|
||||
spacing the polyline is a line the renderer drew, so a point on it reports the drawing. The
|
||||
change is in `deps/plotter` and unconditional — no setting, because the library had no business
|
||||
offering a readout the data does not contain. `CrosshairRow::marker` is placed from the same y,
|
||||
so the dot lands on the quoted sample and **sits beside the polyline at a deep zoom, by
|
||||
design**: one y feeding both is what keeps the mark and the number from disagreeing. The guards
|
||||
are the library's `crosshair_value_is_the_nearest_sample` and `[cursors-probe]`'s `first mark at
|
||||
x=.. y=..` agreeing with the pane's first value.
|
||||
- **The cursors are read back from the plots only while a gesture is on that row.** `Cursor::x`
|
||||
is the *free* pointer position while a drag runs and the snapped value otherwise -- which is
|
||||
what the app itself wrote a frame earlier, or the snap of it. A tick that reads a row on
|
||||
|
||||
Reference in new issue
Block a user