Skip to main content

The fastest streaming algorithms for your TTTR data

Project description

🍕 Trattoria 🍕

Trattoria delivers you the fastest streaming algorithms to analyze your TTTR data. We currenlty support the following algorithms:

  • Second order autocorrelations: Calculate the autocorrelation between two channels of your TCSPC.
  • Third Order autocorrelations: Calculate the coincidences between 3 channels. A sync version is provided were it uses the fact that the sync channel is periodic and known.
  • Intensity time trace: Calculate the intensity on each (or all) channels versus time.
  • Zero finder: Given two uncorrelated channels (e.g. a laser behind a 50/50 splitter) compute the delay between the input channels.
  • Lifetime: Compute the lifetime histogram from a pulsed excitation experiment.

Supported file formats

Currently Trattoria can only read PTU files from PicoQuant. If you want support for more or want to help providing it please put a ticket on the tttr-toolbox project.

Installing

pip install trattoria

Examples

The entry point to Trattoria is the PTUFile class. This class has methods that give us access to the algorithms. Each of the algorithms takes as input a parameter object and returns a results object. For a complete list of the functionality see the examples folder.

import trattoria

import matplotlib.pyplot as plt

ptu_filepath = Path("/path/to/some.ptu")
ptu = trattoria.PTUFile(ptu_filepath)

timetrace_params = trattoria.TimeTraceParameters(
    resolution=10.0,
    channel=None,
)
tt_res = ptu.timetrace(timetrace_params)

plt.plot(tt_res.t, tt_res.tt / timetrace_params.resolution)
plt.xlabel("Time (s)")
plt.ylabel("Intensity (Hz)")
plt.show()

The examples folders contains examples of all the functionality available in Trattoria. For more details check the docstrings in core.py.

Design

Trattoria is just a very thin wrapper around the trattoria-core library which itselfs provides a lower level interface to the the tttr-toolbox library. A Rust project that provides the compiled components that allows us to go fast.

Citing

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

trattoria-0.3.0.tar.gz (5.6 kB view details)

Uploaded Source

Built Distribution

trattoria-0.3.0-py3-none-any.whl (5.6 kB view details)

Uploaded Python 3

File details

Details for the file trattoria-0.3.0.tar.gz.

File metadata

  • Download URL: trattoria-0.3.0.tar.gz
  • Upload date:
  • Size: 5.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for trattoria-0.3.0.tar.gz
Algorithm Hash digest
SHA256 b828648c20cbe00c828ab253025ee73c70e79262ec6588e78c0513118e2db2d5
MD5 d6c7038659e1d05aee2feb172aac5523
BLAKE2b-256 20b3a90fbbad3e986df98a32b973c2020d7a39191453bc0d0ef59fbf11c2a7e7

See more details on using hashes here.

File details

Details for the file trattoria-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: trattoria-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 5.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: poetry/1.1.6 CPython/3.8.5 Darwin/19.6.0

File hashes

Hashes for trattoria-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 3e46213a05f440f23808ce7894c46c2d8c26c7cb89ea6484442eb49154af286d
MD5 b80a2ba6ade99308a187495a795c3276
BLAKE2b-256 9eef35e9d2cabcffbc506f9492bc575251fa4314456f7206709ff6e81c32485c

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