python-microscope / microscope

Python library for control of microscope devices, supporting hardware triggers and distribution of devices over the network for performance and flexibility.
https://www.python-microscope.org
GNU General Public License v3.0
69 stars 41 forks source link

fail to get sensor shape in ximea camera #107

Closed iandobbie closed 4 years ago

iandobbie commented 4 years ago

The ximea driver has a bug in the sensor shape code. Don't know how this ever worked!

def _get_sensor_shape(self):
    return (self.img.width,self.image.height)

I also could quite work out how this is meant to get initialised as beamdelta doesn't do the right magic (or not the same magic as cockpit anyway)

carandraug commented 4 years ago

The ximea driver has a bug in the sensor shape code. Don't know how this ever worked!

I don't think it ever did. I just checked the whole history of the ximea file and seems like it has always like that. I have fixed that now with 90b76c9

I also could quite work out how this is meant to get initialised as beamdelta doesn't do the right magic (or not the same magic as cockpit anyway)

Can you give more details? During XimeaCamera.initialize, the camera collects an image which then uses to provide shape information. BeamDelta does not initialize the camera because it expects the device to already have been initialized and indeed the device server initializes the device. On a python session, you should be able to:

c = XimeaCamera()
c.initialize()
c.get_sensor_shape()

If that works, then you should be able to get it from the client:

c = DataClient('PYRO:....')
c.get_sensor_shape()

If that works, then that's a BeamDelta issue. If so, can you open an issue there with how to reproduce it and the error message?

carandraug commented 4 years ago

I just tested this with Ian on his Mac and we can no longer reproduce the issue. Closing.