What’s New in Revision 0.11.1.dev

These are the changes in SpectroChemPy-0.11.1.dev. See Release notes for a full changelog, including other versions of SpectroChemPy.

New Features

  • Score plot labels now use adjustText for intelligent placement (collision avoidance with markers and other labels). Falls back to a fixed offset if adjustText is not installed.

  • PCA component labels now display as PC1, PC2, … instead of #0, #1, … in legends and coordinate display. Other analysis methods retain the default #0, #1, … labels. (#1404)

Bug Fixes

  • Display legend in 2D lines/stack plots when legend=True is passed as a plotting keyword argument. Previously the legend kwarg was silently ignored by the 2D plot backend, so lines rendered with auto-populated labels from coordinate metadata never showed a legend. (#1404)

Breaking Changes

  • MCRALS.solverConc and MCRALS.solverSpec are deprecated in favour of solver_C and solver_St. The old names remain functional but emit FutureWarning. (PR #XXXX)

  • MCRALS.constraints is now a validated traitlet, enabling both constructor and post-construction assignment while preserving the distinction between None (legacy path) and [] (explicitly unconstrained new-API fit). Assignment of constraints after fitting invalidates the fitted state. The constraints parameter is not config-file serializable. (PR #XXXX)

Deprecations

  • MCRALS.solverConc is deprecated; use solver_C instead.

  • MCRALS.solverSpec is deprecated; use solver_St instead.

  • Legacy MCR-ALS constraint traitlet parameters (nonnegConc, unimodConc, closureConc, etc.) are deprecated; use the constraints API instead.

Developer

  • DOC: Improved example gallery to showcase SpectroChemPy-native idioms (Coord.linspace, Coord.arange, scp.abs) for coordinate creation

    and dataset operations, replacing redundant np.linspace + Coord wrapping patterns, np.abs usage, list-comprehension synthetic data generators (scp.fromfunction), np.random.normal on datasets (scp.normal), np.arange wrapped in NDDataset (scp.arange), and np.random.rand + NDDataset constructor (NDDataset.random). Also updated API docstring examples to use scp.gaussian, Coord.linspace, scp.arange, and NDDataset.random instead of raw NumPy equivalents. (#1370)

  • MAINT: Mutualized the duplicated figure/axes/show lifecycle across the five composite plot functions (plot_score, plot_scree, plot_compare, plot_merit, plot_baseline) into shared _setup_axes and _maybe_show helpers in mplutils.py. Added 38 structural contract tests verifying the lifecycle behavior. No public API change. (#1408)