Skip to content

Commit

Permalink
Fixed bug in calculation of hs stdevs
Browse files Browse the repository at this point in the history
  • Loading branch information
the-florist committed Aug 23, 2024
1 parent 7c99ae1 commit 62c0baa
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions Source/InitialConditions/ScalarFields/RandomField.impl.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -331,12 +331,12 @@ inline void RandomField::calc_spectrum()
{
stdevs[0] += pow(hplusx[(k + N * (j + N * i))*skip] - means[0], 2.);
stdevs[1] += pow(hcrossx[(k + N * (j + N * i))*skip] - means[1], 2.);
}

for(int s=0; s<2; s++)
{
stdevs[s] /= pow(Nc, 3.);
stdevs[s] = sqrt(stdevs[s]);
}
for(int s=0; s<2; s++)
{
stdevs[s] /= pow(Nc, 3.);
stdevs[s] = sqrt(stdevs[s]);
}

if (m_spec_type == "position")
Expand Down

0 comments on commit 62c0baa

Please sign in to comment.