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.
- 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.
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 three methods that give us access to the algorithms. Each of the algorithms takes as input a parameter object and returns a results object. For example:
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 thing 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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file trattoria-0.1.1.tar.gz
.
File metadata
- Download URL: trattoria-0.1.1.tar.gz
- Upload date:
- Size: 4.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.9 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1869a13395807685d40c04e971d77a5183e1c67066cbb3b046ec677c7d38c20 |
|
MD5 | 0e8dd77295715c5f01e5ac29444c6a9a |
|
BLAKE2b-256 | fd04ccaefdc521171a369199a7801cf5a55471b4ff46db687e1c0ec3dcb67537 |
File details
Details for the file trattoria-0.1.1-py3-none-any.whl
.
File metadata
- Download URL: trattoria-0.1.1-py3-none-any.whl
- Upload date:
- Size: 4.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: poetry/1.1.6 CPython/3.8.9 Darwin/19.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 544a807516632f624a8417c1a814eae621d7fce8f7be9fbe8866f3b2ba88101a |
|
MD5 | 08a5dfa286097709d77bd9fd467f3715 |
|
BLAKE2b-256 | eac8897c473f6d993f3f9e4dc24a07d7f485e5257e97d8f7261b8d7fbeaaa8f2 |