DSPSR user documentation: dspsr

Connecting to the PSRDADA ring buffer in shared memory

To read data from the ring buffer in shared memory created by PSRDADA, first ensure that the psrdada software is detected when running the dspsr configure script. This can be tested by running
which psrdada_cflags
If the above command is found, then the dspsr configure script should detect and use it. After running the dspsr configure script, you can verify that psrdada was found by running
grep DADA Makefile
which should yield something like
PSRDADA_CFLAGS = -I/psrhome/linux_64/include
PSRDADA_LIBS =  -L/psrhome/linux_64/lib -lpsrdada
to compile and install dspsr with psrdada support, run
echo " dada" >> backends.list
make
make install
You are now ready to run dspsr while reading from a psrdada ring buffer.

First, download some input data files then create a text file named dada.key that contains the following two lines:

DADA INFO:
key c2c2
The key is simply a hexadecimal code used to identify the ring buffer; create the ring buffer using the same key by running
dada_db -k c2c2
In the background, run another program that will read the data file and write its contents to the ring buffer
dada_diskdb -f 1644-4559.cpsr2 -k c2c2 &
Now run dspsr with the dada.key file that instructs it how to connect to the ring buffer
dspsr -F 128:D -E 1644-4559.eph -P 1644-4559.polyco dada.key
When finished, you can delete the ring buffer with
dada_db -k c2c2 -d