Convert images of beads into XYZ positions
Project description
MagTrack is a Python package for tracking symmetric beads in single-molecule magnetic tweezers experiments.
- GPU accelerated (optional, requires a CUDA GPU)
- Sub-pixel XYZ coordinates
- Python notebook included with examples
- Documented, tested, and benchmarked
- Only depends on NumPy, SciPy, and CuPy
- Actively maintained
Try a demo in a Google Colab notebook:
⏳ Install
Pre-requisites
- Python >=3.9
- NumPy >=1.26
- SciPy >=1.11.1
- (Optional, but needed for GPU acceleration) CuPy-CUDA12x >=13.0
- Windows or Linux or MacOS (MacOS does not support NVIDIA GPU acceleration)
- MagTrack can run on a CPU or GPU. But GPU execution requires a CUDA-compliant GPU with the CUDA Toolkit installed. This is free and easy to install for most NVIDIA GPUs.
Instructions
pip install magtrack[gpu]
Or without CuPy
pip install magtrack
Optional: For GPU acceleration on a computer with an NVIDIA CUDA GPU, you may need to install the CUDA Toolkit for CuPy. See details at https://docs.cupy.dev/en/stable/install.html
⚒ 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.
You can download it and run it on your computer.
Or try it out with Google Colab.
📖 Documentation
View the full documentation at magtrack.readthedocs.io
💬 Support
Report issues, make requests, and ask questions on the GitHub issue tracker
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
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file magtrack-0.7.0.tar.gz.
File metadata
- Download URL: magtrack-0.7.0.tar.gz
- Upload date:
- Size: 37.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0499abd1c67c11e0c1775576d6190fc477903d02ea374b4aee70f6e30c3e83ab
|
|
| MD5 |
c1cf8696f4e324ce349bf51c1578de2f
|
|
| BLAKE2b-256 |
36be6ea2e163434fc64943e58ccb8676d18185322e75952819cb4a04115e00bd
|
Provenance
The following attestation bundles were made for magtrack-0.7.0.tar.gz:
Publisher:
python-publish.yml on 7jameslondon/MagTrack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
magtrack-0.7.0.tar.gz -
Subject digest:
0499abd1c67c11e0c1775576d6190fc477903d02ea374b4aee70f6e30c3e83ab - Sigstore transparency entry: 661789786
- Sigstore integration time:
-
Permalink:
7jameslondon/MagTrack@2e9ed7b4bac41cf43ea4c308f312675f20506b7f -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/7jameslondon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2e9ed7b4bac41cf43ea4c308f312675f20506b7f -
Trigger Event:
release
-
Statement type:
File details
Details for the file magtrack-0.7.0-py3-none-any.whl.
File metadata
- Download URL: magtrack-0.7.0-py3-none-any.whl
- Upload date:
- Size: 27.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0d1937c39960b5a85840c930283ecbd066534fc54ca7df181ee7927b3514742c
|
|
| MD5 |
f534523855d270e5e3da6bf29d9ca6f9
|
|
| BLAKE2b-256 |
6d45514474b49893e623857106bb1c183225329da9cd98b9621bad8d28095ae5
|
Provenance
The following attestation bundles were made for magtrack-0.7.0-py3-none-any.whl:
Publisher:
python-publish.yml on 7jameslondon/MagTrack
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
magtrack-0.7.0-py3-none-any.whl -
Subject digest:
0d1937c39960b5a85840c930283ecbd066534fc54ca7df181ee7927b3514742c - Sigstore transparency entry: 661789788
- Sigstore integration time:
-
Permalink:
7jameslondon/MagTrack@2e9ed7b4bac41cf43ea4c308f312675f20506b7f -
Branch / Tag:
refs/tags/v0.7.0 - Owner: https://github.com/7jameslondon
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
python-publish.yml@2e9ed7b4bac41cf43ea4c308f312675f20506b7f -
Trigger Event:
release
-
Statement type: