OpenwaterHealth / OpenwaterHealth/openlifu-python
Add support for non-uniform focal point hit counts
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 27
- Forks
- 21
- Avg merge
- 1d 20m
- Merged PRs (30d)
- 6
Description
Currently, pulses in a sonication sequence are distributed equally across all focal points in a round robin pattern. In multifocus treatments, focal points can receive different effective acoustic energy per pulse, so equal pulse distribution can leave some foci undertreated relative to ther others. Allowing more pulses to be allocated to weaker foci could raise the min ISPTA across focal points and improve treatment uniformity.
Main proposed changes:
Solution.focal_hit_counts: add a new field storing the number of pulses directed to each focal pointProtocol.calc_solution: add newfocal_hit_countsandoptimize parameters.focal_hit_countsaccepts an explicit allocation.optimize=Truecomputes an optimized allocation automaticallyoptimize_hit_counts(): add a helper that maximizes the min ISPTA across focal points, subject to TIC limits fromparam_constraintsSolutionAnalysis.per_focus_tic: add a new field exposing per-focus TIC values- weighted intensity aggregation in
calc_solutionandSolution.get_ispta
Please let me know if this sounds reasonable and if you'd be open to a PR. I'd love to contribute. Thanks!
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Solution, Protocol.calc_solution, SolutionAnalysis.per_focus_tic, and the existing param_constraints handling. Trace how focal points are currently assigned pulses and how ISPTA and TIC are aggregated. Done should include explicit and optimized focal-hit allocations, constraint-aware optimization, per-focus TIC reporting, and weighted intensity calculations.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100