HIFU simulation in python, with Trident ray tracing
Link to a more detailed report
- prove for cubes media and multi-planar media interfaces
numpy
numba
: CUDA and JIT accelerationmatplotlib
: for visualizationscipy
: for calculating integralcached_property
: faster property access https://github.com/pydanny/cached-property
- accurate pressure
is calculated from far field approximation using
pyHIFU.transducer.TElement.ffa
atlen0
(pyHIFU.transducer.TElement.distance_z
), which is the minimal distance that far-field approximation holds. - Intensity
- Power
,
A
is the area formed three intersection points with a plane perpendicular to power ray at a point, in this case islen0
.
An example is in case1.py
-
read the config files (
pyHIFU.io
) -
Initialize the geometric representation of the media (
pyHIFU.physics.MediaComplex
) -
Initialize sampling box (
pyHIFU.Box.Box
). -
For each transducer element, do:
- set parameters
- initial casting in lossless or markoil
- cast initial ray towards
mc
(MediaComplex
) and sort them according to theirbundle_identifier
- for each bundle, measure accumulated intensity, phase and counter for each
pyHIFU.Box.Cube
- calculate complex pressure using
- return this complex pressure to calling func and free other memories
-
accumulate the complex pressure from all transducers.
-
save the result for further visualization
python standard module multiprocessing
ray tracing using CUDA and numba.cuda.jit