Skip to content

Lecroy

LecroyPacket = TypeAdapter(LecroyPrepare | LecroySeqStart | LecroyEnd | LecroySeqEnd | LecroyData | LecroyParsed) module-attribute

Union type for Lecroy packets

LecroyData

Bases: LecroyBase

Each "traces" message has 3 zmq parts: metadata (json), waveforms (np.array), timestamps (list)

Example
LecroyData(
    htype='traces',
    ch: 2,
    ts: 1740563614.969933,
    frame: 0,
    shape: [1, 8002],
    horiz_offset: -1.0000505879544622e-07,
    horiz_interval: 1.25000001668929e-11,
    dtype: "float64"
    )
Source code in dranspose/data/lecroy.py
class LecroyData(LecroyBase):
    # len(parts) parts[0]
    # 3 b'{"htype": "traces", "ch": 2, "ts": 1740563614.969933, "frame": 0, "shape": [1, 8002], "horiz_offset": -1.0000505879544622e-07, "horiz_interval": 1.25000001668929e-11, "dtype": "float64"}'
    """
    Each "traces" message has 3 zmq parts:
    metadata (json), waveforms (np.array), timestamps (list)

    Example:
        ``` py
        LecroyData(
            htype='traces',
            ch: 2,
            ts: 1740563614.969933,
            frame: 0,
            shape: [1, 8002],
            horiz_offset: -1.0000505879544622e-07,
            horiz_interval: 1.25000001668929e-11,
            dtype: "float64"
            )
        ```
    """

    htype: Literal["traces"]
    ch: int
    ts: float
    frame: int
    shape: List[int]
    dtype: str
    horiz_offset: float
    horiz_interval: float

LecroyEnd

Bases: LecroyBase

Example
LecroyEnd(
    htype='msg'
    what=3,
    frame=66,
    frames=66,
)
Source code in dranspose/data/lecroy.py
class LecroyEnd(LecroyBase):
    # len(parts) parts[0]
    """
    Example:
        ``` py
        LecroyEnd(
            htype='msg'
            what=3,
            frame=66,
            frames=66,
        )
        ```
    """

    frames: int
    what: Literal[WhatEnum.STOP]  # STOP = 3

LecroyPrepare

Bases: LecroyBase

Example
LecroyStart(
    htype='msg'
    what=0,
    frame=0,
)
Source code in dranspose/data/lecroy.py
class LecroyPrepare(LecroyBase):
    # len(parts) parts[0]
    # 1 b'{"htype": "msg", "what": 0, "frame": 0}'
    """
    Example:
        ``` py
        LecroyStart(
            htype='msg'
            what=0,
            frame=0,
        )
        ```
    """

    htype: Literal["msg"]
    what: Literal[WhatEnum.PREPARE]  # PREPARE = 0

LecroySeqEnd

Bases: LecroyBase

Example
LecroySeqEnd(
    htype='msg'
    what=2,
    frame=2,
)
Source code in dranspose/data/lecroy.py
class LecroySeqEnd(LecroyBase):
    # len(parts) parts[0]
    # 1 b'{"htype": "msg", "what": 2, "frame": 2}'
    """
    Example:
        ``` py
        LecroySeqEnd(
            htype='msg'
            what=2,
            frame=2,
        )
        ```
    """

    htype: Literal["msg"]
    what: Literal[WhatEnum.SEQEND]  # SEQEND = 2

LecroySeqStart

Bases: LecroyBase

Example
LecroyStart(
    htype='msg'
    what=1,
    frame=0,
    ntriggers=-1
    seqno=0
    channels=[2, 4]
)
Source code in dranspose/data/lecroy.py
class LecroySeqStart(LecroyBase):
    # len(parts) parts[0]
    # 1 b'{"htype": "msg", "what": 1, "frame": 0, "ntriggers": -1, "seqno": 0, "channels": [2, 4]}'
    """
    Example:
        ``` py
        LecroyStart(
            htype='msg'
            what=1,
            frame=0,
            ntriggers=-1
            seqno=0
            channels=[2, 4]
        )
        ```
    """

    htype: Literal["msg"]
    what: Literal[WhatEnum.START]  # START = 1
    ntriggers: int
    seqno: int
    channels: List[int]