mirror of
https://github.com/openmc-dev/openmc.git
synced 2026-07-28 14:15:42 -04:00
Fixed degrees of freedom for confidence intervals using t_percentile.
This commit is contained in:
parent
a258b7f73f
commit
792eb39e89
6 changed files with 8 additions and 8 deletions
|
|
@ -407,7 +407,7 @@ contains
|
|||
if (confidence_intervals) then
|
||||
! Calculate t-value for confidence intervals
|
||||
alpha = ONE - CONFIDENCE_LEVEL
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations)
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations - 1)
|
||||
else
|
||||
t_value = ONE
|
||||
end if
|
||||
|
|
@ -441,7 +441,7 @@ contains
|
|||
if (confidence_intervals) then
|
||||
! Calculate t-value for confidence intervals
|
||||
alpha = ONE - CONFIDENCE_LEVEL
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations)
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations - 1)
|
||||
else
|
||||
t_value = ONE
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -1237,7 +1237,7 @@ contains
|
|||
if (confidence_intervals) then
|
||||
! Calculate t-value for confidence intervals
|
||||
alpha = ONE - CONFIDENCE_LEVEL
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations)
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations - 1)
|
||||
|
||||
! Adjust sum_sq
|
||||
global_tallies(:) % sum_sq = t_value * global_tallies(:) % sum_sq
|
||||
|
|
|
|||
|
|
@ -347,7 +347,7 @@ contains
|
|||
if (confidence_intervals) then
|
||||
! Calculate t-value for confidence intervals
|
||||
alpha = ONE - CONFIDENCE_LEVEL
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations)
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations - 1)
|
||||
else
|
||||
t_value = ONE
|
||||
end if
|
||||
|
|
|
|||
|
|
@ -1864,7 +1864,7 @@ contains
|
|||
! Calculate t-value for confidence intervals
|
||||
if (confidence_intervals) then
|
||||
alpha = ONE - CONFIDENCE_LEVEL
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations)
|
||||
t_value = t_percentile(ONE - alpha/TWO, n_realizations - 1)
|
||||
end if
|
||||
|
||||
do i = 1, n_tallies
|
||||
|
|
|
|||
|
|
@ -21,7 +21,7 @@ sp = StatePoint(filename)
|
|||
|
||||
# Calculate t-value for 95% two-sided CI
|
||||
n = sp.current_batch - sp.n_inactive
|
||||
t_value = scipy.stats.t.ppf(0.975, n)
|
||||
t_value = scipy.stats.t.ppf(0.975, n - 1)
|
||||
|
||||
# Loop over all tallies
|
||||
for i, t in enumerate(sp.tallies):
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ sp = StatePoint(filename)
|
|||
|
||||
# Calculate t-value for 95% two-sided CI
|
||||
n = sp.current_batch - sp.n_inactive
|
||||
t_value = scipy.stats.t.ppf(0.975, n)
|
||||
t_value = scipy.stats.t.ppf(0.975, n - 1)
|
||||
|
||||
# Loop over all tallies
|
||||
print("Reading data...")
|
||||
|
|
@ -60,7 +60,7 @@ for t in sp.tallies:
|
|||
|
||||
# Make figure
|
||||
print("Making colorplot...")
|
||||
plt.imshow(error, interpolation="nearest")
|
||||
plt.imshow(mean, interpolation="nearest")
|
||||
plt.colorbar()
|
||||
plt.xlim((0,nx))
|
||||
plt.ylim((0,ny))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue