Skip to content

Commit

Permalink
Tidy up tube_calib.py code re #6344
Browse files Browse the repository at this point in the history
Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
  • Loading branch information
KarlPalmen committed Feb 11, 2013
1 parent 5c6e86e commit f6331f6
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions Code/Mantid/scripts/Calibration/tube_calib.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ def getPoints ( IntegratedWorkspace, funcForms, fitParams, whichTube, showPlot=F
This N slit method is suited for WISH or the five sharp peaks of MERLIN .
@param IntegratedWorkspace: Workspace of integrated data
@param funcForms: array of function form 1=slit, 2=edge
@param funcForms: array of function form 1=slit/bar, 2=edge
@param fitParams: a TubeCalibFitParams object contain the fit parameters
@param whichTube: a list of workspace indices for one tube
@param showPlot: show plot for this tube
Expand All @@ -102,8 +102,7 @@ def getPoints ( IntegratedWorkspace, funcForms, fitParams, whichTube, showPlot=F
eHeight, eWidth = fitParams.getHeightAndWidth()
outedge, inedge, endGrad = fitParams.getEdgeParameters()

#margin = 0.3
margin = 0.2
margin = 0.3

# Set workspace names, a different workspace if plotting, so plot survives.
calibPointWs = "CalibPoint"
Expand Down Expand Up @@ -474,12 +473,17 @@ def getCalibration ( ws, tubeSet, calibTable, fitPar, iTube, PeakTestMode=False,
if(nTubes == 0):
return

# Delete temporary workspaces for obtaining slit points
# Delete temporary workspaces for obtaining points
if( OverridePeaks == []):
DeleteWorkspace('getPoints')
DeleteWorkspace('CalibPoint_NormalisedCovarianceMatrix')
DeleteWorkspace('CalibPoint_Parameters')
DeleteWorkspace('CalibPoint_Workspace')
# Assume at least one slit or peak (else we'd need to check here)
DeleteWorkspace('Z1_NormalisedCovarianceMatrix')
DeleteWorkspace('Z1_Parameters')
DeleteWorkspace('Z1_Workspace')


# Delete temporary workspaces for getting new detector positions
DeleteWorkspace('QuadraticFittingWorkspace')
Expand Down

0 comments on commit f6331f6

Please sign in to comment.