Skip to main content

Experimental data utilities: error propagation and LaTeX table generator

Project description

labdatautils

A Python library for experimental data analysis and reporting.
Includes tools for error propagation and LaTeX-ready table formatting — all with consistent significant-figure handling.

Features

  • Error propagation via finite difference derivatives, with correct significant figures.
  • LaTeX table generation with support for merged value ± error columns.
  • Designed for clarity and reproducibility in lab reports.

Installation

pip install labdatautils

Function Reference

1. propagate(func, *args)

Arguments:

  • func (callable) — Function whose result and uncertainty are to be calculated.
  • *args — Values and uncertainties, alternating: val1, err1, val2, err2, ...
    Each can be a float, list, or NumPy array (all arrays must have the same length).

Returns:

  • values (ndarray) — Computed function results.
  • errors (ndarray) — Propagated uncertainties.

2. generate_latex_table(column_headers, data_columns, **kwargs)

Arguments:

  • column_headers (list of str) — Ordered list of column names to display.
  • data_columns (sequence of arrays) — One array per column, in the same order as column_headers.
    Each array should contain the values for that column.
  • caption (str, optional) — Table caption. Default: "Data Table".
  • label (str, optional) — LaTeX label for referencing. Default: "tab:data".
  • error_map (dict or list of str, optional) — Maps error columns to their associated value column.
    Example: {"dx": "x", "dy": "y"} or ["dx:x", "dy:y"].
  • merge_error_style (str, optional) — How to display value and error pairs:
    "separate" (two columns), "pm" (e.g. 1.23 ± 0.04), "paren" (e.g. 1.23(4)). Default: `"separate"

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

lab_data_utils-0.1.0.tar.gz (8.4 kB view details)

Uploaded Source

Built Distribution

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

lab_data_utils-0.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file lab_data_utils-0.1.0.tar.gz.

File metadata

  • Download URL: lab_data_utils-0.1.0.tar.gz
  • Upload date:
  • Size: 8.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lab_data_utils-0.1.0.tar.gz
Algorithm Hash digest
SHA256 cc69087c65e12b7e710e960a47973e835b63cebfd9430503f889c464cb0aad3a
MD5 484dbe7f570a6e35e09fe99ed823cf80
BLAKE2b-256 2d6f72fb98879c7b5574c7dec26a1193bdd4d79ec66ed234d49e233067da652d

See more details on using hashes here.

Provenance

The following attestation bundles were made for lab_data_utils-0.1.0.tar.gz:

Publisher: publish.yml on Pablo-CastroPerez/lab-data-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file lab_data_utils-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: lab_data_utils-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for lab_data_utils-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 68c1b02b2e72912f620b933a9607378d75891a60e0841d7a07da158578eda599
MD5 be156e6c98d23d43b1c3e001b96c69ef
BLAKE2b-256 0f538f9385c4c29f834e3c869c1e301947287730486981f375c22de0483ebd19

See more details on using hashes here.

Provenance

The following attestation bundles were made for lab_data_utils-0.1.0-py3-none-any.whl:

Publisher: publish.yml on Pablo-CastroPerez/lab-data-utils

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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