Skip to content

Detector systematics through snowstorm split and hist stage - #893

Merged
thehrh merged 9 commits into
masterfrom
snowstorm
Feb 26, 2026
Merged

thehrh merged 9 commits into
masterfrom
snowstorm

Conversation

@JanWeldert

Copy link
Copy Markdown
Collaborator

First draft of a stage applying detector systematics by splitting snowstorm simulation in halves and extracting (linear) gradients from the two halves. It accepts snowstorm simulation where the detector systematics are sampled uniformly and from a Gaussian (the only two existing options).

@JanWeldert
JanWeldert marked this pull request as ready for review February 20, 2026 09:43

@thehrh thehrh left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Please render your code more maintainable and reviewable by adding appropriate comments and docstrings (see my various inline comments). Right now, it is hard to impossible to judge whether the service is doing what it is intended to.

Comment thread pisa/stages/cont_sys/snowstorm_hist.py Outdated
Comment thread pisa/stages/cont_sys/snowstorm_hist.py Outdated
Comment thread pisa/stages/cont_sys/snowstorm_hist.py Outdated
Comment thread pisa/stages/cont_sys/snowstorm_hist.py Outdated
Comment thread pisa/stages/cont_sys/snowstorm_hist.py Outdated
Comment thread pisa/stages/cont_sys/snowstorm_hist.py
Comment thread pisa/stages/cont_sys/snowstorm_hist.py
Comment thread pisa/stages/cont_sys/snowstorm_hist.py
Comment thread pisa/stages/utils/hist.py Outdated
Comment thread pisa/stages/cont_sys/snowstorm_hist.py Outdated
Comment thread pisa/stages/utils/hist.py Outdated
container.representation = self.apply_mode
container["weights"] = hist
for k in container.validity["weights"]:
# Histogramming does not invalidate other representations.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Ok, because setting an item of a container (i.e. in this case the statement container["weights"] = hist) results in a call of mark_changed("weights"), which invalidates the "weights" in the "events" representation (or any other), even though the histogramming operation doesn't mathematically invalidate them.

Comment thread pisa/stages/cont_sys/snowstorm_hist.py
Comment thread pisa/stages/cont_sys/snowstorm_hist.py Outdated
@thehrh
thehrh merged commit 12ce315 into master Feb 26, 2026
0 of 3 checks passed
@thehrh
thehrh deleted the snowstorm branch February 26, 2026 11:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants