Issue with start_headless and IDS driver.
Closed this issue · 2 comments
Bug report
Bug summary
I think there may be a problem with headless startup and some camera drivers. The code in acq_util.py seems to assume that the first thing that will come back from the micromanager instance will be the text STARTED.
If you look at the code for the IDS driver you can see that there are a number of status printf statements that are not conditional. Hence these appear before you eventually get the STARTED line.
The code in question is:
output = process.stdout.readline()
if "STARTED" not in output.decode('utf-8'):
raise Exception('Error starting headless mode')
Perhaps this could be in a while loop to skip over the initial status junk?
output = True
started = False
while output and not started:
output = process.stdout.readline()
started = "STARTED" in output.decode('utf-8')
if not started:
raise Exception('Error starting headless mode')
Expected outcome
Actual outcome
This is the output that the IDS driver actually produces. Note that we get to the STARTED token eventually. However the single readline in the current start_headless function will never see it.
output serial number: 4103143800
output ID: IDS GmbH
output Version:
output Date: 27.04.2017
Select: 1c
Type: 100c
Reserved:
sensor properties:
sensor ID: 50
sensor name: UI324xCP-M
width x height: 1280 x 1024
pixel pitch: 5.300 um
color mode: monochrome
pixel clock range: 7 - 86 MHz
frame rate range 0.50 - 17.29
Exposure (0.009, 66.621) ms, increment 0.0549 ms
gains: master: 0, red: 0, green: 0, blue: 0
IDS_uEye: binning 1x1 available
IDS_uEye: binning 2x2 available
IDS_uEye: binning 2x2 available
IDS_uEye: binning 2x2 available
IDS_uEye: color mode MONO16
IDS_uEye: set exposure to 0.0098
IDS_uEye: MM-Image buffer size for 1280x1024, color mode MONO16, 1x1 binning: 2621440 byte
IDS_uEye: MM-Image buffer size for 1280x1024, color mode MONO16, 1x1 binning: 2621440 byte
setting display mode to DIB: display mode: 1
default pixel clock: 24 MHz
IDS_uEye: pixel clock set to 24 MHz
IDS_uEye: pixel clock set to 24 MHz
IDS_uEye: set trigger mode TRIGGER_LO_HI
IDS_uEye: set exposure to 9.9995
IDS_uEye: pixel clock set to 86 MHz
IDS_uEye: new frame rate range 0.9472 - 59.8227
IDS_uEye: new exposure range 0.0090 - 19.2536
IDS_uEye: set exposure to 10.0000
IDS_uEye: set color mode MONO16
IDS_uEye: MM-Image buffer size for 1280x1024, color mode MONO16, 1x1 binning: 2621440 byte
IDS_uEye: set binning to 2x2 (0x1)
IDS_uEye: MM-Image buffer size for 1280x1024, color mode MONO16, 2x2 binning: 655360 byte
STARTED
Version Info
- Operating system: Windows 10
- pycromanager version: 22.01
- MicroManager version: 20221128
- Python version: 3.11
- Python environment (command line, IDE, Jupyter notebook, etc)
Makes sense, want to make a PR with this added?