IShort to Complex is causing this code to save all zeros?

I have a simple GNU radio code for recording data from an SDR and saving the samples to files. It records data in IShort format and saves directly to the hard drive as IShort. Amplitude scaling to the data must be done in post-processing at a later step. I made a copy of the code to include the amplitude scaling between the “USRP Source” block and the “Streams to Vector > File Sink” blocks using an “IShort to complex” block, then a “Fast Multiply Const” block, then a “Complex To IShort” block. However, this modification causes the saved files to contain all zeros instead of measured samples. My scale factors for the IShort to Complex/Complex to IShort are both 32767.0. I have a set of blocks for a spectrogram display with windowing which pulls from the output of the “Fast Multiply Const” block. Thus, I believe the error has something to do with the “Complex To IShort” block. Can someone please explain why this is happening?

Thank you

1 Like