Acoustics toolbox for time domain acoustic and ultrasound simulations in complex and tissue-realistic media.
Project description
k-Wave-python
This project is a Python implementation of most of the MATLAB toolbox k-Wave 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 accessibility and reproducibility of k-Wave simulations for medical imaging, algorithmic prototyping and testing. Many tools and methods of k-Wave can be found here, but this project has and will continue to diverge from the original k-Wave APIs in order to leverage pythonic practices.
Installation
To install the most recent build of k-Wave-python from PyPI, run:
pip install k-wave-python
After installing the python package, the required binaries will be downloaded and installed the first time you run a simulation.
Getting started
After installation, run the B-mode reconstruction example in the examples
directory of the repository:
git clone https://github.com/waltsims/k-wave-python
cd k-wave-python
pip install '.[example]'
python3 examples/bmode_reconstruction_example.py
This example file steps through the process of:
- Generating a simulation medium
- Configuring a transducer
- Running the simulation
- Reconstructing the simulation
Requirements
This example expects an NVIDIA GPU by default to simulate with k-Wave.
To test the reconstruction on a machine with a GPU,
set RUN_SIMULATION
on line 14 of bmode_reconstruction_example.py
to True
and the example will run without the pre-computed data.
Development
If you're enjoying k-Wave-python and want to contribute, development instructions can be found here.
Related Projects
- k-Wave: A MATLAB toolbox for the time-domain simulation of acoustic wave fields.
- j-wave: Differentiable acoustic simulations in JAX.
- ADSeismic.jl: a finite difference acoustic simulator with support for AD and JIT compilation in Julia.
- stride: a general optimisation framework for medical ultrasound tomography.
Documentation
The documentation for k-wave-python can be found here
Contact
e-mail walter.simson@tum.de.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file k_wave_python-0.2.1.tar.gz
.
File metadata
- Download URL: k_wave_python-0.2.1.tar.gz
- Upload date:
- Size: 549.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 43ea46795b147e12fae366f8313a8498ebfe4a1f6d89fd8eae1943ca9bda7b23 |
|
MD5 | e2cb4c4295469bdd660180297f5da646 |
|
BLAKE2b-256 | ecd9f04405546efea02ad303a9f5405dc1a49eb70e60ee66bb6c36937c801a83 |
Provenance
File details
Details for the file k_wave_python-0.2.1-py3-none-any.whl
.
File metadata
- Download URL: k_wave_python-0.2.1-py3-none-any.whl
- Upload date:
- Size: 193.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-httpx/0.23.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 771696d8be000a801620773af68112d802e335ea2ad5fbe7cb672f0aba076278 |
|
MD5 | 41c351446bbdd119336016e88bdd656a |
|
BLAKE2b-256 | f74f94be8da581ebf26eb3bd002c99658946c574bf7e4add14e56070e0c7bd2d |