OpenwaterHealth / OpenwaterHealth/openlifu-python

Add support for non-uniform focal point hit counts

Open
#449 0 comments 0 reactions 0 assignees View on GitHub

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 point
  • Protocol.calc_solution: add new focal_hit_counts and optimize parameters. focal_hit_counts accepts an explicit allocation. optimize=True computes an optimized allocation automatically
  • optimize_hit_counts(): add a helper that maximizes the min ISPTA across focal points, subject to TIC limits from param_constraints
  • SolutionAnalysis.per_focus_tic: add a new field exposing per-focus TIC values
  • weighted intensity aggregation in calc_solution and Solution.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

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.