Skip to main content

Convert images of beads into XYZ positions

Project description


PyPi Docs Paper Python package

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: 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

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

magtrack-0.7.0.tar.gz (37.2 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.0-py3-none-any.whl (27.2 kB view details)

Uploaded Python 3

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

Hashes for magtrack-0.7.0.tar.gz
Algorithm Hash digest
SHA256 0499abd1c67c11e0c1775576d6190fc477903d02ea374b4aee70f6e30c3e83ab
MD5 c1cf8696f4e324ce349bf51c1578de2f
BLAKE2b-256 36be6ea2e163434fc64943e58ccb8676d18185322e75952819cb4a04115e00bd

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtrack-0.7.0.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.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

Hashes for magtrack-0.7.0-py3-none-any.whl
Algorithm Hash digest
SHA256 0d1937c39960b5a85840c930283ecbd066534fc54ca7df181ee7927b3514742c
MD5 f534523855d270e5e3da6bf29d9ca6f9
BLAKE2b-256 6d45514474b49893e623857106bb1c183225329da9cd98b9621bad8d28095ae5

See more details on using hashes here.

Provenance

The following attestation bundles were made for magtrack-0.7.0-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