Releases: kmnhan/erlabpy
v3.8.2
v3.8.2 (2025-03-25)
🐞 Bug Fixes
-
analysis.transform.symmetrize: fix compatibility with data including NaN (ce173ce)
-
formatting: make float formatting use scientific notation for very small values (83843a0)
-
plugins.erpes: promote more attributes to coords (c2c066a)
-
dataloader: allow datetime and callable objects in
additional_coords
(732288f) -
imagetool: update associated coords on show and reload; ensure float64 type for associated coordinates (1958b80)
-
qsel: allow passing arrays to simultaneously select multiple indices (a5c987b)
DataArray.qsel
now supports collection arguments. For example, actions likedarr.qsel(x=[1, 2, 3], x_width=2)
now works properly. -
analysis.fit.functions: allow passing arrays to any argument (ffe4914)
⚡️ Performance
-
imagetool.manager: improve server responsiveness (#117) (255c04f)
Changes the internal detection mechanism for running manager instances to be more reliable, along with some server side micro-optimizations.
♻️ Code Refactor
-
kspace: hide progress messages during momentum conversion (9eab40c)
Hides the printed messages during momentum conversion by default. The messages can be enabled by passing
silent=False
toDataArray.kspace.convert
. -
imagetool.fastslicing: fix type signature ordering (a409322)
[main 94881cc] bump: version 3.8.1 → 3.8.2
3 files changed, 13 insertions(+), 3 deletions(-)
v3.8.1
v3.8.0
v3.8.0 (2025-03-11)
✨ Features
-
kspace: add method to convert between experimental configurations (7a426a8)
Adds a new method
DataArray.kspace.as_configuration
that allows the user to easily correct data loaded in the wrong configurations. This is useful for setups where the experimental geometry can be changed. -
io.plugins: add
mbs
plugin for setups based on MB Scientific AB analyzers (#112) (43e454b) -
imagetool: add Symmetrize dialog (4ebaeab)
-
imagetool.dialogs: enhance CropToViewDialog with dimension selection and validation (6394121)
-
imagetool: add Average dialog for averaging data over selected dimensions (2e81aec)
-
imagetool: include rotation angle in rotation transform suffix (2842c5f)
-
imagetool.manager: add new action to refresh ImageTool data from the file it was loaded from. (d822f73)
When performing real-time data analysis, it is often necessary to update the data in the ImageTool from the file it was loaded from. This commit adds a new
Reload Data
action to the right-click context menu of the ImageTool manger. The action is only visible when the data can be properly reloaded. -
imagetool: retain cursor info when loading new data that is compatible with the current data (917851f)
-
analysis.gold:
gold.poly
now returns a fit result Dataset instead of a lmfit modelresult. (ff224e7) -
analysis.gold: add background slope option for Fermi edge fitting (513e531)
-
io: allow temporary overriding of loader properties (#101) (bd4c50b)
Adds a new context manager,
erlab.io.extend_loader
, for temporarily overriding data loader behaviour.This is especially useful for data across multiple files, where the user can specify additional attributes to treat as coordinates, allowing them to be concatenated.
-
explorer: add image preview and fine-grained loading control (dca8fcb)
-
imagetool: implement non-dimension coordinate plotting (48eac24)
1D Non-dimension coordinates associated with a data dimension can now be plotted alongside 1D slices on a secondary axis.
For instance, if an ARPES map has a temperature coordinate that varies for each mapping angle, the temperature coordinate can be plotted as a function of angle.
The plot can be toggled in the added item inside the
View
menu of the menu bar in ImageTool. -
add accessor method for averaging over dimensions while retaining coordinates (90d28fb)
Adds
DataArray.qsel.average
, which takes dimension names and callsDataArray.qsel
with the bin widths set to infinity. UnlikeDataArray.mean
, the new method retains coordinates associated with the averaged dimension. -
analysis.fit.functions: make several fitting functions xarray-aware (53b3688)
-
utils.array: add
broadcast_args
decorator for DataArray broadcasting (76149b9)Adds a new decorator that enables passing DataArrays to functions that only accepts numpy arrays or always returns numpy arrays, like numba-accelerated functions and some scipy functions.
-
analysis.transform: add
symmetrize
(#97) (aefb966)Adds a new method
erlab.analysis.transform.symmetrize
for symmetrizing data across a single coordinate.
🐞 Bug Fixes
-
imagetool: center rotation guidelines on cursor position upon initialization (18a7114)
-
io.plugins.kriss: support tilt compensated angle maps (0229ea2)
-
io: enforce native endianness for Igor Pro waves (#114) (92fe389)
Data loaded from Igor Pro waves will now be converted to have native endianness. Some old data were loaded in big-endian by default, causing incompatibility with several numba functions, with ambiguous error messages.
-
io.plugins.kriss: properly assign rotation axes names (3dcb2ae)
-
imagetool.dialogs: make new windows opened within data transformation dialogs forget file path information (7a012cd)
-
imagetool: properly handle integer coordinates, closes #94 (5f0cd36)
-
imagetool: correct 1D data axis padding (68f59e9)
-
imagetool: allow loading data saved with non-default colormap (#102) (c476be2)
-
io.dataloader: preserve darr name when loading without values (3310ed6)
-
imagetool: allow data with constant coordinates (6ed4f2b)
-
imagetool.manager: disable scrolling in image preview (bd77e8d)
-
io.plugins.da30: zero DA offset for non-DA lens modes (#96) (a3bdf84)
♻️ Code Refactor
-
move fitting accessors to
xarray-lmfit
(#110) (9106cef)DataArray.modelfit
andDataset.modelfit
are deprecated. The functionality has been moved to the xarray-lmfit package, and can be accessed viaDataArray.xlm.modelfit
andDataset.xlm.modelfit
as a drop-in replacement. -
ktool: adjust default lattice parameter spinbox step to 0.1 for finer adjustments (d7cba80)
-
improve error message for missing hvplot package (a0c2460)
-
utils.array: simplify decorators for 2D array checks (7275e2e)
[main 8902951] bump: version 3.7.0 → 3.8.0
2 files changed, 2 insertions(+), 2 deletions(-)
v3.7.0
v3.7.0 (2025-02-14)
✨ Features
-
imagetool: add 'Crop to View' functionality (ab6976b)
Adds new menu option that crops the data to the currently visible axes limits.
-
explorer: remember scroll location when selecting a different file (ae58268)
-
imagetool: reimplement axis linking logic (8f8648c)
Limits for all axes that correspond to the same dimension are now shared.
Furthermore, view limits are now also shared across linked tools.
-
io.dataloader: display progress bar when loading data from multiple files (#91) (4d3a704)
A progress bar is now displayed by default when loading data that spans multiple files. The visibility of the progress bar can be controlled with the newly added
progress
argument toerlab.io.load
.
🐞 Bug Fixes
-
imagetool: improve manual range handling and auto range behavior (4864129)
-
imagetool: adjust bin spinbox range to include maximum data shape (701e189)
-
imagetool.manager: resolve exceptions that sometimes appear on initialization (04c23ba)
-
imagetool.manager: ensure compatibility with lazy-loaded data (6d57e13)
-
analysis.gold: fix incorrect normalization for Fermi edge fits and add resolution parameter (1fe773d)
-
analysis.fit.functions.general: properly normalize convolution kernel for small sigma (390769e)
-
ktool: resolve incompatibility with hv-dependent data (#88) (472e98e)
⚡️ Performance
- analysis.fit.models.FermiEdgeModel: micro-optimizations related to EF guessing (afc5c90)
♻️ Code Refactor
-
io.plugins.da30: show error for invalid zip files (4c348e6)
-
goldtool: add initial resolution spinbox (9d8dd8d)
-
analysis.gold.quick_fit: enable resolution plot customization through keyword arguments (a3058e6)
-
io.plugins.da30: support loading unzipped DA30 scans (#89) (eadc676)
[main 567d989] bump: version 3.6.0 → 3.7.0
2 files changed, 2 insertions(+), 2 deletions(-)
v3.6.0
v3.6.0 (2025-02-03)
✨ Features
-
explorer: add a new interactive tool for browsing file systems (a70b222)
Adds a
explorer
GUI window that provides a view of the file system with a summary of selected ARPES data files.The window can be started within ImageTool Manager from the File menu, or as a standalone application with
python -m erlab.interactive.explorer
.Closes #83.
-
misc: add function to open directory in system's file manager (7d3db3f)
🐞 Bug Fixes
-
io.exampledata: replace
sph_harm
deprecated in scipy 1.15.0 withsph_harm_y
(eba902c) -
interactive.utils: ignore all other arguments for separator actions in
DictMenuBar
(5c94b92)This fixes unintended text showing alongside menubar separators in some operating systems.
-
imagetool.manager: fix archived files being deleted after a few days (7d93442)
♻️ Code Refactor
-
io.exampledata: update sph_harm usage to match scipy 1.15.0 changes (1dde195)
-
replace direct
typing
imports with namespace imports (fc2825d) -
imagetool: update type hints and preload fastbinning module (ab0b3fd)
-
io: improve docs structure by reorganizing namespace (5e2d7e5)
-
io: improve error messages for folders (8d63c09)
[main 567dfc8] bump: version 3.5.1 → 3.6.0
2 files changed, 2 insertions(+), 2 deletions(-)
v3.5.1
v3.5.1 (2025-01-14)
🐞 Bug Fixes
-
restool: improve parameter guessing and copied code formatting (0b33770)
The temperature and center can now be guessed independently.
♻️ Code Refactor
-
plotting: add
literal
option for point label formatting inmark_points_outside
, consistent withmark_points
(db723fd) -
generalize fomatting DataArray to raw HTML (85c735e)
-
analysis.gold: add plot capability to
quick_fit
and deprecate quick_resolution (903450b)Future code shoule use
quick_fit
withplot=True
instead ofquick_resolution
. -
ktool: add work function spinbox (31c5ae8)
-
io.dataloader: adds a
extensions
attribute to data loaders (a819960)Data loaders can now choose to implement an
extensions
attribute that returns a set of file extensions supported by the loader. This reduces the possibility of the user trying to load files with a wrong loader and gives informative error messages. -
io: expose
load_krax
as public API (3508a0a)Adds a new function
erlab.io.utils.load_krax
that can parse MBS deflector maps saved as.krx
.
[main 95508a0] bump: version 3.5.0 → 3.5.1
2 files changed, 2 insertions(+), 2 deletions(-)
v3.5.0
v3.5.0 (2025-01-04)
✨ Features
-
imagetool.manager: implement threaded file loading (feeb06b)
Data are now loaded in the background.
🐞 Bug Fixes
-
plotting: properly expose
__all__
(03cdf89) -
imagetool: inverted state and aspect ratio of axes are now properly restored (321c837)
♻️ Code Refactor
- imagetool: make imagetool respect the most recently used loader and data directory if opened in the manager (df1d550)
[main d31bbbe] bump: version 3.4.0 → 3.5.0
2 files changed, 2 insertions(+), 2 deletions(-)
v3.4.0
v3.4.0 (2025-01-02)
✨ Features
-
introduce
utils.array.sort_coord_order
function (0e694d2)Sorts coordinates order to be prettier! Sorting now applied in various places such as data loaders, ImageTool, and the
qsel
accessor. -
interactive: add
restool
(fd838b1)Adds a new interactive tool
restool
for fitting Fermi-Dirac distributions with a linear background to EDCs averaged over angles. The angle and energy range can be adjusted interactively. -
imagetool.manager: add integration with IPython (cf346b9)
Adds a new action that stores data with the
%store
magic command. With this, it is much more easy to import data processed in the manager into jupyter notebook sessions. -
imagetool.manager: add preview (9fdc63d)
Adds an image preview panel that shows the main image of the selected data.
Also, a new hover preview option can be toggled on to show the preview images when hovering over each item.
🐞 Bug Fixes
-
kspace: properly handle maps with energy given as kinetic (02bce90)
-
io.plugins.erpes: show warning when loading with index is ambiguous (95a88b6)
-
io: fixes loaded data losing their original names (a19f37a)
-
analysis.fit: handle NaN values in linear fit guesses (1aef937)
-
imagetool.manager: fix undefined selection order (4c486e2)
⚡️ Performance
- improve import time (e2a2542)
♻️ Code Refactor
-
reorganize interactive module structure (87a6e89)
-
imagetool: add
update
parameter toapply_func
(fd0238d) -
accessors.kspace: make errors during momentum conversion due to missing coords or attrs more explicit (eb3d01c)
-
imagetool: change argument
use_manager
tomanager
initool()
(0929e5c) -
imagetool: move main window setup from
__init__.py
tomainwindow.py
(0997149)This refactor enhances maintainability and readability by clearly separating the main window setup logic from the package initialization.
-
imagetool: disable manager by default (34e943f)
This update modifies
itool
andqshow
so that tools are opened in the manager only whenuse_manager=True
is explicitly specified.To address the inconvenience, a new
Move to Manager
action with keyboard shortcutCtrl+Shift+M
has been added to theFile
menu of ImageTool windows opened outside the manager when the manager is running. -
make sequence type checking function public and move to
utils
module (0475cfd)Adds
utils.misc.is_sequence_of
, which checks if an object is a sequence of elements of the specified type. -
imagetool: show all axes by default for 4D data (b034477)
-
imagetool: add icons to context menu items that opens a new window (1f548f7)
-
imagetool: streamline window title naming (0f9dcda)
-
replace boilerplate decimal calculation with new
utils.array.effective_decimals
(7873669) -
imagetool: initial migration to QAction (7807174)
Mostly internal changes that reduces duplicate code and makes keyboard shortcuts robust.
-
imagetool.manager: refactor console and jitted functions to private modules to improve startup time (280bfd8)
[main d9524c1] bump: version 3.3.0 → 3.4.0
2 files changed, 2 insertions(+), 2 deletions(-)
v3.3.0
v3.3.0 (2024-12-23)
✨ Features
-
io: improve loader registry repr with descriptions and dynamic formatting (3f43405)
-
io: add descriptions to loaders for better user guidance (7087c04)
-
dtool: add boxcar filter and 1D curvature, along with internal improvements (0bd2b17)
-
analysis.image: add
diffn
function for nth derivative calculation (a70812f)Adds a function that calculates accurate n-th order partial derivatives of DataArrays using findiff.
Also, functions that use derivatives including
curvature
andscaled_laplace
now uses properly scaled derivatives from findiff. As a consequence, the output of these functions may be slightly different. -
analysis.image: add boxcar filter (7475266)
-
analysis.image: add 1D curvature (522d554)
-
io.plugins.erpes: add data loader for our homelab system! (48dcbb4)
-
io.plugins.merlin: allow loading BL4 single file in
ImageTool
file menu (079914e) -
io.dataloader: automatically load in parallel with per-loader threshold (33a8c63)
-
imagetool: add support for DataTree objects (c4c03e3)
🐞 Bug Fixes
-
imagetool.manager: fix dark mode handling and focus management in console (ed81f70)
-
imagetool.manager: bind associated tools to the manager (a38cf7f)
With this change, closing an ImageTool window no longer affects tools such as ktool and dtool opened in that ImageTool.
-
imagetool: make dimension order in exported image data from image plot consistent with the GUI (0ee225b)
-
imagetool: fix issue with selection with multiple binned dimensions (121c968)
-
io.dataloader: adjust condition to handle single file loading (d98c71f)
-
io.plugins.da30: update
DA30Loader
to handle multiple regions in one.pxt
file (1ff8b93)
♻️ Code Refactor
-
io: deprecate choosing loaders with their aliases, closes #76 (464ee45)
-
interactive.utils: improve code generation (2b24e08)
-
replace direct imports with module references (b3ca55c)
-
io.nexusutils: defer error message until actually trying to load nexus files (8eec5aa)
[main aa8d3ed] bump: version 3.2.3 → 3.3.0
2 files changed, 2 insertions(+), 2 deletions(-)
v3.2.3
v3.2.3 (2024-12-19)
🐞 Bug Fixes
-
enforce strict monotonicity check in data loader (513554e)
-
da30: return empty dict instead of None for matches in loader (2d8b8ae)
-
io.dataloader: assign coords also for multifile scan of length 1 (0b14f75)
-
io.plugins.merlin: adjust handling logic for motor scan aborted after one file (1ac25f1)
♻️ Code Refactor
- io: implement lazy loading (da5244a)
[main ec5a479] bump: version 3.2.2 → 3.2.3
2 files changed, 2 insertions(+), 2 deletions(-)