MagTrack is a free open-source Python library for tracking symmetric beads in single-molecule magnetic tweezers experiments.
- Sub-pixel XYZ coordinates
- GPU accelerated (optional, requires a CUDA-capable GPU)
- Python notebook included with examples
- Documented, tested, and benchmarked
- Only depends on NumPy, SciPy, and CuPy
- Runs on Windows, macOS, and Linux
- Easy installation with pip
Try a demo in a Google Colab notebook
⏳ Install
Get started with MagTrack by following the installation instructions.
⚒ Usage
import magtrack
# Run the full default XYZ pipeline
x, y, z, profiles = magtrack.stack_to_xyzp(stack)
# Or make your own pipeline from algorithms you prefer
x, y = magtrack.center_of_mass(stack)
x, y = magtrack.auto_conv_sub_pixel(stack, x, y)
profiles = magtrack.fft_profile(stack)
...
More Examples
You can see more examples of how to use MagTrack in this notebook.
Try it out with Google Colab.
Or you can download it and run it on your computer with Jupyter Notebook.
📖 Documentation
View the full guide to MagTrack at magtrack.readthedocs.io
🔬 Live Microscope Control and Acquisition
You can use MagTrack for live video processes using our sister project MagScope.
💬 Support
Report issues and make requests on the GitHub issue tracker.
Having trouble? Need help? Have suggestions? Want to contribute?
Email us at magtrackandmagscope@gmail.com
Metadata
Release files for magtrack 1.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| magtrack-1.0.0.tar.gz | 70.5 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| magtrack-1.0.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 150.9 kB
Release files / magtrack-1.0.0.tar.gz
| Download URL | magtrack-1.0.0.tar.gz |
|---|---|
| Size | 70.5 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
3bca596a66d29246513a4051ba5c44f49bfcda97ef47c4d75841152b8739679f
|
|
BLAKE2b-256 checksum How to use checksums |
ff16ad5fa966ec46c2b689bfb393ed9a172c0478f64c9aa0a940b9027ffd6d8d
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 15, 2026.
Transparency logRelease files / magtrack-1.0.0-py3-none-any.whl
| Download URL | magtrack-1.0.0-py3-none-any.whl |
|---|---|
| Size | 80.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
103005b27f4298696d93efa03715d1ee600d9159058fa46793b5e4b230f218b5
|
|
BLAKE2b-256 checksum How to use checksums |
f285773e4dc04ac5cea75bb0a23ba7497ff07d06621efbfd96228234f7741e6b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/7.0.0 CPython/3.13.14
|
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 Sep 15, 2026.
Transparency log