6. Translating to different formats¶
6.1. CSV¶
6.1.1. Basic CSV¶
Translation to csv is 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.1.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=60, freqmax=100, bgr=0)
bash:
readgssi -i DZT__001.DZT -o DZT__001.csv -f csv -N -t 60-100 -r 0
6.2. 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=60, freqmax=100, bgr=0)
bash:
readgssi -i DZT__001.DZT -o DZT__001.csv -f numpy -N -t 60-100 -r 0
6.3. 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=60, freqmax=100, bgr=0)
bash:
readgssi -i DZT__001.DZT -o DZT__001.csv -f gprpy -N -t 60-100 -r 0