gpuSimulateN2kPLExpand¶
-
class gpuSimulateN2kPLExpand : public kotekan::Stage¶
Perform on CPU the equivalent of the CudaCorrelator stage: N2 PL Mask Expander.
An example of this stage being used can be found in
config/tests/verify_cuda_n2k.yaml.The raw packet loss (PL) mask is downsampled by 2 in time, 4 in frequency, and 8 in element (polarization x dish). To be combined with the RFI mask in the 1-bit correlator, the PL mask first has to be expanded (entries cloned) so that it is no longer downsampled in time or frequency. The downsampling in element will remain.
In memory the PL mask has its time axis split into fast (length 64 bits) and coarse (length samples_per_data_set / 2 / 64 bits) axes. Each bit in the mask corresponds to 2 times (and 4 frequencies), so the length 64 bit fast time axis represents 128 time samples.
This stage performs the expansion in time and frequency by cloning bits by 2 in time and 4 in frequency.
- Buffers
in_bufThe input packet loss mask.Format: bitmask: uint64_t, equivalently uint8_t or uint1x8_t
Shape: [samples_per_data_set / 128, num_local_freq / 4, num_elements / 8] or equivalently [samples_per_data_set / 128, num_local_freq / 4, num_elements / 8, 8] if the datatype is uint8_t or uint1x8_t. If the elements axis is constructed as polarization, dish pairs, its shape is taken to be [num_polarizations, num_dishes / 8]. Size of a frame is samples_per_data_set
num_local_freq * num_elements / 512 bytes.
Metadata:
chordMetadata. time_downsample_fpga[] = 128
out_bufThe output, expanded packet loss mask.Format: bitmask: uint64_t, equivalently uint8_t or uint1x8_t
Shape: [samples_per_data_set / 64, num_local_freq, num_elements / 8] or equivalently [samples_per_data_set / 64, num_local_freq, num_elements / 8, 8] if the datatype is uint8_t or uint1x8_t. If the elements axis is constructed as polarization, dish pairs, its shape is taken to be [num_polarizations, num_dishes / 8]. Size of a frame is samples_per_data_set
num_local_freq * num_elements / 64 bytes.
Metadata:
chordMetadata. time_downsample_fpga[] = 64
- Param num_elements:
Int. Number of feeds or (antennas x polarizations).
- Param num_local_freq:
Int. Number of frequencies.
- Param samples_per_data_set:
Int. Number of samples per frame.