Reading a Fast-Streaming Data File from BYU PAF Back-End

Introduction

One of the data output modes from the BYU PAF back-end is a fast streaming mode that records complex FFT output spectra in a disk file. These spectra are directly from the FFTs of blocks of data words from a selectable subset of the 64 ADCs. The options for selecting the active ADCs are documented in the BYU PAF backend manual. Each FFT input block can be 256, 512, or 1024 ADC samples long which correspond to 128, 256, or 512 output spectral channels. The ADC sample rate is 50 MS/s so the output spectra have a total bandwidth of 25 MHz and a channel spacing of 195.3, 97.7, or 48.8 kHz, respectively. Each datum from each spectral channel is a complex number consisting of two 8-bit signed integers that are the real and imaginary components of the complex value channel output. The time interval between output spectra is 2.56, 5.12, or 10.24 microseconds, respectively.

Various subsets of the 64 ADC channels can be selected when the hardware is initialized, and, in fact, the data rate from all 64 ADCs is too fast for continuous streaming of full-spectrum data to hard drive. The selectable subset combinations of active ADCs and sub-spectra are described in the hardware manual. The mapping of PAF element number to back-end ADC number is recorded in the RcvrArray1_2.fits files.

Data Packet Format Each 2.56, 5.12, or 10.24 microsecond spectrum set is recorded on hard disk as a raw UDP data packet which must be decoded in some detail, in some instances at the byte or bit level, before spectra are available for processing. Multi-byte integers are in big-endian format, which is opposite to the little-endian format of Intel processor machines. Python code for accessing and interpreting spectra is given below.