Skip to content

Commit

Permalink
Add input 'Output File Prefix'. Refs #6555.
Browse files Browse the repository at this point in the history
  • Loading branch information
wdzhou authored and peterfpeterson committed Apr 12, 2013
1 parent 93e6a72 commit 622e026
Show file tree
Hide file tree
Showing 4 changed files with 297 additions and 258 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@ class AdvancedSetupScript(BaseScriptElement):
vanadiumsmoothparams = ""
preserveevents = False
extension = "_event.nxs"
outputfileprefix = ""

def __init__(self, inst_name):
""" Initialization
Expand Down Expand Up @@ -74,6 +75,7 @@ def createParametersList(self):
self.parnamelist.append("PushDataPositive")
self.parnamelist.append("Extension")
self.parnamelist.append("PreserveEvents")
self.parnamelist.append("OutputFilePrefix")

return

Expand Down Expand Up @@ -120,6 +122,7 @@ def buildParameterDict(self):
pardict["VanadiumSmoothParams"] = self.vanadiumsmoothparams
pardict["Extension"] = str(self.extension)
pardict["PreserveEvents"] = str(int(self.preserveevents))
pardict["OutputFilePrefix"] = self.outputfileprefix

return pardict

Expand Down Expand Up @@ -219,30 +222,20 @@ def from_xml(self, xml_str):
"preserveevents", default=str(int(AdvancedSetupScript.preserveevents)))
self.preserveevents = bool(int(tempbool))

self.outputfileprefix = BaseScriptElement.getStringElement(instrument_dom,
"outputfileprefix", default = AdvancedSetupScript.outputfileprefix)

return

def reset(self):
""" 'Public' method to reset state
"""
# self.sample_file = RunSetupScript.sample_file
# self.output_wsname = RunSetupScript.output_wsname
# self.detcal_file = RunSetupScript.detcal_file
# self.relocate_dets = RunSetupScript.relocate_dets
# self.incident_energy_guess = RunSetupScript.incident_energy_guess
# self.use_ei_guess = RunSetupScript.use_ei_guess
# self.tzero_guess = RunSetupScript.tzero_guess
# self.monitor1_specid = RunSetupScript.monitor1_specid
# # self.monitor2_specid = RunSetupScript.monitor2_specid
# self.rebin_et = RunSetupScript.rebin_et
# self.et_range_low = RunSetupScript.et_range_low
# self.et_range_width = RunSetupScript.et_range_width
# self.et_range_high = RunSetupScript.et_range_high
# self.et_is_distribution = RunSetupScript.et_is_distribution
# self.hardmask_file = RunSetupScript.hardmask_file
# self.grouping_file = RunSetupScript.grouping_file
# self.show_workspaces = RunSetupScript.show_workspaces

self.stripvanadiumpeaks = AdvancedSetupScript.stripvanadiumpeaks
self.extension = AdvancedSetupScript.extension
self.reserveevents = AdvancedSetupScript.preserveevents

self.outputfileprefix = AdvancedSetupScript.outputfileprefix


return

Original file line number Diff line number Diff line change
Expand Up @@ -115,6 +115,7 @@ def set_state(self, state):

self._content.preserveevents_checkbox.setChecked(state.preserveevents)
self._content.extension_combo.setCurrentIndex(self._content.extension_combo.findText(state.extension))
self._content.outputfileprefix_edit.setText(state.outputfileprefix)

return

Expand All @@ -141,6 +142,8 @@ def get_state(self):
s.preserveevents = self._content.preserveevents_checkbox.isChecked()
s.extension = str(self._content.extension_combo.currentText())

s.outputfileprefix = self._content.outputfileprefix_edit.text()

return s


Expand Down

0 comments on commit 622e026

Please sign in to comment.