k-Wave Toolbox

# Release Notes

## Current Version

k-Wave Toolbox Version B.0.4 (fourth beta release)

## Change Log - B.0.4

Release Date: 21st December 2011

New Features and Changes:

- the indexing of input matrices has been modified to (x, 1) in 1D, (x, y) in 2D and (x, y, z) in 3D to be more intuitive
- the corresponding inputs to `makeGrid` are now (Nx, dx) in 1D, (Nx, dx, Ny, dy) in 2D, and (Nx, dx, Ny, dy, Nz, dz) in 3D
- cumulative nonlinear effects can be modelled by setting `medium.BonA`
- heterogeneous absorption values can now be used by defining `medium.alpha_coeff` as a matrix
- `kspaceFirstOrder1D`, `kspaceFirstOrder2D`, `kspaceFirstOrder3D`, and `makeGrid` have been re-written to significantly reduce memory usage
- `source` and `sensor` inputs can be defined as an object of `kWaveTransducer` type (returned by `makeTransducer`) to allow simple simulations using ultrasound transducers
- `source.ux`, `source.uy`, and `source.uz` can be specified individually
- time varying inputs `source.p`, `source.ux`, etc., can now contain any number of time points (they do not need to be the same length as `kgrid.t_array`)
- approximate GPU memory usage is reported when using k-Wave with the GPUmat or Accelereyes toolboxes
- the reference sound speed used in the k-space operator can now be manually set by defining `medium.sound_speed_ref`
- the statistics of the pressure field at each sensor element can now be computed without storing the pressure field by setting `sensor.record_mode` to `'statistics'`
- 3D `sensor_data` can now optionally be streamed to disk by setting the optional input parameter `'StreamToDisk'` to `true`
- `toneBurst` function inputs have changed
- `db2neper` and `neper2db` now use exact conversion factor
- frequency filtering applied when `sensor.frequency_response` is given is now performed using `gaussianFilter`
- B.01 release style inputs no longer supported

Bug Fixes:

- bug fix in defining the absorption parameters for heterogeneous media
- bug fix in setting initial velocity for `kspaceFirstOrder3D`
- bug fix in frequency filtering applied when `kgrid.t_array` has an odd number of time points
- bug fix in `kspaceFirstOrder2D` when saving movies with `'MovieType'` set to `'image'` (the first frame did not display the sensor mask), and the movie frames variable is now preallocated
- bug fix in creating the spatial wavenumber matrices using the `kWaveGrid` class when 1/Nx (etc) is a recurring number

New Functions:

- `checkFactors`
- `envelopeDetection`
- `findClosest`
- `gaussianFilter`
- `logCompression`
- `makeTransducer`
- `mendousse`
- `stackedPlot`

New Examples:

- Defining An Ultrasound Transducer
- Simulating Ultrasound Beam Patterns
- Using An Ultrasound Transducer As A Sensor
- Simulating B-mode Ultrasound Images
- Modelling Nonlinear Wave Propagation

## Change Log - B.0.3

Release Date: 15th February 2011

New Features and Changes:

- support for time varying velocity inputs via `source.u_mask`, `source.ux`etc````
- sensor data now also returns velocity if `'ReturnVelocity'` is set to `true`
- sensor frequency response can be defined using `sensor.frequency_response`
- time reversal image reconstructions can include compensation for acoustic attenuation
- `'CartInterp'` set to `'linear'` now uses `TriScattererdInterp` and is supported in 3D
- `'PMLInside'` set to `false` is now supported in 3D
- estimated simulation times are given
- the PML can be hidden by setting `'PlotPML'` to `false`
- `'PlotScale'` can now also be set to `'auto'` and the display can be log compressed by setting `'LogScale'` to `true`
- 2D simulations can now also be displayed as a mesh plot by setting `'MeshPlot'` to `true`
- movie frame capture in 2D can be controlled using `'MovieType'`
- default smoothing now only applies to the initial pressure distribution
- `kgrid.x_off` (etc) fields are no longer supported
- bug fix in setting initial velocity for time staggered grids
- new k-space simulation function `kspaceSecondOrder` based on a second-order lossy wave equation for homogeneous media
- `makeGrid` now uses class definitions
- `spectrum` now supports all window shapes defined in `getWin`
- `smooth` now uses a Blackman window as default and supports all window shapes defined in `getWin`
- `resize` function inputs have changed and now supports 3D inputs
- bug fix in `kspacePlaneRecon` remapping

New Functions:

- `addNoise`
- `applyFilter`
- `benchmark`
- `expandMatrix`
- `fwhm`
- `gaussian`
- `getAlphaFilter`
- `getDateString`
- `getWin`
- `interpftn`
- `kspaceSecondOrder`
- `saveTiffStack`
- `voxelPlot`

New Examples:

- Recording The Particle Velocity
- Defining A Gaussian Sensor Frequency Response
- Comparison Of Modelling Functions
- Setting An Initial Pressure Gradient
- Photoacoustic Waveforms in 1D, 2D and 3D
- Dipole Point Source In A Homogeneous Propagation Medium
- The Doppler Effect
- Diffraction Through A Slit
- Focussed Detector in 3D
- Modelling Sensor Directivity in 2D
- Modelling Sensor Directivity in 3D
- Focussed 2D Array with Directional Elements
- Image Reconstruction With Directional Sensors
- Image Reconstruction With Bandlimited Sensors
- Image Reconstruction With Compensation For Acoustic Absorption
- Source Smoothing
- Modelling Power Law Absorption

## Change Log - B.0.2

Release Date: 23rd January 2010

New Features:

- inputs redefined as structures
- power law absorption
- 2D sensor directivity
- time varying pressure inputs

New Functions:

- `attenuationWater`
- `db2neper`
- `filterTimeSeries`
- `grid2cart`
- `neper2db`
- `numDim`
- `powerLawKramersKronig`
- `scaleSI`
- `scaleTime`
- `spectrum`
- `speedSoundWater`
- `toneBurst`

## Change Log - B.0.1

Release Date: 22nd July 2009

First Beta Release.

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