AcousticSensor

Package: kwave.toolbox Superclasses: kwave.toolbox.Sensor

Class used to define acoustic sensors

Syntax

source = AcousticSensor(kgrid);

Description

This class is used to define acoustic sensors. The constructor takes an object of the kwave.toolbox.Sensor class, which defines the grid size.

Examples

Define the grid and sensor objects, and a binary sensor mask containing a single sensor position.

  kgrid = kwave.toolbox.Grid([128, 128], 1e-3);
  sensor = kwave.toolbox.AcousticSensor(kgrid);
  sensor.pressureSensor = 'on';
  sensor.mask = zeros(sensor.gridSize);
  sensor.mask(1, :) = 1;
  kgrid = kwave.toolbox.Grid([128, 128], 1e-3);
  sensor = kwave.toolbox.AcousticSensor(kgrid);
  sensor.pressureSensor = 'off';
  sensor.velocitySensor = 'on';
  sensor.mask = zeros(sensor.gridSize);
  sensor.mask(1, :) = 1;
  sensor.timeStepSpacing = 2;

Properties (pre-simulation)

  • pressureSensor - Sets the acoustic pressure to be recorded ('on' / 'off'). Default 'on'.
  • velocitySensor - Sets the acoustic particle velocity to be recorded ('on' / 'off' / 'ongrid'). By default the particle velocity is returned on the staggered grid and at staggered times. The 'ongrid' option returns it on the grid (same grid as the pressure) but still at staggered times. Default 'off'.
  • densitySensor - Sets the acoustic density to be recorded ('on' / 'off'). Default 'off'.
  • mask - Binary mask the size of the grid with 1s indicated sensor positions.
  • timeStepSpacing - Number of timesteps separating recording events. If this is 1 then the sensors record at every timestep. If 2 then at every other timestep, etc.

Properties (post-simulation)

  • pressure - Matrix (number of sensor points x number of time points) containing the values of the acoustic pressure at the sensor positions at the times given in times. The sensor positions are indexed using Matlab's column-major indexing.
  • velocity - Matrix of values of the acoustic particle velocity at the sensor positions at the times given in times.
  • density - Matrix of values of the acoustic density at the sensor positions at the times given in times.
  • times - Vector of recording times.

See Also

  • Sensor, GridInput