Processing Pipelines#
BatchProcessingPipeline#
This Processing Pipeline accumulates individual data events into fixed-size batches before passing them downstream. Once a full batch has been collected, it is yielded as a single dictionary of stacked numpy arrays. Any remaining events that do not fill a complete batch at the end of the data stream are yielded as a partial batch.
Configuration Parameters for BatchProcessingPipeline#
batch_size(int): The number of events to accumulate before yielding a batch. Example:10
PeaknetPreprocessingPipeline#
This Processing Pipeline prepares detector image data for inference with the PeakNet peak-finding model. It applies the following steps in order:
Padding: each individual detector image is zero-padded to a uniform target size before being added to the batch.
Batching: padded images are accumulated into fixed-size batches of
batch_sizeevents.Channel dimension: after batching, a channel dimension is optionally inserted into the image arrays, converting them from shape
(B, H, W)to(B, C, H, W).
Non-image data (timestamps, scalars, etc.) passes through all stages unchanged.
Configuration Parameters for PeaknetPreprocessingPipeline#
batch_size(int): The number of events to accumulate before yielding a batch. Example:8target_height(int): The target height in pixels to which each detector image is padded before batching. Images that are already at least this tall are not padded along the height axis. Example:1024target_width(int): The target width in pixels to which each detector image is padded before batching. Images that are already at least this wide are not padded along the width axis. Example:1024pad_style(str): This parameter is optional. It controls how the padding is distributed around the image. Accepted values are:center: padding is distributed as equally as possible on both sides of each axis (top/bottom and left/right).bottom-right: all padding is added to the bottom and right edges of the image, leaving the top-left corner of the original image aligned with the top-left corner of the padded output.
The default value of this parameter is
center. Example:bottom-rightadd_channel_dim(bool): This parameter is optional. Whentrue, a channel dimension is inserted into batched image arrays after batching, transforming their shape from(B, H, W)to(B, C, H, W). The default value of this parameter istrue. Example:falsenum_channels(int): This parameter is optional. It specifies the number of channelsCto produce whenadd_channel_dimistrue. If greater than 1, the image data is repeated along the new channel axis. This parameter is ignored whenadd_channel_dimisfalse. The default value of this parameter is1. Example:3