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 hostAfter 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
| Method | Description |
|---|---|
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
| Parameter | Type | Description |
|---|---|---|
start_channel | int | Start input channel (0–7) |
start_slope | bool | Start edge: True = rising |
stop_channel | int | Stop input channel (0–7) |
stop_slope | bool | Stop edge: True = rising |
window_ps | int | Coincidence window in picoseconds |
bin_size | int | Histogram bin width in picoseconds |
correlator_type | int | Correlator mode (0 = standard TCSPC) |
is_correlating | bool | Start / 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
| Parameter | Type | Description |
|---|---|---|
channel | int | Channel index 0–7 |
threshold_v | float | Discriminator threshold in volts |
nim_nttl | bool | Input standard: True = NIM, False = TTL |
rising_edge | bool | Trigger on rising edge |
falling_edge | bool | Trigger on falling edge |
offset_ps | int | Per-channel time offset in picoseconds |
dead_time_ps | int | Minimum dead time in picoseconds |
prolonged_dead_time | bool | Extend dead time to suppress afterpulsing |
static_calibration | bool | Disable 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: