snAPI

Fast, Intuitive, and Versatile Python Wrapper

Free, powerful Python wrapper for seamless device control, data acquisition and in-depth analysis.
snAPI Python interface for controlling PicoQuant Time Tagging & TCSPC electronics.

Key Benefits

Combine Python’s flexibility with C++ processing speed
Build custom analysis pipelines tailored to your research
Handle massive data streams on-the-fly
Automate experiments through simple Python scripting
Run the same code on Windows and Linux

Control and Visualize Complex Photon Experiments

High-Performance Python Control for Time Tagging and TCSPC

Snappy New API (short snAPI) is a free, powerful Python API that enables seamless communication and configuration with PicoQuant’s time tagging & TCSPC electronics. Built on a high-performance C++ backend, it bridges the gap between the speed of PicoQuant’s hardware and the ease and flexibility of Python. With its high-level interface to the underlying C++ library, snAPI unlocks the full capabilities of PicoQuant’s time tagging & TCSPC devices, supporting smooth data processing, efficient handling of large photon counts, and real-time analysis. Users can access raw or unfolded data directly from their device or conveniently read PTU files for offline exploration, opening new possibilities for deep scientific insight. By leveraging Python, researchers and developers can build their own algorithms, implement complex calculations, and create tailored data processing pipelines without dealing with core-level device handling.

It is fully compatible with all PicoQuant time tagging and TCSPC units.

 

Example of a network topology. Green bubbles = MultiHarp 150 or MultiHarp 160 event timers, blue bubbles = White Rabbit switches, the arrows are pointing from master to slave.

Precise Multi-Device Synchronization with White Rabbit

The White Rabbit interface enables precise synchronization and timestamping between two PicoQuant time taggers, providing sub-nanosecond accuracy across multiple channels and experiments. It prevents temporal drift by distributing a stable reference clock over fiber and is essential for demanding applications such as quantum communication. With snAPI, White Rabbit can be integrated easily, allowing coordinated measurement start times and reliable multi-device data acquisition with MultiHarp instruments.

Overview of the measurement classes and real-time manipulators available in UniHarp and accessible via snAPI. Measurement classes define the acquisition workflow for photon data (e.g., Histogram, Time Trace, Correlation), while manipulators process photon streams during acquisition, enabling operations such as coincidence detection, channel merging, timestamp delays, or heralded event filtering. Together, they form a flexible framework for designing complex time-resolved photon experiments.

Advanced Measurement Classes and Manipulators of snAPI

snAPI provides a set of high-level measurement classes for efficient data acquisition in time tagging and TCSPC experiments. Histogram measurements analyze temporal kinetics and excited-state dynamics, while Time Trace records intensity variations over time to study processes such as blinking or signal stability. Correlation analysis supports auto- and cross-correlation workflows, including and FCS measurements for investigating photon statistics and dynamic interactions. For advanced use cases, Unfold provides direct access to photon timing information, and the RAW class exposes the complete time-tag stream for fully customized analysis pipelines.

A key strength of snAPI is the seamless integration of these measurement classes with real-time manipulators. Manipulators can filter, transform, or combine photon events during acquisition, enabling workflows such as coincidence detection, heralded measurements, timestamp alignment, or channel merging. Together, measurement classes and manipulators form a flexible processing pipeline that allows users to design complex photon experiments while maintaining efficient and reproducible data acquisition.

snAPI enables direct control and data analysis of PicoQuant TCSPC and time tagging and TCSPC devices from Python on Linux systems.

snAPI for Linux

Originally developed for Windows, snAPI now provides seamless control of PicoQuant’s time tagging & TCSPC devices from Python on both Windows and Linux systems. Built as a high-level wrapper around PicoQuant’s core-level libraries, it combines the ease and flexibility of Python with the performance of a C++ backend. The interface supports x86-64 platforms and allows researchers to run or adapt existing scripts across operating systems with minimal effort.

 

Key Features

  • Configure and control time taggers with simple Python scripts
  • Analyze time-tagged photon streams and TCSPC histograms
  • Tools for correlation, coincidence counting, time gating, filtering, and heralded photon detection
  • Convenient reading and writing of native PicoQuant time tag files
  • Integrated visualization with Matplotlib
  • Free and open-source, actively maintained and available on GitHub

Measurement Classes

Measurement classes define how the time-tagged photon event stream is converted into measurable quantities. Each event in the stream contains at least a timestamp and a channel identifier, representing when and where a photon was detected. A measurement class processes this stream using a specific algorithm to generate a particular representation of the data, such as count rates, time-delay distributions, or photon correlations. Different measurement classes therefore provide different perspectives on the same underlying photon detection events.

