Skip to main content

A Python library that unifies Positron Emission Particle Tracking (PEPT) research, including tracking, simulation, data analysis and visualisation tools.

Project description

version Open In Colab

PEPT

A Python library that integrates all the tools necessary to perform research using Positron Emission Particle Tracking (PEPT). The library includes algorithms for the location, identification and tracking of particles, in addition to tools for visualisation and analysis, and utilities allowing the realistic simulation of PEPT data.

Positron Emission Particle Tracking

PEPT is a technique developed at the University of Birmingham which allows the non-invasive, three-dimensional tracking of one or more 'tracer' particles through particulate, fluid or multiphase systems. The technique allows particle or fluid motion to be tracked with sub-millimetre accuracy and sub-millisecond temporal resolution and, due to its use of highly-penetrating 511keV gamma rays, can be used to probe the internal dynamics of even large, dense, optically opaque systems - making it ideal for industrial as well as scientific applications.

Getting Started

These instructions will help you get started with PEPT data analysis.

Prerequisites

This package supports Python 3. You also need to have NumPy and Cython on your system in order to install it.

Installation

You can install pept from PyPI:

pip install pept

Or you can install the latest version from the GitHub repository:

pip install git+https://github.com/uob-positron-imaging-centre/pept

Example usage

You can download data samples from the UoB Positron Imaging Centre's Repository:

$> git clone https://github.com/uob-positron-imaging-centre/example_data

A minimal analysis script using the pept.tracking.peptml subpackage:

import pept
from pept.scanners import ParallelScreens
from pept.tracking import peptml
from pept.visualisation import PlotlyGrapher

lors = ParallelScreens('example_data/sample_2p_42rpm.csv', skiprows = 16)

max_distance = 0.1
cutpoints = peptml.Cutpoints(lors, max_distance)

clusterer = peptml.HDBSCANClusterer(min_sample_size = 30)
centres, clustered_cutpoints = clusterer.fit_cutpoints(cutpoints)

fig = PlotlyGrapher().create_figure()
fig.add_trace(centres.points_trace())
fig.show()

A more in-depth tutorial is available on Google Colab.

Full documentation is available here.

Performance

Significant effort has been put into making the algorithms in this package as fast as possible. The most compute-intensive parts have been implemented in C and parallelised, where possible, using joblib. For example, using the peptml subpackage, analysing 1,000,000 LoRs on the author's machine (mid 2012 MacBook Pro) takes ~26 s (with another 12 s to read in the data). This efficiency is largely due to the availabiliy of a great high-performance implementation of the HDBSCAN clustering algorithm.

Help and Support

We recommend you check out our tutorials. If your issue is not suitably resolved there, please check the issues page on our GitHub. Finally, if no solution is available there, feel free to open an issue; the authors will attempt to respond in a reasonably timely fashion.

Contributing

We welcome contributions in any form! Assistance with documentation, particularly expanding tutorials, is always welcome. To contribute please fork the project, make your changes and submit a pull request. We will do our best to work through any issues with you and get your code merged into the main branch.

Citing

If you used this codebase or any software making use of it in a scientific publication, you must cite the following paper:

Nicuşan AL, Windows-Yule CR. Positron emission particle tracking using machine learning. Review of Scientific Instruments. 2020 Jan 1;91(1):013329.

https://doi.org/10.1063/1.5129251

Licensing

The pept package is GNU v3.0 licensed. Copyright (C) 2020 Andrei Leonard Nicusan.

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

pept-0.1.5.tar.gz (986.4 kB view details)

Uploaded Source

Built Distribution

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

pept-0.1.5-cp37-cp37m-macosx_10_14_x86_64.whl (879.5 kB view details)

Uploaded CPython 3.7mmacOS 10.14+ x86-64

File details

Details for the file pept-0.1.5.tar.gz.

File metadata

  • Download URL: pept-0.1.5.tar.gz
  • Upload date:
  • Size: 986.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for pept-0.1.5.tar.gz
Algorithm Hash digest
SHA256 3d5931886be83eaf812607b5a0d7e7788c00a8ef5599eb45ec61ccae48ca6b77
MD5 8a21503c223250cfea917967057c731b
BLAKE2b-256 883d24f04ba7b656874ca7cd26ff38346fd5793ee7aaabdbec2433a42139357e

See more details on using hashes here.

File details

Details for the file pept-0.1.5-cp37-cp37m-macosx_10_14_x86_64.whl.

File metadata

  • Download URL: pept-0.1.5-cp37-cp37m-macosx_10_14_x86_64.whl
  • Upload date:
  • Size: 879.5 kB
  • Tags: CPython 3.7m, macOS 10.14+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.4

File hashes

Hashes for pept-0.1.5-cp37-cp37m-macosx_10_14_x86_64.whl
Algorithm Hash digest
SHA256 fe78bc669d0fb0eacdd63cdbeec90e7bb599dd0f5725c965a783f263c6d3fd6d
MD5 77727d471c2634ada200be52ecc25c03
BLAKE2b-256 97bf915014383766385362c03448abf04b9d2c5860075a4b4d27aee40a559f34

See more details on using hashes here.

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