Skip to main content

A Python package for the analysis and processing of experimental data in scientific research.

Project description

PyPI - Version Python Versions PyPI - Downloads License GitHub Issues GitHub Pull Requests GitHub Repo stars GitHub Forks

LabToolbox logo

LabToolbox is a Python package that provides a collection of useful tools for laboratory data analysis. It offers intuitive and optimized functions for curve fitting, uncertainty propagation, data handling, and graphical visualization, enabling a faster and more rigorous approach to experimental data processing. Designed for students, researchers, and anyone working with experimental data, it combines ease of use with methodological accuracy.

Installation

You can install LabToolbox from PyPI using pip:

pip install LabToolbox

Alternatively, you can clone the repository and install it manually:

git clone https://github.com/giusesorrentino/LabToolbox.git
cd LabToolbox
pip install .

Dependencies

LabToolbox relies on a set of well-established scientific Python libraries. When installed via pip, these dependencies are automatically handled. However, for reference or manual setup, here is the list of core dependencies:

  • numpy – fundamental package for numerical computing.
  • scipy – scientific and technical computing tools.
  • matplotlib – for plotting and data visualization.
  • statsmodels – statistical modeling and inference.
  • emcee – affine-invariant ensemble sampler for MCMC.
  • corner – corner plots for visualizing multidimensional distributions.
  • lmfit – flexible curve-fitting with parameter constraints.
  • astropy – core astronomy library for Python.

Note: Up to version 2.0.3, the package was tested and validated 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.

Library Structure

The LabToolbox package is organized into multiple submodules, each dedicated to a specific aspect of experimental data analysis:

  • LabToolbox.fit: Routines for linear and non-linear curve fitting.

  • LabToolbox.signals: Signal analysis tools tailored for laboratory experiments, featuring frequency domain analysis and post-processing of acquired data.

  • LabToolbox.stats: Statistical tools for experimental data analysis, including generation of synthetic datasets, histogram construction, outlier removal, residual analysis (normality, skewness, kurtosis), and likelihood/posterior computation for parametric models.

  • LabToolbox.uncertainty: Methods for estimating and propagating uncertainties in experimental contexts, allowing quantification of how input errors affect model outputs.

  • LabToolbox.utils: A collection of helper functions for tasks like data formatting and general-purpose utilities used throughout the package.

Documentation

Detailed documentation for all modules and functions is available in the GitHub Wiki. The wiki includes function descriptions, usage examples, and practical guidance to help you get the most out of the library.

Citation

If you use this software, please cite it using the metadata in CITATION.cff. You can also use GitHub’s “Cite this repository” feature (available in the sidebar of the repository page).

Code of Conduct

This project includes a Code of Conduct, which all users and contributors are expected to read and follow.

Additionally, the Code of Conduct contains a section titled “Author’s Ethical Requests” outlining the author's personal expectations regarding responsible and respectful use, especially in commercial or large-scale contexts. While not legally binding, these principles reflect the spirit in which this software was developed, and users are kindly asked to consider them when using the project.

Disclaimer

LabToolbox makes use of the uncertainty_class package, available on GitHub, which provides functionality for uncertainty propagation in calculations. Manual installation is not required, as it is included as a module within LabToolbox.

Some utility functions — namely my_cov, my_var, my_mean, my_line, and y_estrapolato — available in the LabToolbox.utils module, are adapted from the my_lib_santanastasio package, originally developed by F. Santanastasio for the Laboratorio di Meccanica course at the University of Rome “La Sapienza”.

Additionally, the lin_fit and model_fit functions provide the option to visualize fit residuals. This feature draws inspiration from the VoigtFit library, with the relevant portions of code clearly annotated within the source.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

labtoolbox-3.0.0.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

labtoolbox-3.0.0-py3-none-any.whl (33.9 kB view details)

Uploaded Python 3

File details

Details for the file labtoolbox-3.0.0.tar.gz.

File metadata

  • Download URL: labtoolbox-3.0.0.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for labtoolbox-3.0.0.tar.gz
Algorithm Hash digest
SHA256 4eef0fa406e22eb9348d4a4350144d6dbeb2be27f84f7ab3db0a0fc56df7f0b5
MD5 f8c4071bd43240aa685c5a537d6e04cf
BLAKE2b-256 24e3efbce58740e7d42d8a5e6764881748028d18312bd5504ad396cb6e5cb749

See more details on using hashes here.

File details

Details for the file labtoolbox-3.0.0-py3-none-any.whl.

File metadata

  • Download URL: labtoolbox-3.0.0-py3-none-any.whl
  • Upload date:
  • Size: 33.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.9.6

File hashes

Hashes for labtoolbox-3.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 152514e4129fe6c22c1d0b7cb5342851ef2e41d62a26702b9f45410f04c7efe1
MD5 38c07b35f779d20e928895e7e211f0f5
BLAKE2b-256 ed84763f882944dc3595de3816af03dcc6c1e4ea38e68d91b9497c6bc7944686

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page