pcdshub / pcdsdevices

Collection of Ophyd device subclasses for IOCs unique to LCLS PCDS.
https://pcdshub.github.io/pcdsdevices/
Other
5 stars 59 forks source link

LaserTiming scan failure #567

Open ZLLentz opened 4 years ago

ZLLentz commented 4 years ago

Expected Behavior

Scan

Current Behavior

Session logfile /reg/g/pcds/pyps/apps/hutch-python/xcs/logs/2020_09/xcsopr_03_17h32m51s.log Big traceback from a trigger_and_read block ending in: ValueError: Cannot determine the appropriate bluesky-friendly data type for value None of Python type <class 'NoneType'>. Supported types include: int, float, str, and iterables such as list, tuple, np.ndarray, and so on.

Relevant setup in xcs:

xcs/beamline.py:
lxt = LaserTiming('LAS:FS4',name='lxt') 
lxt._fs_tgt_time.kind = 'hinted'

experiments/lu7817.py:
class User():
    def ascan(self, motor, start, end, nsteps, nEvents, record=None, use_l3t=False):
        self.cleanup_RE()
        currPos = motor.wm()
        daq.configure(nEvents, record=record, controls=[motor], use_l3t=use_l3t)
        try:
            RE(scan([daq], motor, start, end, nsteps))
        except Exception:
            logger.debug('RE Exit', exc_info=True)
        finally:
            self.cleanup_RE()
        motor.mv(currPos)

Offending command: In [58]: x.ascan(lxt,-100e-12,100e-12,30,1200)

Logbook post: https://pswww.slac.stanford.edu/lgbk/lgbk/xcslu7818/elogs/5f51b38032ae0fc830939efc

ZLLentz commented 4 years ago
In [6]: lxt.read_configuration()
Out[6]:
OrderedDict([('lxt_user_offset',
              {'value': None, 'timestamp': 1599238372.0474427})])

I think we should default these offset values to 0 instead of None

klauer commented 4 years ago

Addressed in the related #551