Describe the bug
I regularly run PYMEAcquire in simple configs that lack a z-controller. This inludes certain scopes but also when running init file that only registers the camera, e.g. for camera calibration etc.
During acquisitions there are attempts to write stack metadata which fail as a z-control is not available.
To Reproduce
Steps to reproduce the behavior:
- Run
PYMEAcquire with simple init file that lacks z-controller (e.g. no piezo)
- Start acquisition.
- Non-fatal but nevertheless potentially confusing error is produced.
- Error shown below:
(10.16080325929549, 'spoolController.StartSpooling', {'maxFrames': 500, 'stack': False}, 1609032592.9298954, 1.7976931348623157e+308), spoolController.StartSpooling
DEBUG:PYME.Acquire.SpoolController:Looking for C:\Users\cs463\PYMEData\cs463\2020_12_15\15_12_series_P.h5 on local machine
ERROR:PYME.Acquire.stackSettings:Error writing stack metadata
Traceback (most recent call last):
File "c:\python-support\pyme-py3\PYME\Acquire\stackSettings.py", line 161, in ProvideStackMetadata
mdh.setEntry('StackSettings.StartPos', self.GetStartPos())
File "c:\python-support\pyme-py3\PYME\Acquire\stackSettings.py", line 93, in GetStartPos
return self._CurPos() - (self.GetStepSize()*(self.GetSeqLength() - 1)*self.GetDirection()/2)
File "c:\python-support\pyme-py3\PYME\Acquire\stackSettings.py", line 132, in _CurPos
return self.scope.GetPos()[self.GetScanChannel()]
KeyError: 'z'
DEBUG:PYME.Acquire.Spooler:Disconnecting from frame source
Expected behavior
Gracefully bypass stack settings when no z-control available.
Platform (please complete the following information - or copy-paste from error dialog if shown):
- OS: [e.g. Win10] all platforms
- Python version: 2.7, 3.7
- numpy version: various
- wxpython version [if a UI bug]: N/A
Describe the bug
I regularly run PYMEAcquire in simple configs that lack a z-controller. This inludes certain scopes but also when running init file that only registers the camera, e.g. for camera calibration etc.
During acquisitions there are attempts to write stack metadata which fail as a z-control is not available.
To Reproduce
Steps to reproduce the behavior:
PYMEAcquirewith simple init file that lacks z-controller (e.g. no piezo)Expected behavior
Gracefully bypass stack settings when no z-control available.
Platform (please complete the following information - or copy-paste from error dialog if shown):