Skip to content

Commit

Permalink
Allow for single sample input in QLrun. Refs #7427
Browse files Browse the repository at this point in the history
If there is only a single sample input then you just get back a single
workspace rather than a group.
  • Loading branch information
martyngigg committed Jul 11, 2013
1 parent 61c141d commit b0a70d0
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions Code/Mantid/scripts/Inelastic/IndirectBayes.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,14 +277,18 @@ def QLRun(program,samWS,resWS,rsname,erange,nbins,fitOp,wfile,Loop,Verbose,Plot,
prob1.append(yprob[1])
prob2.append(yprob[2])
fitWS = fname+'_Result'
fout = fitWS +'_'+ str(m)
if nsam > 1:
fout = fitWS +'_'+ str(m)
else:
fout = fitWS
CreateWorkspace(OutputWorkspace=fout, DataX=datX, DataY=datY, DataE=datE,
Nspec=nsp, UnitX='DeltaE', VerticalAxisUnit='Text', VerticalAxisValues=names)
if m == 0:
group = fout
else:
group += ',' + fout
GroupWorkspaces(InputWorkspaces=group,OutputWorkspace=fitWS)
if nsam > 1:
GroupWorkspaces(InputWorkspaces=group,OutputWorkspace=fitWS)
if program == 'QL':
yPr0 = np.array([prob0[0]])
yPr1 = np.array([prob1[0]])
Expand Down

0 comments on commit b0a70d0

Please sign in to comment.