Schematic illustration of time trace photon count rate binning as implemented in UniHarp software and accessible through the snAPI interface for time-resolved photon counting experiments.

Time Trace

The Time Trace measurement class calculates the photon count rate as a function of time. Photon detection events are grouped into consecutive time bins of fixed duration. The number of photons detected within each bin is counted, producing a time-dependent trace of photon intensity.

This measurement is typically used to monitor temporal fluctuations in photon emission, such as blinking behavior of single emitters, fluorescence intensity changes, or detector stability over time.

Schematic diagram of TCSPC histogramming of photon arrival times relative to a sync signal, as implemented in UniHarp software and accessible via the snAPI programming interface.

Histogram

The Histogram measurement class builds a distribution of photon arrival times relative to a reference signal, typically the sync signal of a pulsed excitation source. Each photon event is assigned to a time bin based on its arrival delay after the sync pulse.

The resulting histogram represents the temporal distribution of photon arrivals, commonly used in time-correlated single photon counting (TCSPC) experiments such as time-resolved photolumindescence (TRPL). It provides information such as fluorescence lifetimes or decay dynamics.

Schematic illustration of photon correlation analysis between detection channels as implemented in UniHarp software and accessible through the snAPI interface for g² and FCS measurements.

Correlation

The Correlation measurement class computes the temporal correlation between photon detection events. It evaluates the time differences between photons detected on one or more channels and accumulates them into correlation bins.
Depending on the analysis type, different algorithms are used. For example, g² correlations are typically computed using bins of constant width, whereas fluorescence correlation spectroscopy (FCS) calculations often employ a multi-tau algorithm, where bin widths increase pseudo-logarithmically to efficiently cover a wide range of time scales.
The resulting correlation function describes how likely photon events are to occur at a certain delay relative to one another. This allows the investigation of photon statistics and dynamic processes in the sample. Typical applications include photon antibunching measurements, FCS, and cross-correlation between detection channels.

Icons illustrating Unfold and Raw measurement classes in UniHarp and snAPI

Unfold & Raw

The Unfold and Raw measurement classes provide direct access to time-tagged photon events. Unfold outputs individual detection events with their timestamps and channel information in a structured table format, enabling detailed inspection and custom analysis of photon sequences. Raw mode records the unprocessed TTTR data stream directly to a PTU file without intermediate processing or visualization, ensuring maximum recording performance and efficient storage for large datasets intended for offline analysis.

Manipulators

Manipulators operate directly on the photon event stream before it is processed by a measurement class. Each photon event consists of a timestamp and a channel identifier, and manipulators modify this stream by filtering, transforming, or generating new events based on temporal or logical conditions. Multiple manipulators can be combined sequentially to build complex processing pipelines. This allows users to implement experiment-specific logic such as coincidence detection, temporal filtering, channel merging, or timing corrections before the data is analyzed by a measurement class.

Schematic illustration of photon coincidence detection across two channels within a defined time window as implemented in UniHarp software and accessible through the snAPI interface.

Coincidence

The Coincidence manipulator identifies photon events that occur within a defined time window across multiple input channels. When events from the selected channels are detected within this temporal window, they are considered a coincidence and can be written to a dedicated software channel or replace the original events. The manipulator also allows different coincidence counting modes and timestamp definitions, enabling flexible control over how coincident events are generated and represented in the data stream.
A common application is the detection of simultaneous photon events in multi-detector experiments. For example, in a two-detector photon correlation measurement, the coincidence manipulator can identify photon pairs detected within a few nanoseconds, allowing further analysis of photon statistics or quantum correlations.

Schematic diagram of heralded photon event filtering using a gate window triggered by a herald signal, as implemented in UniHarp software and accessible via the snAPI interface.

Herald

The Herald manipulator filters photon events based on the detection of a herald photon on a specific input channel. For each photon event on selected gate channels, the manipulator opens a time gate after a configurable delay and checks whether a herald photon occurs within this gate interval. Depending on the configuration, events associated with herald detections can either be accepted or rejected, and the resulting events may be written to new software channels or overwrite the original ones.
This mechanism is commonly used in heralded photon experiments such as spontaneous parametric down conversion (SPDC), where the detection of one photon indicates the presence of another correlated photon. By filtering events based on the herald signal, the manipulator can significantly reduce background events and isolate the photon pairs of interest.

