Skip to content

Commit

Permalink
Fixed an error in Rp. Refs #6747.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Apr 12, 2013
1 parent 0cb12a4 commit c818897
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Code/Mantid/Framework/Kernel/src/Statistics.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -254,14 +254,14 @@ namespace Mantid
double diff = obs_i - cal_i;

sumrpnom += fabs(diff);
sumrpdenom += fabs(cal_i);
sumrpdenom += fabs(obs_i);

sumnom += weight*diff*diff;
sumdenom += weight*obs_i*obs_i;
}

Rfactor rfactor;
rfactor.Rp = std::sqrt(sumrpnom/sumrpdenom);
rfactor.Rp = (sumrpnom/sumrpdenom);
rfactor.Rwp = std::sqrt(sumnom/sumdenom);

return rfactor;
Expand Down

0 comments on commit c818897

Please sign in to comment.