k-Wave Toolbox |

# 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 low pass filter applied by `applyFilter` 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 high frequency 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'` | (integer numeric scalar) | `3` | The number of points per wavelength used to compute the filter cutoff frequency (setting to 0 turns of the filtering).
`'RampPPW'` | (integer numeric scalar) | `0` | The number of points per wavelength used to compute the length of the cosine start-up ramp (setting to 0 turns off the start-up ramp).
`'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

- Monopole Point Source In A Homogeneous Propagation Medium
- Dipole Point Source In A Homogeneous Propagation Medium
- Simulating Transducer Field Patterns
- The Doppler Effect
- Diffraction Through A Slit
- Simulations In Three-Dimensions
- Focussed Detector in 3D
- Modelling Sensor Directivity in 2D
- Modelling Sensor Directivity in 3D
- Focussed 2D Array with Directional Elements
- Filtering A Delta Function Input Signal

## See Also

`applyFilter`, `smooth`, `spectrum`

© 2009, 2010, 2011 Bradley Treeby and Ben Cox.