Skip to content

Commit

Permalink
Refs #4930. Adding extra blocks in python for iparm file.
Browse files Browse the repository at this point in the history
  • Loading branch information
peterfpeterson committed Mar 7, 2012
1 parent da53335 commit 8564f4f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def _generateFocusPos(self, lines):
temp = lines[0]
temp = temp.replace("Instrument parameter file:", "")
self.iparmFile = temp.strip()
if len(self.iparmFile) <= 0:
self.iparmFile = None
lines = lines[1:] # delete this line

# get the spectra into a buffer
Expand Down Expand Up @@ -378,7 +380,8 @@ def _focus(self, wksp, calib, info, filterLogs=None, preserveEvents=True,
self.log().notice("FOCUS:" + str(focusPos))
if not focusPos is None:
EditInstrumentGeometry(Workspace=wksp, NewInstrument=False, **focusPos)
wksp.getRun()['iparm_file'] = self._config.iparmFile
if (self._config.iparmFile is not None) and (len(self._config.iparmFile) > 0):
wksp.getRun()['iparm_file'] = self._config.iparmFile

ConvertUnits(InputWorkspace=wksp, OutputWorkspace=wksp, Target="TOF")
if preserveEvents and not "histo" in self.getProperty("Extension"):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,8 @@ def _generateFocusPos(self, lines):
temp = lines[0]
temp = temp.replace("Instrument parameter file:", "")
self.iparmFile = temp.strip()
if len(self.iparmFile) <= 0:
self.iparmFile = None
lines = lines[1:] # delete this line

# get the spectra into a buffer
Expand Down Expand Up @@ -417,7 +419,8 @@ def _focus(self, wksp, calib, info, filterLogs=None, preserveEvents=True,
self.log().notice("FOCUS:" + str(focusPos))
if not focusPos is None:
EditInstrumentGeometry(Workspace=wksp, NewInstrument=False, **focusPos)
wksp.getRun()['iparm_file'] = self._config.iparmFile
if (self._config.iparmFile is not None) and (len(self._config.iparmFile) > 0):
wksp.getRun()['iparm_file'] = self._config.iparmFile

ConvertUnits(InputWorkspace=wksp, OutputWorkspace=wksp, Target="TOF")
if preserveEvents and not "histo" in self.getProperty("Extension"):
Expand Down

0 comments on commit 8564f4f

Please sign in to comment.