diff --git a/Code/Mantid/Framework/Algorithms/src/MultipleScatteringAbsorption.cpp b/Code/Mantid/Framework/Algorithms/src/MultipleScatteringAbsorption.cpp index e4570e7cc9999f071ce44600cd64ce0b284f1e7a..78a3d25cb1f6538a0818510771cae3e8266dc01f 100644 --- a/Code/Mantid/Framework/Algorithms/src/MultipleScatteringAbsorption.cpp +++ b/Code/Mantid/Framework/Algorithms/src/MultipleScatteringAbsorption.cpp @@ -104,6 +104,7 @@ void MultipleScatteringAbsorption::exec() Geometry::IDetector_sptr det = in_WS->getDetector(index); if (det == NULL) throw std::runtime_error("Failed to find detector"); + if ( det->isMasked() ) continue; double l2 = det->getDistance(*sample); double tth_rad = in_WS->detectorTwoTheta(det); double total_path = l1 + l2; diff --git a/Code/Mantid/Framework/DataHandling/src/SaveGSS.cpp b/Code/Mantid/Framework/DataHandling/src/SaveGSS.cpp index 106060da21e952ebd79d259bb1448a1d5b6f45ba..34977da2dc21f39147d44e5bf88a3418d7bf943e 100644 --- a/Code/Mantid/Framework/DataHandling/src/SaveGSS.cpp +++ b/Code/Mantid/Framework/DataHandling/src/SaveGSS.cpp @@ -125,6 +125,17 @@ void SaveGSS::exec() double l1, l2, tth; for (int i=0;i<nHist;i++) { + Geometry::IInstrument_const_sptr instrument = inputWS->getInstrument(); + if (instrument != NULL) + { + Geometry::IObjComponent_const_sptr source = instrument->getSource(); + Geometry::IObjComponent_const_sptr sample = instrument->getSample(); + if ( source != NULL && sample != NULL ) + { + Geometry::IDetector_const_sptr det = inputWS->getDetector(static_cast<size_t>(i)); + if ( det->isMasked() ) continue; + } + } getFocusedPos(inputWS, i, l1, l2, tth); if (!split && i==0) // Assign only one file {