diff --git a/tasks/sud.py b/tasks/sud.py index 0f7db45..c280228 100644 --- a/tasks/sud.py +++ b/tasks/sud.py @@ -66,7 +66,10 @@ class SudTask(ATask): # its whole duration (decided once, here, rather than re-checked # every tick) instead of relying on the controller's own FSM to # notice and idle out. - cooling = ramping and ramp is not None and ramp['temp'] < self.tc.get_theta_ist() - TEMP_REACHED_TOLERANCE + # bool(...): get_theta_ist() can be a numpy.float64 (Pot's transport + # delay line is a numpy array internally) - the '<' comparison would + # then yield numpy.bool_, which json.dumps() can't serialize. + cooling = bool(ramping and ramp is not None and ramp['temp'] < self.tc.get_theta_ist() - TEMP_REACHED_TOLERANCE) self.tc.set_cooling(cooling) if step is not None: