14
14
import zmq
15
15
from odin .adapters .parameter_tree import ParameterAccessor , ParameterTree
16
16
17
- from .eiger_options import option_config_options
17
+ from .eiger_options import eiger_config_options
18
18
19
19
20
20
class EigerDetector (object ):
@@ -484,11 +484,7 @@ def set(self, path, value):
484
484
return self .initialize_detector ()
485
485
elif path == 'command/hv_reset' :
486
486
return self .hv_reset_detector ()
487
- else :
488
- # mbbi record will send integers; change to string
489
- if any (option == path .split ("/" )[- 1 ] for option in option_config_options ):
490
- value = str (value )
491
- return self ._params .set (path , value )
487
+ return self ._params .set (path , value )
492
488
493
489
def get_value (self , item ):
494
490
# Check if the item has a value field. If it does then return it
@@ -500,7 +496,7 @@ def set_mode(self, mode_type, value):
500
496
logging .info ("Setting {} mode to {}" .format (mode_type , value ))
501
497
# Intercept integer values and convert to string values where
502
498
# option not index is expected
503
- value = option_config_options ["mode" ].get_option (value )
499
+ value = eiger_config_options ["mode" ].get_option (value )
504
500
if mode_type == self .STR_STREAM :
505
501
response = self .write_stream_config ('mode' , value )
506
502
param = self .read_stream_config ('mode' )
@@ -519,8 +515,8 @@ def set_value(self, item, value):
519
515
logging .info ("Setting {} to {}" .format (item , value ))
520
516
# Intercept integer values and convert to string values where
521
517
# option not index is expected
522
- if any (option == item for option in option_config_options ):
523
- value = option_config_options [item ].get_option (value )
518
+ if any (option == item for option in eiger_config_options ):
519
+ value = eiger_config_options [item ].get_option (value )
524
520
# First write the value to the hardware
525
521
if item in self .DETECTOR_CONFIG :
526
522
response = self .write_detector_config (item , value )
@@ -730,12 +726,12 @@ def read_detector_live_image(self):
730
726
def intercept_reply (self , item , reply ):
731
727
# Intercept detector config for options where we convert to index for
732
728
# unamabiguous definition and update config to allow these
733
- if any (option == item for option in option_config_options ):
729
+ if any (option == item for option in eiger_config_options ):
734
730
# Inconsitency over mapping of index to string
735
731
# communication via integer, uniquely converted to mapping as defined in eiger_options
736
732
value = reply [u'value' ]
737
- reply [u'value' ] = option_config_options [item ].get_index (value )
738
- reply [u'allowed_values' ] = option_config_options [item ].get_allowed_values ()
733
+ reply [u'value' ] = eiger_config_options [item ].get_index (value )
734
+ reply [u'allowed_values' ] = eiger_config_options [item ].get_allowed_values ()
739
735
return reply
740
736
741
737
def arm_detector (self ):
@@ -803,7 +799,7 @@ def has_stale_parameters(self):
803
799
804
800
def get_trigger_mode (self ):
805
801
trigger_idx = self .get_value (self .trigger_mode )
806
- return option_config_options ['trigger_mode' ].get_option (trigger_idx )
802
+ return eiger_config_options ['trigger_mode' ].get_option (trigger_idx )
807
803
808
804
def start_acquisition (self ):
809
805
# Perform the start sequence
0 commit comments