Skip to content

Releases: kmnhan/erlabpy

v3.23.1

28 May 00:19

Choose a tag to compare

v3.23.1 (2026-05-28)

🐞 Bug Fixes

  • docs: fix failing documentation build (#365) (1d99caa)

[main 4948c76] bump: version 3.23.0 → 3.23.1
3 files changed, 8 insertions(+), 2 deletions(-)

v3.23.0

27 May 23:31

Choose a tag to compare

v3.23.0 (2026-05-27)

✨ Features

  • io: allow keyword arguments to be dispatched to identify or load_single based on their signatures (645fa61)

    The previous behavior of the load function was to pass all additional keyword arguments to the identify method of the active loader. Keyword arguments to load_single had to be passed through the load_kwargs argument. To provide more flexibility and allow for more intuitive usage, load now automatically detects which keyword arguments are accepted by identify and load_single and dispatches them accordingly. If a keyword argument is accepted by both methods, it is passed to identify by default, but can still be forced to go to load_single using the load_kwargs argument.

  • manager: improve general quality of generated code (6db3932)

    Cleaned up useless intermediate variables and relay assignments in generated code across multiple tools.

  • io.plugins.hers: add angle conversion and B-field correction (#361) (81d3fbe)

    ALS BL10.0.0.1 data is now automatically converted to angles upon loading. The loader also tries to automatically correct warping due to small magnetic fields for maps.

  • manager: add provenance-aware operations in console (#357) (b0b6959)

    ImageTool Manager now supports provenance-aware operations between multiple tools from both the console and UI actions. With this addition, users can conduct complex analysis within the GUI and still keep provenance of the exact steps required to reproduce results from raw data.

    In the console, tools[i] now acts similar to a DataArray, so just typing expressions like tools[0] - tools[1] can create ImageTools with preserved parent history. Complex expressions that use xarray and numpy methods are also supported.

    ImageTools created this way records each input’s history and the code used to create the new tool. One use case would be assigning coordinates from one tool to another, e.g. tools[0].assign_coords(tools[1].eV), which creates a new tool with the same data but updated coordinates and provenance. These tools are also reloadable, enabling complex real-time data analysis without external scripts.

    Concatenation also uses the same provenance path as console-derived results, so that where the concatenated data came from is recorded in the provenance of the resulting tool.

    Also enables access to child ImageTools from the console using tools[i].children[j]. Nested children can be accessed by chaining children, like tools[i].children[j].children[k]. Type tools[i].children to see a summary of children.

  • imagetool: add leading edge extraction dialog (#355) (a28de00)

    ImageTool now includes an Edit → Leading Edge… dialog for calculating leading-edge positions with erlab.analysis.interpolate.leading_edge. Users can choose the dimension, fraction of the maximum, and search direction.

  • analysis.interpolate: support leading edge axis selection (#353) (458c703)

    Allows selecting dimension and direction for leading edge extraction.

  • qsel: add min/max/sum aggregation (#351) (3a27026)

    The xarray.DataArray.qsel accessor now supports mean, minimum, maximum, and sum reductions through qsel.mean/min/max/sum helpers. qsel.average remains available as an alias for qsel.mean. They can also be selected with the func argument to qsel.

  • imagetool: share axis inversion by dimension (#350) (1c915d6)

    ImageTool now treats axis inversion as shared state for each data dimension, matching shared manual limits. Inverting an axis from a plot context menu or from View → Invert Axis updates every plot showing that dimension. It is now also undo/redoable.

  • imagetool: select variables from Datasets and DataTrees (#346) (45cc30e)

    When opening data structures containing multiple DataArrays, ImageTool now prompts the user to select which of the data variables to open.

  • imagetool: better history entries (cc7b2b0)

    History entries are more descriptive. Also combines multiple operations into one entry if they are performed in quick succession.

  • imagetool: add selection dialog (8f929bf)

    Add Select Data… to the ImageTool Edit menu for building validated xarray selections without writing free-form code. The dialog supports per-dimension qsel, sel, and isel point/range selectors, previews the resulting shape, and can copy executable code.

    Although it is easier to directly select slices from the right-click context menu of each plot, this is not always possible (e.g. for 4D data) and the dialog provides a more comprehensive interface for building complex selections.

  • imagetool: add a toggle for controls visibility (3f81f9d)

    Adds a new menu action to toggle the visibility of the ImageTool controls.

  • manager: add menu item that shows the current workspace properties, including path and file status (46c4055)

  • manager: add right-click menu items to Windows taskbar icon and macOS dock icon for standalone installations (73ec9d2)

  • manager: add "Open Recent" menu with recently used workspace files (1b2e18b)

  • manager: add workspace offload for ImageTool data (70f15ce)

    Replace the old Archive/Unarchive workflow with Offload to Workspace in the ImageTool manager. The new action saves the workspace when needed, frees selected in-memory ImageTool data, and reconnects it as dask-backed data from the .itws workspace file. Dask-backed data can be loaded in to memory with Load Into Memory. Additionally, user-configured chunk size edits are now saved into the workspace file so reloaded data keeps the intended chunk layout.

🐞 Bug Fixes

  • imagetool: ensure filter dialogs generate provenance and copy code (1ae87e2)

  • ftool: properly handle coordinates with spaces (#358) (eff9b96)

  • interactive: preserve exact float spinbox display (#356) (aeae172)

    Some spinboxes were rounded to 15 significant digits, which may have reduced precision in some cases.

  • imagetool: handle dropped workspace load failures (#354) (3a0e7ee)

    Fixes an issue where drag-and-dropping a .itws file into the manager window would sometimes fail.

  • imagetool: preserve full precision in numeric entries (#352) (cd38fa1)

    Fixed an issue where coordinate data or selection argument inputs were rounded to the spinbox display precision.

  • imagetool: guard unsafe normalize and display values (#349) (0ae5b24)

    ImageTool now treats invalid or rendering-unsafe values as missing. Infinite values and extreme finite display outliers no longer blow up colormap generation or crash rendering.

    Normalize now returns NaN where area or range denominators are non-finite or effectively zero, instead of dividing by those values and producing unusably large results.

  • manager: fixes an issue where the manager would sometimes crash after saving (#348) (2ff502b)

  • imagetool: fix all-NaN selections after ImageTool coordinate edits (#344) (d38a398)

    Tools and ImageTool windows opened from cursor, bin, or crop selections now refresh using the same selected positions on the current source data. This fixes cases where refreshing or extracting selected data returned all-NaN values after Edit → Edit Coordinates, even when no crop was applied.

  • manager: group watched badges by source (#343) (a320b59)

    Fixes a regression where watched variables from the same notebook will appear in different colors.

  • imagetool: properly link multiple cursor drag (0cb8982)

  • imagetool: fix inconsistent history entry creation behavior (92fd122)

  • imagetool: preserve manual manager row names on reload ([e947e88](https://github.com/kmnh...

Read more

v3.22.0

13 May 02:03

Choose a tag to compare

v3.22.0 (2026-05-13)

✨ Features

  • manager: reconnect watched variables from saved workspaces (#337) (6a3d433)

    Makes watched variables in ImageTool Manager now reconnect by their name after notebook or workspace restarts.

    Users can watch a variable with the usual %watch data command, restart the notebook kernel, rerun the notebook, and run %watch data_name again to reconnect the existing watched row instead of creating a duplicate. Saved ImageTool workspaces also remember watched variables, so reopening an .itws file shows the watched rows and lets the notebook reconnect them.

    A new %watch --restore command reconnects all watched variables from the open manager workspace when matching variables exist in the notebook. This makes sharing notebooks and workspaces together straightforward: send the .itws file along with the .ipynb file, open both, execute run the notebook cells, then run %watch --restore.

    Watched rows that cannot currently connect to a notebook variable are shown as disconnected until they are restored.

  • imagetool: add interpolation dialog (#336) (f7ab159)

    Add an interpolation dialog for resampling data along a selected dimension. The dialog allows users to apply interpolation along customizable coordinates.

  • ktool: support angle-energy cuts in ktool (#332) (743eda6)

    ktool now supports displaying alpha-eV cuts.

  • manager: better manager workspace files (#333) (e8600a4)

    This is a change that significantly influences the workflow when working in ImageTool Manager. One ImageTool Manager window is now logically coupled to one workspace file, allowing you to save and load workspace documents more easily. You can save the entire state of your workspace by pressing Ctrl+S in any child window, just like working with experiment files in Igor Pro.

  • manager: support multiple manager instances (#331) (d331f82)

    Allow multiple ImageTool Manager windows to run at the same time. You can target a specific manager with a 0-based index in client code (e.g., manager=2), or set a default for the session. When multiple managers are running and no default is set, manager=True now raises an error. You can start a new manager instance from an existing manager window with the new File → New Manager Instance menu option.

    Also adds new %manager magics for listing managers, selecting a default, checking the current default, and clearing it.

  • imagetool: add coordinate and attribute editing (e0c954d)

    Allows users to add scalar coordinates, add 1D associated coordinates along existing dimensions, and edit DataArray attributes directly from ImageTool. Use Edit → Edit Coordinates and Edit → Edit Attributes to open the respective dialogs.

  • imagetool: add dialog for renaming coordinates and dimensions (a0bec2f)

    Adds an ImageTool Edit → Rename... dialog as an interface to DataArray.rename, allowing users to rename coordinates and dimensions in the ImageTool.

  • manager: prefer scan-number loading in copied code (ca59635)

    ImageTool Manager now writes cleaner copied workflow code for data loaded from files. When an ERLab loader can infer and verify the scan number for the opened file, the copied code uses erlab.io.load(scan, data_dir=...) instead of embedding the full file path.

  • imagetool: add scale and offset coordinate editing (4cf0db0)

    ImageTool’s Coordinate Editor can now transform numeric scalar and 1D coordinates with a simple new = scale * old + offset operation in a new tab.

  • imagetool: improve copied code (9c19644)

    Code copied in various workflows in ImageTool Manager now starts from a meaningful source instead of assuming an arbitrary variable named data. Watched variables keep using the watched variable name, data loaded from files includes load code when available, and others prompt for the source variable name before copying.

    Also cleans up some of the code so that unnecessary seed aliases like derived = data are not included in the copied code.

  • io: add data loader pal4a1 for PAL beamline 4A1 (#328) (4d80751)

    Updates the Igor text parser to preserve empty-unit SetScale axes as x/y/z/t and parse X Note metadata into attrs to support loading data files from PAL beamline 4A1 at Pohang.

  • imagetool: add a way to view associated coordinate values (#327) (5f5fb15)

    ImageTool now lets users inspect plotted associated coordinates values corresponding to the currently active cursor position directly from the cursor value readout. The readout source can now be selected from the value field’s right-click context menu.

    Also, the right-click context menu of profile plots now includes actions to open associated coordinates in a new ImageTool window.

  • manager: add guided loader extension editors (#325) (5912d4c)

    Add interactive helper dialogs for ImageTool manager loader extensions. The name_map and coordinate_attrs fields still support raw literal editing, but now include guided editors that inspect the first selected file, show available metadata attributes, clarify loader-provided mappings, and write the resulting literal values back into the existing fields.

  • imagetool: add divide-by-coordinate data operation (#326) (c9841be)

    Add an ImageTool Edit menu action for dividing data by a selected numeric coordinate, such as mesh current.

  • imagetool: plot multidimensional associated coordinates (#324) (a928be6)

    ImageTool can now plot numeric non-dimension coordinates with one or more dimensions from ViewPlot Associated Coordinates. Multidimensional associated coordinates are sliced with the active cursor and averaged over binned hidden dimensions, so their profile overlays stay aligned with the displayed data slice. Cursor color mapping also supports multidimensional associated coordinates by sampling the coordinate value at each cursor position.

  • io.plugins.merlin: add support for loading beamline control system scans (#317) (43ae4a6)

    Adds a new function load_bcs to the MERLIN plugin, which can load beamline control system (BCS) scan data from text files. Currently only tested with DiagOn images, but should be flexible enough to support other image columns and varying/constant numeric columns.

    This adds Pillow as a new optional dependency which is required to load .png image files.

  • imagetool: support Igor binary wave export (#318) (e06f735)

    ImageTool’s File -> Save As dialog now includes an Igor Binary Waves (.ibw) option. Exports use erlab.io.igor.save_wave, making it easier to save displayed data directly for use in Igor Pro.

🐞 Bug Fixes

  • manager: improve contrast of some text in the metadata panel in dark mode (9830ef8)

  • manager: fixes a PySide6 incompatibility related to provenance handling (c948dc0)

  • manager: preserve file information during analysis (3b7f1b7)

    ImageTool now keeps the file information when data loaded from a file is transformed in place, opened in a detached top-level window, or restored through the manager. ImageTool windows detached from the originally loaded parent now retain their full history. The manager metadata panel also shows the originating file when available.

  • imagetool: fix coordinate edit code generation (eeedeb0)

  • io.plugins.hers: correct coordinate handling for ALS BL10 data (#329) (733eb60)

    FITS data from ALS BL10 now use the nominal scan axis from the FITS header for single-motor scans, matching Igor Pro’s loader behavior. This fixes cases where analyzer rotation (Alpha, translated to beta in erlab conventions) loaded with slightly nonuniform measured readback values. The measured values are still retained as <motor>_readback coordinates for diagnostics.

    FITS binary table image axes also now interpret TRPIX as a one-based reference pixel, so TRPIX=1 starts exactly at TRVAL, matching FITS/Igor semantics. This was previously misinterpreted as zero-based, causing a one-pixel shift in the loaded data.

  • manager: respect default loader for manager file dialogs...

Read more

v3.21.0

26 Apr 03:05

Choose a tag to compare

v3.21.0 (2026-04-26)

✨ Features

  • io: add loader_extensions keyword argument to load (#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_extensions in 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, and restool can also be configured to rerun fits when their source data updates.

    ImageTool transform dialogs now include a Result Placement selector. In manager-backed windows, the default is Open Child Window. Choose Open Top-Level Window to keep the previous detached-window behavior, or Replace Current to 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, and meshtool, 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 to era.transform.symmetrize_nfold. The interface for era.transform.symmetrize is moved to Edit → Symmetrize → Mirror....

  • analysis.transform: add n-fold rotational symmetrization (468f967)

    Add era.transform.symmetrize_nfold as a public transform API for rotational averaging with arbitrary rotational symmetry.

  • imagetool: add interface for thin (d973702)

    Adds a new Edit → Thin dialog to ImageTool for resampling with xarray.DataArray.thin.

  • imagetool: add interface for coarsen (5e2e672)

    Adds a new Edit → Coarsen dialog to ImageTool for block-wise reduction with xarray.DataArray.coarsen.

  • imagetool: add interface for swap_dims (a36a5d3)

    Adds an Edit → Swap Dimensions dialog to ImageTool as a GUI for xarray.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 ktool as normal emission angles and azimuthal offset if a ktool is opened from an ImageTool window with a visible rotation guideline on a alpha-beta slice.

  • 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's Apps menu.

  • 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 ktool is 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 method xarray.DataArray.kspace.set_normal is now the recommended way to set angle offsets for momentum conversion. The existing xarray.DataArray.kspace.offsets attribute remains available for direct, dictionary-style access to angle offsets for advanced use cases. Also adds a DataArray.kspace.set_normal_like method to copy normal emission angles from another DataArray.

  • plotting: add fine-grained control over mappable selection for colorbars (70442cc)

    Adds a new index parameter to proportional_colorbar and nice_colorbar that allows users to specify which mappable to use when multiple are present. Also adds an image_only parameter 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 ftool 2D stepped fits to next event loop turn (7abb9a3)

    Defer the next slice in ftool 2D up/down fit sequences with a queued Qt callback so cursor and fit overlays have a...

Read more

v3.20.2

13 Mar 11:01

Choose a tag to compare

v3.20.2 (2026-03-13)

⚡️ Performance

  • io.plugins.da30: improve DA30 zip loading performance (ef5b315)

    Rewrites load_zip to avoid temporary directory extraction by parsing .ini files directly from zip contents and reading spectrum binaries into NumPy arrays in memory.

  • manager: slightly improve watch change detection speed and remove xxhash optional dependency (1b2c453)

  • imagetool: optimize data handling and memory management (0ba2268)

    Implements a more efficient approach where data is not copied unnecessarily. This almost halves the memory usage when opening floating point arrays, and allows in-place updates from the console without risking unintended side effects on the original data. Temporary transformations like normalization will take up more memory only when activated.

  • imagetool: micro-optimization for binning along multiple axes (0466bd5)

♻️ Code Refactor

  • remove optional libarchive dependency for DA30 zip file loading (e5fd1b5)

    Benchmarks show that using libarchive does not have a significant performance improvement when loading a single DA30 zip file, and it adds an optional dependency that can be difficult to install on some platforms. This commit removes the option to use libarchive for loading DA30 zip files, and simplifies the code accordingly.

[main b8ef1a2] bump: version 3.20.1 → 3.20.2
3 files changed, 5 insertions(+), 5 deletions(-)

v3.20.1

04 Mar 23:23

Choose a tag to compare

v3.20.1 (2026-03-04)

🐞 Bug Fixes

  • kspace: Use arctan2 for correct quadrant in inverse conversion function for very large angles (d34a3f1)

  • analysis.fit: make resolution convolution invariant to descending energy axes (4e7ca4a)

    do_convolve previously produced physically shifted broadened spectra for descending energy coordinates because kernel generation extended its padded domain assuming ascending order. This caused axis-order-dependent broadening results (for example, shifted Fermi-edge crossing positions) even though the underlying data were identical up to reversal.

  • kspace: correct kz point-count resolution spacing for momentum conversion (2e55f0a)

    DataArray.kspace.estimate_resolution(..., from_numpoints=True) now uses adjacent-point spacing over inclusive bounds ((max - min) / (N - 1)) instead of dividing by N, which previously underestimated kz step size and could generate overly dense default kz grids in convert(). The change also adds a single-point guard (np.inf when fewer than two points exist).

  • analysis.gold: honor coordinate order for fit-range slicing (f956429)

    Patches functions that select the fit range using input parameters to sort the input range to match the coordinate order of the input dataset. This ensures that the fit range is correctly applied regardless of the coordinate order of the input dataset. The affected functions include edge, poly, spline, and quick_fit.

  • analysis.gold: plot FWHM span with correct half-width around fitted center (2479f31)

    The fit visualization now shades the true FWHM interval. Previously, the span used center ± resolution, doubling the displayed width. It now uses the correct one (center ± resolution/2).

  • analysis.gold: normalize fixed center parameter calculation in edge (519f001)

  • kspace: add kinetic energy validation to prevent nonphysical values (6bd6f47)

    Raises ValueError when kinetic energy is nonpositive during resolution estimation and coordinate conversion in kspace tools and accessors. This ensures that users are informed of nonphysical conditions in their data and prevents downstream errors.

  • imagetool: properly handle non-uniform descending coordinates (e221a92)

    Non-uniform descending coordinates were not handled correctly when indexing by value or when synchronizing with different ImageTools. This commit adds support for non-uniform descending coordinates by reversing the coordinate array and adjusting the index accordingly.

  • ktool: Descending eV axes (common from some loaders) collapsed center range and selected wrong bins, producing wrong preview results (a3442eb)

  • ktool: "Estimate resolution" ignored current UI wf, so estimated momentum resolution could be inconsistent with actual conversion parameters (515262a)

  • ktool: "Estimate bounds" ignored current UI V0/wf, so low-hv and hv-dependent data could get wrong momentum bounds (a57da0c)

  • ktool: fixed a bug where the result could be wrong for data with the energy axis given in kinetic energy. (f310caf)

  • analysis.gold: correct parameter assignment for fixed center in edge (1521908)

  • io: add warning for squeezing dimensions in save_as_hdf5 with igor_compat=True (80ef869)

⚡️ Performance

  • ktool: improve memory efficiency and speed by using shallow copies (2ee88a4)

♻️ Code Refactor

  • meshtool: add manager-aware warning for peak detection failure (171d0ad)

  • analysis.mesh: raise an error if invalid peaks are provided or automatic detection fails (14a5500)

  • imagetool: deprecate core module and re-export from viewer and plot_items (1dcc093)

  • imagetool: split viewer internals into focused modules (cc39a81)

  • imagetool: rename core module to viewer (cbb2792)

[main 5357b66] bump: version 3.20.0 → 3.20.1
3 files changed, 20 insertions(+), 20 deletions(-)

v3.20.0

15 Feb 06:28

Choose a tag to compare

v3.20.0 (2026-02-15)

✨ Features

  • manager: add reusable watch API and deprecate low-level watch transports (#273) (f0f5567)

    Introduces a thread-safe, module-level watcher API (watch, watched_variables, maybe_push, shutdown) that works both with and without the IPython extension (including non-IPython notebook environments like marimo). Refactors %watch and extension load/unload to delegate to this shared API, keeping IPython behavior consistent while adding a polling fallback when post-cell hooks are unavailable.

    This does not affect behavior for existing users of %watch in IPython notebooks, but enables new use cases for programmatic data watching in other contexts.

  • ftool: export fit parameters (values and stderr) to HDF5 or ImageTool from the right-click menu of the parameter plot (#270) (0d76dbb)

  • imagetool: support non-uniform non-display axes in multicursor plot code (#268) (8392e9f)

    Generate valid matplotlib code for multicursor selections when non-display axes are non-uniform by using mixed selection (isel for non-uniform axes, qsel for uniform axes) and correctly averaging binned non-uniform selections.

  • ftool: improve parameter merging when changing model parameters (#264) (e70e0e9)

    Changing model parameters now merges parameters more intelligently. Parameters that exist in both the old and new models are retained with their current values. Also, expressions are transferred if they can be evaluated with the new model's parameters; otherwise the computed value and bounds are

    copied instead.

  • ftool: add overlay plot (#263) (764379a)

    Adds a parameter overlay checkbox next to the parameter selector for 2D fits that plots the selected parameter on the 2D image.

  • analysis.fit: add a Shirley background option to MultiPeakModel (#258) (edcecb5)

    MultiPeakModel now supports a Shirley background.

    This also changes MultiPeakModel.eval_components to return several named background components instead of a single _bkg entry. This may require changes to user code that references the background.

🐞 Bug Fixes

  • restool: ensure fit results are computed inside the thread for dask-backed inputs (60786ae)

  • ftool: fix thread lifetime handling and possible deadlock on very fast fits (7fe75fb)

  • restool: resolved threading issues related to canceling fits and closing window while fit is running (aedf5da)

  • imagetool: suppress duplicate UI alerts for exceptions and warnings (#271) (68c2893)

    This fixes an issue where multiple alert dialogs would appear for the same error condition when creating ImageTool windows or loading workspaces, leading to a hang on Windows.

  • imagetool: allow out-of-bounds center values in RotationDialog (e677e58)

    Center coordinates are no longer clamped to the current data bounds. This lets users rotate around arbitrary points (including outside the visible coordinate range).

  • imagetool: improve server shutdown handling and timeout management (f8135cd)

  • analysis.image: make boxcar_filter compatible with dask arrays (ea80731)

  • analysis: enforce coordinate validity in filters and correlation (c699574)

    Tighten coordinate handling in gaussian filters and autocorrelation, and raises on invalid/degenerate spacing. This prevents divide-by-zero issues and makes errors explicit for constant coordinates.

  • imagetool: correct formatting of error traceback (8b90db8)

  • analysis: correctly handle dimensions of size 1 across various functions (67875c6)

  • dtool: handle data with dimensions of size 1 (5d53894)

  • interactive.utils: improve cut tolerance (histogram) handling for scalar and iterable inputs (e5e159f)

  • interactive.utils: handle singleton dimensions in array_rect (5ea9163)

  • imagetool: avoid false non-uniform axes for user _idx dims (42f073e)

    Refine ImageTool so that non-uniform axis detection so only dims created by make_dims_uniform are treated as non-uniform. This prevents accidental misclassification when users provide their own *_idx dimensions.

  • interactive: ensure spinbox value updates and validation checks are accurate (0c4e67e)

  • qsel.average: average over all dimensions when no dimension is specified (54d460b)

    DataArray.qsel.average() now averages over all dimensions when dim=None is passed to match the behavior of DataArray.mean().

  • imagetool: average coordinates when binning over non-uniform axes (bce5a66)

    When binning over non-uniform axes, coordinates associated to the non-uniform dimension were dropped instead of being

    averaged. This commit fixes that by using qsel.average() to average the coordinates along the binned dimensions.

  • qsel: drop non-numeric coordinates silently when averaging instead of raising an error (26b4b29)

⚡️ Performance

  • imagetool: micro-optimization for restoring single cursor state (09619f3)

  • itool: avoid unnecessary deep-copying of data (4ef1bd2)

  • manager: speed up closing multiple ImageTool windows (#272) (4c334a5)

  • ktool: ensure updates are smooth under rapid input parameter changes (#267) (133205e)

  • analysis.transform: disable parallel interpolation in shift with order 1 and add some parameters for further optimization (b53e89f)

    Uses serial interpolation in shift for compatibility with workflows that utilize multiprocessing, like dask. Also adds new parameters keep_dim_order and assume_sorted which further optimizes the graph for dask-based workflows.

  • ftool: cache y values for 2D data (e2c4611)

  • analysis.correlation: micro-optimization to use shallow copy (d5a88b7)

  • imagetool: micro-optimize shallow copy when updating data (5e7d4fe)

  • interactive: defer ImageTool UI updates (#262) (e2ad0e8)

    ImageTool now lazy-populates colormap and control UI to reduce startup time, and avoids auto-showing windows when loading multiple DataArrays at once. The window contents are now computed on demand.

♻️ Code Refactor

  • manager: change console toggle shortcut to Ctrl+J (9ebb92f)

  • ftool: ask for confirmation before transposing data (580c933)

[main 6d0e364] bump: version 3.19.2 → 3.20.0
3 files changed, 3 insertions(+), 3 deletions(-)

v3.19.2

27 Jan 16:48

Choose a tag to compare

v3.19.2 (2026-01-27)

🐞 Bug Fixes

  • ftool: fix state restoration for 2D data (8736d68)

  • goldtool: use adaptive decimal steps for range selection (8942b45)

    The range selection spinboxes will now adjust its number of decimals based on the coordinates of the input data.

  • ftool: update parameters for all slices in 2D data when changing the model (d358f9d)

  • ftool: make initial values of parameters change more consistently with user expectations when making changes to the model options that change the parameter set (6ec1785)

  • ensure compatibility with coordinates with negative increments across the codebase (#255) (5478eb0)

    Many functions and interactive tools returns wrong results or raises ambiguous errors when working with data with coordinates that are decreasing. This commit ensures that the following functions and tools function correctly for such data:

    • gaussian_filter, gaussian_laplace, diffn, scaled_laplace, and curvature in erlab.analysis.image module

    • Cropping and code generation in ImageTool

    • goldtool, restool, ftool, dtool

  • ftool: fix transpose button not working for 2D data (#254) (dde56c0)

[main 14eba0f] bump: version 3.19.1 → 3.19.2
3 files changed, 28 insertions(+), 2 deletions(-)

v3.19.1

22 Jan 09:33

Choose a tag to compare

v3.19.1 (2026-01-22)

🐞 Bug Fixes

  • allow read-only arrays to be passed to _split_uniform_segments (d5d9b97)

  • ftool: improve fit cancellation handling (eef9c21)

  • ftool: allow changing fit range during 2D fit propagation (c16b734)

  • goldtool: allow polynomial degree to be 0 (effectively functions as weighted average) (d3f4641)

  • ktool: fix unit for inner potential showing as degrees (e8322dd)

  • interactive: prioritize HDF5 format when saving fit results (#252) (16b46d8)

  • analysis.gold: correctly fit spline along dimensions other than alpha (#250) (60aa88a)

  • io: improve handling of non-uniform coordinates in save_wave (#245) (404882d)

    Non-uniform coordinates are now replaced with index-based coordinates when saving to Igor waves, with a user-level warning.

    Also combines multiple warnings complaining about dropped non-dimension coordinates into a single warning to reduce clutter.

⚡️ Performance

  • analysis.transform.shift: improve speed for linear interpolation (#251) (2a391fd)

    Speeds up erlab.analysis.transform.shift for order=1 and mode='constant' by switching to a fast linear interpolation implementation instead of scipy.ndimage.shift.

♻️ Code Refactor

  • ftool: ftool now accepts fit result datasets saved from xarray-lmfit so that users can load and visualize previous fit results in the GUI. (6773511)

  • docs: add information about AI assistance and the new VS Code extension to the getting started guide (ca09e99)

  • remove curvefittingtool, nobody uses it anymore (cb23d93)

[main 8e901c2] bump: version 3.19.0 → 3.19.1
3 files changed, 21 insertions(+), 3 deletions(-)

v3.19.0

09 Jan 22:28

Choose a tag to compare

v3.19.0 (2026-01-09)

✨ Features

  • analysis.fit: add voigt peak shape to MultiPeakModel (547d4ab)

  • io: support loading data with chunks for some loaders (c5cc15b)

    Some supported loaders (erpes, maestro, ssrl52) now accept a chunks argument in erlab.io.load. Users can control the chunk size when loading large datasets to optimize memory usage and performance. The default chunking is None.

  • imagetool: add reload action directly to ImageTool window (6529b33)

    The reload action was only available in the manager right-click context menu. Now, it is also accessible directly from the ImageTool window's File menu and also with a standard refresh keyboard shortcut.

  • interactive: add option to ignore specific warning messages in ImageToolManager (79ef0d7)

    When a warning dialog is shown in the ImageToolManager, users can now choose an Ignore button. This will suppress future warnings with the same message for the duration of the session.

  • erlab.analysis.fit: add 2 new models for data fitting (9baea86)

    Adds TLLModel which represents a Tomonaga-Luttinger liquid power-law suppression of the density of states, and SymmetrizedGapModel which represents the superconducting gap spectral function symmetrized about the Fermi level.

  • analysis.interpolate: add leading_edge function that computes the leading edge of EDCs. (846aafc)

  • add interactive GUI for curve fitting (633f722)

    Adds a new erlab.interactive.ftool tool that can be used to interactively fit arbitrary 1D lmfit models to 1D and 2D data.

  • analysis.fit: add oversampling parameter to convolution fit function for improved accuracy (dea64ff)

    With narrow peaks smaller than the data step size, convolution-based fitting can produce inaccurate results due to undersampling. This commit introduces an 'oversampling' parameter to the convolution fit function, allowing users to specify a higher sampling rate during convolution operations.

    Oversampling is also available as a parameter to MultiPeakModel.

  • analysis.fit.models: add rough guess of peak centers and widths to MultiPeakModel (0c45f93)

    MultiPeakModel's guess method now estimates peak centers and widths based on the input data, improving initial parameter estimates for fitting. Note that this is a basic heuristic and will only work when peaks are well-separated and distinct.

  • add functions for plotting arbitrary BZ slices (2bdd1fc)

    Adds functions to compute the intersections of Brillouin zone boundaries with arbitrary planes in k-space.

    Also updates ktool to use the new functions, improving visualization of BZ slices.

🐞 Bug Fixes

  • io.plugins.ssrl52: check ssrl loader correctly loads all example files including camera (24656b0)

  • imagetool: fixes an issue where disabling setting cursor colors from coordinate values did not work as intended (9718a8a)

  • manager: improve running check reliability (4192eba)

    The previous implementation of is_running relied on checking if the TCP port was open, which could lead to false positives if the port was occupied by another process. The updated implementation uses ZeroMQ's monitoring capabilities to verify that the server is actively responding to handshake events, providing a more accurate assessment of its running state.

  • manager: add timeout for communication with ImageTool Manager to prevent hangs in user code. (fae261f)

    The default htimeout is set to 15 seconds, and can be configured by the ITOOL_MANAGER_ZMQ_TIMEOUT_MS environment variable.

  • interactive: fix inconsistent Ctrl+W behavior in tools, especially on macOS (4c7ccef)

  • restool: fix trying to fit sometimes resulting in a RuntimeError (610649c)

  • analysis.fit.models: properly display reprs for FermiEdgeModel and FermiDiracModel (d71f40a)

  • analysis.mesh: fix undoing automatic straight slit Fermi level correction for data containing NaNs (9c0dcb2)

  • interactive: make interactive tool windows close completely when pressing Ctrl+W if it is not in the ImageTool manager (3350324)

  • imagetool: fix error when dragging cursor line with alt key pressed (a7ef23f)

  • manager: fix duplicate error messages for standalone build of ImageTool Manager (4428604)

⚡️ Performance

  • analysis.fit: speed up convolution by using fftconvolve (ab974a7)

♻️ Code Refactor

  • analysis.fit: improve gaussian convolution stability and accuracy (3cc0718)

  • analysis.fit: set default coefficients for PolynomialModel and StepEdgeModel (2b3aa9a)

  • analaysis.fit.minuit: allow passing lmfit parameters directly to from_lmfit (9eef563)

  • analysis.fit.functions.general: add defaults to gaussian_wh and lorentzian_wh (3ceb79c)

[main e16a8e7] bump: version 3.18.0 → 3.19.0
3 files changed, 33 insertions(+), 3 deletions(-)