diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.h b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.h
index a85d80e6f3f3..85ce1560ca60 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.h
+++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.h
@@ -47,6 +47,7 @@ public slots:
void loadSettings();
void saveSettings();
+ bool validateParFile();
bool validateRebin();
bool validateVanCal();
diff --git a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.ui b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.ui
index 16bd3b464f97..fbf54a7d743a 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.ui
+++ b/Code/Mantid/MantidQt/CustomInterfaces/inc/MantidQtCustomInterfaces/Indirect/IndirectDiffractionReduction.ui
@@ -6,7 +6,7 @@
0
0
- 495
+ 450
500
@@ -290,6 +290,36 @@
+ -
+
+
-
+
+
+ false
+
+
+ Load PAR file:
+
+
+
+ -
+
+
+ false
+
+
+
+
+
+
+ .par
+ .dat
+
+
+
+
+
+
@@ -443,6 +473,41 @@
MantidQtMantidWidgets/IndirectInstrumentConfig.h
+
+ iicInstrumentConfiguration
+ dem_ckSumFiles
+ set_leSpecMin
+ set_leSpecMax
+ ckIndividualGrouping
+ ckPARFile
+ cbPlotType
+ ckGSS
+ ckNexus
+ ckAscii
+ pbHelp
+ pbRun
+ pbManageDirs
+ leRebinStart
+ leRebinEnd
+ leRebinWidth
+
-
+
+
+ ckPARFile
+ toggled(bool)
+ rfPARFile
+ setEnabled(bool)
+
+
+ 103
+ 328
+
+
+ 276
+ 327
+
+
+
+
diff --git a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDiffractionReduction.cpp b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDiffractionReduction.cpp
index e299035cf7a8..6d26878b2fae 100644
--- a/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDiffractionReduction.cpp
+++ b/Code/Mantid/MantidQt/CustomInterfaces/src/Indirect/IndirectDiffractionReduction.cpp
@@ -120,7 +120,7 @@ void IndirectDiffractionReduction::demonRun()
}
else
{
- if(!m_uiForm.dem_rawFiles->isValid() || !validateRebin())
+ if(!m_uiForm.dem_rawFiles->isValid() || !validateRebin() || !validateParFile())
{
showInformationBox("Invalid input.\nIncorrect entries marked with red star.");
return;
@@ -196,6 +196,7 @@ void IndirectDiffractionReduction::runGenericReduction(QString instName, QString
rebin = rebinStart + "," + rebinWidth + "," + rebinEnd;
bool individualGrouping = m_uiForm.ckIndividualGrouping->isChecked();
+ bool useParFile = m_uiForm.ckPARFile->isChecked();
// Get detector range
std::vector detRange;
@@ -223,6 +224,9 @@ void IndirectDiffractionReduction::runGenericReduction(QString instName, QString
msgDiffReduction->setProperty("SaveFormats", saveFormats);
msgDiffReduction->setProperty("OutputWorkspace", "IndirectDiffraction_Workspaces");
+ if(useParFile)
+ msgDiffReduction->setProperty("InstrumentParFile", m_uiForm.rfPARFile->getFirstFilename().toStdString());
+
m_batchAlgoRunner->addAlgorithm(msgDiffReduction);
m_batchAlgoRunner->executeBatchAsync();
@@ -404,6 +408,12 @@ void IndirectDiffractionReduction::instrumentSelected(const QString & instrument
m_uiForm.ckIndividualGrouping->setToolTip("");
m_uiForm.ckIndividualGrouping->setEnabled(true);
}
+
+ // Update the VESUVIO PAR file option
+ bool isVesuvio = instrumentName == "VESUVIO";
+ if(!isVesuvio)
+ m_uiForm.ckPARFile->setChecked(false);
+ m_uiForm.ckPARFile->setEnabled(isVesuvio);
}
/**
@@ -452,6 +462,19 @@ void IndirectDiffractionReduction::saveSettings()
settings.endGroup();
}
+/**
+ * Validates the instrument PAR file option.
+ *
+ * @returns Result of validation
+ */
+bool IndirectDiffractionReduction::validateParFile()
+{
+ bool useParFile = m_uiForm.ckPARFile->isChecked();
+ if(useParFile)
+ return m_uiForm.rfPARFile->isValid();
+ return true;
+}
+
/**
* Validates the rebinning fields and updates invalid markers.
*