Closed ThomasLohnert closed 4 years ago
As part of this we should have a class that checks the validity of a read beamline config file, against conditions such as
Beamline
is setBeamline
have been passed into Beamline
Beamline
have been passed into Beamline
Beamline
and provides clear feedback in case of an invalid config.
Create ticket for this move after MVP we don't expect users to do this.
Ensure if a monitor can not be placed on a pv then the pv is placed into alarm and the montior is connected when it comes online.
SAme with motor reolution, if the galil isn't there in startup then it is polled everytime and the motor is in error
Things to do as part of this ticket (list might be expanded):
Check it deals with:
Traceback (most recent call last):
File "C:\Instrument\Apps\Python\lib\site-packages\pcaspy\driver.py", line 631, in getValue
newValue = driver.read(self.info.reason)
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\ChannelAccess\reflectometry_driver.py", line 91, in read
value = param_sort.get_from_parameter(param)
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\ChannelAccess\pv_manager.py", line 203, in get_from_parameter
return convert_to_epics_pv_value(parameter.parameter_type, parameter.rbv)
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\parameters.py", line 193, in rbv
return self._rbv()
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\parameters.py", line 554, in _rbv
return self._component.beam_path_rbv.get_position_relative_to_beam()
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\beam_path_calc.py", line 159, in get_position_relative_to_beam
self._theta_incoming_beam_if_set_else_incoming_beam())
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\movement_strategy.py", line 156, in get_distance_relative_to_beam
return self._displacement - self._dist_along_axis_from_zero_to_beam_intercept(beam)
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\movement_strategy.py", line 103, in _dist_along_axis_from_zero_to_beam_intercept
beam_intercept = self.calculate_interception(beam)
File "C:\Instrument\Apps\EPICS\ISIS\inst_servers\master\ReflectometryServer\movement_strategy.py", line 38, in calculate_interception
assert beam is not None
It doesn't might e easy to make this harder, @John-Holt-Tessella will investigate briefly
As a user of reflectometers, I would like the reflectometry server to handle exceptions more robustly. Perhaps the reflectometry server should have top-level exception handling that prints/logs the error rather than just dying. We should also deal with stall conditions. E.g. If an exception is thrown or a stall happens all motors need to stop.
Acceptance Criteria