Skip to main content

Asymmetry Asymmetry: a red A and damped wave over a blue time axis

A Python library, command-line tool, and desktop application for muon-spin spectroscopy (μSR).

Python 3.11+ License: MIT Status: Beta Documentation

Download the desktop application · Documentation · Issue tracker · Changelog

Overview

Asymmetry provides tools for reducing, analysing, and visualising μSR data through Python, command-line, and graphical interfaces. It supports detector grouping and calibration, time- and frequency-domain fitting, Fourier and maximum-entropy analysis, parameter trends, and saving analysis sessions for reuse.

  • Data loading: read supported ISIS NeXus, PSI BIN/MDU, and ROOT acquisitions, including multi-period runs. See the loading guide for supported layouts and required readers.
  • Reduction and calibration: select detector groups, estimate detector balance, apply timing, deadtime, and background settings, and rebin or combine compatible data.
  • Fitting: fit time-domain signals, raw detector counts, multiple detector groups, or simultaneous run series using built-in models and composite expressions.
  • Spectra: compute Fourier spectra with windowing and phase controls, or reconstruct spectra with a maximum-entropy solver.
  • Scans and trends: analyse integral field/RF scans, compare fitted parameters across runs, and fit parameter trends with physical models.
  • Simulation: generate synthetic detector counts for teaching and checking an analysis with known inputs and recorded random seeds.
  • Projects and export: save analysis sessions with their settings and provenance, reopen them, and export plot data, figures, and GLE scripts.
  • Scripting and agents: use the Python API or the asymmetry CLI, with JSON output, headless plots, and a packaged skill for Claude Code and Codex.

Project status and validation

Asymmetry is beta software under active development. Its code and documentation have been written by AI coding agents (Claude Code and Codex). Throughout development, numerical behaviour has been checked through automated tests, independent mathematical references, and comparisons with established μSR software. See the software comparisons for tested cases, agreement, and known limitations.

Check scientific claims and model definitions against primary literature and other trusted sources, and validate results for your analysis before relying on them for publication. APIs may change between releases.

Projects saved by released versions remain loadable. The numerical accuracy guide explains evaluation targets and their scientific scope.

Installation

Desktop application

Download the latest release for Windows x64 or macOS on Apple Silicon. The installer includes Python and the GUI dependencies. Open Asymmetry from the Windows Start menu or the macOS Applications folder. Linux and Intel Mac users can use a Python installation.

Python installation

Asymmetry requires Python 3.11 or later; clean installations are checked on Python 3.11, 3.12, and 3.13. Use a virtual environment as described in the installation guide. For a version published on PyPI, install the full end-user Python feature set and launch:

python -m pip install "asymmetry[all]"
asymmetry-gui

If the version you need is not available on PyPI, use the source installation. The core library and CLI can also be installed on their own:

python -m pip install asymmetry

Extras select additional Python dependencies and can be combined:

python -m pip install "asymmetry[gui,hdf5,root]"
Extra Provides
all GUI, file readers, headless plots, and GLE support; excludes development tools and CUDA
gui Desktop interface and Matplotlib
agent Headless plots and HDF5 loading for CLI/agent workflows
hdf5 HDF5 NeXus reading and writing
hdf4 Legacy HDF4 NeXus reading
root Supported μSR ROOT file reading
gle GLE script generation
gpu Optional CUDA acceleration for MaxEnt
dev Contributor tools for testing, lint, and documentation

HDF4 can require native libraries, and compiling GLE scripts requires the external GLE program. GPU use requires compatible NVIDIA hardware and drivers. See the installation guide for platform requirements. The desktop installers bundle their HDF4 runtime.

Quick start

For a complete GUI analysis with no measurement files, follow the synthetic first-analysis walkthrough. It generates detector counts, fits a relaxation, and saves a reopenable project and report.

Fit synthetic data in Python

This example needs only the core installation. Time is in μs, asymmetry is in percent, and sigma is in percentage points. The seeded Gaussian observations are a demonstration, not acquired detector counts.

import numpy as np
from asymmetry.core.fitting import FitEngine, Parameter, ParameterSet
from asymmetry.core.fitting.models import exponential_relaxation

time_us = np.linspace(0.0, 10.0, 201)
sigma = np.full_like(time_us, 0.3)
signal = 24.0 * np.exp(-0.3 * time_us) + 2.0
rng = np.random.default_rng(23)
asymmetry = signal + rng.normal(0.0, sigma)

parameters = ParameterSet([
    Parameter("A0", 20.0, min=0.0),
    Parameter("Lambda", 0.2, min=0.0),
    Parameter("baseline", 1.0),
])
result = FitEngine().fit_arrays(
    time_us, asymmetry, sigma, exponential_relaxation, parameters
)
print(result.parameters["Lambda"].value)

The fitted rate should be close to the generating value, 0.3 μs⁻¹. Continue with the API cookbook for acquisition loading, calibration, reduction, and fitting recipes.

Use the CLI or an AI coding agent

For a published release, install the headless workflow with pipx:

pipx install "asymmetry[agent]"
asymmetry --help
asymmetry skill install --agent claude  # or --agent codex
asymmetry skill check

Restart the agent after installing or upgrading its skill. After upgrading Asymmetry, rerun asymmetry skill install and asymmetry skill check. Add hdf4 or root to the extras when your files require them. The desktop installer does not put this CLI on PATH. See the CLI and agent guide for source installation, skill management, and analysis commands.

Documentation and support

Asymmetry is maintained by Ben Huddart. Models and file formats are implemented from published mathematics, documented formats, and observed behaviour. We acknowledge the work behind WiMDA, musrfit, and Mantid; see NOTICE for attribution and the MIT licence for Asymmetry's terms.

Metadata

Release files for Asymmetry 0.29.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for Asymmetry 0.29.0
File Size Uploaded Provenance Actions
asymmetry-0.29.0.tar.gz 8.1 MB With provenance Details for asymmetry-0.29.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for Asymmetry 0.29.0
File Interpreter ABI Platform Actions
asymmetry-0.29.0-py3-none-any.whl Python 3 none any Details for asymmetry-0.29.0-py3-none-any.whl

Total release size: 11.6 MB

Release files / asymmetry-0.29.0.tar.gz

Download URL asymmetry-0.29.0.tar.gz
Size 8.1 MB
Tags Source
SHA-256 checksum
How to use checksums
f25882f112452c72d59d1a7cd484ea858c7839a3dc62aba7b3c5d1f9f054a55f
BLAKE2b-256 checksum
How to use checksums
486e765c3b91a1a9ff89396d539280cf4fcd9611cb0603c8002226923cdf950c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Release files / asymmetry-0.29.0-py3-none-any.whl

Download URL asymmetry-0.29.0-py3-none-any.whl
Size 3.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
bd931cef422ca851ef5a66716a66c96bc8c09e7e74032f08ff5a5f18e8b48920
BLAKE2b-256 checksum
How to use checksums
294f4d965649538508cca0a1377cf7d5dda5fb846d2ed1aeffefac797b050c6e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

Security for Asymmetry 0.29.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for asymmetry-0.29.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 26, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.29.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page