diff --git a/Code/Mantid/Framework/Algorithms/src/Q1D2.cpp b/Code/Mantid/Framework/Algorithms/src/Q1D2.cpp index a6f36f228a9bda16c682ee000aa9a43e86f8400a..b241a0cfab2515794f732ea690bf808bd2184e06 100644 --- a/Code/Mantid/Framework/Algorithms/src/Q1D2.cpp +++ b/Code/Mantid/Framework/Algorithms/src/Q1D2.cpp @@ -12,6 +12,7 @@ #include "MantidDataObjects/Histogram1D.h" #include "MantidAlgorithms/Qhelper.h" #include "MantidKernel/BoundedValidator.h" +#include "MantidAPI/ISpectrum.h" namespace Mantid { @@ -120,7 +121,7 @@ void Q1D2::exec() try { det = m_dataWS->getDetector(i); } catch (Exception::NotFoundError&) { - g_log.warning() << "Spectrum index " << i << " has no detector assigned to it - discarding" << std::endl; + g_log.warning() << "Workspace index " << i << " (SpectrumIndex = " << m_dataWS->getSpectrum(i)->getSpectrumNo() << ") has no detector assigned to it - discarding" << std::endl; // Catch if no detector. Next line tests whether this happened - test placed // outside here because Mac Intel compiler doesn't like 'continue' in a catch // in an openmp block. diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/SANSRunWindow.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/SANSRunWindow.cpp index 1159939ffbf3f36965a97f32f1f46c1ff784492f..1065f4cb53adf1c91f6b8f77b4e5b0b7b20f0849 100644 --- a/Code/Mantid/MantidQt/CustomInterfaces/src/SANSRunWindow.cpp +++ b/Code/Mantid/MantidQt/CustomInterfaces/src/SANSRunWindow.cpp @@ -828,7 +828,7 @@ bool SANSRunWindow::loadUserFile() m_uiForm.gravity_check->setChecked(false); } - ////Detector bank: support REAR, FRONT, HAB, BOTH, MERGED options + ////Detector bank: support REAR, FRONT, HAB, BOTH, MERGED, MERGE options QString detName = runReduceScriptFunction( "print i.ReductionSingleton().instrument.det_selection").trimmed(); if (detName == "REAR" || detName == "MAIN"){ @@ -837,7 +837,7 @@ bool SANSRunWindow::loadUserFile() m_uiForm.detbank_sel->setCurrentIndex(1); }else if (detName == "BOTH"){ m_uiForm.detbank_sel->setCurrentIndex(2); - }else if (detName == "MERGED"){ + }else if (detName == "MERGED" || detName== "MERGE"){ m_uiForm.detbank_sel->setCurrentIndex(3); } @@ -1960,7 +1960,7 @@ QString SANSRunWindow::readUserFileGUIChanges(const States type) if ( ( ! floodFile.isEmpty() ) && ( m_uiForm.detbank_sel->currentText() == "HAB" ) ) { - issueWarning("Flood file may not work", "Flood files have not always been compatible with the HAB detector you might want to check '"+floodFile+"'.\nThe reduction will continue"); + g_log.warning() << "::SANS::Warning: Flood files will be ignored for the HAB/FRONT detector" <<std::endl; } // Set the wavelength ranges, equal to those for the sample unless this box is checked // Also check if the Trans Fit on/off tick is on or off. If Off then set the trans_opt to off @@ -2191,6 +2191,8 @@ void SANSRunWindow::handleReduceButtonClick(const QString & typeStr) //Reset the objects by initialising a new reducer object //py_code = "i._refresh_singleton()"; + if (runMode == SingleMode) // TODO: test if it is really necessary to reload the file settings. + { py_code = "\ni.ReductionSingleton().set_instrument(isis_instrument."+getInstrumentClass()+")"; //restore the settings from the user file py_code += "\ni.ReductionSingleton().user_file_path='"+ @@ -2200,7 +2202,7 @@ void SANSRunWindow::handleReduceButtonClick(const QString & typeStr) std::cout << "\n\n" << py_code.toStdString() << "\n\n"; runReduceScriptFunction(py_code); - + } // Mark that a reload is necessary to rerun the same reduction forceDataReload(); //Reenable stuff diff --git a/Code/Mantid/scripts/SANS/ISISCommandInterface.py b/Code/Mantid/scripts/SANS/ISISCommandInterface.py index d9b341d53fffc2084a1f238ae35b087adb1703b3..ae71d841b2fda9551648b4cfbc196c8e28775e33 100644 --- a/Code/Mantid/scripts/SANS/ISISCommandInterface.py +++ b/Code/Mantid/scripts/SANS/ISISCommandInterface.py @@ -396,6 +396,7 @@ def WavRangeReduction(wav_start=None, wav_end=None, full_trans_wav=None, name_su ReductionSingleton.replace(ReductionSingleton().settings()) ReductionSingleton().instrument.setDetector('front') + SetDetectorFloodFile('') #FIXME: now the FloodFile does not refer to FRONT/HAB detectors. But, in the future, this line must be erased. retWSname_front = _WavRangeReduction(name_suffix) retWSname = retWSname_front