Skip to content

Commit

Permalink
Show full path of peaks file re #5414
Browse files Browse the repository at this point in the history
Also had this file name defined in only one place (rather than two changed to three).

Signed-off-by: Karl Palmen <karl.palmen@stfc.ac.uk>
  • Loading branch information
KarlPalmen committed Oct 30, 2012
1 parent 9686300 commit 02ca561
Showing 1 changed file with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@
from ideal_tube import * # For ideal tube
from tube_calib import * # For tube calibration functions
from tube_spec import * # For tube specification class
import os

def CalibrateMerlin( RunNumber, UsePeakFile=False ):
# Run number must include any leading zeros that appear in the file name of the run.
Expand Down Expand Up @@ -69,11 +70,16 @@ def CalibrateMerlin( RunNumber, UsePeakFile=False ):

# == Get the calibration and put results into calibration table ==
# also put peaks into PeakFile
peakFileName = "TubeCalibDemoMerlin_Peaks.txt"
if(not UsePeakFile):
getCalibration( CalibInstWS, thisTubeSet, calibrationTable, fitPar, iTube, ExcludeShortTubes=ActiveLength, PeakFile='TubeCalibDemoMerlin_Peaks.txt' )
getCalibration( CalibInstWS, thisTubeSet, calibrationTable, fitPar, iTube, ExcludeShortTubes=ActiveLength, PeakFile=peakFileName )
saveDirectory = config['defaultsave.directory']
fullPeakFileName = os.path.join(saveDirectory, peakFileName)
print " Put slit peaks into file",fullPeakFileName
else:
getCalibrationFromPeakFile( CalibInstWS, calibrationTable, iTube, 'TubeCalibDemoMerlin_Peaks.txt' )
print "Got calibration (new positions of detectors) and put slit peaks into file TubeCalibDemoMerlin_Peaks.txt"
getCalibrationFromPeakFile( CalibInstWS, calibrationTable, iTube, peakFileName )

print "Got calibration (new positions of detectors)"

# == Apply the Calibation ==
ApplyCalibration( Workspace=CalibInstWS, PositionTable=calibrationTable)
Expand Down

0 comments on commit 02ca561

Please sign in to comment.