Git Product home page Git Product logo

hifu.py's Introduction

pyHIFU

HIFU simulation in python, with Trident ray tracing

Link to a more detailed report

example

Goals

  • prove for cubes media and multi-planar media interfaces

Dependencies

Trident initialization

  1. accurate pressure \hat p is calculated from far field approximation using pyHIFU.transducer.TElement.ffa at len0 (pyHIFU.transducer.TElement.distance_z), which is the minimal distance that far-field approximation holds.
  2. Intensity I_0={\lvert \hat p\rvert^2}/{2 Z}
  3. Power P_0=I0 \cdot A, A is the area formed three intersection points with a plane perpendicular to power ray at a point, in this case is len0.

HIFU Routine

An example is in case1.py

  1. read the config files (pyHIFU.io)

  2. Initialize the geometric representation of the media (pyHIFU.physics.MediaComplex)

  3. Initialize sampling box (pyHIFU.Box.Box).

  4. For each transducer element, do:

    • set parameters
    • initial casting in lossless or markoil
    • cast initial ray towards mc (MediaComplex) and sort them according to their bundle_identifier
    • for each bundle, measure accumulated intensity, phase and counter for each pyHIFU.Box.Cube
    • calculate complex pressure using pressure = \sqrt{2 Z I_{mean}} \cdot e^{i \phi_{mean}}
    • return this complex pressure to calling func and free other memories
  5. accumulate the complex pressure from all transducers.

  6. save the result for further visualization

Acceleration and parallel computing

python standard module multiprocessing

ray tracing using CUDA and numba.cuda.jit

hifu.py's People

Contributors

tonyxwz avatar dependabot[bot] avatar engineer2b avatar

Stargazers

 avatar  avatar lizhao avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.