Skip to content

Enhance DepositedChargeActor with uncertainty statistics#1083

Open
srmarcballestero wants to merge 7 commits into
OpenGATE:masterfrom
srmarcballestero:feature/charge_actor
Open

Enhance DepositedChargeActor with uncertainty statistics#1083
srmarcballestero wants to merge 7 commits into
OpenGATE:masterfrom
srmarcballestero:feature/charge_actor

Conversation

@srmarcballestero

Copy link
Copy Markdown
Contributor

Enhance the DepositedChargeActor to include history-by-history uncertainty statistics for deposited charge. Add corresponding tests and documentation.

Copilot AI review requested due to automatic review settings July 2, 2026 09:26

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

Adds history-by-history uncertainty statistics to DepositedChargeActor by accumulating per-event first/second moments in the C++ core, exposing derived statistics in the Python actor API, documenting the feature, and validating it with a new test.

Changes:

  • Accumulate per-event deposited charge moments (Sum x, Sum x^2, N) in GateDepositedChargeActor and expose them through pybind.
  • Add Python-side nominal_charge_statistics / dynamic_charge_statistics dictionaries (mean/std/sem/total uncertainty, etc.) and propagate values back from subprocess runs.
  • Add documentation and a new regression test to cross-check the uncertainty estimate.

Reviewed changes

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

Show a summary per file
File Description
opengate/tests/src/actors/test099_deposited_charge_actor_uncertainty.py New test validating internal consistency and batch-vs-history uncertainty agreement.
opengate/actors/miscactors.py Python API: store moments/event count, compute uncertainty stats dictionaries, and print uncertainties in __str__.
docs/source/user_guide/user_guide_reference_actors.rst User guide section documenting the new uncertainty statistics and example usage.
core/opengate_core/opengate_lib/pyGateDepositedChargeActor.cpp pybind exports for squared-moment getters and event count getter.
core/opengate_core/opengate_lib/GateDepositedChargeActor.h Core actor API extended with per-event callbacks and new merged accumulators.
core/opengate_core/opengate_lib/GateDepositedChargeActor.cpp Core implementation: per-event buffering + moment accumulation + thread-safe merge.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread opengate/actors/miscactors.py Outdated

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Pull request overview

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

Comment thread opengate/actors/miscactors.py
Comment thread docs/source/user_guide/user_guide_reference_actors.rst
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