flowrs-engine/crates/dpb-plot/PROVENANCE.md
flowRS fd958c0547 flowRS engine, cut from flowRS 3451b065
Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-11-02 19:04:39 -05:00

2.4 KiB

Provenance: dpb-plot

Source. AuraSense's aurasense-dpb-training repository, crates/dpb-plot, at commit 9202cd83fe2aa284957bf6a6d8aa1284eb1541e6 (branch feat/dpb-plot, 2026-10-19).

Licence. Upstream is Apache-2.0 OR MIT. flowRS takes it under Apache-2.0, the licence of the rest of flowRS (the text is LICENSE at the repository root); the MIT text is kept beside the crate as LICENSE-MIT. Upstream has no NOTICE file. The package keeps upstream's authors and licence expression.

What was taken. Cargo.toml, README.md and src/ (core, gpu/ with its WGSL shaders, tests), formatted with default rustfmt so later changes show as diffs against the vendoring commit (668c9166). Not taken: the wasm feature (JavaScript bindings, build-wasm.sh), the bench feature and bench/ budget pages, measure/wgpu-proto, and gates.sh. flowRS calls the crate as Rust and runs its own gates.

flowRS's changes (commit 3e1650a1 and later)

  • A moments level beside the min/max pyramid (history.rs): ChannelSpec::stats / with_stats(), per-block Moments { n, mean, m2 } (f32, merged with Chan et al.'s pairwise update and accumulated in f64 over a range), range_moments, bucket_moments and moment(). The EEG scope's DC removal and ±1 SD band, and flowrs-capture's analog index, read them; JLS-style mean/std over any span without touching the samples.

  • ChannelSpec::keeping(seconds): a ring sized by duration.

  • A spread band (plot.rs): SeriesKind::Spread, drawn as mean ± one standard deviation per pixel column.

  • Column helpers made public (plot.rs): Trace and its fields, copy_trace, copy_spread and columns, so the Waveform panel and the scope build scenes from runs that are not a TimePlot lane.

  • Two trigger tests name the new stats field.

  • An image mark (scene.rs MarkKind::Image, ImageRun, Scene::push_image; gpu::ImageData, Renderer::set_image; gpu/wgsl/image.wgsl and its GLSL twin in webgl2.rs; an offscreen-canvas path in canvas2d.rs), added by flowrs-viz's substrate (work/neuroviz): a grid of values the renderer holds, drawn through a 256-entry colour lookup texture with bilinear or nearest sampling, an optional circular clip and contour hairlines. Topomaps, time-frequency maps, spectral arrays and ERP images draw through it. Canvas 2D scales an offscreen canvas and draws no contours.

All upstream tests still pass, with new tests for each addition.