Пример #1
0
/// Calculate the relative change in residuals with respect to the supplied
/// total number of counts
double PoldiAnalyseResiduals::relativeCountChange(
    const DataObjects::Workspace2D_sptr &sum, double totalMeasuredCounts) {
  const MantidVec &corrCounts = sum->readY(0);
  double csum = 0.0;
  for (auto it = corrCounts.begin(); it != corrCounts.end(); ++it) {
    csum += fabs(*it);
  }

  return csum / totalMeasuredCounts * 100.0;
}
/// Calculate the relative change in residuals with respect to the supplied
/// total number of counts
double PoldiAnalyseResiduals::relativeCountChange(
    const DataObjects::Workspace2D_sptr &sum, double totalMeasuredCounts) {
  const MantidVec &corrCounts = sum->readY(0);
  double csum = 0.0;
  for (double corrCount : corrCounts) {
    csum += fabs(corrCount);
  }

  return csum / totalMeasuredCounts * 100.0;
}