Skip to main content

Python Nanoparticle Tracking Analysis

Project description

PyNTA

Particle tracking instrumentation and analysis in Python

Screenshot of the PyNTA software

PyNTA aims at bridging the gap between data acquisition and analysis in nanoparticle tracking experiments. You can read more about the project at https://python-nta.readthedocs.io.

Installation

Create a virtual environment in your own computer and run the following command to get the latest PyNTA version:

pip install pynta

And if you want the development branch, you can run:

pip install git+https://github.com/nanoepics/pynta@develop

Note that the development branch is for testing purposes only. Forward compatibility is not ensured and unexpected bugs may be encountered.

Starting PyNTA

In order to start the program, you need to run the following command:

pynta

It will automatically start the program with a default synthetic camera. If you would like to specify your own configuration file for PyNTA, you should run instead:

pynta -c config.yml

where config.yml has to be replaced by the name of your file. You can explore the examples folder in the repository.

First Steps with PyNTA

By default, PyNTA comes configures to use synthetic data. The images displayed are simulated random movements of particles. You can use that data to test the program regardless of whether you have a camera available or not.

You can start by aquiring images and movies. Stream the data to the hard drive and do real time tracking and characterization based on the diffusion of the particles. You can find more information on the online documentation.

Supported cameras

We currently support the following cameras:

  • Hamamatsu Orca (Interfaced through DCAM-API)
  • Photonic Science
  • Basler (Interfaced through PyPylon)

The code has been structured in such a way that adding support for other cameras is straightforward, and also the simulation of experiments is easy to implement. You can read the guide on how to contribute to the code.

Features

The key feature of PyNTA is the ability to acquire and analyse images in real time. By leveraging the capabilities of Trackpy, every frame is processed, detecting particles and linking their trajectories. This allows the user to see results about the distribution of particle sizes in close-to real time.

PyNTA allows the user to stream data directly to the hard drive, both video data and particle location can be saved during the progress of the experiment, making it failsafe against failures. Metadata is included in every generated file, guaranteeing the reproducibility of the experiments.

Report Issues

To report a problem with PyNTA, or suggestions for improvement, etc. you can use the Issue Tracking System. You can also contact the authors of the program if you have specific needs or would like to collaborate either scientifically or with development of code.

Wishlist

  • Make PyNTA available for data analysis of data already collected
  • Simplify the generation of the configuration file
  • Encapsulate the experiment and isolate it from the GUI
  • Improve response time for calculating size histograms
  • Include extra parameters for the tracking, currently supported by trackpy but not implemented in the GUI
  • Create an installer easy to distribute

For Developers

You can find the source code of this project on Github. You can check the documentation in order to understand the structure of the code and the main development guidelines.

In summary, if you want to add or improve the code, the proper workflow is as follows:

  • Fork the repository into your own user space on Github.

  • Start a new branch based on develop if you are adding new functionality or on master if you are solving an ASAP bug.

  • Improve the code on that branch.

  • Once you are done, update your branch with the latest code from develop:

    git checkout develop
    git pull upstream develop
    git rebase develop my_branch
    

    where my_branch is the name of the branch you have started. More info here.

  • This leaves your branch with a history appended to the end of the history of develop. Then, you can just merge the branch into develop with --squash:

    git merge --squash my_branch
    git commit -m "description of your work"
    

    Important: When you do this, all the work that you have done on your branch will be condensed to a single commit into develop. Make sure you use a clear message. This makes tracking changes much easier, and the history of commits remains safe in your own repository.

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

PyNTA-0.1.4.tar.gz (247.2 kB view details)

Uploaded Source

Built Distribution

PyNTA-0.1.4-py3-none-any.whl (250.3 kB view details)

Uploaded Python 3

File details

Details for the file PyNTA-0.1.4.tar.gz.

File metadata

  • Download URL: PyNTA-0.1.4.tar.gz
  • Upload date:
  • Size: 247.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for PyNTA-0.1.4.tar.gz
Algorithm Hash digest
SHA256 1fd6e23d38b0dad86117fd3e9958d2a596a6bb1bbb49014e1905457845fdee6c
MD5 97616cace47841a1b91a40fd8fd2aa3e
BLAKE2b-256 176e92ab5233bae5dd6551756e97a952227dd42051de2f36e43ead61cc0ecaf7

See more details on using hashes here.

File details

Details for the file PyNTA-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: PyNTA-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 250.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.21.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.31.1 CPython/3.7.3

File hashes

Hashes for PyNTA-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 0f2f90739a0ef6c5a40437b86f46645f0f5129e0ede1e72f1a744b380b276875
MD5 fe53798e133ba8409e7cd764d625d812
BLAKE2b-256 98a54f2cd48e3947ddfe3da57c985b69e59a9d820a17cc4e242c07e3ae0a2cbf

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page