From 86ba6af2b7b474d4ed6e7c2574b15942f89cfb70 Mon Sep 17 00:00:00 2001
From: Matthias Puchner <github@mpuchner.de>
Date: Thu, 20 May 2021 06:26:21 +0200
Subject: [PATCH] working tags; docu

---
 Core/Fitting/SimDataPair.cpp        | 4 ++--
 Core/Simulation/GISASSimulation.cpp | 1 +
 Device/ProDetector/DetectorMask.cpp | 1 +
 3 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/Core/Fitting/SimDataPair.cpp b/Core/Fitting/SimDataPair.cpp
index a62c28e66b0..9672479c2c1 100644
--- a/Core/Fitting/SimDataPair.cpp
+++ b/Core/Fitting/SimDataPair.cpp
@@ -64,8 +64,8 @@ SimulationResult convertData(const ISimulation& simulation, const OutputData<dou
             (*roi_data)[it.roiIndex()] = data[it.roiIndex()];
         });
     } else if (haveSameDimensions(simulation.detector(), data)) {
-        // experimental data has same shape as the detector, we have to put orig data to smaller roi
-        // map
+        // experimental data has same shape as the detector, we have to copy the original
+        // data to a smaller roi map
         simulation.detector().iterateOverNonMaskedPoints([&](IDetector::const_iterator it) {
             (*roi_data)[it.roiIndex()] = data[it.detectorIndex()];
         });
diff --git a/Core/Simulation/GISASSimulation.cpp b/Core/Simulation/GISASSimulation.cpp
index d6b85d75e3f..c731298aea1 100644
--- a/Core/Simulation/GISASSimulation.cpp
+++ b/Core/Simulation/GISASSimulation.cpp
@@ -73,6 +73,7 @@ void GISASSimulation::setBeamParameters(double wavelength, double alpha_i, doubl
 
 size_t GISASSimulation::intensityMapSize() const
 {
+    // #baROI this can be heavily improved by using regionOfInterest directly??!
     size_t result = 0;
     detector().iterateOverRegionOfInterest([&result](IDetector::const_iterator) { ++result; });
     return result;
diff --git a/Device/ProDetector/DetectorMask.cpp b/Device/ProDetector/DetectorMask.cpp
index e58011e68d8..71d4bbacb71 100644
--- a/Device/ProDetector/DetectorMask.cpp
+++ b/Device/ProDetector/DetectorMask.cpp
@@ -100,6 +100,7 @@ void DetectorMask::process_masks()
         Bin1D binx = m_mask_data.getAxisBin(index, 0);
         Bin1D biny = m_mask_data.getAxisBin(index, 1);
         // setting mask to the data starting from last shape added
+        // #baROI refactor reverse iterator and not two vectors but a struct/pair
         bool is_masked(false);
         for (size_t i_shape = m_shapes.size(); i_shape > 0; --i_shape) {
             const IShape2D* shape = m_shapes[i_shape - 1].get();
-- 
GitLab