Skip to content

Commit

Permalink
Refs #5421 Tweaks and bugfixes for Bayes interface.
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel Jackson committed Oct 25, 2013
1 parent 4f8984c commit 1b68631
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ namespace MantidQt
*/
void IndirectBayesTab::runPythonScript(const QString& pyInput)
{
emit executePythonScript(pyInput, false);
emit executePythonScript(pyInput, true);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion Code/Mantid/MantidQt/CustomInterfaces/src/JumpFit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ namespace MantidQt
"from IndirectJumpFit import JumpRun\n";

pyInput += "JumpRun('"+sample+"','"+fitFunction+"',"+widthTxt+","+QMin+","+QMax+","
"Save="+save+", Plot='"+plot+"', Verbose="+verbose+")\n";
"Save="+save+", Plot="+plot+", Verbose="+verbose+")\n";

runPythonScript(pyInput);
}
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/scripts/Inelastic/IndirectBayes.py
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,7 @@ def QLRun(program,samWS,resWS,resnormWS,erange,nbins,Fit,wfile,Loop,Verbose,Plot
array_len = 4096 # length of array in Fortran
CheckXrange(erange,'Energy')

nbin,nrbin = CheckBinning(nbins)
nbin,nrbin = nbins

if Verbose:
logger.notice('Sample is ' + samWS)
Expand Down Expand Up @@ -759,12 +759,12 @@ def QuestRun(samWS,resWS,nbs,erange,nbins,Fit,Loop,Verbose,Plot,Save):
EndTime('Quest')

def QuestPlot(inputWS,Plot):
if (Plot == 'Sigma' or Plot == 'All'):
if (Plot == 'Sigma'):
sig_plot=mp.plotSpectrum(inputWS+'_Sigma',0,True)
if (Plot == 'Beta' or Plot == 'All'):
if (Plot == 'Beta'):
beta_plot = mp.plotSpectrum(inputWS+'_Beta',0,True)
if(Plot == 'All'):
mp.mergePlots(sig_plot,beta_plot)
mp.plotSpectrum([inputWS+'_Sigma',inputWS+'_Beta'], 0, True)

# ResNorm programs
def ResNormRun(vname,rname,erange,nbin,Verbose=False,Plot='None',Save=False):
Expand Down
8 changes: 4 additions & 4 deletions Code/Mantid/scripts/Inelastic/IndirectJumpFit.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ def JumpRun(samWS,jumpFunc,width,qmin,qmax,Verbose=False,Plot=False,Save=False):
val = log.value
logger.notice('Fit program was : '+val)

logger.notice('Parameters in ' + samWs)
logger.notice('Parameters in ' + samWS)

x = mtd[samWS].readX(0)
xmax = x[len(x)-1]
Expand All @@ -54,13 +54,13 @@ def JumpRun(samWS,jumpFunc,width,qmin,qmax,Verbose=False,Plot=False,Save=False):
return

#run fit function
fitWS = samWS +'_'+jumpFunc +'fit'
fitWS = samWS[:-9] +'_'+ jumpFunc +'fit'
Fit(Function=func, InputWorkspace=spectumWs, CreateOutput=True, Output=fitWS)

#process output options
if Save:
fit_path = os.path.join(workdir,fitWS+'.nxs')
SaveNexusProcessed(InputWorkspace=fitWS, Filename=fit_path)
fit_path = os.path.join(workdir,fitWS+'_Workspace.nxs')
SaveNexusProcessed(InputWorkspace=fitWS+'_Workspace', Filename=fit_path)

if Verbose:
logger.notice('Fit file is ' + fit_path)
Expand Down

0 comments on commit 1b68631

Please sign in to comment.