mespy

mespy is a Python toolbox for experimental data analysis.

This documentation is organized by module: each main file has an overview page and a separate page for each public function. In parallel there is a section dedicated to internal checks, useful for understanding how the package normalizes inputs and handles errors.

What you’ll find here

Package goals

  • offer small, readable APIs

  • validate problematic inputs early

  • produce clear errors in notebooks and teaching scripts

  • keep the public API separate from internal details

Quick example

from mespy import histogram, load_csv, weighted_mean

df = load_csv(
    "data/reference/test_misure.csv",
    required_columns=["lunghezza_mm", "sigma_mm"],
)
media = weighted_mean(df["lunghezza_mm"], 1 / df["sigma_mm"]**2)
fig, ax = histogram(
    df["lunghezza_mm"],
    xlabel="lunghezza [mm]",
    title=f"Media = {media:.3f} mm",
)