k-Wave Toolbox |

# interpCartData

Interpolate data from a Cartesian to a binary sensor mask

## Syntax

    binary_sensor_data = interpCartData(kgrid, cart_sensor_data, cart_sensor_mask, binary_sensor_mask)
    binary_sensor_data = interpCartData(kgrid, cart_sensor_data, cart_sensor_mask, binary_sensor_mask, interp)

## Description

`interpCartData` takes a matrix of time-series data recorded over a set of Cartesian sensor points given by `cart_sensor_mask` and computes the equivalent time-series at each sensor position on the binary sensor mask `binary_sensor_mask` using interpolation. The properties of `binary_sensor_mask` are defined by the k-space grid structure `kgrid`. Two- and three- dimensional data are supported.

## Inputs

`kgrid` | k-space grid structure returned by `makeGrid`
`cart_sensor_data` | original sensor data measured over `cart_sensor_mask` indexed as `cart_sensor_data(sensor position, time)`
`cart_sensor_mask` | Cartesian sensor mask over which `cart_sensor_data` is measured
`binary_sensor_mask` | binary sensor mask at which equivalent time-series are computed via interpolation

## Optional Inputs

`interp` | interpolation mode used to compute the time-series, both `'nearest'` and (two-point) `'linear'` modes are supported (default = `'nearest'`)

## Outputs

`binary_sensor_data` | array of time-series corresponding to the sensor positions given by `binary_sensor_mask`

## Examples

- 2D Time Reversal Reconstruction For A Circular Sensor
- 3D Time Reversal Reconstruction For A Spherical Sensor

## See Also

`cart2grid`, `kspaceFirstOrder2D`, `kspaceFirstOrder3D`, `makeGrid`

© 2009 Bradley Treeby and Ben Cox.