Releases: kmnhan/erlabpy
v2.11.0
v2.11.0 (2024-10-13)
Features
-
io.dataloader: add new argument that can control combining (bdec5ff)
Adds a new parameter
combine
toio.load
. IfFalse
, returns a list of post-processed files without attempting to concatenate or merge the data into a single object. IfTrue
, retains the current default behavior.
Bug Fixes
- imagetool: allow coords of any dtype coercible to float64 (4342ebc)
- io.dataloader: properly handle combining multi-axis scans (2cd22c7)
Code Refactor
- io.plugins: update type hints (54d0c5d)
- remove unused imports (f1e35de)
- interactive: add informative error message for missing pyqt (1347a02)
- io.plugins: add warning when plugin load fails (ed5b184)
[main 8e66420] bump: version 2.10.0 → 2.11.0
2 files changed, 21 insertions(+), 1 deletion(-)
v2.10.0
v2.10.0 (2024-10-08)
Features
-
io.plugins: add loader for beamline ID21 ESM at NSLS-II (c07e490)
This commit adds a new data loader for beamline ID21 ESM at NSLS-II, Brookhaven National Laboratory.
-
io.dataloader: add formatters (2ee9a4a)
A new attribute named
formatters
and a new methodget_formatted_attr_or_coord
has been added to loaders. This allows custom per-attribute pretty-printing behavior. -
io: add parallel argument to
load
(88cd924) -
io: add xarray backend for igor files (1fe5ca5)
.pxt
,.pxp
, and.ibw
files can now be opened with xarray methods such asxr.open_dataset
andxr.open_dataarray
. See the updated user guide for more information.
Bug Fixes
-
io.dataloader: properly reorder coordinates (3ebfb0f)
Coordinate order was broken for loaders which assign coordinates in inherited
post_process
. This is now fixed, and returned data will be consistently ordered with respect to the mapping, with the dimension coordinates coming first. -
erlab.io.plugins.maestro: temporary fix for xarray issue (c2d04a3)
-
io.plugins.da30: properly handle output types (6297aba)
The DA30 loader now tries to return a dataset from
.zip
files only when there are no coordinate conflicts. In the case of conflicts, the loader will return aDataTree
.Also, single region DA30
.pxt
files will now return aDataArray
consistent with the equivalent.ibw
file. -
interactive.fermiedge: allow transposed input to fermi edge fitting tool (dcae75e)
-
interactive.imagetool: retain attrs when exporting slice (1bed572)
When accessing the data of a single slice from the right-click menu of
ImageTool
, the attributes of the original data are now kept. This allows saved slices or data opened in other tools to retain their attributes. -
resolve gui script not working on windows with conda (62253d0)
-
io.dataloader: clear plot before loading in interactive summaries (21d6dea)
-
plotting.general: fix
plot_slices
compatibility with slice object as argument (5948a7b) -
io: disable memmapping when loading data (c39da1b)
Memmapping seemed to interfere loading multiple files when called through ipywidgets.
Code Refactor
-
io.utils: use pathlib in
get_files
(b7a0f5b) -
io.plugins.merlin: combine ImageTool file menu into single entry (6e28ac2)
-
io: add postprocessing and validation for
DataTree
objects (3fb3ff5) -
io: add warning when file is ambiguous (8daabb8)
-
io: remove renaming steps from
load_single
in multi-file loaders (542f4f2)Combining before renaming coords should be more straightforward
-
io: allow missing alpha coord (c9deed4)
Validation checks will not warn about missing detector angle, allowing XPS measurements.
-
io.dataloader: only allow real file or folder names as input (b9a59cc)
The previous behavior allowed passing
f_001.pxt
to loadf_001_S001.pxt
,f_001_S002.pxt
... but this was confusing since there is no file namedf_001.pxt
. This commit disallows such input. -
cleanup erplot namespace (007eedb)
-
io: implement metaclass (e787b1c)
Whenever the
identify()
method failed to find any files, subclasses had to explicitly raiseFileNotFoundError
. This resulted in a lot of boilerplate code and ambiguous error messages. Now, all subclasses can just returnNone
inidentify()
when no files are found. The appropriate error is automatically raised. -
io.igor: raise OSError on load fail (6c7a4c4)
-
move dataloader cell formatting implementation to utils module (0f2cb1c)
-
io: deprecate calling igor functions from top level namespace (bb8af7c)
Calling
erlab.io.load_wave
anderlab.io.load_experiment
is deprecated. When writing new code, usexarray.load_dataarray
andxarray.load_dataset
instead.
Performance
- interactive.imagetool: improve manager speed (891c4ee)
[main 04f06a0] bump: version 2.9.1 → 2.10.0
2 files changed, 6 insertions(+), 2 deletions(-)
v2.9.1
v2.9.0
v2.9.0 (2024-08-30)
Feat
-
interactive.imagetool: add rotation (fdeb8a9)
A rotation dialog has been added to the Edit menu. Rotation guidelines can be overlaid on the main image.
-
interactive.utils: add rotatable lines that can be rotated by dragging (31b55e5)
-
analysis.transform: add
rotate
function (83a2ad8)Added a new function that can rotate DataArray values using spline interpolation. Previous simple implementations are marked as deprecated.
-
utils.array: add new function
trim_na
(c628b5b)This function trims the edges of DataArrays where all values are NaN.
-
accessors.kspace: add method argument (204073e)
Momentum conversion through the
convert()
method of the kspace accessor now supports an additional keyword argumentmethod
that can be used to choose different interpolation methods supported byscipy.interpolate.RegularGridInterpolator
. Note that methods other than'linear'
will take much longer to execute. -
analysis.interpolate: add solver args (24be3b0)
FastInterpolator
now supportssolver
andsolver_args
keyword arguments introduced in scipy 1.13.0. -
interactive.colors: implement
BetterColorBarItem
limit editor (7dd1477)A new context menu in
BetterColorBarItem
's viewbox enables manually editing color limits. -
analysis.interpolate: implement slicing along a vector (cba8567)
A new function
slice_along_vector
has been added which enables interpolating through a line defined by a vector and a point. -
interactive.imagetool: add goldtool and dtool to menu (33d5e35)
The interactive tools goldtool and dtool are now directly accessible from the right-click menu of 2D images in ImageTool.
-
accessors.general: add option to
qsel.around
to disable averaging (5aaed85) -
plotting.general: add
NonUniformImage
functionality toplot_array
(86d8c1a)plot_array
can now plot data with unevenly spaced coordinates. It usesmatplotlib.image.NonUniformImage
with the default interpolation option set to 'nearest'. The resulting plot may be different fromxarray.DataArray.plot
which usespcolormesh
to generate image plots. -
interactive.imagetool: add copy limits to colorbar menu (29c37c4)
Right-clicking on the colorbar will now show a menu which contains a button that copies the current color limits to the clipboard. This is useful when manually adjusting color limits.
Fix
- interactive.imagetool: properly disconnect signals (dce236f)
- interactive.imagetool: fix autoscale when loading data (2c12f59)
- interactive.imagetool: scale spinbox decimals relative to coordinate step size (9a801a5)
- interactive.utils: update
BetterSpinBox
width on changing decimals (0a70884) - interactive: fix compatibility issue with PySide6 (da5f4af)
- interactive.imagetool: do not copy code when unnecessary (9131029)
- accessors.general: qshow now triggers hvplot properly for 1D data (8a84813)
- interactive.imagetool: make manager socket use default backlog (0ac7f0b)
- interactive.imagetool: ensure proper socket termination in manager (2cceb27)
Refactor
-
interactive.utils: improve code generation (78c403f)
-
analysis: move
shift
totransform
(08baf05)The
shift
function has been moved fromutils
totransform
. Calling from theutils
module is now deprecated. -
analysis: cleanup namespace (e3e641d)
Three functions that were directly accesible from the
erlab.analysis
namespace are now deprecated. Import them from their respective modules. -
remove deprecated module
analysis.utilities
(8b79ab5) -
analysis.image: add check for NaN in input (095554f)
Derivative functions now check for NaNs in input data and raise a warning.
The interactive derivative tool automatically fills NaNs in the input data with zeros and shows a warning message.
-
remove unpacking inside
np.r_
(6c27864) -
improve initial import time (f720973)
[main de5f096] bump: version 2.8.5 → 2.9.0
2 files changed, 24 insertions(+), 2 deletions(-)
v2.8.6
v2.8.5
v2.8.4
v2.8.4-alpha.1
v2.8.4-alpha.1 (2024-07-26)
Chore
- support numpy 2.0 (
7927392
)
Ci
-
(semantic-release) change prerelease token to avoid conflict with setuptools-scm (
8e0c726
) -
(pre-commit) update config (
f242ca0
) -
add pre-release configuration (
81a63a5
) -
(rtd) cleanup obsolete environment and requirement files (
37d93bc
) -
(pre-commit) pre-commit autoupdate (
ea5720d
)updates: - github.com/astral-sh/ruff-pre-commit: v0.5.0 → v0.5.1
-
(github) change schedule (
144b554
)
Documentation
Fix
-
(erlab.plotting.general) improve
plot_array
keyword versatility (1dc41cd
)Enables additional kwargs with valid data dimensions as the key to be passed onto
qsel
. -
(erlab.analysis.gold) fix
quick_fit
attribute detection (3797f93
) -
(interactive.imagetool) retain window title upon archiving (
b5d8aa4
)
Refactor
-
(plotting.general) remove
LabeledCursor
(912b4fb
)We skip the deprecation step since nobody is likely to be using it anyway.
-
(accessors) split submodule (
6ed5c03
)Accessors in
utils.py
has been moved togeneral.py
, so thatutils.py
only contains utilities for creating accessors. -
improve type annotations (
b242f44
)
Style
-
apply ruff pylint checks (
8265b90
) -
enforce ruff SIM (
1ce4d36
) -
enforce ruff RET (
99dd897
) -
enforce ruff A (
c6aa21c
) -
enforce ruff E501 (
885174f
)
Test
v2.8.3
v2.8.3 (2024-07-08)
Ci
-
(pre-commit) pre-commit autoupdate (
4257d0c
)updates: - github.com/astral-sh/ruff-pre-commit: v0.4.10 → v0.5.0
Fix
-
(interactive.imagetool) various fixes related to manager (
3d3f55e
)This fix incorporates many changes to the ImageTool and ImageTool Manager.
First, the archiving function of the manager now works properly, and tries to clear memory eagerly.
When opening data from a file using the GUI, the name of the file will now be displayed in the title bar of the ImageTool. This file name is also propagated to the name displayed in the manager.
Furthermore, the archiving and show/hide functionality of the manager has been updated to restore the window geometry automatically. When the user shows or unarchives a hidden or archived window, the previous position of the window is restored.
Some icons and the layout of the manager has been modified, and tooltips has been added to the buttons.
Also, some unexpected behavior regarding linking has been resolved. -
(plotting.plot3d) temporarily disable broken monkey patch (
220f23f
) -
replace broken signature for dynamic functions (
39a3954
) -
(interactive.imagetool) fix broken binning controls on loading fron GUI (
0ca5437
)
Refactor
v2.8.2
v2.8.2 (2024-07-01)
Chore
- (deps) pin numpy<2.0 until upstream dependencies are fixed (
5b538ba
)
Ci
-
(github) allow manual trigger upload (
a4c5959
) -
(github) rename workflow file (
e3615c4
) -
(github) use single workflow file and test for different Qt libs (
cd7d057
) -
(pre-commit) pre-commit autoupdate (
1a86288
)updates: - github.com/astral-sh/ruff-pre-commit: v0.4.9 → v0.4.10
Documentation
-
update conda installation instructions (
a475543
) -
improve user guide (
400080e
)Added some more information in the indexing guide and fixed typos in the curve fitting guide.
Fix
-
(interactive.imagetool) fix crash while linking more than 3 tools (
d5f8a30
) -
update resistance loader (
6fcf2ab
)
Refactor
- (interactive.imagetool) show error message in GUI when opening file (
287a7e8
)