Enhance DepositedChargeActor with uncertainty statistics#1083
Open
srmarcballestero wants to merge 7 commits into
Open
Enhance DepositedChargeActor with uncertainty statistics#1083srmarcballestero wants to merge 7 commits into
srmarcballestero wants to merge 7 commits into
Conversation
There was a problem hiding this comment.
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) inGateDepositedChargeActorand expose them through pybind. - Add Python-side
nominal_charge_statistics/dynamic_charge_statisticsdictionaries (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.
…ero in uncertainty test
…SimulationStatisticsActor) and update the tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Enhance the DepositedChargeActor to include history-by-history uncertainty statistics for deposited charge. Add corresponding tests and documentation.