It's probably a better idea to set the maxFreq to the Nyquist freq by
default, but only time for a quick hack at the moment. You'll have to
neck down maxFreq to 7-10 kHz for softer cantilevers (~< 40 pN/nm),
since otherwise you'll start picking up higher order modes.
The bump_plot fix was just because plotting a bunch of data is _slow_.
Pylab in general is no speed demon, so the less extra work I give it,
the better.
if yfit != None:
common._pylab.plot(data["Z piezo output"], yfit,
'r-', label='fit')
+ common._pylab.hold(False)
common._pylab.title("bump surface")
common._pylab.legend(loc='upper left')
common._pylab.xlabel("Z piezo output voltage (bits)")
return min(fitted_variance, naive_variance)
@splittableKwargsFunction()
-def fit_psd(freq_axis, psd_data, minFreq=500, maxFreq=7000) :
+def fit_psd(freq_axis, psd_data, minFreq=500, maxFreq=25000) :
"""
freq_axis : array of frequencies in Hz
psd_data : array of PSD amplitudes for the frequencies in freq_axis