Skip to main content

Convert images of beads into XYZ positions

Project description


PyPi Downloads Docs Paper Python package

MagTrack is a Python package for tracking symmetric beads in single-molecule magnetic tweezers experiments.

Try a demo in a Google Colab notebook: Open in Colab

⏳ 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. Open in Colab

📖 Documentation

View the full documentation at magtrack.readthedocs.io

💬 Support

Having trouble? Need help? Have suggestions? Or want to contribute code?
Report issues and make requests on the GitHub issue tracker
Or email us at magtrackandmagscope@gmail.com

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

magtrack-0.7.2.tar.gz (38.6 kB view details)

Uploaded Source

Built Distribution

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

magtrack-0.7.2-py3-none-any.whl (27.4 kB view details)

Uploaded Python 3

File details

Details for the file magtrack-0.7.2.tar.gz.

File metadata

  • Download URL: magtrack-0.7.2.tar.gz
  • Upload date:
  • Size: 38.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for magtrack-0.7.2.tar.gz
Algorithm Hash digest
SHA256 eee30b3df24f70a883e210b4f5a2e888e011de40f8e0c7ef5ecf32dde7a5d191
MD5 a21a0489fea5b79a681568d23d40ef3c
BLAKE2b-256 15fccf3c20667a54600ba2faf90fbf45ab4cbe67df499e5e3f03a0e9eb9ad9b7

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtrack-0.7.2.tar.gz:

Publisher: python-publish.yml on 7jameslondon/MagTrack

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

File details

Details for the file magtrack-0.7.2-py3-none-any.whl.

File metadata

  • Download URL: magtrack-0.7.2-py3-none-any.whl
  • Upload date:
  • Size: 27.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for magtrack-0.7.2-py3-none-any.whl
Algorithm Hash digest
SHA256 fb9187a8b3acf721d47c096e494dee5986da8afacce90935cf20784ddea03bc0
MD5 944b2fb674f71b2cc54e2892b6e293f1
BLAKE2b-256 16c60d4312dcb761e36a4335a5d0e09daecb11d0bde88a0d1cdd0545f2093ae1

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtrack-0.7.2-py3-none-any.whl:

Publisher: python-publish.yml on 7jameslondon/MagTrack

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