You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Route variable-duration browsing on a backend capability flag rather than
the backend name, so mne-qt-browser can opt in. Duck-typed the way
BrowserBase._has_time_slice already is, so an older mne-qt-browser still
declines. Six tests whose skip reason claimed matplotlib-only now run on
both backends.
Three of these fixes are regressions on the *equal-duration* path, not
ragged-only:
- _recompute_epochs_vlines computed an unclamped sample offset, so a click
in an epoch's last half sample rounded one sample past its end, a latency
no epoch holds. Every line was dropped while the readout still showed the
out-of-range value. The Qt backend kept its old path behind a guard; the
matplotlib rewrite had none, so fixed-duration data went through the new
code.
- _draw_traces rebuilt the visible-epoch list by searchsorting the time
range, which drops the last epoch when it holds one sample, and raises
when that is the only visible epoch. Ask the view instead.
- The colour band mask excluded each epoch's own first sample, so a
one-sample epoch was drawn in its neighbour's colour and the window's
first sample was never painted at all.
Ragged-only:
- _create_epoch_histogram called np.ptp(..., axis=2) on a list of arrays.
Peak-to-peak is per trial, so compute it per epoch.
- _getitem moved the per-epoch bounds but never re-derived the union time
axis, so as_fixed() kept padding out to epochs that had been dropped:
epochs[0] of a 100-sample epoch returned (1, 3, 280) with 540 NaN and
n_contributing == 0 at 180 time points. crop() already re-derives it.
- drop_bad(reject=...) reached Epochs.times and raised an internal error
with no classification; it now declines clearly. The no-arg call still
short-circuits, which _concatenate_epochs relies on.
Also silence two ty diagnostics in _crop_variable that predate this branch.
Verified against the pre-PR commit across 7,697 recorded states and 377
figures per environment: all 32 fields that determine what the reader sees
are bit-identical, and the only movement is the vline landing on a real
sample instead of between two.
0 commit comments