help-octave
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Signal Package pwelch


From: Thomas D. Dean
Subject: Re: Signal Package pwelch
Date: Tue, 13 Aug 2019 19:06:00 -0700
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Thunderbird/60.8.0

On 8/13/19 2:12 PM, Thomas D. Dean wrote:
On 8/13/19 1:32 PM, Thomas D. Dean wrote:
I have a application using the signal package pwelch function that
seems to produce an incorrect plot.

[s, f] = pwelch(iq,[], overlap=0, NFFT=2048, Fs=sample_rate,
detrend='none', range='shift', plot_type = 'dB')

iq is read from an rtl-sdr

knowing the location of some signals, like the Hydrogen line, and,
comparing this to python, pwelch puts the "hydrogen bump" about .3MHz
too high.

pwelch(iq,[], overlap=0, NFFT=2048, Fs=sample_rate, detrend='none',
range='shift', plot_type = 'dB');

How do I upload an image to show this?

More information,

The "hydrogen bump" should be between 1420400000 and 1420500000 Hz.
But, pwelch places it between 1420700000 and 1420850000

octave:100> [s, f] = pwelch(iq,[], overlap=0, NFFT=2048, ...
         Fs=sample_rate,  detrend='none', range='shift', ...
         plot_type = 'dB');
octave:101> freq
freq =  1420400000
octave:102> x = freq + f;
octave:103> idx=find( ( x >= 1420700000 ) & ( x <= 1420850000 ) );
octave:104> plot( x(idx), 10*log10(s(idx)));

I can post the .cc and the .m code, if anyone is interested.

Tom Dean



Fixed.  Strange character in the .m file.

Sorry for the noise.

Tom Dean


reply via email to

[Prev in Thread] Current Thread [Next in Thread]