Skip to content

Fix biological warm start for cell ax bx#911

Merged
wahln merged 3 commits into
e0404:devfrom
acsevillam:pr/biological-warm-start-cell-axbx
May 29, 2026
Merged

Fix biological warm start for cell ax bx#911
wahln merged 3 commits into
e0404:devfrom
acsevillam:pr/biological-warm-start-cell-axbx

Conversation

@acsevillam
Copy link
Copy Markdown

Bug description

Biological optimization warm-start handling does not consistently support dij.ax and dij.bx stored as cell arrays per CT scenario.

This can affect initialization paths where wInit is provided directly, because ixDose and gamma were computed assuming non-cell biological parameter arrays. The same biological metadata preparation was also partly duplicated across matRad_fluenceOptimization.

Approach

This PR adds matRad_prepareBiologicalOptimizationDij to centralize biological dij preparation before initial fluence weights are estimated.

The helper:

  • normalizes dij.ax and dij.bx to one cell entry per CT scenario
  • reconstructs missing ax/bx values from cst
  • validates biological parameters against cst
  • computes dij.ixDose
  • computes dij.gamma for variable RBE projection

matRad_fluenceOptimization now calls this helper once after selecting the back-projection model, so provided wInit and internally estimated warm starts use the same prepared biological metadata.

No new user-facing parameters, external dependencies are introduced.

Validation

  • matRad_runTests('test/optimization/test_biologicalOptimizationDij.m')
  • matRad_runTests('test/optimization')
  • MISS_HIT style/lint on the changed files

@read-the-docs-community
Copy link
Copy Markdown

read-the-docs-community Bot commented May 19, 2026

Documentation build overview

📚 matRad | 🛠️ Build #32904424 | 📁 Comparing 0fbfae5 against latest (c014dc8)

  🔍 Preview build  

36 files changed · + 1 added · ± 35 modified

+ Added

± Modified

Copy link
Copy Markdown
Contributor

@wahln wahln left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very nice, thanks!

@codecov
Copy link
Copy Markdown

codecov Bot commented May 29, 2026

Codecov Report

❌ Patch coverage is 82.05128% with 14 lines in your changes missing coverage. Please review.
✅ Project coverage is 54.96%. Comparing base (33bf9a5) to head (0fbfae5).

Files with missing lines Patch % Lines
...mization/matRad_prepareBiologicalOptimizationDij.m 81.81% 14 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##              dev     #911      +/-   ##
==========================================
+ Coverage   54.83%   54.96%   +0.13%     
==========================================
  Files         321      322       +1     
  Lines       20568    20618      +50     
==========================================
+ Hits        11278    11333      +55     
+ Misses       9290     9285       -5     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented May 29, 2026

Test Results

    3 files  ± 0      3 suites  ±0   32m 40s ⏱️ -29s
  367 tests + 5    367 ✅ + 5  0 💤 ±0  0 ❌ ±0 
1 197 runs  +15  1 192 ✅ +15  5 💤 ±0  0 ❌ ±0 

Results for commit 0fbfae5. ± Comparison against base commit 33bf9a5.

♻️ This comment has been updated with latest results.

@wahln wahln merged commit 174e756 into e0404:dev May 29, 2026
11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants