Recent Releases of labtoolbox

labtoolbox - v3.0.0

LabToolbox 3.0.0 Release Notes

This version of LabToolbox introduces a new module, LabToolbox.signals, designed for signal processing, along with major changes to existing functions.

Note: Up to version 2.0.3, the package was tested on Python 3.9.6. Starting from version 3.0.0, it has been tested only on Python 3.13.3. While compatibility with earlier Python versions (≥ 3.9.6) is still expected, it is no longer officially guaranteed. The minimum required version remains Python 3.9.

Author's Note

LabToolbox 3.0.0 is, so far, the major release. I was finally able to add a new module, clean up some function names to improve clarity and readability, and optimize several existing features. Overall, this version represents a more mature and structured state of the package. Unless unforeseen bugs are discovered (which I find unlikely, as this release has been extensively tested), LabToolbox 3.0.0 will serve as a stable version for the foreseeable future. Hope you enjoy it :)

Added

  • New Module: Introduced LabToolbox.signals, which includes four new functions for signal analysis and processing.
  • New Functions: Added six new functions across different modules:
    • LabToolbox.utils.convert: Converts any physical quantity between different units.
    • LabToolbox.utils.format_str: Formats data and uncertainties into LaTeX strings of the form "$data \pm err$".
    • LabToolbox.signals.dfs: Computes the discrete Fourier series approximation of a sampled function.
    • LabToolbox.signals.fourier_series: Computes the Fourier series approximation of a function $f(t)$.
    • LabToolbox.signals.harmonic: Identifies the dominant harmonics in a real-valued signal.
    • LabToolbox.signals.decompose: Reconstructs selected sinusoidal components from a real-valued signal.
  • Documentation: The package now includes a Wiki with function descriptions, usage examples, and practical guidance.
  • Added a dark mode logo.

Changed

  • Functions must now be called with their full module path, i.e., LabToolbox.module.function instead of LabToolbox.function. Only PrintResult and convert are accessible directly from the LabToolbox namespace.
  • All function arguments previously representing uncertainties have been renamed with the suffix _err (e.g. sigma_yy_err, sxx_err, etc.) for improved clarity and consistency.
  • Function Renaming:
    • LabToolbox.stats.histogram has been renamed to LabToolbox.stats.hist.
    • LabToolbox.utils.to_latex_table has been renamed to LabToolbox.utils.latex_table
    • LabToolbox.uncertainty.uncertainty_diff has been renamed to LabToolbox.uncertainty.numerical.
    • LabToolbox.uncertainty.montecarlo_uncertainty has been renamed to LabToolbox.uncertainty.montecarlo
  • Argument Renaming:
    • In LabToolbox.uncertainty.propagate, x_arrays has been renamed to x_val.
    • In LabToolbox.uncertainty.numerical, x_vars has been renamed to x_val.
    • In LabToolbox.uncertainty.montecarlo, values has been renamed to value.
  • Added the argument log in LabToolbox.fit.lin_fit to allow setting log-scale for the x- and/or y-axis.
  • Added the argument bins to LabToolbox.stats.hist and LabToolbox.stats.analyze_residuals.
  • Added the argument align to LabToolbox.utils.latex_table.
  • Modified the output behavior of LabToolbox.utils.PrintResult if name and/or unit are empty strings.
  • Modified the output behavior of LabToolbox.fit.lin_fit and LabToolbox.fit.model_fit if less than 0.5% of the residuals lie within $\pm2\sigma$ of zero.
  • Optimized the functions LabToolbox.fit.lin_fit and LabToolbox.utils.PrintResult.
  • README Updates:
    • Installation instructions for cloning the repository are now included in the Installation section.
    • A Dependencies section has been added to support manual installation.
  • Added a package-level docstring to __init__.py.
  • Renamed LabToolbox.uncertainty_class to LabToolbox._uncertainty_class and is now considered internal (not intended for public use).
  • Helper functions (e.g. my_mean, my_var, etc.) have been moved to LabToolbox._helper (not intended for public use).

Fixed

  • Resolved issues in LabToolbox.fit.lin_fit:
    • Labels for m and c now display the correct number of significant digits when mscale or cscale is set.
    • The x-axis bounds are now correctly estimated when xscale is used.
  • Fixed incorrect behavior in LabToolbox.fit.model_fit and LabToolbox.fit.lin_fit when x_err is not None.
  • Corrected the LaTeX output format in LabToolbox.utils.to_latex_table.

