Skip to content

Commit 73618fa

Browse files
authored
Merge pull request #136 from pinton-lab/develop
v1.3.0
2 parents acf5d2a + 734ad51 commit 73618fa

97 files changed

Lines changed: 20424 additions & 2822 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.bumpversion.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
[tool.bumpversion]
2-
current_version = "1.2.3"
2+
current_version = "1.3.0"
33
parse = """(?x)
44
(?P<major>0|[1-9]\\d*)\\.
55
(?P<minor>0|[1-9]\\d*)\\.

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ repos:
1111
args: ["--maxkb=10000"]
1212
- repo: https://github.com/astral-sh/ruff-pre-commit
1313
# Ruff version.
14-
rev: v0.11.0
14+
rev: v0.15.2
1515
hooks:
1616
# Run the linter.
1717
- id: ruff

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
}
1111
},
1212
"python.analysis.typeCheckingMode": "standard",
13-
"python.testing.pytestEnabled": true
13+
"python.testing.pytestEnabled": true,
14+
"ruff.format.preview": false
1415
}

README.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -211,6 +211,41 @@ Here are the main steps to run the Fullwave simulation
211211
4. Define the sensor.
212212
5. Execute the simulation.
213213

214+
## Tutorial: transducers and transmits
215+
216+
A named array places itself on the grid, and one call states the transmit.
217+
218+
```python
219+
grid = fullwave.Grid(domain_size=(4.5e-2, 4.5e-2), f0=5.208e6, duration=6.7e-5, c0=1540)
220+
221+
transducer = fullwave.Transducer.l7_4(grid)
222+
transducer.plane_wave(angle_deg=2.5)
223+
224+
solver = fullwave.Solver(work_dir="./outputs/my_run", grid=grid, medium=medium, transducer=transducer)
225+
recorded = solver.run()
226+
```
227+
228+
The arrays are `l7_4` (linear, 128 elements, 5.208 MHz), `c5_2v` (curved, 49.57 mm radius, 3.7 MHz) and `p4_1c` (phased, 64 elements). `fullwave.TransducerGeometry` builds any other.
229+
230+
The transmits are `plane_wave(angle_deg=...)`, `focus(focus_m=...)`, `diverging(virtual_source_m=...)` and `synthetic_aperture(element)`. Each takes `apodization` and `pulse`. Set `transducer.active_source_elements` first to use part of the aperture.
231+
232+
Every transducer is additive by default, which is what the calibrated setups use. Pass `source_type="clamped"` for a hard source.
233+
234+
`transducer.apply_transducer_stack(...)` paints a probe's backing, matching layer, lens and standoff onto the medium maps before the `Medium` is built. `fullwave.TransducerStack` holds the values.
235+
236+
### Which example to read
237+
238+
| I want to | example |
239+
| ---------------------------------- | ----------------------------------------------------------------------------------------------------------- |
240+
| send one plane wave | [simple_plane_wave.py](examples/simple_plane_wave/simple_plane_wave.py) |
241+
| do the same in 3D | [simple_plane_wave_3d.py](examples/wave_3d/simple_plane_wave_3d.py) |
242+
| compound plane waves into a B-mode | [plane_wave_compounding.py](examples/linear_transducer/plane_wave_compounding.py) |
243+
| focus and watch the beam | [linear_transducer_focused_animation.py](examples/linear_transducer/linear_transducer_focused_animation.py) |
244+
| run a full synthetic aperture | [full_synthetic_aperture.py](examples/linear_transducer/full_synthetic_aperture.py) |
245+
| do the same on a curved array | [convex_transducer_fsa.py](examples/convex_transducer/convex_transducer_fsa.py) |
246+
| image through an abdominal wall | [linear_transducer_abdominal_wall.py](examples/linear_transducer/linear_transducer_abdominal_wall.py) |
247+
| build a layered phantom | [medium_builder_example.py](examples/medium_builder/medium_builder_example.py) |
248+
214249
## New simulation development instruction
215250

216251
- after the [installation](#installation)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
"""Attenuation and phase velocity of a uniform phantom, read between two planes."""

0 commit comments

Comments
 (0)