Photonscore. Contact
Home / Documentation / LINTag Python Interface
Software Documentation

LINTag Python Interface

LINTag Python Interface

The LINTag class provides remote control of the LINTag time-tagging module over gRPC. It communicates with the LINTag Capture desktop application, which must be running and accessible on the network.

Connection

import photonscore as pe

tag = pe.LINTag()                       # default: localhost:5556
tag = pe.LINTag("192.168.1.10:5556")   # remote host

After construction all sub-handles (correlator, status, settings, file_writer) are ready to use.

Quick Start

import photonscore as pe
import matplotlib.pyplot as plt

tag = pe.LINTag("localhost:5556")

# Configure channel 0: 100 mV threshold, NIM input, rising edge
tag.settings.set_channel(
    channel=0,
    threshold_v=0.1,
    nim_nttl=True,
    rising_edge=True,
    falling_edge=False,
    offset_ps=0,
    dead_time_ps=0,
    prolonged_dead_time=False,
    static_calibration=False,
)

# Start a 1 µs coincidence window correlator on ch0→ch1
tag.correlator.set_correlator_settings(
    start_channel=0,
    start_slope=True,
    stop_channel=1,
    stop_slope=True,
    window_ps=1_000_000,  # 1 µs
    correlator_type=0,
    bin_size=1000,        # 1 ns bins
    is_correlating=True,
)

# Read back the histogram
bins, values = tag.correlator.get_histogram()
plt.stairs(values, bins)
plt.xlabel("Time (ps)")
plt.ylabel("Counts")
plt.show()

The Device Handle

Note

The reference for LINTag.LINTag.LINTag is generated from the Python docstrings and inserted here automatically. Do not write it out by hand.

options: show_root_heading: true heading_level: 3 members:

  • __init__

Correlator

Controls the on-board histogram / time-difference correlator.

Note

The reference for LINTag.LINTag.CorrelatorClass is generated from the Python docstrings and inserted here automatically. Do not write it out by hand.

options: heading_level: 3

MethodDescription
set_correlator_settings(…)Configure window, channels, bin size, and start/stop
get_correlator_settings()Read current correlator configuration
get_histogram()Return (bins, values) as numpy arrays
clear_histogram()Reset accumulation buffers

Channel Configuration Reference

ParameterTypeDescription
start_channelintStart input channel (0–7)
start_slopeboolStart edge: True = rising
stop_channelintStop input channel (0–7)
stop_slopeboolStop edge: True = rising
window_psintCoincidence window in picoseconds
bin_sizeintHistogram bin width in picoseconds
correlator_typeintCorrelator mode (0 = standard TCSPC)
is_correlatingboolStart / stop accumulation

Status

Read-only device telemetry and profile information.

Note

The reference for LINTag.LINTag.StatusClass is generated from the Python docstrings and inserted here automatically. Do not write it out by hand.

options: heading_level: 3

Settings

Configure per-channel parameters (threshold, polarity, dead time, …).

Note

The reference for LINTag.LINTag.SettingsClass is generated from the Python docstrings and inserted here automatically. Do not write it out by hand.

options: heading_level: 3

Channel Parameters Reference

ParameterTypeDescription
channelintChannel index 0–7
threshold_vfloatDiscriminator threshold in volts
nim_nttlboolInput standard: True = NIM, False = TTL
rising_edgeboolTrigger on rising edge
falling_edgeboolTrigger on falling edge
offset_psintPer-channel time offset in picoseconds
dead_time_psintMinimum dead time in picoseconds
prolonged_dead_timeboolExtend dead time to suppress afterpulsing
static_calibrationboolDisable auto-calibration for this channel

File Writer

Note

The reference for LINTag.LINTag.FileWriterClass is generated from the Python docstrings and inserted here automatically. Do not write it out by hand.

options: heading_level: 3

Examples

See the interactive tutorial notebook:

LINTag Notebook Tutorial