Removed

Removed example.ipynb from the project files. All functions and usage examples are now documented on the GitHub Wiki.

- Python
Published by giusesorrentino 10 months ago

labtoolbox - v2.0.3

LabToolbox 2.0.3 Release Notes

This version only provides minor bug fixes.

Changes

  • Added two new arguments (names and prior_bounds) to the function LabToolbox.stats.posterior.
  • Minor changes in the README.md file.

Bug Fix

  • Fixed an issue where users were required to manually install the package uncertainty_class.
  • The function LabToolbox.stats.posterior now correctly performs the Bayesian parameter estimation.

- Python
Published by giusesorrentino 10 months ago

labtoolbox - v2.0.0

LabToolbox 2.0.0 Release Notes

NOTE: Version 2.0.1 only provides an update for the README.md file on PyPI. Now the logo is displayed correctly.

Added

  • New Module: Added the module .stats.
  • New Functions:
    • LabToolbox.stats.analyze_residuals: It performs a residual analysis by plotting and quantifying deviations from a model fit, including Gaussianity tests, skewness, kurtosis, and Durbin–Watson statistic.
    • LabToolbox.stats.samples: It generates synthetic datasets from a variety of common statistical distributions with parameter validation and customizable sampling size.
    • LabToolbox.utils.to_latex_table: It allows export of data tables in LaTeX format.
    • LabToolbox.uncertainty.montecarlo_uncertainty: It performs uncertainty propagation using Monte Carlo simulations given central values and standard deviations of input parameters.
  • Project Metadata: Added CITATION.cff and CODE_OF_CONDUCT.md to standardize citation and community guidelines.

Changes

  • Renamed the function propagate_uncertainty to propagate.
  • Renamed the module .misc to .utils to better reflect its role as a collection of general-purpose utility functions.
  • Moved the functions histogram and remove_outliers from .utilts to .stats.
  • Moved all the functions from .basics to .utils.
  • Moved all the functions from .posterior to .stats.
  • README Updates: Enhanced README.md with the project logo, status badges, and a dedicated Code of Conduct section.
  • Attribution Notice: Added the following comment in the code to indicate the use of code adapted from the VoigtFit library: text # The following code is adapted from the VoigtFit library, # originally developed by Jens‑Kristian Krogager under the MIT License. # https://github.com/jkrogager/VoigtFit
  • Axis Scaling Clarification: Updated docstrings for functions with xscale and yscale parameters to emphasize that these only affect plot scaling and do not influence the core fitting calculations.
  • Histogram Optimization: Refactored the function histogram for improved performance and readability.
  • Cleanup: Removed .DS_Store, dist and LabToolbox.egg-info from the project files.

Removed

  • Removed Function: Removed the function residuals; replaced by the more robust analyze_residuals.
  • Removed Module: Removed the modules .basics and .posterior.

- Python
Published by giusesorrentino 10 months ago

labtoolbox - v1.1.2

LabToolbox 1.1.2 Release Notes

Changes

  • The library is now available in english.
  • All of the functions previously using the old code of PrintResult are now updated.
  • The p-value displayed in the plot using model_fit is now showing an adeguate number of decimal digits.

Bug Fixes

  • Fixed an issue with the lin_fit function. Now the units of m and c are displayed correctly.

- Python
Published by giusesorrentino 10 months ago

labtoolbox -

Release Notes

Modifiche

Bug fix nella funzione lin_fit.

- Python
Published by giusesorrentino 10 months ago

labtoolbox - Versione 1.1.0

Release Notes

Aggiunte

Aggiunte le funzioni remove_outliers e bootstrap_fit, rispettivamente, nei moduli LabToolbox.misc e LabToolbox.fit.

Modifiche

Ottimizzate le funzioni lin_fit, model_fit e residuals.

- Python
Published by giusesorrentino 10 months ago

labtoolbox - Versione 1.0.8

Aggiunto un file example.ipynb contenente esempi di utilizzo delle principali funzioni della libreria.

- Python
Published by giusesorrentino 10 months ago