From: W. Trevor King Date: Thu, 12 Feb 2009 05:24:25 +0000 (-0500) Subject: Set default maxFreq to 25 kHz. Unset pylab.hold for the bump_plot residual. X-Git-Tag: 0.4~6 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=fcf207a926d336084a8e6a874ba93110042c1d8a;p=calibcant.git Set default maxFreq to 25 kHz. Unset pylab.hold for the bump_plot residual. 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. --- diff --git a/calibcant/bump_analyze.py b/calibcant/bump_analyze.py index 0ae4045..7482879 100755 --- a/calibcant/bump_analyze.py +++ b/calibcant/bump_analyze.py @@ -205,6 +205,7 @@ def bump_plot(data, yguess=None, yfit=None, plotVerbose=False) : 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)") diff --git a/calibcant/vib_analyze.py b/calibcant/vib_analyze.py index ff37f12..74e1ed4 100755 --- a/calibcant/vib_analyze.py +++ b/calibcant/vib_analyze.py @@ -123,7 +123,7 @@ def vib_analyze(deflection_bits, freq, 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