Amsterdam Scientific Instruments CheeTah TPX3

New in version 0.2: This detector is experimentally supported for now, and needs matching Serval and Accos versions running.

At this time, only the passive mode is implemented, which relies on configuring the detector and acquisition from the outside. Adding active mode support is planned for the future.

Usage examples

from libertem.viz.bqp import BQLive2DPlot
from libertem_live.api import LiveContext
from libertem.udf.sum import SumUDF

ctx = LiveContext(plot_class=BQLive2DPlot)

with ctx.make_connection('asi_tpx3').open(
    data_host="127.0.0.1",
    data_port=TPX3_DATA_PORT,
    chunks_per_stack=16,
    bytes_per_chunk=1500000,
    buffer_size=2048,  # MiB
) as conn:

    # If the timeout is hit, pending_aq is None.
    # In a real situation, make sure to test for this,
    # for example by looping until a pending acquisition
    pending_aq = conn.wait_for_acquisition(timeout=10.0)

    # prepare for acquisition
    aq = ctx.make_acquisition(
        conn=conn,
        frames_per_partition=4096,
        pending_aq=pending_aq,
    )

    # run one or more UDFs on the live data stream:
    ctx.run_udf(dataset=aq, udf=SumUDF())