Skip to content
Snippets Groups Projects
Commit 6cb24a4f authored by Wuttke, Joachim's avatar Wuttke, Joachim
Browse files

std var name

parent c2842fce
No related branches found
No related tags found
1 merge request!2384all "set" classes now inherit VectorWC
......@@ -42,16 +42,16 @@ bool haveSameSizes(const IDetector& detector, const Datafield& data)
Datafield repositionData(const ScatteringSimulation& simulation, const Datafield& data)
{
Frame coordSystem = simulation.detector().clippedFrame();
Frame frame = simulation.detector().clippedFrame();
std::vector<double> values(coordSystem.size(), 0.);
std::vector<double> values(frame.size(), 0.);
std::vector<double> errors;
if (data.hasErrorSigmas())
errors = std::vector<double>(coordSystem.size(), 0.);
errors = std::vector<double>(frame.size(), 0.);
const IDetector& det = simulation.detector();
std::vector<size_t> ai = det.activeIndices();
if (coordSystem.hasSameSizes(data.frame())) {
if (frame.hasSameSizes(data.frame())) {
for (unsigned long i : ai) {
values[i] = data[i];
if (data.hasErrorSigmas())
......@@ -69,7 +69,7 @@ Datafield repositionData(const ScatteringSimulation& simulation, const Datafield
throw std::runtime_error(
"FitObject::init_dataset: Detector and experimental data have different shape");
return {coordSystem.clonedAxes(), values, errors};
return {frame.clonedAxes(), values, errors};
}
} // namespace
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment