luca-fiorito-11/sandy

negative samples

luca-fiorito-11 opened this issue · 1 comments

When sampling from a Normal distribution with large standard deviations it is likely to draw negative perturbations.
Physically many quantities such as cross sections or energy distributions do not take negative values.

SANDY must handle the negative samples in a consistent manner.

Two methods were proposed:

method 1

Samples outside the range [0, 2*mean] are set to mean.
The truncated PDF is shown below.
truncated_pdf_mean

method 2

Samples outside the range [0, 2*mean] are set to 0 or 2*mean respectively if they fall below or above the defined range.
The truncated PDF is shown below.
truncated_pdf_tails

Comparison

truncated_pdf_deviation