Skip to content

Commit

Permalink
Fix UI issues in calibration tab
Browse files Browse the repository at this point in the history
Refs #10513
  • Loading branch information
DanNixon committed Feb 5, 2015
1 parent 2166166 commit 6ae76a4
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 23 deletions.
Expand Up @@ -48,7 +48,6 @@ namespace CustomInterfaces
virtual bool validate();

private slots:
void algorithmsComplete(bool error);
void calPlotRaw();
void calPlotEnergy();
void calMinChanged(double);
Expand Down
Expand Up @@ -75,6 +75,9 @@
<property name="maximum">
<double>999.990000000000009</double>
</property>
<property name="value">
<double>1.0</double>
</property>
</widget>
</item>
<item>
Expand Down Expand Up @@ -161,6 +164,9 @@
<property name="maximum">
<double>999.990000000000009</double>
</property>
<property name="value">
<double>1.0</double>
</property>
</widget>
</item>
</layout>
Expand Down
Expand Up @@ -165,8 +165,6 @@ namespace CustomInterfaces

void IndirectCalibration::run()
{
connect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(algorithmsComplete(bool)));

// Get properties
QString firstFile = m_uiForm.leRunNo->getFirstFilename();
QString filenames = m_uiForm.leRunNo->getFilenames().join(",");
Expand Down Expand Up @@ -224,10 +222,6 @@ namespace CustomInterfaces
{
QString resolutionWsName = outputWorkspaceNameStem + "_res";

QString scaleFactor("1.0");
if(m_uiForm.ckResolutionScale->isChecked() && !m_uiForm.spResolutionScale->text().isEmpty())
scaleFactor = m_uiForm.spResolutionScale->text();

QString resDetectorRange = QString::number(m_dblManager->value(m_properties["ResSpecMin"])) + ","
+ QString::number(m_dblManager->value(m_properties["ResSpecMax"]));

Expand All @@ -249,12 +243,14 @@ namespace CustomInterfaces
resAlg->setProperty("RebinParam", rebinString.toStdString());
resAlg->setProperty("DetectorRange", resDetectorRange.toStdString());
resAlg->setProperty("BackgroundRange", background.toStdString());
resAlg->setProperty("ScaleFactor", m_uiForm.spScale->value());
resAlg->setProperty("Smooth", m_uiForm.ckSmoothResolution->isChecked());
resAlg->setProperty("Verbose", m_uiForm.ckVerbose->isChecked());
resAlg->setProperty("Plot", m_uiForm.ckPlot->isChecked());
resAlg->setProperty("Save", m_uiForm.ckSave->isChecked());

if(m_uiForm.ckResolutionScale->isChecked())
resAlg->setProperty("ScaleFactor", m_uiForm.spScale->value());

m_batchAlgoRunner->addAlgorithm(resAlg);

// When creating resolution file take the resolution workspace as the result
Expand All @@ -264,21 +260,6 @@ namespace CustomInterfaces
m_batchAlgoRunner->executeBatchAsync();
}

void IndirectCalibration::algorithmsComplete(bool error)
{
if(error)
return;

QString firstFile = m_uiForm.leRunNo->getFirstFilename();
QFileInfo firstFileInfo(firstFile);
/* QString calFileName = firstFileInfo.baseName() + "_" + m_uiForm.iicInstrumentConfiguration->getAnalyserName() + m_uiForm.iicInstrumentConfiguration->getReflectionName() + "_calib.nxs"; */

/* m_uiForm.ind_calibFile->setFileTextWithSearch(calFileName); */
/* m_uiForm.ckUseCalib->setChecked(true); */

disconnect(m_batchAlgoRunner, SIGNAL(batchComplete(bool)), this, SLOT(algorithmsComplete(bool)));
}

bool IndirectCalibration::validate()
{
MantidQt::CustomInterfaces::UserInputValidator uiv;
Expand Down

0 comments on commit 6ae76a4

Please sign in to comment.