Additional metric and viewcone restriction for monte carlo statistics estimator#2346
Additional metric and viewcone restriction for monte carlo statistics estimator#2346GernotMaier wants to merge 7 commits into
Conversation
|
There was a problem hiding this comment.
Pull request overview
This PR extends the Monte Carlo statistics estimation workflow to support (1) restricting estimates to a reduced view-cone radius and (2) estimating required thrown events from a user-specified total number of triggered events, in addition to the existing per-bin relative-uncertainty target. It also centralizes and applies test-resource path macro resolution when reading YAML configuration files.
Changes:
- Add
--reduced_view_cone_radiussupport and view-cone reweighting in the Monte Carlo statistics estimator. - Add
--target_triggered_eventsas an alternative metric (mutually exclusive with--target_relative_uncertainty) for required-events estimation. - Move/centralize
${static:...}/${generated:...}/${downloaded:...}path macro resolution intosimtools.io.io_handlerand apply it during config loading.
Reviewed changes
Copilot reviewed 12 out of 12 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/unit_tests/production_configuration/test_monte_carlo_statistics_estimator.py | Adds unit coverage for reduced view-cone logic, triggered-event target metric, and metadata/column changes. |
| tests/unit_tests/io/test_io_handler.py | Adds unit tests for recursive resolution of test-resource macros and canonical tests/resources/... paths. |
| tests/unit_tests/configuration/test_configurator.py | Verifies YAML config loading resolves ${static/generated/downloaded:...} macros into absolute paths. |
| tests/unit_tests/applications/test_production_derive_monte_carlo_statistics.py | Extends CLI parsing tests for --reduced_view_cone_radius and --target_triggered_events. |
| tests/integration_tests/config/production_derive_monte_carlo_statistics_target_uncertainty.yml | Updates integration config to use reduced view cone radius and new output naming. |
| tests/integration_tests/config/production_derive_monte_carlo_statistics_target_triggered_events.yml | Adds a new integration config for the triggered-event target mode. |
| src/simtools/testing/configuration.py | Delegates test-resource path resolution to simtools.io.io_handler. |
| src/simtools/production_configuration/monte_carlo_statistics_estimator.py | Implements view-cone restriction, triggered-event target estimation, and refactors estimation helpers/metadata handling. |
| src/simtools/io/io_handler.py | Introduces resolve_test_resource_paths utility for ${static/generated/downloaded:...} and tests/resources path normalization. |
| src/simtools/configuration/configurator.py | Applies test-resource path resolution when reading YAML configuration files. |
| src/simtools/applications/production_derive_monte_carlo_statistics.py | Adds new CLI options and enforces mutual exclusivity between the two target metrics. |
| docs/changes/2346.feature.md | Adds a changelog fragment describing the new estimator metric and view-cone restriction option. |
Comments suppressed due to low confidence (1)
tests/integration_tests/config/production_derive_monte_carlo_statistics_target_uncertainty.yml:17
integration_testsblock is not valid YAML for the expected workflow schema:test_nameis currently at the same indentation level as the list item, so it becomes a sibling key ofintegration_testsinstead of part of the test entry.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| overall_trigger_probability = _compute_overall_trigger_probability( | ||
| triggered_counts, | ||
| simulated_counts, | ||
| energy_mask, | ||
| target_relative_uncertainty, | ||
| ) |




Closes #2345