Skip to content

Commit

Permalink
Add param to ISIS instruments Refs #11861
Browse files Browse the repository at this point in the history
  • Loading branch information
DanNixon committed May 28, 2015
1 parent c145bcf commit b36d483
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 5 deletions.
Expand Up @@ -57,7 +57,7 @@ def PyInit(self):
self.declareProperty(name='SampleEnvironmentLogName', defaultValue='sample',
doc='Name of the sample environment log entry')

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

Expand Down Expand Up @@ -323,9 +323,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 b36d483

Please sign in to comment.