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
- Joint delay histograms
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/Peter-Barrow/tangy.git
Quick 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()
Count coincidences in the last second for channels [0, 1] with a 1ns window
integration_time = 1
coincidence_window = 1e-9
channels = [0, 1]
count = buffer.coincidence_count(integration_time, coincidence_window, channels)
Collect coincident timetags
records = buffer.coincidence_collect(integration_time, coincidence_window, channels)
Find the delays between pairs of channels
channel_a = 0
channel_b = 1
integration_time = 10
measurement_resolution = 6.25e-9
result_delay = buffer.relative_delay(channel_a, channel_b,
integration_time,
resolution=6.25e-9,
window=250e-7)
delays = [0, result_delay.t0]
Count (or collect) coincidences with delays
count = buffer.coincidence_count(integration_time,
coincidence_window,
channels,
delays=delays)
records = buffer.coincidence_collect(integration_time,
coincidence_window,
channels,
delays=delays)
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
File details
Details for the file tangy-0.9.1-cp312-cp312-win_amd64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp312-cp312-win_amd64.whl
- Upload date:
- Size: 445.5 kB
- Tags: CPython 3.12, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 707e71859be5af84360462b9c5bf775f995b451b474b9aca594f4612f36fee55 |
|
MD5 | 7687f4d470236981b9573ff108de6477 |
|
BLAKE2b-256 | 6b9715981f262d2299fc8596a6844df106fd2db0e46aa0c37dac71a35cbebdfc |
File details
Details for the file tangy-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3329d1cf767bcbd44fb4f3a559bf3c6049a270e2768a2b90a0e3fd8ec01db926 |
|
MD5 | 9a5631e07d2b00b07acf66e4732fc74d |
|
BLAKE2b-256 | fbe790e88eb80bcaa4600f390d6cc0e149ae77917997acfd199304bde7f71d43 |
File details
Details for the file tangy-0.9.1-cp311-cp311-win_amd64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp311-cp311-win_amd64.whl
- Upload date:
- Size: 452.4 kB
- Tags: CPython 3.11, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6038927bbbbdf21b968c955845fcb2865971358a529ef3e68d5336ea2f19606c |
|
MD5 | febba949713a494b9ea67210b2566576 |
|
BLAKE2b-256 | d340ddafe8cb70eaa6161ee7360410f2724569640d4e33bbdabad4ef01bc52fb |
File details
Details for the file tangy-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 3.0 MB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 109dce27ee0ddf791940e8d06c6cfc72986af841e9d732b9811e2bb1eccfe74e |
|
MD5 | 3525963b5fc6c41536e343e07a6b0b27 |
|
BLAKE2b-256 | c6325f2b63d9683c54bc5a57c84fb50964520120c9175c498fa88f88ca0b78bb |
File details
Details for the file tangy-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 305.6 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 51bbf8748a98e1c46fcec10e99179677126c0b314004eb1b5e28c938325cd803 |
|
MD5 | 9bb9efd9198b9aeacc9a3edc749906e9 |
|
BLAKE2b-256 | e78e571da116de7472e84464d8804cd561611aa8793717cd6298d58d3a1ea3d2 |
File details
Details for the file tangy-0.9.1-cp311-cp311-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp311-cp311-macosx_10_9_x86_64.whl
- Upload date:
- Size: 334.8 kB
- Tags: CPython 3.11, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | ef35087c299e4ef1b4d21baa5e60d07d0d061730a441426dce815327a348f8eb |
|
MD5 | 5a2b25a9509438d5da281fa28f464ede |
|
BLAKE2b-256 | ebc9683bfe44fd0e50595106fc8b22a28a3cb2eadbb1061abab5ab10bea17046 |
File details
Details for the file tangy-0.9.1-cp310-cp310-win_amd64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp310-cp310-win_amd64.whl
- Upload date:
- Size: 450.6 kB
- Tags: CPython 3.10, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c95ea16f08c77dd68276d34102a96021666fa8e0074431cb238612f15da30c34 |
|
MD5 | 842ef6de5b713f33a2f45f77753044c6 |
|
BLAKE2b-256 | 9e736de3af6850cb2deccf2096a52b6ddb38f932a55a72edb539f9ff9a2c3042 |
File details
Details for the file tangy-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7dd980c64c6ea8aa9fc5c473d2465a49b6b010460beb075cdf174549e842b64b |
|
MD5 | dbcfaed9e5ff0fe0ae034279e3ebe034 |
|
BLAKE2b-256 | 2f60f26cd4cfcffa61487c57f6b3f81c808ad48a1773a3b080b6048b937762ad |
File details
Details for the file tangy-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 304.3 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | bdbca63bbe7678ccb0543d6b4cc2357fe764f1e41acf635a6c9f31aff8b2487d |
|
MD5 | 92d0c0bf733eaafe16ac8c1ca1161670 |
|
BLAKE2b-256 | 007da053a311361ff04bcc35e639a8702be2efcd6268cc965caaaaf99b93b206 |
File details
Details for the file tangy-0.9.1-cp310-cp310-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp310-cp310-macosx_10_9_x86_64.whl
- Upload date:
- Size: 333.7 kB
- Tags: CPython 3.10, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50eb61ad3c721a128afb871261bb65242738fedfb84f63eca2e1938e1d1dd049 |
|
MD5 | dbf16b921421d777938165355f3f0339 |
|
BLAKE2b-256 | b0eff2950e3b7cdb3393f96110ada626758d8100b22b8f86ce898e684538d52c |
File details
Details for the file tangy-0.9.1-cp39-cp39-win_amd64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp39-cp39-win_amd64.whl
- Upload date:
- Size: 451.3 kB
- Tags: CPython 3.9, Windows x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c953f3c3dc2023e14f09fe4fa9b7f6e449236c7dff611b13fe833f82c15cf03e |
|
MD5 | 60930fd487754b93bf589868d21c9d08 |
|
BLAKE2b-256 | 80e22c0bf055387f6eece1b6151005344dc82fe368af2ec3ff1a532eb00a166a |
File details
Details for the file tangy-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 2.8 MB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0614bf95348c9a39d021030df0c90c6817a2a0b6e04c8bd8be570ffe9dbdffd8 |
|
MD5 | c8b9da5e47fe3a7b723372278434e02e |
|
BLAKE2b-256 | 4d42c730be9c351b487f0979f3f4d094f1b63279cabb6380ac25c86ce49ba089 |
File details
Details for the file tangy-0.9.1-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 304.1 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e72d7f55135d782d3ae008cc242bcac92bfd890187063d06876ff6ba744f2408 |
|
MD5 | 7184fab3714b44c5a82336641903c5d5 |
|
BLAKE2b-256 | 10e4ff3e389781545fd0cfdaa71a2cdac01a4f6c82a64439c1e581bc521aa81a |
File details
Details for the file tangy-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl
.
File metadata
- Download URL: tangy-0.9.1-cp39-cp39-macosx_10_9_x86_64.whl
- Upload date:
- Size: 333.5 kB
- Tags: CPython 3.9, macOS 10.9+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/5.1.1 CPython/3.12.6
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 53931b6325588b57983eade8e8ce2567adef5be95b8b7b24f2319adfb5dec011 |
|
MD5 | 138f4f3e9615a9550db1f3f4e881c856 |
|
BLAKE2b-256 | 414a6256edd497042e11b2606f4054fd0c14e3baa1e26bafcc71b0a919b91725 |