Skip to content

Conversation

@NickiBond
Copy link
Contributor

@NickiBond NickiBond commented Nov 5, 2025

Changes to improve how V2DL3 handles noise including:

  1. Using average of qStatsData.getCameraAverageTraceVar instead of qStatsData.getCameraAverageTraceVarTimeIndpt for EA selection. This is because qStatsData.getCameraAverageTraceVarTimeIndpt excludes all pixels that were excluded at any time during the run which can lead to calculating noise from very few pixels which can be unreliable.
  2. Use closest EA if noise is out of range rather than throwing out the run. A warning message telling user how far out of range it is has been added.
  3. If pixels are suppressed during a timeslice, qStatsData.getCameraAverageTraceVar returns an artificially low value. Added following procedure:
If > 200 pixels suppressed:
        • Find mean and standard deviation of event noises.
        • If noise is X standard deviations lower than the mean (currently set at 3):
                • Use mean of the noises within X standard deviations instead for those noise events (usually one timeslice)
        • Else:
                • Change in noise due to suppressed pixels is small, print warning and continue.
  1. Moved avNonNegativeNoises /= nNonNegativeNoises inside if/else statement to avoid a potential divide by 0 error.

@matthew-w-lundy
Copy link
Contributor

This test failure is not a problem. It appears to run fine to generate files before and after, and the results are expected to be different so the comparison fails.

@NickiBond
Copy link
Contributor Author

@matthew-w-lundy thank you for checking that.

@NickiBond NickiBond requested a review from njucarlchen November 7, 2025 17:17
@NickiBond NickiBond marked this pull request as ready for review November 7, 2025 17:18
Copy link

@njucarlchen njucarlchen left a comment

Choose a reason for hiding this comment

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

Code changes Look good. And conversions of a few runs on my machine succeeded without issue.

@NickiBond NickiBond merged commit bc4aa63 into main Nov 24, 2025
2 of 3 checks passed
@NickiBond NickiBond deleted the bugfix/noise_vegas branch November 24, 2025 10:37
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.

4 participants