microscope icon indicating copy to clipboard operation
microscope copied to clipboard

pvcam: wrong frame dimensions in circular buffer mode

Open dstoychev opened this issue 4 years ago • 1 comments

This bug only affects circular buffer mode and only when a non-square ROI is used.

https://github.com/python-microscope/microscope/blob/ef280c3402606941d1427b72950b472feb2b6cae/microscope/cameras/pvcam.py#L1510-L1522

The problem is with line 1518, where the frame buffer is cast to a numpy array. The shape of the array is supposed to be (height, width), so the dimensions need to be swapped like this:

frame_p, (self.roi[3], self.roi[2])

dstoychev avatar Jul 24 '21 20:07 dstoychev

Implemented in https://github.com/dstoychev/microscope/commit/965fa39588c281ad5194024f094c71eeba7b2b8f.

dstoychev avatar Aug 14 '21 10:08 dstoychev