Skip to content

Commit

Permalink
Store component in an array re #6755
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 Apr 3, 2013
1 parent 5c675f0 commit d09a728
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Code/Mantid/scripts/Calibration/tube_spec.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,15 +19,17 @@ def __init__(self,ws):
self.inst = ws.getInstrument()
self.numTubes = 0
self.specComponentArray = []
self.component = 0
self.component = 0 # NEXT STEP: Put self.component into array ##########
self.minNumDetsInTube = 200
self.tubes = []

def setTubeSpecByString(self, tubeSpecString ):
"""
Sets tube specification by string. The string specifies a component of the intrument
as in the instrument tree of its IDF file. This component may contain one or more tubes
and possibly all the tunes in the instrument.
and possibly all the tunes in the instrument.
If the tube specification is not empty this component is added to those already
in the specification.
@param tubeSpecString: string specifying tubes of a component of the instrument
Expand Down Expand Up @@ -88,7 +90,7 @@ def getNumTubes(self):
if(self.numTubes >= 0):
return self.numTubes

# We have a negative number set in self.numTubes, so we search for tubes
# We have a negative number set in self.numTubes, so we search for tubes
comp = self.getComponent()
if( comp == 0):
return self.numTubes
Expand Down

0 comments on commit d09a728

Please sign in to comment.