Commit 2b5cb9fb authored by Mathieu Tillet's avatar Mathieu Tillet
Browse files

Change min/max calculation for instrument actor

parent 337c360c
......@@ -1051,13 +1051,16 @@ void InstrumentActor::setDataIntegrationRange(const double &xmin,
m_DataMaxValue = -DBL_MAX;
const auto &spectrumInfo = workspace->spectrumInfo();
auto maskWksp = getMaskWorkspace();
// Ignore monitors if multiple detectors aren't grouped.
for (size_t i = 0; i < m_specIntegrs.size(); i++) {
const auto &spectrumDefinition = spectrumInfo.spectrumDefinition(i);
// Ignore monitors if they are masked on the view
if (spectrumDefinition.size() == 1 &&
std::find(monitorIndices.begin(), monitorIndices.end(), i) !=
monitorIndices.end())
(std::find(monitorIndices.begin(), monitorIndices.end(), i) !=
monitorIndices.end() ||
maskWksp->isMasked(i)))
continue;
auto sum = m_specIntegrs[i];
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment