Skip to content

Commit

Permalink
fix formula
Browse files Browse the repository at this point in the history
  • Loading branch information
jonahm-LANL committed Dec 8, 2024
1 parent 7da4cb8 commit 7756675
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/oscillations.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ void compute_local_gnu(grid_local_angles_type f, grid_Gnu_type local_Ns,
wmean /= (Ns + SMALL);

const double wb2N = Ns * wmean * wmean;
// should have units of w/sqrt(N).
// should have units of sum(w)/sqrt(N) ~ sqrt(N) wmean
// middle term scales b/c
// sqrt(sum w^2) ~ sqrt(N wmean^2) ~ sqrt(N) wmean
const double stddev =
sqrt(wb2N + (w2 + Ns * wb2N) / (fabs(Ns - 1) + SMALL));
sqrt(wb2N + Ns * (w2 - wb2N) / (fabs(Ns - 1) + SMALL));

// TODO(JMM): Generalize this for six species?
const double ELN =
Expand Down

0 comments on commit 7756675

Please sign in to comment.