Skip to content

Commit

Permalink
Fix for issue #727
Browse files Browse the repository at this point in the history
  • Loading branch information
lucabaldini committed Aug 22, 2024
1 parent 4a4e6a1 commit 947abd4
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ixpeobssim/evt/kislat2015.py
Original file line number Diff line number Diff line change
Expand Up @@ -613,7 +613,8 @@ def calculate_stokes_errors(I, Q, U, mu, W2):
# is then calculated with the ppf of a normal distribution.
pval[mask] = numpy.exp(-0.5 * (_Q**2. / dQ[mask]**2. + _U**2. / dU[mask]**2.))
conf[mask] = 1. - pval[mask]
sig[mask] = scipy.stats.norm.ppf(conf[mask])
# Note this has been fixed after https://github.com/lucabaldini/ixpeobssim/issues/727
sig[mask] = scipy.stats.norm.ppf(0.5 * conf[mask] + 0.5)
# And this is obviously ill-conditioned when we're many sigmas from zero,
# as the pvalue is too small, the detection confidence is 1, and the
# significance becomes infinite. Under this conditions we might as well
Expand Down

0 comments on commit 947abd4

Please sign in to comment.