Trimming SDR IQ Raw Data

Introduction

When working with SDR# on Windows, I can save reception data using either the ‘Baseband: Simple Recorder’ or ‘Audio: Simple Recorder’. In either case the files can be opened and manipulated in Audacity because they have a .wav file extension. The Baseband files have a sample rate equal to the Rx samp_rate and the Audio files have a default of 48Ksps. The situation changes when working with Gqrx which I use when decoding with RaspberryPi4B. Gqrx can save Baseband as well as Audio files. The Baseband files, however, are similar to those used in GNURadio and can’t be manipulated in Audacity. However, you can easily trim them in using Python.

Marine GMDSS VHF DSC on Gqrx

Fig.1 VHF DSC as Received on Gqrx on RPi4B
Fig.2 Python Trim Data Program

Figure 1 shows Burst 2 of a 3 Burst VHF DSC transmission received locally on Nov12th_2025. The receive file was quite large at 173Mbyte. In order to trim this, I used a Python program as shown in Figure 2. The trick here is to determine the start_index : stop_index. Burst 2 occurred at 54secs into the file, so I want to trim from 53secs to 56secs.
Start_Index = Fs x 53secs = 240000 x 53 = 12720000
Stop_Index = Fs x 56secs = 240000 x 55 = 13440000
The file is now reduced to 5.49Mbyte, which is so much easier to handle.

Fig.3 YouTube Video Trimming SDR IQ Raw Data



GNU Radio Basics Course

Please send your comments, questions and suggestions to:
contact:

YouTube Channel
YouTube Channel

References

#1. – “Marine GMDSS/NAVTEX MF Decoder”
https://jeremyclark.ca/wp/telecom/marine-gmdss-navtex-mf-decoder/

#2. – “Marine GMDSS/DSC VHF Decoder_b”
https://jeremyclark.ca/wp/telecom/marine-gmdss-dsc-vhf-decoder_b/

#3. – “BFSK Generator on GNU Radio”
https://jeremyclark.ca/wp/telecom/bfsk-generator-on-gnuradio/

#4. – “Marine GMDSS/DSC VHF Decoder_a”
https://jeremyclark.ca/wp/telecom/marine-gmdss-dsc-vhf-decoder_a/

#5. – “RTL-SDR for HF Marine GMDSS/DSC on SDRangel”
https://jeremyclark.ca/wp/telecom/rtl-sdr-for-hf-marine-gmdss-dsc-on-sdrangel/

#6. – “VHF Marine GMDSS/DSC Decode & Scicos Simulation”
https://jeremyclark.ca/wp/telecom/vhf-marine-gmdss-dsc-decode-scicos-simulation/

#7. – “RTL-SDR for HF Marine GMDSS/DSC”
https://jeremyclark.ca/wp/telecom/rtl-sdr-for-hf-marine-gmdss-dsc/

#8. – “RTL-SDR for Marine GMDSS/DSC on RaspberryPi4”
https://jeremyclark.ca/wp/telecom/rtl-sdr-for-marine-gmdss-dsc-on-raspberrypi4/

#9. – “RTL-SDR for Marine GMDSS/DSC on Multipsk”
https://jeremyclark.ca/wp/telecom/rtl-sdr-for-marine-gmdss-dsc-on-multipsk/



By Jeremy Clark

Jeremy Clark is a Senior Telecommunications Engineer and Advanced Amateur Radio Operator VE3PKC. He is the author of E-Books on Telecommunications, Navigation & Electronics.