Scaling/Merging: Clean-up data structures

This commit is contained in:
2026-05-25 18:23:18 +02:00
parent 61776a446e
commit ea36b26a4f
12 changed files with 190 additions and 630 deletions
@@ -2,9 +2,11 @@
// SPDX-License-Identifier: GPL-3.0-only
#include "UpdateReflectionResolution.h"
#include "IntegrationOutcome.h"
#include "../common/CrystalLattice.h"
ResolutionStats UpdateReflectionResolution(const UnitCell &cell, std::vector<std::vector<Reflection> > &reflections) {
ResolutionStats UpdateReflectionResolution(const UnitCell &cell, std::vector<IntegrationOutcome > &reflections) {
ResolutionStats ret;
CrystalLattice latt(cell);
@@ -13,12 +15,12 @@ ResolutionStats UpdateReflectionResolution(const UnitCell &cell, std::vector<std
const auto cstar = latt.Cstar();
for (auto &image: reflections) {
if (!image.empty()) {
if (!image.reflections.empty()) {
ret.n_images++;
ret.n_reflections += image.size();
ret.n_reflections += image.reflections.size();
}
for (auto &r: image) {
for (auto &r: image.reflections) {
Coord q = r.h * astar + r.k * bstar + r.l * cstar;
auto qlen = q.Length();
if (qlen > 1e-6) {