6. Translating to different formats

Functions that output radar data to various file formats. Details on these functions can be found at readgssi.translate

6.1. DZT

DZT is the native file format of GSSI data. DZT files are binary and thus must follow strict formatting guidelines, and can only be read by specialized software. To write DZT files using readgssi, you can use either the command line or python depending on your preference.

For more information on DZT files, see page 55 of GSSI's SIR 3000 manual.

6.1.1. Basic DZT

Output to DZT is easy.

Python:

readgssi.readgssi(infile='DZT__001.DZT', outfile='DZT__001-out.DZT', frmt='dzt')

bash:

readgssi -i DZT__001.DZT -o DZT__001-out.DZT -f dzt

6.1.2. DZT of processed data

It’s common to process data before outputting. Here, we distance-normalize and filter before writing to DZT.

Python:

readgssi.readgssi(infile='DZT__001.DZT', outfile='DZT__001-out.DZT', frmt='dzt',
                  normalize=True, freqmin=80, freqmax=120, bgr=0)

bash:

readgssi -i DZT__001.DZT -o DZT__001-out.DZT -f dzt -N -t 80-120 -r 0

6.2. CSV

6.2.1. Basic CSV

Translation to csv is also easy.

Python:

readgssi.readgssi(infile='DZT__001.DZT', outfile='DZT__001.csv', frmt='csv')

bash:

readgssi -i DZT__001.DZT -o DZT__001.csv -f csv

6.2.2. CSV of processed data

It’s common to process data before outputting. Here, we distance-normalize and filter before writing to CSV.

Python:

readgssi.readgssi(infile='DZT__001.DZT', outfile='DZT__001.csv', frmt='csv',
                  normalize=True, freqmin=80, freqmax=120, bgr=0)

bash:

readgssi -i DZT__001.DZT -o DZT__001.csv -f csv -N -t 80-120 -r 0

6.3. numpy binary

The following python and bash commands do the same (process then output), but output to numpy binary format instead.

Python:

readgssi.readgssi(infile='DZT__001.DZT', outfile='DZT__001.csv', frmt='numpy',
                  normalize=True, freqmin=80, freqmax=120, bgr=0)

bash:

readgssi -i DZT__001.DZT -o DZT__001.csv -f numpy -N -t 80-120 -r 0

6.4. GPRPy-compatible format

And finally, these commands output the same data to a format compatible with GPRPy, which involves numpy binary (.npy) and a JSON serialization of header values.

Python:

readgssi.readgssi(infile='DZT__001.DZT', outfile='DZT__001.csv', frmt='gprpy',
                  normalize=True, freqmin=80, freqmax=120, bgr=0)

bash:

readgssi -i DZT__001.DZT -o DZT__001.csv -f gprpy -N -t 80-120 -r 0

Back to top ↑