Schematic illustration of photon event merging from multiple input channels into a single software channel as implemented in UniHarp and accessible via the snAPI interface.

Merge

The Merge manipulator combines photon events from multiple input channels into a single software channel. When an event from one of the selected channels is detected, its channel identifier is replaced with the new merged channel while the timestamp remains unchanged. Events from channels that are not part of the configuration pass through the manipulator unaffected.
This functionality is useful when signals from several detectors should be treated as a single logical source. For example, events from multiple detectors monitoring the same optical path can be merged into one channel to simplify subsequent coincidence or correlation analysis.

Schematic diagram of photon timestamp delay adjustment on a detection channel as implemented in UniHarp and accessible via the snAPI interface.

Delay

The Delay manipulator shifts the timestamps of photon events from a selected channel by a fixed time offset. The configured delay is added to the timestamp of each event on that channel, while all other channels pass through unchanged. This allows precise correction of timing differences introduced by detectors, cables, or electronic components in the measurement setup.
An example application is the temporal alignment of signals from multiple detectors. If one detector introduces an additional delay due to longer cable paths or internal processing, the delay manipulator can compensate for this offset to ensure accurate coincidence or correlation measurements.

Schematic diagram of the Sub-Stream manipulator in UniHarp and snAPI, showing filtering of photon events within a defined time interval between start and stop time.

Sub-Stream

The Sub-Stream manipulator filters the photon event stream based on a defined time interval. Only events whose timestamps fall between a specified start and stop time are passed through the manipulator, while all other events are discarded. This filtering is applied to all channels simultaneously without modifying the original channel assignments.
This manipulator is useful when analyzing only a specific portion of a measurement. For instance, it can be used to isolate a region of interest within a long acquisition, such as a time window where a sample was actively excited or when a particular experimental condition was applied.

Relevant for Your Research​

Matching Applications & Methods​

Switcher A&M
Coincidence correlation showing photon antibunching of NV centers in nanodiamonds
Materials Science | Quantum Optics
Schematic illustration of quantum key distribution showing single photons exchanged between Alice and Bob while eavesdropping by Eve introduces detectable disturbances.
Quantum Optics
Expand Your System

Complete your setup

Combine compatible components to build a complete setup tailored to your experimental requirements and measurement workflows.

High-Resolution Multichannel Time Tagging & TCSPC Unit
Exceptional timing precision
Flexible trigger options
Upgradable channel configuration
High throughput via USB & external FPGA interface
Remote synchronization via White Rabbit
Smart on-board event filters
Universal Time-Tagging Data Acquisition Software
Run complex experiments faster with intuitive workflows
Gain immediate experimental feedback via real-time visualization
Set up complex measurements without scripting
Compare live results directly with previously recorded data
Clean measurement data using built-in filtering tools
High-Throughput Multichannel Time Tagging & TCSPC Unit
Largest channel scalability
High throughput via USB & external FPGA interface
Remote synchronization via White Rabbit
Smart on-board event filters
Learn, Connect, and Exchange

Meet PicoQuant at Scientific Events

Info Request

Feedback snAPI Software Usage

You have downloaded and tested our software and something did not work out or you are missing something?

* Required

Your Feedback*

Explore Similar Products

Related Products

Explore complementary and alternative products within this category to compare specifications, performance, and configurations for your application.

Universal Time-Tagging Data Acquisition Software
Run complex experiments faster with intuitive workflows
Gain immediate experimental feedback via real-time visualization
Set up complex measurements without scripting
Compare live results directly with previously recorded data
Clean measurement data using built-in filtering tools
Quantum Correlation Analysis Software
Faster insights through real-time analysis
Reproducible, publication-ready quantum data
Reliable coincidence logic without manual coding
Streamlined workflows across all detector setups
Consistent results independent of experiment complexity
Spectroscopy Control and Analysis Software
Faster, more reliable fluorescence workflows
Higher accuracy in decay analysis
Consistent results across complex experiments
Automated routines reduce manual effort
Flexible control for diverse applications
Seamless integration with PicoQuant’s spectrometer systems

Info Request

Contact us

Please fill out the form below to request more information about our products and services. You may also use it to ask for pricing, availability, technical specifications, or any other details relevant to your inquiry. Our team will be happy to review your request and get in touch with you. If additional information is needed to process your inquiry, we will let you know.

* Required

Contact us

Please fill out the form below to request more information and prices about our product. Our team will be happy to review your request and get in touch with you. If additional information is needed to process your inquiry, we will let you know.

* Required