Skip to main content

pymagnetos

Latest Release PyPI Documentation Pipeline Coverage

Collection of Python tools for high magnetic field experiments analysis.

It provides libraries and apps to analyse data acquired at the LNCMI in Toulouse.

Currently available apps :

  • linx : digital lock-in
  • pyuson : for ultrasound experiments
  • pytdo : for TDO experiments

Those are also available as a library that can be used within custom Python scripts. They use a common framework that can also be used to build other experiment-specific app.

The documention is hosted here.

Installation

For more detailed instructions, see the installation instructions.

Method 1 : as an app

If you plan to just use the graphical user interfaces, consider installing pymagnetos as a tool managed by uv, a modern Python package manager, that will install the required Python version and dependencies.

Method 1 : Click to see instructions
  1. Install uv (see their official installation instructions) :
    • On Windows, enter the following command in PowerShell :
    powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex"
    
    • On Linux and MacOS, enter the following in a shell :
    curl -LsSf https://astral.sh/uv/install.sh | sh
    
  2. From a shell (PowerShell in Windows), install pymagnetos globally :
    uv tool install pymagnetos
    

pymagnetos is now installed along its dependencies in an isolated environment with no risks to mess up with your current tools and Python versions. Its main command, pymagnetos, is made available from any shell.

Update

To upgrade to the latest version, run :

uv tool upgrade pymagnetos

Method 2 : as a library

Installing pymagnetos as a library will allow you to use it from scripts and Jupyter notebooks (e.g. you will be able to import it with import pymagnetos).

Method 2 : Click to see instructions

From a virtual environment with Python>=3.11, install pymagnetos from PyPI :

pip install pymagnetos

If you plan to use Jupyter notebooks, install pymagnetos with the Jupyter dependencies instead :

pip install pymagnetos[jupyter]

Update

To upgrade to the latest version, run, from the virtual environment :

pip install --upgrade pymagnetos

Usage

All apps and the corresponding backend libraries require a configuration file. Grab a configuration file template from the configs folder, edit it according to your settings (essentially the path to the data directory) and drag & drop in the app window.

Run an app

Once installed, the pymagnetos command should be available from the shell (PowerShell in Windows). You can check its usage with : pymagnetos --help

Which comes down to :

  • Run the app for digital lock-in : pymagnetos linx
  • Run the app for ultrasound experiments : pymagnetos pyuson
  • Run the app for TDO experiments : pymagnetos pytdo

Tip : hit the top arrow on the keyboard to show previous commands you ran.

You can then drag & drop your configuration file in the window and click some buttons !

Use in a script

Subpackages (e.g. pyuson or pytdo) can be imported in Python scripts or Jupyter notebooks. There are some examples in the examples folder. You can copy them and edit them according to your need.

To run the examples, matplotlib is required to display the figures. Install it with :

pip install matplotlib

To open and run the notebooks (file with the .ipynb extension), the Jupyter package needs to be installed, along with a package to make the figures interactive. If pymagnetos was installed with the [jupyter] extra, they are already installed. Otherwise, install those packages with :

pip install jupyter matplotlib ipympl

To open a Jupyter notebook, open the Jupyter Lab web interface :

jupyter lab

Then, browse to your .ipynb file and run it ! Alternatively, Visual Studio Code supports Jupyter notebooks natively through the Jupyter extension.

Contribute

See the developer documentation.

To run the tests in a container :

podman run -it $(podman build -q .)

Acknowledgments

pymagnetos is developed in the Laboratoire National des Champs Magnétiques Intenses (LNCMI) in Toulouse, France, with the support of the OSCARS HiMagnetOS project. Built by humans, no LLM were used anywhere in the project.

Metadata

Release files for pymagnetos 0.11.5

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

Source distribution (sdist)

Source distribution for pymagnetos 0.11.5
File Size Uploaded Provenance Actions
pymagnetos-0.11.5.tar.gz 147.5 kB Without provenance Details for pymagnetos-0.11.5.tar.gz

Built distribution (wheel)

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

Total release size: 337.1 kB

Release files / pymagnetos-0.11.5.tar.gz

Download URL pymagnetos-0.11.5.tar.gz
Size 147.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8018c770bf0a72a6f4a633b5c365f2b549c298b34e82ecef66b04162e648624a
BLAKE2b-256 checksum
How to use checksums
591e63a28b369dc79611ec5f0348236f2a679f6de8399622926f9045cf4a3dbf
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / pymagnetos-0.11.5-py3-none-any.whl

Download URL pymagnetos-0.11.5-py3-none-any.whl
Size 189.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
efc4c362e5916ba2b4c981e9432b8f88e0562e7b373a0289f26280fd5037c375
BLAKE2b-256 checksum
How to use checksums
fb22b1b1fc6d459eb49b6d202af61916d4d9ae14375bbd6e97d18aa559f9e9f2
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via uv/0.12.5 {"installer":{"name":"uv","version":"0.12.5","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Debian GNU/Linux","version":"13","id":"trixie","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Security for pymagnetos 0.11.5

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.

No provenance found

None of the files in this release were uploaded with provenance metadata.

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.

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