Skip to content

Commit

Permalink
Added property ProjectID. Refs #8089.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou committed Nov 25, 2013
1 parent 16c6206 commit 348bcc1
Showing 1 changed file with 11 additions and 1 deletion.
Expand Up @@ -90,6 +90,9 @@ def PyInit(self):
self.declareProperty(FileProperty("InputProjectFilename","", FileAction.OptionalLoad, ['.nxs']),
"Name of sequential project file.")

# Project ID
self.declareProperty("ProjectID", "", "Project ID.")

return


Expand All @@ -100,7 +103,7 @@ def PyExec(self):
self._processInputProperties()

# Instantiaze sequential refinement
seqrefine = SeqRefineProfile("IDx890", self.log())
seqrefine = SeqRefineProfile(self._projectID, self.log())

# Execute
if self.functionoption == "Setup":
Expand Down Expand Up @@ -147,8 +150,13 @@ def _processInputProperties(self):

self._lastStep = self.getProperty("FromStep").value

self._projectID = self.getProperty("ProjectID").value
if len(self._projectID) == 0:
raise NotImplementedError("User must specify project ID.")

self.functionoption = self.getProperty("FunctionOption").value
if self.functionoption == "Setup":
# Request on 'Setup'
ptype = self.getProperty("ProfileType").value
if ptype == "Neutron Back-to-back exponential convoluted with psuedo-voigt":
self.peaktype = "NeutronBk2BkExpConvPVoigt"
Expand All @@ -161,6 +169,7 @@ def _processInputProperties(self):
self.bkgdparws = self.getProperty("InputBackgroundParameterWorkspace").value
self.profilews = self.getProperty("InputProfileWorkspace").value
self.braggpeakws = self.getProperty("InputBraggPeaksWorkspace").value


elif self.functionoption == "Refine":
self.paramstofit = self.getProperty("Parameters2Refine").value
Expand All @@ -180,6 +189,7 @@ def _processInputProperties(self):
if self.wsindex < 0 or self.wsindex >= self.dataws.getNumberHistograms():
raise NotImplementedError("Input workspace index %d is out of range (0, %d)." %
(self.wsindex, self.dataws.getNumberHistograms()))

return


Expand Down

0 comments on commit 348bcc1

Please sign in to comment.