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

merge fct

parent 15eb9005
No related branches found
No related tags found
1 merge request!1318merge functions in main computation
...@@ -106,7 +106,7 @@ private: ...@@ -106,7 +106,7 @@ private:
//! Normalizes the detector counts to beam intensity, to solid angle, and to exposure angle. //! Normalizes the detector counts to beam intensity, to solid angle, and to exposure angle.
virtual void normalize(size_t /*start*/, size_t /*n_elements*/) {} virtual void normalize(size_t /*start*/, size_t /*n_elements*/) {}
virtual void addBackgroundIntensity(size_t start, size_t n_elements) = 0; virtual void addBackgroundIntensity(size_t, size_t) {}
virtual void addDataToCache(double weight) = 0; virtual void addDataToCache(double weight) = 0;
......
...@@ -54,16 +54,9 @@ void SpecularSimulation::runComputation(const ReSample& re_sample, size_t iEleme ...@@ -54,16 +54,9 @@ void SpecularSimulation::runComputation(const ReSample& re_sample, size_t iEleme
{ {
SpecularElement& ele = *(m_eles.begin() + static_cast<long>(iElement)); SpecularElement& ele = *(m_eles.begin() + static_cast<long>(iElement));
SpecularComputation(re_sample, options(), progress()).run(ele); SpecularComputation(re_sample, options(), progress()).run(ele);
}
void SpecularSimulation::addBackgroundIntensity(size_t start, size_t n_elements) if (background())
{ ele.setIntensity(background()->addBackground(ele.intensity()));
if (!background())
return;
for (size_t i = start, stop_point = start + n_elements; i < stop_point; ++i) {
SpecularElement& element = m_eles[i];
element.setIntensity(background()->addBackground(element.intensity()));
}
} }
void SpecularSimulation::addDataToCache(double weight) void SpecularSimulation::addDataToCache(double weight)
......
...@@ -48,8 +48,6 @@ private: ...@@ -48,8 +48,6 @@ private:
void runComputation(const ReSample& re_sample, size_t iElement) override; void runComputation(const ReSample& re_sample, size_t iElement) override;
void addBackgroundIntensity(size_t start_ind, size_t n_elements) override;
void addDataToCache(double weight) override; void addDataToCache(double weight) override;
//... Overridden getters: //... Overridden getters:
......
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