Skip to content

Commit

Permalink
Merge pull request #802 from mantidproject/11861_add_new_elwin_params…
Browse files Browse the repository at this point in the history
…_to_isis_inst

IDA.ELWIN worked as supposed to with the IRIS and BASIS nexus files
  • Loading branch information
jmborr committed May 30, 2015
2 parents 6967e95 + 0c9dd0f commit 6d83253
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
Expand Up @@ -35,7 +35,6 @@ class ElasticWindowMultiple(DataProcessorAlgorithm):
_range_2_start = None
_range_2_end = None
_mtd_plot = None
_sample_log_value = ''

def category(self):
return 'Workflow\\Inelastic;PythonAlgorithms;Inelastic'
Expand All @@ -58,8 +57,9 @@ def PyInit(self):
self.declareProperty(name='SampleEnvironmentLogName', defaultValue='sample',
doc='Name of the sample environment log entry')

sampEnvLogVal_type = ['last value', 'average']
self.declareProperty('SampleEnvironmentLogValue', 'last value', StringListValidator(sampEnvLogVal_type),
sampEnvLogVal_type = ['last_value', 'average']
self.declareProperty('SampleEnvironmentLogValue', 'last_value',
StringListValidator(sampEnvLogVal_type),
doc='Value selection of the sample environment log entry')

self.declareProperty(WorkspaceProperty('OutputInQ', '', Direction.Output),
Expand Down Expand Up @@ -324,8 +324,9 @@ def _get_temperature(self, ws_name):
if self._sample_log_name in run:
# Look for temperature in logs in workspace
tmp = run[self._sample_log_name].value
value_action = {'last value': lambda x: x[len(x)-1],
'average': lambda x: x.mean()}
value_action = {'last_value': lambda x: x[len(x)-1],
'average': lambda x: x.mean()
}
temp = value_action[self._sample_log_value](tmp)
logger.debug('Temperature %d K found for run: %s' % (temp, run_name))
return temp
Expand Down
Expand Up @@ -125,7 +125,7 @@
<widget class="QComboBox" name="leLogValue">
<item>
<property name="text">
<string>last value</string>
<string>last_value</string>
</property>
</item>
<item>
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/instrument/IRIS_Parameters.xml
Expand Up @@ -81,6 +81,9 @@
<parameter name="Workflow.SE-log" type="string">
<value val="sample" />
</parameter>
<parameter name="Workflow.SE-log-value" type="string">
<value val="last_value" />
</parameter>
<parameter name="Workflow.beam-width" type="string">
<value val="2.1" />
</parameter>
Expand Down
3 changes: 3 additions & 0 deletions Code/Mantid/instrument/OSIRIS_Parameters.xml
Expand Up @@ -73,6 +73,9 @@
<parameter name="Workflow.SE-log" type="string">
<value val="sample" />
</parameter>
<parameter name="Workflow.SE-log-value" type="string">
<value val="last_value" />
</parameter>
<parameter name="Workflow.beam-width" type="string">
<value val="2.2" />
</parameter>
Expand Down

0 comments on commit 6d83253

Please sign in to comment.