Repository navigation
Proton models documentation - #130
Conversation
There was a problem hiding this comment.
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.mdAPI page coveringdose_bortfeldandlet_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 todocs/python/API/stopping/materials.md; the file is atdocs/python/API/materials.md, so use../materials.md.../installation.md→ resolves todocs/python/API/installation.md; the file is atdocs/python/installation.md, so use../../installation.md.../function-status.md→ resolves todocs/python/API/function-status.md; the file is atdocs/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.
There was a problem hiding this comment.
🟢 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
Co-authored-by: Leszek Grzanka <grzanka@agh.edu.pl> Signed-off-by: Witold Nieć <witold.niec@gmail.com>
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>

This pull request adds comprehensive documentation for the analytical proton dose and LET models in the
pyamtrack.proton_modelsmodule 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 thedose_bortfeldandlet_wilkensfunctions.Documentation Additions:
proton_models.mddescribing thedose_bortfeldandlet_wilkensfunctions, including parameter details, return values, usage examples, and error handling.Status Updates:
proton_models.dose_bortfeldandproton_models.let_wilkensare now fully ported to Python, with links to the new API documentation.