@@ -1509,14 +1509,39 @@ def pulse_mask(self, labelled=True, field=None):
15091509
15101510
15111511class XtdfPulses (PulsePattern ):
1512- def __init__ (self , xtdf_source , include_cells = True ,
1513- ppt_anchor : int | PulsePattern | None = None ,
1514- first_lit_cell = 0 ):
1512+ """An interface to pulses from XTDF sources.
1513+
1514+ The custom fast MHz detectors used at European XFEL send their data
1515+ via the XFEL Train Data Format (XTDF), which contains information
1516+ about the pulse pattern recorded by these detectors.
1517+
1518+ This component exposes this information via the pulse pattern
1519+ interface. As XTDF detectors generally enumerate pulses
1520+ independently, it also allows to correlate its pulse ID with those
1521+ obtained from other global sources, e.g. the machine information
1522+ from [XrayPulses][extra.components.Xraypulses].
1523+
1524+ Args:
1525+ detector (SourceData): Instrument source of an XTDF source.
1526+ ppt_anchor (int or PulsePattern, optional): Constant offset to
1527+ add to XTDF pulse IDs, or PulsePattern-based component to
1528+ correlate every train individually. No correlation is done
1529+ by default.
1530+ first_lit_cell (int, optional): Which cell coincides with the
1531+ first pulse from passed ppt_anchor, ignored unless a
1532+ PulsePattern component is passed.
1533+ include_cells (bool, optional): Whether to include cell IDs
1534+ in the pulse index generated by this component, True by
1535+ default.
1536+ """
1537+
1538+ def __init__ (self , xtdf_source , ppt_anchor = None , first_lit_cell = 0 ,
1539+ include_cells = True ):
15151540 super ().__init__ (xtdf_source , xtdf_source ['image.pulseId' ])
15161541
1517- self ._cell_key = xtdf_source ['image.cellId' ] if include_cells else None
15181542 self ._ppt_anchor = ppt_anchor
15191543 self ._first_lit_cell = first_lit_cell
1544+ self ._cell_key = xtdf_source ['image.cellId' ] if include_cells else None
15201545
15211546 def __repr__ (self ):
15221547 return "<{} using {}>" .format (type (self ).__name__ , self ._source .source )
0 commit comments