v3.21.0
v3.21.0 (2026-04-26)
✨ Features
-
io: add
loader_extensionskeyword argument toload(#313) (ccccc1a)This allows passing temporary loader extension settings to a single load call without needing to wrap it in
erlab.io.extend_loader.Also implement GUI for setting
loader_extensionsin the ImageTool Manager and the Data Explorer. -
manager: add refreshable nested ImageTool workflows (#308) (f19cf12)
This is a major update to the ImageTool Manager that changes the workflow for ImageTool-based analysis.
Previously, ImageTool windows were always top-level items in the manager, while tools launched from ImageTool were nested under their source ImageTool. This made derived ImageTool outputs inconsistent: opening an ImageTool from an existing ImageTool created a sibling window instead of a child, and the manager could not track the relationship between the output and its source.
Starting with this release, ImageTool windows can be nested below the tool or ImageTool that created them, and the manager tracks parent-child relationships between source data, tools, and derived outputs. Results are organized under their source in the manager tree, and their lineage is tracked back to the original data. When parent data changes, child tools and outputs are marked as stale and can be refreshed manually or automatically.
ftool,goldtool, andrestoolcan also be configured to rerun fits when their source data updates.ImageTool transform dialogs now include a
Result Placementselector. In manager-backed windows, the default isOpen Child Window. ChooseOpen Top-Level Windowto keep the previous detached-window behavior, orReplace Currentto overwrite the active ImageTool.The manager side panel now shows source metadata, derivation steps, and copyable replay code for derived results. Select individual derivation steps to copy only the relevant code, or copy the full derivation at once. This makes it easier to inspect how a result was created and move the workflow into reproducible code.
Workspaces are upgraded so that nested tools, nested ImageTool outputs, fit results, source bindings, and derivation metadata persist across save/load.
-
manager: let child tools refresh after source data changes (#305) (c8180b2)
Child tools opened from ImageTool, such as
dtool,goldtool,restool,ktool, andmeshtool, now keep track of the selection they were opened from. When the parent ImageTool is updated with compatible new data, for example after reload, replace, watch updates, or in-place editing dialogs, those tools no longer silently stay on outdated data. Instead, they are marked as stale or unavailable in both the tool window and the ImageTool manager. Users can click the marker to refresh the tool from the latest source data, and can optionally enable automatic updates for future replacements. This makes real-time and iterative analysis much smoother because helper tools no longer need to be reopened every time the parent data changes. -
imagetool: add interface for
symmetrize_nfold(07eb6c8)Adds a new
Edit → Symmetrize → Rotational...dialog to ImageTool as an interface toera.transform.symmetrize_nfold. The interface forera.transform.symmetrizeis moved toEdit → Symmetrize → Mirror.... -
analysis.transform: add n-fold rotational symmetrization (468f967)
Add
era.transform.symmetrize_nfoldas a public transform API for rotational averaging with arbitrary rotational symmetry. -
imagetool: add interface for
thin(d973702)Adds a new
Edit → Thindialog to ImageTool for resampling withxarray.DataArray.thin. -
imagetool: add interface for
coarsen(5e2e672)Adds a new
Edit → Coarsendialog to ImageTool for block-wise reduction withxarray.DataArray.coarsen. -
imagetool: add interface for
swap_dims(a36a5d3)Adds an
Edit → Swap Dimensionsdialog to ImageTool as a GUI forxarray.DataArray.swap_dims. -
imagetool: add Gaussian filter (#301) (9d2e49a)
Adds a Gaussian filter dialog with the same preview/reset behavior as the normalization dialog.
-
imagetool: make rotation guidelines more useful (e30341a)
Rotation guidelines now move together with the cursor by default, making it easier to manipulate them. The guidelines can still be used as fixed reference lines when the "Follow Active Cursor" option is disabled.
Also, the center and angle of the rotation guidelins are now also fed into
ktoolas normal emission angles and azimuthal offset if aktoolis opened from an ImageTool window with a visible rotation guideline on aalpha-betaslice. -
imagetool: make rotation guidelines undoable and restorable (3217138)
-
ktool: add symmetrization preview (522f554)
Adds the ability to preview n-fold symmetrized constant-energy surfaces to
ktool. -
interactive.ptable: add periodic table app (#297) (7e77064)
Adds a new interactive periodic table app,
erlab.interactive.ptable, that provides x-ray absorption edge tables, and photoionization cross-section plots. The app is also accessible from the ImageTool manager'sAppsmenu. -
analysis.xps: add module that provides x-ray cross sections and absorption edge energies for core-level photoemission analysis (#296) (dd7d824)
-
kspace: make cut conversion exact (#293) (426ae22)
Momentum conversion for cuts previously approximated the momentum perpendicular to the slit as a single value across the cut. This is exact only for cuts passing through the origin in momentum space, but can lead to errors for off-center cuts. Now, the exact momentum coordinates are calculated for each point in the output grid, allowing for accurate conversion of arbitrary cuts. The cuts also contain correct momentum coordinates.
This should not affect most use cases since many cuts of interest are taken near normal emission, and the deviation from the approximation is small for typical angles and kinetic energy ranges.
This also covers hv-dependent cuts that are measured while varying the map angle (beta). Also in this case, the Brillouin Zone overlay of
ktoolis now plotted by slicing with a curved surface in momentum space rather than a flat plane, so the overlay is more accurate for off-center cuts.This change only affects cuts (i.e., data with only one in-plane momentum axis) since for full 2D momentum maps, the exact momentum coordinates are always calculated. Cuts through the origin are also unaffected.
-
kspace: allow setting offsets from normal emission angles in momentum conversion (#291) (f56ad87)
Adds a new workflow for setting angle offsets based on the normal emission angles in the data. This is accessible through a new "Normal Emission" section in
ktool, and the underlying methodxarray.DataArray.kspace.set_normalis now the recommended way to set angle offsets for momentum conversion. The existingxarray.DataArray.kspace.offsetsattribute remains available for direct, dictionary-style access to angle offsets for advanced use cases. Also adds aDataArray.kspace.set_normal_likemethod to copy normal emission angles from another DataArray. -
plotting: add fine-grained control over mappable selection for colorbars (70442cc)
Adds a new
indexparameter toproportional_colorbarandnice_colorbarthat allows users to specify which mappable to use when multiple are present. Also adds animage_onlyparameter to restrict the selection to images. This provides more flexibility in cases where multiple mappables are present in a single axes. -
analysis.fit: properly allow multidimensional xarray broadcasting for functions that use convolution (7c1d1ca)
Also adds support for lazy-computing dask-based inputs.
🐞 Bug Fixes
-
ktool: suppress warnings about missing k-space parameters in ktool (3388182)
-
imagetool: properly include watched data name in generated code for average and crop dialogs (1e1d4ef)
-
interactive: defer
ftool2D stepped fits to next event loop turn (7abb9a3)Defer the next slice in
ftool2D up/down fit sequences with a queued Qt callback so cursor and fit overlays have a chance to repaint between steps. -
analysis.gold: fix regression where open bounds (
None) was not avaliable in range slicing and plotting functions (4fdc856) -
interactive: better lifecycle management of colorbar menu widgets to prevent rare crashes due to garbage collection of menu widgets from worker threads during later allocations (37f5cc4)
-
interactive: fix failures when both PyQt6 and PySide6 are installed (cf982f5)
[main 9437485] bump: version 3.20.2 → 3.21.0
3 files changed, 11 insertions(+), 3 deletions(-)