labscript-suite / labscript-devices

A modular and extensible plugin architecture to control experiment hardware using the 𝘭𝘒𝘣𝘴𝘀𝘳π˜ͺ𝘱𝘡 𝘴𝘢π˜ͺ𝘡𝘦.
http://labscriptsuite.org
Other
5 stars 57 forks source link

Spinnaker_Camera little bug #72

Closed thompsonjila closed 2 years ago

thompsonjila commented 3 years ago

I noticed that the Spinnaker_Camera should check if num_frames, failed_frames, underrun_frames are None before printing. Sorry, I am not sure if this was the right place to put it! ` def stop_acquisition(self): print('Stopping acquisition...') self.camera.EndAcquisition()

    # This is supposed to provide debugging info, but as with most things
    # in PySpin, it appears to be completely useless:.
    num_frames=self.get_attribute('StreamTotalBufferCount', stream_map=True)
    failed_frames=self.get_attribute('StreamFailedBufferCount', stream_map=True)
    underrun_frames=self.get_attribute('StreamBufferUnderrunCount', stream_map=True)
    print('Stream info: %d frames acquired, %d failed, %d underrun' %
          (num_frames, failed_frames, underrun_frames))`
dsbarker commented 3 years ago

I also just saw this bug. My workaround is to change blacs_workers.py line 235 to be:

print('Stream info: %s frames acquired, %s failed, %s underrun' %
              (str(num_frames), str(failed_frames), str(underrun_frames)))

I'm looking into figuring out how to actually get out the debug info, but I suspect I will be thwarted by the general poor quality of FLIR's python wrappers.