Skip to content

Proton models documentation - #130

Merged
grzanka merged 6 commits into
mainfrom
proton_models-documentation
Oct 2, 2026
Merged

grzanka merged 6 commits into
mainfrom
proton_models-documentation

Conversation

@witNie

@witNie witNie commented Aug 31, 2026 •

Copy link
Copy Markdown
Contributor

This pull request adds comprehensive documentation for the analytical proton dose and LET models in the pyamtrack.proton_models module and updates the function porting status to reflect that these models are now fully ported to Python. The documentation provides detailed explanations, usage examples, parameter descriptions, and validation rules for the dose_bortfeld and let_wilkens functions.

Documentation Additions:

  • Added a new API documentation page proton_models.md describing the dose_bortfeld and let_wilkens functions, including parameter details, return values, usage examples, and error handling.
  • Explained conventions for input arguments, vectorization, and cartesian-product evaluation for both functions.
  • Included references to relevant scientific literature and links to related documentation.

Status Updates:

  • Updated the function porting status table to indicate that proton_models.dose_bortfeld and proton_models.let_wilkens are now fully ported to Python, with links to the new API documentation.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR documents the newly-ported proton analytical models in the pyamtrack Python wrapper for the libamtrack Docusaurus documentation site. It adds a dedicated API reference page for the pyamtrack.proton_models module and updates the porting-status table to reflect that these functions are now available. The documented signatures, parameter ranges, defaults, return units, and the Averaging enum all match the actual pyamtrack bindings.

Changes:

  • Adds a new proton_models.md API page covering dose_bortfeld and let_wilkens (parameters, validation, cartesian-product evaluation, examples, references).
  • Flips the status of the two proton pencil-beam functions from ❌ Not Ported to ✅ Fully Ported in function-status.md.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
docs/python/API/stopping/proton_models.md New API reference page for the proton analytical models; content is accurate but the relative cross-doc links (materials.md, ../installation.md, ../function-status.md) are broken.
docs/python/function-status.md Marks the proton functions as Fully Ported, but uses incorrect function names (proton.bortfeld_dose/proton.wilkens_let instead of proton_models.dose_bortfeld/proton_models.let_wilkens) and omits the doc links used by other ported entries.
Suppressed comments (1)

docs/python/API/stopping/proton_models.md:269

  • All three "See also" links are broken relative paths from docs/python/API/stopping/:
  • materials.md → resolves to docs/python/API/stopping/materials.md; the file is at docs/python/API/materials.md, so use ../materials.md.
  • ../installation.md → resolves to docs/python/API/installation.md; the file is at docs/python/installation.md, so use ../../installation.md.
  • ../function-status.md → resolves to docs/python/API/function-status.md; the file is at docs/python/function-status.md, so use ../../function-status.md.

Because docusaurus.config.ts sets onBrokenLinks: 'throw', these broken links will fail the build.

- [Materials](materials.md)
- [Python installation](../installation.md)
- [Function porting status](../function-status.md)

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

Comment thread docs/python/API/proton_models.md
Comment thread docs/python/function-status.md Outdated

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🟢 Approval recommended

It is a low-risk, documentation-only change whose function names, parameter order, units, cross-doc links, and literature references were verified against the library's C API and existing site conventions with no discrepancies found.

Review details
  • Files reviewed: 2/2 changed files
  • Comments generated: 0 new
  • Review effort level: Balanced

Comment thread docs/python/API/proton_models.md Outdated
Comment thread docs/python/API/proton_models.md Outdated
Comment thread docs/python/API/proton_models.md Outdated

@grzanka grzanka left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

see comments

Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl>
Signed-off-by: Witold Nieć <witold.niec@gmail.com>

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot review overview

🟡 Changes recommended

The fluence_cm2 parameter description in the new API page is truncated with a dangling "fluence." fragment and should be corrected before approval.

Review effort: Balanced
Findings: 2 Low severity

Open (2)

Comment thread docs/python/API/proton_models.md Outdated
Comment thread docs/python/function-status.md Outdated
Updated documentation for proton models and function status.

Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Signed-off-by: Witold Nieć <witold.niec@gmail.com>
@grzanka
grzanka merged commit 729a426 into main Oct 2, 2026
5 checks passed
@grzanka
grzanka deleted the proton_models-documentation branch October 2, 2026 19:36
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.

3 participants