[Matplotlib-users] psd

2012-01-30 Thread David Craig
Hi I have some data for a 24hr period with a sample rate of 100 samples/second. I want to create a power spectrum using matplotlibs function psd. I want it to have 10 minute windows with a 50% overlap, but cant seem to get the syntax right. My code is as follows: NFFT = len(data) Fs = 100

Re: [Matplotlib-users] psd

2012-01-30 Thread Fabrice Silva
Le lundi 30 janvier 2012 à 11:45 +, David Craig a écrit : Hi I have some data for a 24hr period with a sample rate of 100 samples/second. I want to create a power spectrum using matplotlibs function psd. I want it to have 10 minute windows with a 50% overlap, but cant seem to get the

Re: [Matplotlib-users] psd

2012-01-30 Thread David Craig
Hi, thanks for that. I've made the following changes: NFFT = 100*60*10# Linked to window size Fs = stream[0].stats.sampling_rate win = np.hanning(NFFT) overlap = NFFT/2 power, freq = plt.psd(data, NFFT, Fs, win, overlap) but it returns the following error: Traceback (most recent call

Re: [Matplotlib-users] psd

2012-01-30 Thread Fabrice Silva
Le lundi 30 janvier 2012 à 13:34 +, David Craig a écrit : Hi, thanks for that. I've made the following changes: NFFT = 100*60*10# Linked to window size Fs = stream[0].stats.sampling_rate win = np.hanning(NFFT) overlap = NFFT/2 power, freq = plt.psd(data, NFFT, Fs, win, overlap)

Re: [Matplotlib-users] psd

2012-01-30 Thread Jerzy Karczmarczuk
David Craig : Hi, thanks for that. I've made the following changes: NFFT = 100*60*10# Linked to window size Fs = stream[0].stats.sampling_rate win = np.hanning(NFFT) overlap = NFFT/2 power, freq = plt.psd(data, NFFT, Fs, win, overlap) but it returns the following error:

[Matplotlib-users] psd (and friends) scaling and NFFT

2010-11-16 Thread Ryan May
Hi, I spent a fair amount of time today debugging what I thought was a bug in the scaling of psd() when I was using NFFT to specify zero-padding. This was a mis-use of the code on my part, where I should have been using pad_to to get zero-padding. Most embarassing about this is that I'm

[Matplotlib-users] PSD amplitude disparity

2010-03-02 Thread Dunx
Hi, I know about the difference between pylab.psd and mlab.psd, but in theory the only difference between the returned values is: pylab.psd = 10*log10(mlab.psd) Except this is not true, there is noticeable difference: pylab.psd = 23.4962 (all these pylab.psd values are read from graph)

Re: [Matplotlib-users] PSD amplitude disparity

2010-03-02 Thread John Hunter
On Tue, Mar 2, 2010 at 5:13 AM, Dunx d...@hotmail.co.uk wrote: Hi, I know about the difference between pylab.psd and mlab.psd, but in theory the only difference between the returned values is: pylab.psd = 10*log10(mlab.psd) Except this is not true, there is noticeable difference:

Re: [Matplotlib-users] psd question...

2009-07-29 Thread 3togo
mlab.psd and pyplot.psd are different http://www.nabble.com/file/p24713274/psd_testpng.png http://www.nabble.com/file/p24713274/psd_testpng.png psd_testpng.png #This program below do reveal that mlab.psd and pyplot.psd are different import numpy as np import matplotlib.pyplot as plt

[Matplotlib-users] psd question...

2009-01-14 Thread Lewis, Ambrose J.
Hi All: I'm trying to use the matplotlib psd function to plot some data. The result from MATLAB's pWelch function looks vastly different. Any suggestions/recommendations would be greatly appreciated! THANXS amb Here is the MATLAB code: Fs = 13e6; fid =

Re: [Matplotlib-users] psd question...

2009-01-14 Thread Ryan May
Lewis, Ambrose J. wrote: Hi All: I’m trying to use the matplotlib psd function to plot some data. The result from MATLAB’s pWelch function looks vastly different. Any suggestions/recommendations would be greatly appreciated! What version of matplotlib are you running? I made some

Re: [Matplotlib-users] psd question

2009-01-14 Thread Fago, Matt - AES
I'm trying to use the matplotlib psd function to plot some data. The result from MATLAB's pWelch function looks vastly different. What is the default window type for Matlab? For Matplotlib it is the Hanning window. If Matlab defaults to a rectangular window the results will look quite

Re: [Matplotlib-users] psd question

2009-01-14 Thread Lewis, Ambrose J.
-users-boun...@lists.sourceforge.net [mailto:matplotlib-users-boun...@lists.sourceforge.net] On Behalf Of Fago, Matt - AES Sent: Wednesday, January 14, 2009 11:36 AM To: matplotlib-users@lists.sourceforge.net Subject: Re: [Matplotlib-users] psd question I'm trying to use the matplotlib psd function

[Matplotlib-users] PSD amplitudes

2007-10-25 Thread Joseph Park
Please try the attached script. The answer should be ~0 dB for each of the frequencies. Most likely a simple scaling issue/parameter of which i'm ignorant. -- ## ## Name: psd_scale.py ## ##

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread Joseph Park
To matplotlib-users@lists.sourceforge.net cc Subject [Matplotlib-users] PSD

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread brett . mcsweeney
: [Matplotlib-users] PSD amplitudes Shouldn't the PSD for a simple sine wave tend to infinity the spectral resolution will impact the amplitude, if you are not dealing with a density. by definition a spectral density has applied the bandwidth resolution correction. the PSD amplitude should

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread brett . mcsweeney
Subject Re: [Matplotlib-users] PSD amplitudes is the suggestion that the matplotlib algorithm is correct in computing PSD amplitudes? btw, increasing nFFT increases the number of points used in the FFT, which increases the spectral frequency resolution (smaller binwidth) but for a limited

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread Joseph Park
Re: [Matplotlib-users] PSD amplitudes is the suggestion

Re: [Matplotlib-users] PSD amplitudes

2007-10-25 Thread brett . mcsweeney
) of a sine wave is a delta function! Joseph Park [EMAIL PROTECTED] Sent by: [EMAIL PROTECTED] 26/10/2007 11:50 AM To cc matplotlib-users@lists.sourceforge.net Subject Re: [Matplotlib-users] PSD amplitudes spectral density is by convention a 1Hz binwidth, not an arbitrary one, units of A^2/Hz

[Matplotlib-users] psd amplitude scaling

2007-10-17 Thread Joseph Park
If one creates a 1V RMS sine wave, e.g. with a peak value of 1.414 or peak-peak of 2.83, then computes psd, the resulting amplitude is around 24 dB, yet classic theory dictates the answer ought to be 20 log(1) = 0 dB. This offset seems consistent across various frequencies/sample