frbPostProcess¶
-
class frbPostProcess : public kotekan::Stage¶
Post-processing engine for data coming out of the CHIME/FRB kernel stack.
This engine gathers CHIME/FRB data from the 4 GPU streams in each CHIME node, packing it into CHIME/FRB L0-L1 packets, which are stored in the output buffer. Prior to packing, the (float) input values are scaled and offset to 8-bit unsigned ints (i.e., 0-255). The scaling is determined on a per-packet basis, using AVX2 instructions to calculate and apply those parameters.
This stage can also optionally produce a sum-of-all-beams “incoherent” beam, which will be stored in the 0th beam position in output packets.
Time samples with dropped packet are set to zero.
This stage depends on
AVX2intrinsics.- Buffers
in_buf_0Kotekan buffer feeding data from GPU0.Format: Array of
floatsMetadata:
chimeMetadata
in_buf_1Kotekan buffer feeding data from GPU1.Format: Array of
floatsMetadata:
chimeMetadata
in_buf_2Kotekan buffer feeding data from GPU2.Format: Array of
floatsMetadata:
chimeMetadata
in_buf_3Kotekan buffer feeding data from GPU3.Format: Array of
floatsMetadata:
chimeMetadata
out_bufKotekan buffer that will be populated with packetized data.Format: Array of
ucharsMetadata:
chimeMetadata
lost_samples_bufKoktekan buffer with drop packet info, where 1=droppedMetadata:
chimeMetadataFormat: Array of
uint8
- Metrics
kotekan_frb_masked_packets_totalCount of masked packets
- Author
Keith Vanderlinde, Cherry Ng
- Param num_gpus:
Int. Number of GPUs.
- Param samples_per_data_set:
Int. Number of baseband samples corresponding to each buffer.
- Param downsample_time:
Int. Number of time samples summed in the FRB kernels.
- Param factor_upchan:
Int. Total upchannelization in the FRB kernels.
- Param factor_upchan_out:
Int. Upchannelization that exits the FRB kernels, also number of freqs that will go into each output packet
- Param num_beams_per_frb_packet:
Int. Number of FRB beam in each output stream. (?) Should be 4?
- Param timesamples_per_frb_packet:
Int. Number of times that will go into each packet.
- Param incoherent_beam:
Bool (default=false). Form the incoherent beam or not. If true, will stuff incoherent beam in position 0.
- Param incoherent_truncate:
Float (default=1e10). To deal with inputs / times /freqs with anomalously high values, this limits values used prior to summing into the incoherent beam.
Public Functions
-
frbPostProcess(kotekan::Config &config_, const std::string &unique_name, kotekan::bufferContainer &buffer_container)¶
Constructor.
-
virtual ~frbPostProcess()¶
Destructor.
-
virtual void main_thread() override¶
Primary loop to wait for buffers, dig through data, stuff packets lather, rinse and repeat.