We have
CoincidenceEvent: !record
fields:
# identifiers of the two detecting elements (see doc for DetectionBin)
detectionBins: DetectionBin*2
This generates in types.py
class CoincidenceEvent:
"""All information about a coincidence event specified as indices (i.e. discretized)."""
detection_bins: list[DetectionBin]
def __init__(self, *,
detection_bins: typing.Optional[list[DetectionBin]] = None,
tof_idx: yardl.UInt32 = 0,
):
self.detection_bins = detection_bins if detection_bins is not None else [DetectionBin() for _ in range(2)]
In my python code, I actually used a tuple as opposed to a list (I find that more intuitive for a list of 2 items), and everything works fine. However, pyright complains of course.