gpuSimulateN2kPL1bitCorr¶
-
class gpuSimulateN2kPL1bitCorr : public kotekan::Stage¶
Perform on CPU the equivalent of the CudaCorrelator stage: N2 PL 1 bit Correlator.
An example of this stage being used can be found in
config/tests/verify_cuda_n2k.yaml.This stage performs the 1-bit element-element correlation of the packet loss (PL) mask and applies the RFI mask, resulting in the counts of good samples contributing to each visibility matrix element.
The PL mask is input in its expanded form, not downsampled in time or frequency, but downsampled in element (really: dish) by a factor of 8. For GPU reasons, the time axis is split into fast (64 time samples, each 1 bit) and slow (length samples_per_data_set / 64) axes.
The RFI mask is applied over all elements (it has no element axis) and its time axis is also split into fast (1024 time samples) and slow (samples_per_data_set / 1024) axes.
In terms of 1-bit bools their shapes are: PL: bool1 [samples_per_data_set/64, num_local_freq, num_elements/8, 64] RFI: bool1 [samples_per_data_set/1024, num_local_freq, 1024]
This stage accesses these as u64’s, giving them shapes: PL: u64 [samples_per_data_set/64, num_local_freq, num_elements/8] RFI: u64 [samples_per_data_set/1024, num_local_freq, 16]
The counts matrix is output in a form like the visibility matrix: it is tiled into 8 x 8 blocks, and the lower diagonal blocks are returned as [B00, B10, B11, B20, B21, …]. There are lin_blocks = num_elements / 8 / 8 horizontally and vertically, resulting in num_blocks = lin_blocks
(lin_blocks + 1) / 2 total 8 x 8 blocks returned. Each entry is an int32.
Correlations are performed over sub_integration_ntime time samples, resulting in num_integrations = samples_per_data_set / sub_integration_ntime outputs in time.
The output counts matrix will then have shape: [num_integrations, num_local_freq, num_blocks, 8, 8]
- Buffers
in_plmask_bufThe input expanded packet loss mask.Format: uint64 bitmask.
Shape: [samples_per_data_set / 64, num_local_freq, num_elements / 8]
Metadata:
chordMetadata
in_rfimask_bufThe input RFI mask.Format: uint64 bitmask.
Shape: [samples_per_data_set / 1024, num_local_freq, 16]
Metadata:
chordMetadata
out_bufThe output counts matrix.Format: int32
Shape: [num_integrations, num_local_freq, num_blocks, 8, 8]
Metadata:
chordMetadata, time_downsample_fpga[] = sub_integration_ntime
- 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.
- Param sub_integration_ntime:
Int. Number of samples to correlate.