Skip to main content

Acoustics toolbox for time domain acoustic and ultrasound simulations in complex and tissue-realistic media.

Project description

k-Wave-python

Documentation Status

This project is a Python implementation of v1.4.0 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 the 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 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
git checkout v0.3.0
pip install '.[example]' 
python3 examples/bmode_reconstruction_example.py

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

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 30 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

  1. k-Wave: A MATLAB toolbox for the time-domain simulation of acoustic wave fields.
  2. j-wave: Differentiable acoustic simulations in JAX.
  3. ADSeismic.jl: a finite difference acoustic simulator with support for AD and JIT compilation in Julia.
  4. stride: a general optimisation framework for medical ultrasound tomography.

Documentation

The documentation for k-wave-python can be found here.

Contact

e-mail wsimson@stanford.edu.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

k_wave_python-0.3.0.tar.gz (183.6 kB view details)

Uploaded Source

Built Distribution

k_wave_python-0.3.0-py3-none-any.whl (212.0 kB view details)

Uploaded Python 3

File details

Details for the file k_wave_python-0.3.0.tar.gz.

File metadata

  • Download URL: k_wave_python-0.3.0.tar.gz
  • Upload date:
  • Size: 183.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.23.0

File hashes

Hashes for k_wave_python-0.3.0.tar.gz
Algorithm Hash digest
SHA256 d244c9a9c1cef30bdec32a261ca462d44ae0d143459b9b94bc8df3ea6010a381
MD5 f023f923b2a35dd54e516b170e0d3e79
BLAKE2b-256 71ecc270840d256b67fcfe90fe64d8f465b95afef8c90e3aca9e77971346a869

See more details on using hashes here.

Provenance

File details

Details for the file k_wave_python-0.3.0-py3-none-any.whl.

File metadata

File hashes

Hashes for k_wave_python-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6900f2b005eeecf907d8cc066fa2f8a6650f0d72f40df96d902171328245e167
MD5 31260180cd5cc7b46a5078fdff771fbc
BLAKE2b-256 84a94d4a8380470f57d033a1daa923bcd85ea0f5566dd3db662460b59ab72b58

See more details on using hashes here.

Provenance

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page