spectral module

spectral.convolve(x, transfer, arglist, verbose=True)[source]

Convolves an array with a transfer function in the frequency domain

Parameters:
  • x (stfio_plot.Timeseries) – Input data
  • transfer (function) – Transfer function
  • arglist (list) – Additional arguments to transfer
  • verbose (bool, optional) – Verbose output. Default: False
Returns:

filtered – Filtered data

Return type:

stfio_plot.Timeseries

spectral.fgaussColqu(x, f_c)[source]

Eq. 5 from Colquhoun & Sigworth, p. 486 of the blue book np.log(2.0)/2.0 = 0.34657359028

Parameters:
  • x (numpy.ndarray) – Frequencies
  • f_c (Cutoff frequency (-3dB)) –
Returns:

gauss – Transfer function to achieve -3dB at f_c

Return type:

numpy.ndarray

spectral.gaussian_filter(x, f_c, verbose=True)[source]

Gaussian filter

Parameters:
  • x (stfio_plot.Timeseries) – Input data
  • f_c (float) – Cutoff frequency in kHz (-3 dB)
  • verbose (bool, optional) – Verbose output. Default: False
Returns:

Return type:

x convolved with a Gaussian filter kernel.

spectral.highpass(x, f_c, verbose=True)[source]

Highpass filter

Parameters:
  • x (stfio_plot.Timeseries) – Input data
  • f_c (float) – Cutoff frequency in kHz (-3 dB)
  • verbose (bool, optional) – Verbose output. Default: False
Returns:

Return type:

x convolved with a Gaussian filter kernel.

spectral.lowpass(x, f_c, verbose=True)[source]

Lowpass filter

Parameters:
  • x (stfio_plot.Timeseries) – Input data
  • f_c (float) – Cutoff frequency in kHz (-3 dB)
  • verbose (bool, optional) – Verbose output. Default: False
Returns:

Return type:

x convolved with a Gaussian filter kernel.