I am trying to do some PSD analysis. does anybody know whether mlab psd function can hold max, like Matlab function? thanks
[…] = PWELCH(…,TRACE) uses TRACE to combine spectra computed
% for each segment. TRACE can be set to ‘mean’, ‘maxhold’ or ‘minhold’:
% ‘mean’ - Average spectrum over segments for each frequency bin
% ‘maxhold’ - Maximum spectrum over segments for each frequency bin
% ‘minhold’ - Minimum spectrum over segments for each frequency bin
I strongly advise against using the PSD routines in
mlab we maintain them for historical reasons, but are well outside the core-competency of Matplotlib and it is unlikely we will accept any extensions to them.
I suggest looking at scipy.signal.welch instead. From a very quick reading it looks like they can do mean or median for the averaging. I suspect that to get the min/max you will need to open a PR against scipy.