Skip to content
Snippets Groups Projects
Commit fbe6bd87 authored by Yurov, Dmitry's avatar Yurov, Dmitry
Browse files

Disabled cropping real data to roi for instruments others than GISAS

Redmine: #1991
parent 9f848a23
No related branches found
No related tags found
No related merge requests found
......@@ -73,7 +73,11 @@ void JobModelFunctions::setupJobItemForFit(JobItem *jobItem, const RealDataItem
JobModelFunctions::copyRealDataItem(jobItem, realDataItem);
JobModelFunctions::processInstrumentLink(jobItem);
JobModelFunctions::copyMasksToInstrument(jobItem);
JobModelFunctions::cropRealData(jobItem);
// TODO: remove if when other simulation types are ready for roi & masks
if (jobItem->instrumentItem()->modelType() == Constants::GISASInstrumentType)
JobModelFunctions::cropRealData(jobItem);
JobModelFunctions::createFitContainers(jobItem);
jobItem->setItemValue(JobItem::P_PRESENTATION_TYPE, Constants::FitComparisonPresentation);
}
......@@ -141,10 +145,12 @@ void JobModelFunctions::cropRealData(JobItem *jobItem) {
JobItemUtils::createDefaultDetectorMap(intensityItem, jobItem->instrumentItem());
auto instrument = jobItem->instrumentItem()->createInstrument();
instrument->getDetector()->iterate([&](IDetector::const_iterator it){
auto cropped_data = intensityItem->getOutputData();
(*cropped_data)[it.roiIndex()] = (*origData)[it.detectorIndex()];
}, /*visit_masked*/false);
instrument->getDetector()->iterate(
[&](IDetector::const_iterator it) {
auto cropped_data = intensityItem->getOutputData();
(*cropped_data)[it.roiIndex()] = (*origData)[it.detectorIndex()];
},
/*visit_masked*/ false);
intensityItem->updateDataRange();
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment