# <V(t)**2> = (pi*C) / (2*B*A**2)
return (_numpy.pi * C) / (2 * B * A**2)
+def breit_wigner_resonant_frequency(A, B):
+ if (B**2 >= 2*A**2):
+ return 0 # over- or critically-damped
+ return _numpy.sqrt(A**2 - B**2/2)
+
def save(filename, group='/', raw=None, config=None,
deflection_channel_config=None, processed=None):
specs = [
freq_axes.plot(freq_axis, fitdata, 'b-')
noisefloor = D + 0*freq_axis;
freq_axes.plot(freq_axis, noisefloor)
-
- if B**2 < 2*A**2:
- res_freq = _numpy.sqrt(A**2 - B**2/2)
+ res_freq = breit_wigner_resonant_frequency(A=A, B=B)
+ if res_freq > 0:
freq_axes.axvline(res_freq, color='b', zorder=-1)
freq_axes.set_title('power spectral density %s' % timestamp)