Skip to main content

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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

tangy-0.9.2-cp312-cp312-win_amd64.whl (403.2 kB view details)

Uploaded CPython 3.12Windows x86-64

tangy-0.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.12manylinux: glibc 2.17+ x86-64

tangy-0.9.2-cp311-cp311-win_amd64.whl (410.1 kB view details)

Uploaded CPython 3.11Windows x86-64

tangy-0.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.7 MB view details)

Uploaded CPython 3.11manylinux: glibc 2.17+ x86-64

tangy-0.9.2-cp311-cp311-macosx_11_0_arm64.whl (305.8 kB view details)

Uploaded CPython 3.11macOS 11.0+ ARM64

tangy-0.9.2-cp311-cp311-macosx_10_9_x86_64.whl (334.5 kB view details)

Uploaded CPython 3.11macOS 10.9+ x86-64

tangy-0.9.2-cp310-cp310-win_amd64.whl (408.7 kB view details)

Uploaded CPython 3.10Windows x86-64

tangy-0.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.5 MB view details)

Uploaded CPython 3.10manylinux: glibc 2.17+ x86-64

tangy-0.9.2-cp310-cp310-macosx_11_0_arm64.whl (304.5 kB view details)

Uploaded CPython 3.10macOS 11.0+ ARM64

tangy-0.9.2-cp310-cp310-macosx_10_9_x86_64.whl (333.6 kB view details)

Uploaded CPython 3.10macOS 10.9+ x86-64

tangy-0.9.2-cp39-cp39-win_amd64.whl (409.3 kB view details)

Uploaded CPython 3.9Windows x86-64

tangy-0.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (2.6 MB view details)

Uploaded CPython 3.9manylinux: glibc 2.17+ x86-64

tangy-0.9.2-cp39-cp39-macosx_11_0_arm64.whl (304.2 kB view details)

Uploaded CPython 3.9macOS 11.0+ ARM64

tangy-0.9.2-cp39-cp39-macosx_10_9_x86_64.whl (333.5 kB view details)

Uploaded CPython 3.9macOS 10.9+ x86-64

File details

Details for the file tangy-0.9.2-cp312-cp312-win_amd64.whl.

File metadata

  • Download URL: tangy-0.9.2-cp312-cp312-win_amd64.whl
  • Upload date:
  • Size: 403.2 kB
  • Tags: CPython 3.12, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tangy-0.9.2-cp312-cp312-win_amd64.whl
Algorithm Hash digest
SHA256 814125b529684a0315e405d82cbaad727687ac89ca08a4dffe9a6065431ea7a8
MD5 2493ebbfa415f12e04d45f85fe1633df
BLAKE2b-256 59c0cf02e1d22d19656ef83384883f3228d31a472a299e40e8655a056b4f8606

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp312-cp312-win_amd64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 76a9db427ede5ac762f35e0c1f56ad27f6b725f5353a1f724dd3fa3d6e6ebafe
MD5 a0338b25e3131ab27d2e25630741b7fd
BLAKE2b-256 b9ad69aa12e8f0fb9b0a1874fdf3f06285f45476c7dcd53ccbf16aaa99aa75d1

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp311-cp311-win_amd64.whl.

File metadata

  • Download URL: tangy-0.9.2-cp311-cp311-win_amd64.whl
  • Upload date:
  • Size: 410.1 kB
  • Tags: CPython 3.11, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tangy-0.9.2-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 dadcde24d615b1375f93427feb71468a03bddefb4fe608fb5db0a37085d338f3
MD5 64c1e6642ddcd28cbcd5064bc483b5b3
BLAKE2b-256 71261332c8fcb8d37cee41a4bd476fb3efb559170070104543b3e6d4f14cb2cf

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp311-cp311-win_amd64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 d4bf0daa01d1596e60bb015c699a314bfd733cd0d2077555ac520be3331e773c
MD5 56b61cc580d23c9b2c532068ac7f5126
BLAKE2b-256 b66bb6d207b4542a0ec1ce595e5c539ba51c664dede1941822b8fd54be4524e0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp311-cp311-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp311-cp311-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 5e22a6fb2429f664e74a010bee9db06f1cc5a612bf18795bb4de50f8be70a769
MD5 9547ecb6c63b7779b3828ac0ca50df08
BLAKE2b-256 063abb638a644789245746f2a4209c84bc57851ece8c6e3a482219b95e89841d

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp311-cp311-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp311-cp311-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp311-cp311-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 f2c92ec02e4d18129d350ab8a92726ef6fda362c9fd03861ef51014d4ac167c2
MD5 8e7c51005be6d3c09661aac36638dc3d
BLAKE2b-256 92344ba32db4a71bc9c5f02c545358cfaa8ae795ac333c4d17261e73c876d4e7

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp311-cp311-macosx_10_9_x86_64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp310-cp310-win_amd64.whl.

