FrbSifterEvents

class pirate_frb.rpc.FrbSifterEvents(beam_ids, fpga_timestamps, dms, snrs, rfi_probs, widths_ms, subband_freqs_lo_MHz, subband_freqs_hi_MHz, chunk_fpga_start, chunk_fpga_end)

Helper class, representing FRB events to send to the sifter.

Returned by FrbGrouper.create_events(), and passed to FrbSifterClient.send_events().

Attributes (numpy arrays, shapes must be equal):

  • beam_ids (int32) – X-engine beam id of each event

  • fpga_timestamps (int64) – absolute FPGA-counter timestamp of each event

  • dms (float32) – dispersion measure

  • snrs (float32) – signal-to-noise ratio

  • rfi_probs (float32) – RFI probability

  • widths_ms (float32) – intrinsic pulse width in milliseconds

  • subband_freqs_lo_MHz (float32) – low edge of the event’s frequency subband (MHz)

  • subband_freqs_hi_MHz (float32) – high edge of the event’s frequency subband (MHz)

Other attributes:

  • chunk_fpga_start (int) – FPGA count at the start of the time chunk.

  • chunk_fpga_end (int) – FPGA count at the end of the time chunk (= start of the next chunk).

  • shape (tuple) – common shape of the per-event arrays.

to_proto()

Return a list of frb_sifter_pb2.FrbEvent, one per event (row-major order).

Arrays of any shape are flattened; .tolist() yields the native Python scalars required by protobuf.