网页 综合 更新时间 2026-11-14 09:56:06

Changelog — HyperSpy 2.5.0 documentation

自动蜘蛛 hyperspy.org 正文约 5999 字
Changelog entries for the development version are available at https://hyperspy.readthedocs.io/en/latest/changes.html
Add Scalable fixed pattern component to remove_background() to allow subtracting backgrounds defined as a Signal1D, see this lumispy issue #124 for context. (#3590)
Improve lazy signal decomposition:
Rename svd_solver='dask' to svd_solver='randomized' (consistent with sklearn naming conventions) and switch its backend from dask.array.linalg.svd (full SVD) to dask.array.linalg.svd_compressed (randomised truncated SVD), which avoids materialising the full data matrix in memory. output_dimension is required for 'randomized'.
Add svd_solver='full': reproduces pre-v2.5 behaviour using dask.array.linalg.svd; returns lazy dask arrays without triggering any computation; output_dimension is optional.
Add svd_solver='incremental': uses ISVD (a subclass of sklearn.decomposition.IncrementalPCA with centering disabled), which streams the data in mini-batches and scales to datasets larger than RAM.
Add a centre parameter ("navigation", "signal", or None) to control mean-centring before decomposition, consistent with the non-lazy interface.
Navigation and signal masks are now respected during lazy SVD.
Add LazySignal.normalize_poissonian_noise() as a dedicated method on LazySignal, available independently of decomposition.
Implement reproject='signal' for all lazy decomposition algorithms: after learning on signal-masked data, the full signal (including masked channels) is reconstructed via the pseudo-inverse of the loadings, filling NaN at previously masked signal positions. reproject='both' fills both navigation and signal masked positions for all algorithms.
Add algorithm='NMF' support for lazy signals via sklearn.decomposition.MiniBatchNMF (requires scikit-learn >= 1.1 for out-of-core; older versions fall back to in-memory sklearn.decomposition.NMF), enabling out-of-core non-negative matrix factorisation.
Accept any custom sklearn-like estimator object as the algorithm parameter. Objects that implement partial_fit are used incrementally (out-of-core); those with only fit / fit_transform fall back to loading all data into memory before fitting.
Add svd_solver and auto_transpose parameters to LazySignal.decomposition() for API parity with the non-lazy interface.
Add a lazy keyword argument to BaseSignal.get_decomposition_model() (and the underlying _calculate_recmatrix). lazy=True forces a lazy dask-backed signal even when factors/loadings are numpy arrays (they are wrapped with da.from_array locally, without mutating learning_results); lazy=False forces an eager signal even on a lazy input; lazy=None (default) auto-detects based on whether the signal is lazy.
The reproject steps for svd_solver='full' now use dask matmuls instead of materialising the full data matrix via chunk loops. Only the small result array (nav x k loadings or sig x k factors) is computed eagerly; the unrequested array remains a lazy dask array, keeping the end-to-end pipeline lazy even when reproject is used. (#3614)
Add ISVD class, a subclass of sklearn.decomposition.IncrementalPCA that disables centering by overriding the mean_ property to always return zeros. This enables out-of-core incremental singular value decomposition. (#3617)
Establish standards for AI-assisted contributions: adopt the Assisted-by: <tool>:<model> convention for disclosure in commit messages, add a new developer guide section (Coding with AI assistants) with reviewer guidance and best practices, update the pull request template with new checkboxes for AI disclosure and manual testing verification, and add AGENTS.md files documenting codebase conventions for AI tools. (#3622)
Add support for the anywidget GUI toolkit via hyperspy_gui_anywidget, enabling interactive HyperSpy widgets on platforms that do not support ipywidgets or TraitsUI, such as Marimo. Controlled by the enable_anywidget_gui preference (see Configuring HyperSpy). (#3624)
Add intervals parameter to estimate_parameters(), estimate_parameters(), and estimate_parameters() for estimating parameters from multiple disconnected spectral ranges. See Parameter estimation for details. (#3381)
Added yscale argument to plot_spectra(), following matplotlib.axes.Axes.set_yscale(). For cascade only log, symlog and linear are implemented. (#3444)
Lazify load() and save() funtions to speed up import. (#3586)
Fix deprecation warning about license specification when building package using python -m build. (#3594)
Add lazy_output parameter to get_decomposition_model() and get_bss_model() methods. (#3603)
Standardise tabular data display on PrettyTable throughout HyperSpy: AxesManager now uses PrettyTable for both terminal and HTML (notebook) output instead of manual string/HTML formatting; print_summary_statistics() now renders as a proper HTML table in Jupyter notebooks (previously text-only). (#3621)
Remove dual-notification pattern in Parameter where value changes fired both an Event and an Enthought Traits notification. The Traits notification path is removed; all consumers now use the events system exclusively. Suppression of circular updates previously handled by suppress_callback() is replaced with re-entrance guards, reducing coupling with the internal event machinery. (#3631)
Add Interactive.close method to disconnect all event handlers and release internal references, preventing callback leaks when an interactive operation is no longer needed. (#3645)
Poisson-noise normalization and centering in eager decomposition now reverse their data modifications mathematically after decomposition, so the original signal data is always preserved — even with copy=False. The copy parameter is deprecated; a backup copy is now created only when Poisson noise normalization will modify the data (copy and normalize_poissonian_noise), in which case undo_treatments restores the original data bit-exactly. For centering-only pre-treatments, restoration remains mathematical. When no pre-treatments modify
访问原文 返回搜索 https://hyperspy.org/hyperspy-doc/current/changes.html
本页为82搜索生成的网页快照,内容来自站内索引;演示数据的原文链接仅作示例。