The previous commit took "fit x sets the window properly" to mean a fit should frame the data and propagate that as the new time scale. It should not: a fit is a plot interaction, and the window is also the trigger's event span and how the samples are stored, so a fit that framed the data could re-plan the rings and drop the history on a menu click. What a fit means here is the undo of a zoom -- a 2 s window zoomed into reads 2 s again. `fit_x()` therefore reads `window_s_` and never writes it. Live it takes the window-control path with the window already set, which re-arms the follow and parks the newest span at the live edge. Pinned -- a held event, a filling capture or a paused view -- it restores the pin's full range, which is the snapshot's own span and may be narrower than the requested window, and it writes the per-row member axes as well as the link group: `hold_pinned_window()` prefers a member that differs from `pinned_stated_`, so writing the group alone is reverted to the zoomed range one frame later. `apply_window_scale()` is folded back into `apply_time_window()`, which the window control is again the only caller of. The probe now zooms in before fitting, since otherwise there is nothing to undo, and reports `pinned=`. `window` and `event_span` must be unchanged on every line. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
34 lines
1.9 KiB
Plaintext
34 lines
1.9 KiB
Plaintext
<b>Time window</b>
|
|
|
|
The window is how much time the plot shows. Every row shares one window: the figure has a
|
|
single x link group, so the rows cannot drift apart. The trigger's event span follows it, and
|
|
the pre-trigger share is a share of <i>this</i> window.
|
|
|
|
<b>How to reach it</b>
|
|
|
|
The header bar's window button opens a popover: type a number, pick a unit under it, or step a
|
|
decade with the arrows. The button's own label is a reading of the current window in a natural
|
|
unit, width-locked so a change of window cannot widen the header bar.
|
|
|
|
<b>Worth knowing</b>
|
|
|
|
• A window too long to store at the wire rate is <i>decimated, not refused</i>. The shared clock
|
|
takes a power-of-two stride, and each group of samples is <b>averaged</b> rather than strided,
|
|
so a tone above the stored Nyquist is attenuated instead of aliasing to a false low frequency.
|
|
• The stamp stored for a group is the group's <i>mean</i>, which is where the averaging puts the
|
|
value. Stamping at the end of a group would shift every trace half a stored sample late.
|
|
• Moving the window across a decimation boundary rebuilds the buffer and drops the history.
|
|
Walking it inside one decade is free.
|
|
• <b>This control is the only thing that changes the window.</b> A zoom, a pan or a fit moves the
|
|
view <i>inside</i> it and leaves it alone — which is the point of the previous bullet: a wheel
|
|
notch that redefined the window could re-plan the buffer and throw your samples away.
|
|
• The trigger sees the <i>stored</i> (filtered) signal, not the wire signal, because an edge
|
|
found on a sample that is not in the buffer could not be cut out of it.
|
|
|
|
<b>Example</b>
|
|
|
|
1 MS/s with 200 MB of buffer. A 2 s window stores every sample (<tt>time x1</tt>). Widen it to
|
|
600 s and the stride becomes <tt>x16</tt>: 625 S/s stored, anti-aliased at 312.5 Hz. A 2 kHz
|
|
sine seen through that window reads <tt>y=[-0.059, 0.079]</tt> — attenuated to about 6%, not
|
|
folded down to a full-amplitude 125 Hz one.
|