https://github.com/waltsims/k-wave-python
A Python interface to k-Wave GPU accelerated binaries
https://github.com/waltsims/k-wave-python
acoustics gpu kwave neuroscience python simulation ultrasound wave-equation
Last synced: 3 months ago
JSON representation
A Python interface to k-Wave GPU accelerated binaries
- Host: GitHub
- URL: https://github.com/waltsims/k-wave-python
- Owner: waltsims
- License: lgpl-3.0
- Created: 2022-04-02T15:27:23.000Z (over 3 years ago)
- Default Branch: master
- Last Pushed: 2025-06-16T22:24:41.000Z (4 months ago)
- Last Synced: 2025-06-28T06:48:55.193Z (3 months ago)
- Topics: acoustics, gpu, kwave, neuroscience, python, simulation, ultrasound, wave-equation
- Language: Python
- Homepage: https://k-wave-python.readthedocs.io/en/latest/
- Size: 11.1 MB
- Stars: 148
- Watchers: 5
- Forks: 42
- Open Issues: 66
-
Metadata Files:
- Readme: docs/README.md
- Contributing: .github/CONTRIBUTING.md
- License: LICENSE
- Citation: CITATION.cff
Awesome Lists containing this project
README
# k-Wave-python
[](https://discord.gg/Yq5Qj6D9vN)
[](https://k-wave-python.readthedocs.io/en/latest/?badge=latest)
[](https://codecov.io/gh/waltsims/k-wave-python)
[](https://mybinder.org/v2/gh/waltsims/k-wave-python/master)This project is a Python implementation of v1.4.0 of the [MATLAB toolbox k-Wave](http://www.k-wave.org/) as well as an
interface to the pre-compiled v1.3 of k-Wave simulation binaries, which support NVIDIA sm 5.0 (Maxwell) to sm 9.0a (Hopper) GPUs.## Mission
With this project, we hope to increase the accessibility and reproducibility of [k-Wave](http://www.k-wave.org/) simulations
for medical imaging, algorithmic prototyping, and testing. Many tools and methods of [k-Wave](http://www.k-wave.org/) can
be found here, but this project has and will continue to diverge from the original [k-Wave](http://www.k-wave.org/) APIs
to leverage pythonic practices.## Getting started

A large [collection of examples](../examples/) exists to get started with k-wave-python. All examples can be run in Google Colab notebooks with a few clicks. One can begin with e.g. the [B-mode reconstruction example notebook](https://colab.research.google.com/github/waltsims/k-wave-python/blob/master/examples/us_bmode_linear_transducer/us_bmode_linear_transducer.ipynb).
This example file steps through the process of:
1. Generating a simulation medium
2. Configuring a transducer
3. Running the simulation
4. Reconstructing the simulation## Installation
To install the most recent build of k-Wave-python from PyPI, run:
```bash
pip install k-wave-python
```
> **Note for MacOS:**
>
> k-wave-python offers initial support for MacOS, but you will need to install the following dependencies using the [brew package manager](https://docs.brew.sh/Installation) along with the Python package:
> ```bash
> brew install fftw hdf5 zlib libomp
> ```
After installing the Python package, the required binaries will be downloaded and installed the first time you run a
simulation.## Development
If you're enjoying k-Wave-python and want to contribute, development instructions can be
found [here](https://k-wave-python.readthedocs.io/en/latest/development/development_environment.html).## Related Projects
1. [k-Wave](https://github.com/ucl-bug/k-wave): A MATLAB toolbox for the time-domain simulation of acoustic wave fields.
2. [j-wave](https://github.com/ucl-bug/jwave): Differentiable acoustic simulations in JAX.
3. [ADSeismic.jl](https://github.com/kailaix/ADSeismic.jl): a finite difference acoustic simulator with support for AD
and JIT compilation in Julia.
4. [stride](https://github.com/trustimaging/stride): a general optimisation framework for medical ultrasound tomography.## Documentation
The documentation for k-wave-python can be found [here](https://k-wave-python.readthedocs.io/en/latest/).
## Citation
```bibtex
@software{k-Wave-Python,
author = {Yagubbbayli, Farid and Sinden, David and Simson, Walter},
license = {GPL-3.0},
title = {{k-Wave-Python}},
url = {https://github.com/waltsims/k-wave-python}
}
```
## Contacte-mail [wsimson@stanford.edu](mailto:wsimson@stanford.edu).