double Reflection::meanIntensityWithExclusion(std::string *filename, int start, int end) { if (filename == NULL) return meanIntensity(start, end); if (end == 0) end = acceptedCount(); double total_intensity = 0; double weight = 0; int accepted = acceptedCount(); for (int i = start; i < end; i++) { MillerPtr miller = this->acceptedMiller(i); if (accepted > 2 && miller->getFilename() == *filename) continue; total_intensity += miller->intensity(); weight += 1; } total_intensity /= weight; return total_intensity; }
void Reflection::reflectionDescription() { int acceptedCount = 0; std::ostringstream logged; for (int i = 0; i < millerCount(); i++) { MillerPtr miller = this->miller(i); logged << miller->getH() << "\t" << miller->getK() << "\t" << miller->getL() << "\t" << miller->getRawIntensity() << "\t" << "\t" << miller->getSigma() << "\t" << miller->getFilename() << std::endl; if (miller->accepted()) acceptedCount++; } logged << std::endl; std::cout << logged.str(); }