Corrected ambiguity with the centre frequency content of the 'gaussiandotdot' and 'gaussiandotnorm' waveforms. Prior to this update the centre frequency of these waveforms were derived from a base Gaussian waveform with the user given frequency (deriving the pulse width), i.e. this resulted in higher than expected centre frequencies for these waveforms. This has now been corrected so that the user specified centre frequency is what is used for these waveforms.

Tidied up terminology relating to waveform centre frequency.
这个提交包含在:
Craig Warren
2017-06-09 15:57:35 +01:00
父节点 90f7255ff0
当前提交 2e4b43df0f
共有 4 个文件被更改,包括 12 次插入12 次删除

查看文件

@@ -92,13 +92,13 @@ def mpl_plot(w, timewindow, dt, iterations, fft=False):
print('Maximum amplitude: {:g}'.format(w.amp))
if w.freq:
if w.freq and not w.type == 'gaussian':
print('Centre frequency: {:g} Hz'.format(w.freq))
if w.type == 'gaussian' or w.type == 'gaussiandot' or w.type == 'gaussiandotdot':
if w.type == 'gaussian' or w.type == 'gaussiandot' or w.type == 'gaussiandotnorm':
delay = 1 / w.freq
print('Time to centre of pulse: {:g} s'.format(delay))
elif w.type == 'gaussiandotnorm' or w.type == 'gaussiandotdotnorm' or w.type == 'ricker':
elif w.type == 'gaussiandotdot' or w.type == 'gaussiandotdotnorm' or w.type == 'ricker':
delay = np.sqrt(2) / w.freq
print('Time to centre of pulse: {:g} s'.format(delay))
@@ -107,7 +107,7 @@ def mpl_plot(w, timewindow, dt, iterations, fft=False):
powerdrop = -3 # dB
start = np.where((10 * np.log10(waveform / np.amax(waveform))) > powerdrop)[0][0]
stop = np.where((10 * np.log10(waveform[start:] / np.amax(waveform))) < powerdrop)[0][0] + start
print('Pulse width at {:d}dB, i.e. FWHM: {:g} s'.format(powerdrop, time[stop] - time[start]))
print('Pulse width at {:d}dB, i.e. full width at half maximum (FWHM): {:g} s'.format(powerdrop, time[stop] - time[start]))
print('Time window: {:g} s ({} iterations)'.format(timewindow, iterations))
print('Time step: {:g} s'.format(dt))