File metadata

  • Download URL: tangy-0.9.2-cp310-cp310-win_amd64.whl
  • Upload date:
  • Size: 408.7 kB
  • Tags: CPython 3.10, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tangy-0.9.2-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 2908309017163e54f4611e4e6413df02ba491f5f425efce7a525aeb0726b5035
MD5 12d03c870288180c0be866432ff17f3e
BLAKE2b-256 ce5f50b10fc4746205881a2a1ff28a0aa8da0005b80839733dc1561d64160371

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp310-cp310-win_amd64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b3a646ecaa0e91e9c07185ff8df4ba72bf29b1ca5bd07be3328aa2324f0ef2e7
MD5 db91f1399b975e6d2c7a2b98d350ed02
BLAKE2b-256 a69c724edf1ed57fb458defcbd821eb92242f9dafb4f8149063f92bf8d3b2898

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp310-cp310-macosx_11_0_arm64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp310-cp310-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 92db4fe1a1c80139a5b3808e4ca35e67af3f3d13b9367325337c6b813623cc88
MD5 da22f243d2688b235499ac319b18eb92
BLAKE2b-256 fc1cbbfdeb1dfacc6c8c21e24cd4c3940f5a5c55e0add496c643eddb94b80fa4

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp310-cp310-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp310-cp310-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp310-cp310-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 135d54e2b144bf11674073359b88a4dbc01adbe4de6616388f257c08ca928e12
MD5 af7f0844b60e8806704c2367761071dd
BLAKE2b-256 afee6b8882c441b17c04a5cc7415efd03046393e5792fedafb5c3f54c5a52343

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp310-cp310-macosx_10_9_x86_64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp39-cp39-win_amd64.whl.

File metadata

  • Download URL: tangy-0.9.2-cp39-cp39-win_amd64.whl
  • Upload date:
  • Size: 409.3 kB
  • Tags: CPython 3.9, Windows x86-64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tangy-0.9.2-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 1dcc7778323390347f38e59a8ea97aa9f713f67a0b1d45a34a2553caa3b8b58a
MD5 27c7594ddaf8c2d16566a735e9c4b488
BLAKE2b-256 06bf3f5cf97e9639255d3a28867395043bd628c2ceb5f2d83f55573fd57db1ff

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp39-cp39-win_amd64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 ed89c3083b8ce2f4741440ebd22ac43a4d70b12c11b936bbde50788d123916fd
MD5 c7c14ebfa6a10af29863512017e9b0c6
BLAKE2b-256 36d0e28e8e43de707fecdcbaf13780c2c404466174827fafdf44f253d19afc04

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp39-cp39-macosx_11_0_arm64.whl.

File metadata

  • Download URL: tangy-0.9.2-cp39-cp39-macosx_11_0_arm64.whl
  • Upload date:
  • Size: 304.2 kB
  • Tags: CPython 3.9, macOS 11.0+ ARM64
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for tangy-0.9.2-cp39-cp39-macosx_11_0_arm64.whl
Algorithm Hash digest
SHA256 b1d7231861d7fb89ba8f14f7d60fe3e5b45358931c5666be6a7688dc93661f6c
MD5 1d74076bd582a9fd365448635d7c8d7e
BLAKE2b-256 f1500babfcac2b5cdaf44f0ab54e3a9f69ac0f1e7fef89331b861e7a39a23fa0

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp39-cp39-macosx_11_0_arm64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file tangy-0.9.2-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

File hashes

Hashes for tangy-0.9.2-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 facb476cca97aa14b570e26c59abdfe8f4b3614cef23a5d54fbd0aa27f297241
MD5 73021bf117d2468a65f0fa3bc308c595
BLAKE2b-256 0e39c3b535391155e7685dd674a08cfd592159bd1f7b57ac74d20d337e632f44

See more details on using hashes here.

Provenance

The following attestation bundles were made for tangy-0.9.2-cp39-cp39-macosx_10_9_x86_64.whl:

Publisher: build_wheels.yml on Peter-Barrow/tangy

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page