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
Hashes for tangy-0.8.0-cp312-cp312-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2edbf50ca8accd43888af2e1e9964da922af793e17672e1b6c46f3db9a41b544 |
|
MD5 | 029adf0700ec44caa992efd1bf966cad |
|
BLAKE2b-256 | aaad471c96ac327c134063df273dac92a4115ecc4e59a794a04a2ece54ab4767 |
Hashes for tangy-0.8.0-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e519df15fdc3d8bbc43e084ea4ea79233a6c2eb916a77d768ecc7025fb9f9cff |
|
MD5 | 2bbd2a35d9df2b76046c8f7483501890 |
|
BLAKE2b-256 | 5c91db2c053a7bc574d9734b6895b273a87af0eda05dcb1f80319350b1e60f49 |
Hashes for tangy-0.8.0-cp311-cp311-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 66168f6da133b5c7490ebe2d5898d3e7ef21206c84ad5e8a8432d4d56bc67264 |
|
MD5 | b9bb37609a7d9231df6b2df41579db26 |
|
BLAKE2b-256 | fa98696b28e06eacee2a09de28b04c7af29a02331c90c0e60c4578b096f1fe92 |
Hashes for tangy-0.8.0-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e99deac0305fec21d70d1522eb09191c3a6b3aa1ac3b00d1fdcec51916239a4 |
|
MD5 | 0d7bf5d71d1412f9db7e3ec25b5419bd |
|
BLAKE2b-256 | dbc6c6402bccc648207809d38d07b5e855e1864cabc446d1590e1e46884fcc51 |
Hashes for tangy-0.8.0-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5bbd1d6f0d3f90d0551023cdf8e026a7a02ecfec7666f8cff9c313305cf4b3f0 |
|
MD5 | bedfc4a0f272c07c6dec422cc99cf69c |
|
BLAKE2b-256 | 7d8be732449f8bc879992a92a2796f03fabef2787a1a81f12bd2324504972506 |
Hashes for tangy-0.8.0-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5cceb62e9ee4d374a94767266c623036b0dfaa8489bae4f5afd74e1589c30307 |
|
MD5 | 151d3fd62792ca0c3bbfb89dd997d03d |
|
BLAKE2b-256 | e031bf5754726577cca606a6f6a5fa786e64b3b34fc3e4c6e77a5ab385762af8 |
Hashes for tangy-0.8.0-cp310-cp310-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 79d77835fa29513153103989eea08b4af40a208d3356718e42f47a4ee803afe4 |
|
MD5 | 40d559b6ad262aa7ad60f6e2ca1b2fee |
|
BLAKE2b-256 | f7b8cc06312e08e9559f5696809715882a9a6d28ef482ea430c4f071b3d0dbfd |
Hashes for tangy-0.8.0-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 63f296d48f210f29b848611beddf0680a062632d9bf937926769489bcaf6d5e2 |
|
MD5 | f5e3b1ae43e13a767ad79ae2ddb78889 |
|
BLAKE2b-256 | 518b60f6afa87615e9dc0973c58567cbbf8cf992c989cd7b4ec9374d44169901 |
Hashes for tangy-0.8.0-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ca555a1905084fbceaf4f35a0a0245dc624fe4b3deb9f55fa5dc7c7afa6454e1 |
|
MD5 | 27accab3a86e4e6ec9ef93ef7ddca753 |
|
BLAKE2b-256 | ae8f892ed7f44705d72936ab73188aaf5a5742ec92f1df47ff92fccdc58ad860 |
Hashes for tangy-0.8.0-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 658c8d99b64e08fcea77094c22bbe7d42c615b2392d3de123dd77c81da61ec2e |
|
MD5 | ebc3de739d1d8f51b707a64488edba6c |
|
BLAKE2b-256 | 05b4e7a1fda3fcf7a5a51bbf22d706f60ace3448c6af616ef0d3d3c1ab20a36b |
Hashes for tangy-0.8.0-cp39-cp39-win_amd64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1004bfacaef93de6802b97d1934eca8d7c57c95186ac53f0303e85e79bab46d |
|
MD5 | a09baea3f69a79e1d90fa832624e4448 |
|
BLAKE2b-256 | f605a717fe6d5a3199ea11a8db34ea9fa01011c20938ceae2ea6cb9b4047ea92 |
Hashes for tangy-0.8.0-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 972f318187e9ffa66129ce742ac67a86dc908a443c526f25d88ad14543ebbb99 |
|
MD5 | b80829ded549a86f5087858c91a4f962 |
|
BLAKE2b-256 | b45bd1ef266cca50cab3750eac75a3f8c13e9b2bea732a08b1ee8b9fcb8c3e55 |
Hashes for tangy-0.8.0-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d08a874f701717709e09aa71b15ac09b519a8aa5448553bc4386dea81b4e4e8e |
|
MD5 | 09060be4766bb3e5ef578e1d41de321a |
|
BLAKE2b-256 | 5cbf5558d44c65a600520847035148f32dec0c366af55e9fdd8e430538a4ccbf |
Hashes for tangy-0.8.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01cff6eccb9b766b3ce5368fc2890c58cd4e57309dcabf59cc548624bbaff9d9 |
|
MD5 | 932f6a19d0789d10bb592c4c132fbc9d |
|
BLAKE2b-256 | e8f9037984a6b352c480a2842ee59613ea540f310707e4a014b1e659cca8f3a9 |