k-Wave Toolbox Previous   Next

filterTimeSeries

Filter signal using the Kaiser windowing method

Syntax

filtered_signal = filterTimeSeries(kgrid, medium, signal)
filtered_signal = filterTimeSeries(kgrid, medium, signal, ...)

Description

filterTimeSeries filters an input time domain signal using a filter with a specified cut-off frequency, stop-band attenutation, and transition bandwidth. It uses the Kaiser Windowing method to design the FIR filter, which can be implemented either a zero or linear phase filter. The cutoff frequency is defined by a minimum number of temporal points per wavelength. A smoothing ramp can also be applied to the beginning of the signal to reduce startup transients.

Inputs

kgrid

k-Wave grid structure returned by makeGrid

medium

k-Wave medium structure

signal

the time domain signal to filter

Optional Inputs

Optional 'string', value pairs that may be used to modify the default computational settings.

Input Valid Settings Default Description

'PlotSignals'

(boolean scalar)

false

Boolean controlling whether the time signal is displayed before and after filtering.

'PlotSpectrums'

(boolean scalar)

false

Boolean controlling whether the amplitude spectrum is displayed before and after filtering.

'PPW'

(numeric scalar)

3

The number of points per wavelength used to compute the filter cutoff frequency (setting to 0 turns of the filtering).

'RampPPW'

(boolean scalar)

false

Boolean controlling whether a smoothing ramp is applied to the beginning of the signal.

'StopBandAtten'

(numeric scalar)

60

Attenuation in decibels in the filter stop band.

'TransitionWidth'

(numeric scalar)

0.1

Size of the transition relative to the temporal sampling frequency.

'ZeroPhase'

(boolean scalar)

false

Boolean controlling whether a causal or zero phase filter is applied.

Outputs

filtered_signal

the filtered time signal

Examples

See Also

smooth, spectrum


© 2009, 2010 Bradley Treeby and Ben Cox.