Skip to content

Commit

Permalink
Use _ann_ naming for annulus, support on apply corr
Browse files Browse the repository at this point in the history
Refs #10641
  • Loading branch information
DanNixon committed Dec 1, 2014
1 parent 9b43925 commit 7107ec9
Show file tree
Hide file tree
Showing 4 changed files with 24 additions and 5 deletions.
Expand Up @@ -2469,6 +2469,11 @@
<string>Flat</string>
</property>
</item>
<item>
<property name="text">
<string>Annulus</string>
</property>
</item>
<item>
<property name="text">
<string>Cylinder</string>
Expand Down
10 changes: 10 additions & 0 deletions Code/Mantid/MantidQt/CustomInterfaces/src/ApplyCorr.cpp
Expand Up @@ -131,6 +131,10 @@ namespace IDA
{
geom = "cyl";
}
else if ( geom == "Annulus" )
{
geom = "ann";
}

QString pyInput = "from IndirectDataAnalysis import abscorFeeder, loadNexus\n";

Expand Down Expand Up @@ -284,6 +288,12 @@ namespace IDA
uiForm().abscor_dsCorrections->setFBSuffixes(QStringList(ext + ".nxs"));
break;
case 1:
// Geomtry is annulus
ext = "_ann_Abs";
uiForm().abscor_dsCorrections->setWSSuffixes(QStringList(ext));
uiForm().abscor_dsCorrections->setFBSuffixes(QStringList(ext + ".nxs"));
break;
case 2:
// Geomtry is cylinder
ext = "_cyl_Abs";
uiForm().abscor_dsCorrections->setWSSuffixes(QStringList(ext));
Expand Down
10 changes: 7 additions & 3 deletions Code/Mantid/MantidQt/CustomInterfaces/src/CalcCorr.cpp
Expand Up @@ -180,7 +180,7 @@ namespace IDA
}
else if ( uiForm().absp_cbShape->currentText() == "Annulus" )
{
geom = "cyl";
geom = "ann";

// R3 only populated when using can. R4 is fixed to 0.0
if ( uiForm().absp_ckUseCan->isChecked() )
Expand Down Expand Up @@ -437,8 +437,12 @@ namespace IDA
void CalcCorr::shape(int index)
{
// Meaning of the "avar" variable changes depending on shape selection
if ( index == 0 ) { uiForm().absp_lbAvar->setText("Sample Angle:"); }
else if ( index == 1 ) { uiForm().absp_lbAvar->setText("Step Size:"); }
if(index == 0)
// For Flat
uiForm().absp_lbAvar->setText("Sample Angle:");
else
// For Annulus and CYlinder
uiForm().absp_lbAvar->setText("Step Size:");

// Radius 2 is not used for annulus
uiForm().absp_ler2->setEnabled(index != 2);
Expand Down
4 changes: 2 additions & 2 deletions Code/Mantid/scripts/Inelastic/IndirectAbsCor.py
Expand Up @@ -144,8 +144,8 @@ def AbsRun(inputWS, geom, beam, ncan, size, density, sigs, siga, avar, Verbose,
(A1,A2,A3,A4) = FlatAbs(ncan, size, density, sigs, siga, angles, waves)
kill = 0

#geometry is a cylinder
elif geom == 'cyl':
#geometry is an annulus or cylinder
elif geom == 'cyl' or geom == 'ann':
astep = avar
if (astep) < 1e-5:
error = 'Step size is zero'
Expand Down

0 comments on commit 7107ec9

Please sign in to comment.