Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

calculate_noise_parameters #1284

Open
Elisa-Visentin opened this issue Aug 9, 2024 · 2 comments
Open

calculate_noise_parameters #1284

Elisa-Visentin opened this issue Aug 9, 2024 · 2 comments

Comments

@Elisa-Visentin
Copy link

Hi, maybe this is more a discussion than an issue...
In the calculate_noise_parameters function you default extra_noise_dim to 0 if you get a value < 0

extra_noise_in_dim_pixels = max(0., added_noise)

In case you apply it only once to get the NSB level for a run, I agree that you cannot return a negative value (or you can return it but then you cannot remove noise from MC so you will have to put it to 0 later on). But in case you apply this function N times on the same run (i.e., using different subruns), if the average value is slightly above 0 you 'cut' one of the tails of the distribution, thus introducing a bias.
What about adding an option (e.g., a boolean variable) to the function to allow both for the default behaviour (i.e., default to 0) and for a more 'custom' behaviour (i.e., return also negative values)?

@moralejo
Copy link
Collaborator

moralejo commented Sep 2, 2024

Good point, although in practice if one gets values around 0 probably it is not worth to tune the NSB in the first place - I mean it will be a small tuning anyway, and the effect (compared to using dark MC) will be small.
Rather than adding an option on what to return I think you can add an argument (with 0 as default) which is the minimum allowed value. You then set it to -100 or whatever if you want to get the negative values. The important thing is that the default behavior, without that extra argument, stays the same.

@Elisa-Visentin
Copy link
Author

Well, it depends on the 'granularity' of your tuned MCs (and, so, on the requested accuracy for the analysis). And on the 'std deviation' of the NSB values evaluated for a single run
Of course the default behavior must not change :)

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

No branches or pull requests

2 participants