Timetag analysing library
Project description
Welcome to tangy 🍊
tangy is a high performance library to buffer timetags from timetaggers and files and provides soft-realtime analysis.
About
It stores your timetag data in a circular buffer backed by shared memory allowing you to have multiple client connect to the same buffer. When streaming data from a device into a tangy buffer this allows you to have multiple connections to the same device facilitating either mulitple lab users or multiple concurrent experiments. Alternatively, if you have a large file of containing timetags you can read a section into a tangy buffer in one python interpreter and perform analysis on that section in another speeding up exploratory analysis.
Features
- Support for different timetag formats
- A client-server model for buffering and analysis
- Analysis for:
- Singles counting
- Coincidence counting
- Delay finding
Installation
python3 -m pip install tangy
python3 -m pip install tangy[gui] # if you intend on using the guis
Advanced
Install from git to get the latest version
python3 -m pip install git+https://gitlab.com/PeterBarrow/tangy.git
Examples
Open a file and read some data
import tangy
target_file = 'tttr_data.ptu'
n = int(1e7)
name = "tagbuffer"
# Open the file
ptu = tangy.PTUFile(target_file, name, n)
# Read some data from the file
for i in range(11):
start_time = perf_counter()
a = ptu.read(1e6)
stop_time = perf_counter()
run_time += (stop_time - start_time)
print([ptu.record_count, ptu.count])
# Acquire the buffer
buffer = ptu.buffer()
integration_time = 1
coincidence_window = 1e-9
channels = [0, 1]
count = buffer.coincidence_count(integration_time, coincidence_window, channels)
records = buffer.coincidence_collect(integration_time, coincidence_window, channels)
channel_a = 0
channel_b = 1
integration_time = 10
measurement_resolution = 6.25e-9
result_delay = tangy.find_delay(buffer,
channel_a channel_b,
integration_time,
resolution=measurement_resolution)
delays = [0, result_delay.t0]
count = buffer.coincidence_count(integration_time,
coincidence_window,
channels,
delays=delays)
records = buffer.coincidence_collect(integration_time,
coincidence_window,
channels,
delays=delays)
Tools
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 Distributions
Built Distributions
Hashes for tangy-0.5.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bdfded25dd7bd87955942e5c626954768e85af265dbbf067f83a9a09df0793c |
|
MD5 | 7c52bae5c86e8c0629d09fa8992973cd |
|
BLAKE2b-256 | 5d8468ef2109340f2724f82906e8daeaedd0697dd33525066847ad6fc310d963 |
Hashes for tangy-0.5.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 35276949a59ece328c48e35d8b84250e14e8f73ff1b14b334a7ebe1b660d8f09 |
|
MD5 | 1b7ea93fc7e0c3eadd2e003a52540ea9 |
|
BLAKE2b-256 | fed74dc2d5e1b62307d69507481763c27a411f2ce244ce7ac238b15007ff21c9 |
Hashes for tangy-0.5.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a3ffbda608eaccaedab560569b6138c67ee783bfcf5a72eeca899a807975f2d5 |
|
MD5 | 17913660acbf7e7cd000c28b08947722 |
|
BLAKE2b-256 | a9ad07baf3a27b8c5d9a17a915d4ef0cd25c5ae6003dab90499b85cbcb8870b1 |
Hashes for tangy-0.5.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 25f37e6f9ca38d1477737f416ef4edab8f2ffe6706c6a90aa3d9173608367bbc |
|
MD5 | 53bc7c423292563900ba47223425ceff |
|
BLAKE2b-256 | 7bf459940c44f0215aa20c1481650a8494fdc8b2d369f9c4b406426399f9bbe6 |
Hashes for tangy-0.5.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 953d2859926e3ff8513f51ec7d740a5fca8e2bbcd7e0ec803e310412d9d7861c |
|
MD5 | b1501ef7b61faf27dc129a250a7a390a |
|
BLAKE2b-256 | d4580786e06b64c6a2788293204f485dfaa68691d8d15e8edf305bb97e7834cf |
Hashes for tangy-0.5.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 93b53f50ae4b41e89de44fccf60b0d513fd1ef4bc7a60e3477f1d48d93adac14 |
|
MD5 | 16602d29471a9e6eb868dfacb3ae0ee0 |
|
BLAKE2b-256 | b1991b7bc990cb06476597b9a1e96df8daa021e5a661ce24cbcc9d302f58768a |