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.4.2-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2bef009b202b8aae499504af14dee7c4f8869ab634cf74036eb502fd0a2a3feb |
|
MD5 | da8a8add121000230c9aebd5fc5b4d27 |
|
BLAKE2b-256 | da091f0a2f3bd335036dee329264675ab63b2f35a39b1c9a6eaa29b080a7475c |
Hashes for tangy-0.4.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 62140f1f60b3dcabedb671dc73dafc89ece006d821fe2b33b65d404f907808af |
|
MD5 | 05fd9cdb297429f4733d93eaa1a3d25e |
|
BLAKE2b-256 | e6f0cf112a033c69ca614ea8319e4f1fe2a81eca0fbdbfadec7e82723b1d4527 |
Hashes for tangy-0.4.2-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 16c4c106cc60df99a2ce146155df18b5e5f932673251b037ee4f90d7e1df7dee |
|
MD5 | e6c7e87eb4e3c0b1b78a4b30929a5e6a |
|
BLAKE2b-256 | ebd9eafc67962120cd92f8149e2eccdbc9da5634a0d6fd7fff92c054200715c2 |
Hashes for tangy-0.4.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c14559a8d0737296138ef2a704280e33a5f6af70d1c04d26e234d5dd01813677 |
|
MD5 | 2cbc912ff244ee8da2902827ae480947 |
|
BLAKE2b-256 | f6ac35797f2b1084e54a51c18ef3d576fed72ff352d1f7125024c9863c01b0c5 |
Hashes for tangy-0.4.2-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ed87f5a19b16667d2976c4fc4a2e6c167ef828aa1d72fe624fbb223db806e3f |
|
MD5 | a3cdb55ca83dd48e6c69874f1e8f1d6f |
|
BLAKE2b-256 | 5da88c8e503633c723b45d0407aa823eff6ad58989409c27299ad1782bf598ed |
Hashes for tangy-0.4.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e273c743a986dd3c3b64b463ca01d3887fb211620d3b32df387798d8cec33438 |
|
MD5 | 4c7be84a75bf0871ec4b614f890e1c84 |
|
BLAKE2b-256 | dd051350e3cc0f75b7bb25d6f7aac4a5842e6e992064c6316c88dd5ba4abb57e |