Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
23 commits
Select commit Hold shift + click to select a range
4a49b2b
chore(rsdm): bump epics-ca-rs/base-rs/pva-rs to 0.22.x
physwkim Jul 9, 2026
3e371f6
doc(parity): record round-4 audit inventory (R4-1..R4-15)
physwkim Jul 10, 2026
78b11e4
fix(plot): make set_limits_internal the single owner of view-limits r…
physwkim Jul 10, 2026
976c39c
fix(calc): trigger on child value events, not on the stamp counter (R…
physwkim Jul 10, 2026
eeca82c
fix(histogram): treat the colormap histogram upper edge as open (R4-5)
physwkim Jul 10, 2026
0fa3d00
fix(scatter): drop BINNED_STATISTIC points on the open upper edge (R4-6)
physwkim Jul 10, 2026
fe36872
docs(parity): mark R4-5 and R4-6 fixed
physwkim Jul 10, 2026
33dee07
fix(adl2rsdm): default an absent arc `path` to 90°, not 360° (R4-15)
physwkim Jul 10, 2026
3f9660e
fix(calc): re-evaluate a MEDM `J` expression on the first record's se…
physwkim Jul 10, 2026
44aba50
docs(parity): withdraw R4-13, file R4-16, mark R4-15 fixed
physwkim Jul 10, 2026
fb21fb6
fix(adl2rsdm): colour embedded children from the host colormap (R4-14)
physwkim Jul 10, 2026
a1b680f
feat(plot): honour Shift/Alt per-axis wheel-zoom modifiers (R4-1)
physwkim Jul 10, 2026
b53d26c
feat(plot): pan on middle-button drag in every interaction mode (R4-3)
physwkim Jul 10, 2026
d8b5fb5
feat(plot): gate the Reset-Zoom button on autoscale and name the axis…
physwkim Jul 10, 2026
c4cf5c3
fix(volume): make ray opacity depend on traversed thickness, not step…
physwkim Jul 10, 2026
8be7bb6
fix(volume): store the premultiplied volume as f16 so low-coverage hu…
physwkim Jul 10, 2026
dd1ffbb
fix(volume): tie a VolumeId's texture to the views that hold it
physwkim Jul 10, 2026
028f05d
docs(parity): close the round-4 fix phase in the inventory
physwkim Jul 10, 2026
fc8dc9d
chore(release): 0.5.3
physwkim Jul 10, 2026
d3f1e19
fix(rsdm): carry the wire alarm status so MEDM calc operand I works
physwkim Jul 10, 2026
8eb49a3
docs(changelog): restore the version compare links through 0.5.3
physwkim Jul 10, 2026
958543a
docs: record the R4-16 status half as closed at source
physwkim Jul 10, 2026
9e111f0
chore: silence the lints Rust 1.97 added
physwkim Jul 10, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
95 changes: 94 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,95 @@ This is a workspace of three crates released together: **rsplot** (the plotting
library), **rsdm** (a PyDM-style EPICS display layer built on rsplot), and
**adl2rsdm** (a MEDM `.adl` → RsDM-Rust-source converter).

## [0.5.3] - 2026-07-10

A regression release. A workspace-wide upstream-parity audit (silx / PyDM /
adl2pydm + MEDM C) found that three of the fixes 0.5.2 shipped were wrong, and
turned up ten further divergences from the reference behaviour. All are fixed
here. `VolumeRaycaster` users should upgrade: the volume it rendered in 0.5.2
carried no thickness cue and lost the hue of faint voxels.

### Fixed — `rsplot`

- **Volume opacity depends on the thickness a ray crosses again.** 0.5.2's
"Beer-Lambert" correction divided by the *step count*, an exponent carrying no
world distance, so every ray accumulated the same transmittance whatever chord
it traversed: a uniform volume rendered as a flat silhouette, and at the
default 256 steps the correction was exactly the identity. Each sample is now
corrected from a reference *spacing* (`box_diagonal / 256`, a world distance),
which keeps the step-count invariance 0.5.2 was after while restoring the
density cue. A ray crossing the full box diagonal at the default step count
renders exactly as before.
- **Faint voxels keep their colour.** The premultiplied 3-D texture 0.5.2
introduced stored the product `rgb · a` in 8 bits, and the shader must divide
the coverage back out to recover the straight colour — a product that at
coverage `a` resolves the quotient only to steps of `1/a`. An authored
`(255, 128, 0)` voxel at `a = 3/255` read back as `(255, 170, 0)`; at
`a = 1/255` no hue survived at all. The texture is now `Rgba16Float`, which
carries the straight colour exactly at every coverage while the filter still
interpolates premultiplied colour (no return of the dark fringe). **This
doubles the volume texture's VRAM.**
- **`VolumeRaycaster::remove` no longer blanks another view.** Two views sharing
a `VolumeId` share one texture, by design; `remove` freed it outright, so the
survivor silently rendered nothing. The texture is now claim-counted and lives
exactly as long as the views holding its id. Dropping a view releases its
claim too, so a `VolumeRaycaster` that is simply dropped no longer pins its
VRAM for the app's lifetime.
- **Alt+Wheel zooms X only and Shift+Wheel zooms Y/Y2 only**, the silx bindings
the axes menu already advertised. Plain wheel and keep-aspect are unchanged.
- **Middle-button drag pans in every interaction mode**, as in silx. The
existing right-button pan is kept.
- **The Reset-Zoom toolbar button disables when neither axis autoscales**, and
its tooltip names the single autoscaling axis when exactly one is on.
- **Programmatic `set_limits` and toolbar Zoom-In/Out repair their limits.**
Inverted, degenerate or float32-overflowing ranges reached the transform
unrepaired; every view-limits commit now runs the same clamp, including the
Y2 and extra-axis paths.
- **The colormap dialog's histogram drops samples equal to the range maximum**,
as `Histogramnd` does with its default half-open last bin.
- **`Scatter` BINNED_STATISTIC drops points on the max edge** instead of
clamping them into the last bin, matching `scipy.stats.binned_statistic_2d`
as silx calls it. A degenerate extent now admits no point rather than
collapsing every point into bin 0.

### Fixed — `rsdm`

- **`calc://` re-evaluates when a child connects or disconnects.** PyDM
re-emits on a connection-state change; rsdm only watched values.
- **`calc://` no longer retriggers on a child's alarm or metadata change**, only
on an actual value change, as PyDM's `update` list specifies.
- **A `dialect = medm` expression reading operand `I` or `J` re-evaluates on an
alarm status / severity change.** MEDM's `setDynamicAttrMonitorFlags` adds
`monitorStatusChanged` and `monitorSeverityChanged` exactly when the
expression uses those operands. rsdm never watched severity, so a transition
left the calc showing a stale value, and it had no alarm status to read at all
— operand `I` bound a constant `0.0`. Both are now monitored, and only when
the expression reads them.

### Added — `rsdm`

- **`ChannelState::status`** carries the wire alarm status — the record's `STAT`
for `ca://`, the pvAccess `alarm.status` enum for `pva://`. It backs the MEDM
calc operand `I`.

### Fixed — `adl2rsdm`

- **Embedded-display and composite-file children take the host screen's
colormap.** MEDM's `parseCompositeFile` parses and discards the child file's
`"color map"` block and resolves the children's `clr`/`bclr` against the
parent display's palette; adl2rsdm used the child's own. Screens on the
default palette are unaffected; those with a custom palette rendered every
embedded widget in the wrong colours.
- **An arc with no `path` spans 90°, not 360°** — MEDM's `createDlArc` default.

### Changed — `rsplot`

- The volume 3-D texture is `Rgba16Float` rather than `Rgba8Unorm`, doubling its
VRAM. See the faint-voxel fix above for why an 8-bit texture cannot carry the
data.
- `VolumeRaycaster` now holds a clone of its `RenderState` (a bundle of `Arc`s)
so it can release its texture claim on drop.

## [0.5.2] - 2026-07-08

A correctness and robustness pass over the `VolumeRaycaster` shipped in 0.5.1,
Expand Down Expand Up @@ -403,7 +492,11 @@ instead of Qt `.ui` XML.
- rsplot is now the root of a three-crate workspace; `rsdm` reaches egui/wgpu
through `rsplot::egui` to keep a single egui/wgpu in the tree.

[Unreleased]: https://github.com/physwkim/rsplot/compare/v0.4.2...HEAD
[Unreleased]: https://github.com/physwkim/rsplot/compare/v0.5.3...HEAD
[0.5.3]: https://github.com/physwkim/rsplot/compare/v0.5.2...v0.5.3
[0.5.2]: https://github.com/physwkim/rsplot/compare/v0.5.1...v0.5.2
[0.5.1]: https://github.com/physwkim/rsplot/compare/v0.5.0...v0.5.1
[0.5.0]: https://github.com/physwkim/rsplot/compare/v0.4.2...v0.5.0
[0.4.2]: https://github.com/physwkim/rsplot/compare/v0.4.1...v0.4.2
[0.4.1]: https://github.com/physwkim/rsplot/compare/v0.4.0...v0.4.1
[0.4.0]: https://github.com/physwkim/rsplot/compare/v0.3.0...v0.4.0
Expand Down
5 changes: 4 additions & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "rsplot"
version = "0.5.2"
version = "0.5.3"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
Expand All @@ -24,6 +24,9 @@ resolver = "3"
egui = "0.34"
egui-wgpu = "0.34"
bytemuck = { version = "1", features = ["derive"] }
# f16 encoding for the volume ray-caster's premultiplied 3D texture. Already in
# the tree transitively (via wgpu), so this pins no new major version.
half = "2"
colorous = "1"
# PNG encoding for save_graph (offscreen readback → file). Already in the tree
# transitively via egui's image loading, so this pins no new major version.
Expand Down
2 changes: 1 addition & 1 deletion adl2rsdm/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "adl2rsdm"
version = "0.5.2"
version = "0.5.3"
edition = "2024"
rust-version = "1.92"
license = "MIT OR Apache-2.0"
Expand Down
3 changes: 2 additions & 1 deletion adl2rsdm/examples/local_panel_screen.rs
Original file line number Diff line number Diff line change
Expand Up @@ -176,6 +176,7 @@ impl Screen {
place(ui, __frame_origin_16, sx, sy, egui::Order::Middle, egui::Id::new(15u64), 0.0, 18.0, 152.0, 16.0, |ui| {
{
ui.style_mut().override_font_id = Some(egui::FontId::proportional(10.0 * sy));
ui.style_mut().visuals.override_text_color = Some(Color32::from_rgb(0, 0, 255));
ui.with_layout(egui::Layout::centered_and_justified(egui::Direction::LeftToRight), |ui| {
let spacing = ui.spacing_mut();
spacing.interact_size = egui::Vec2::ZERO;
Expand Down Expand Up @@ -341,7 +342,7 @@ fn related_display_icon(ui: &egui::Ui, rect: egui::Rect, fg: egui::Color32, bg:
let side = (rect.height().min(rect.width()) - 8.0).max(4.0);
let icon = egui::Rect::from_center_size(rect.center(), egui::Vec2::splat(side));
let p = |x: f32, y: f32| icon.min + egui::vec2(x, y) * (side / 25.0);
let stroke = egui::Stroke::new(1.0, fg);
let stroke = egui::Stroke::new(1.0_f32, fg);
let painter = ui.painter();
painter.line_segment([p(16.0, 9.0), p(22.0, 9.0)], stroke);
painter.line_segment([p(22.0, 9.0), p(22.0, 22.0)], stroke);
Expand Down
43 changes: 40 additions & 3 deletions adl2rsdm/src/adl_parser.rs
Original file line number Diff line number Diff line change
Expand Up @@ -832,6 +832,36 @@ pub fn parse(text: &str) -> MedmScreen {
/// `clr`/`bclr` indices resolve to the file's colours during this parse (MEDM
/// `executeDlDisplay` → `parseAndExtractExternalColormap`, medmDisplay.c:386-427).
pub fn parse_in_dir(text: &str, source_dir: Option<&Path>) -> MedmScreen {
parse_impl(text, source_dir, None)
}

/// Parse a `.adl` that is being **embedded** into a host display, resolving every
/// `clr`/`bclr` index against `host_colormap` instead of the file's own table.
///
/// MEDM's `parseCompositeFile` (`medm/medmComposite.c:687-700`) reads the child's
/// `display` block and its `"color map"` block with `parseAndSkip` — both are
/// discarded — and appends the child's elements straight into the **parent**
/// `displayInfo`, whose colormap therefore colours them. The child's `file`
/// block is not skipped: `medmComposite.c:684` copies its version number over,
/// which is what selects the old-format attribute rolling.
///
/// The host table is the top-level display's, at any nesting depth: a composite
/// file that itself embeds another passes the same `displayInfo` down.
pub fn parse_embedded_in_dir(
text: &str,
source_dir: Option<&Path>,
host_colormap: &[Color],
) -> MedmScreen {
parse_impl(text, source_dir, Some(host_colormap))
}

/// `host_colormap` is `Some` when this document is embedded into a host display
/// that owns the colour table — see [`parse_embedded_in_dir`].
fn parse_impl(
text: &str,
source_dir: Option<&Path>,
host_colormap: Option<&[Color]>,
) -> MedmScreen {
let buf: Vec<&str> = text.lines().collect();
let blocks = locate_blocks(&buf);

Expand All @@ -842,8 +872,15 @@ pub fn parse_in_dir(text: &str, source_dir: Option<&Path>) -> MedmScreen {
if let Some(block) = named_block("file", &blocks) {
parse_file(&block_content(&buf, block), &mut screen);
}
if let Some(block) = named_block("color map", &blocks) {
screen.color_table = parse_color_map(&block_content(&buf, block));
// An embedded document's own colour table is parsed and thrown away, as
// `parseCompositeFile` does; the host's is installed in its place.
match host_colormap {
Some(table) => screen.color_table = table.to_vec(),
None => {
if let Some(block) = named_block("color map", &blocks) {
screen.color_table = parse_color_map(&block_content(&buf, block));
}
}
}
if let Some(block) = named_block("display", &blocks) {
let content = block_content(&buf, block);
Expand All @@ -853,7 +890,7 @@ pub fn parse_in_dir(text: &str, source_dir: Option<&Path>) -> MedmScreen {
// dir, file absent, unparsable) fall to the built-in default 65-colour
// palette (createDlColormap) and record the file so codegen warns. A BLANK
// `cmap` falls straight to the default palette.
if screen.color_table.is_empty() {
if host_colormap.is_none() && screen.color_table.is_empty() {
let cmap = locate_assignments(&content)
.get("cmap")
.map(|s| s.trim().to_string())
Expand Down
Loading
Loading