@@ -435,11 +435,11 @@ def get_roi_limits(self, hbin=1, vbin=1): # pylint: disable=unused-argument
435435
436436 def _get_buffer_bpp (self ):
437437 bpp = self .GrabberClass ._get_buffer_bpp (self ) if self .GrabberClass else 1
438- ppbpp = self ._get_camera_bytepp ()
438+ ppbpp = self ._get_camera_bitpp ()
439439 if ppbpp is not None :
440440 bpp = (ppbpp - 1 )// 8 + 1
441441 return bpp
442- def _get_camera_bytepp (self ):
442+ def _get_camera_bitpp (self ):
443443 fmt = self .get_attribute_value ("DataResolution" ,error_on_missing = False )
444444 if fmt is None :
445445 return None
@@ -552,7 +552,7 @@ def open(self):
552552
553553 def _ensure_pixel_format (self ):
554554 fgbpp = self .get_grabber_attribute_value ("BITSPERPIXEL" )
555- ppbpp = self ._get_camera_bytepp ()
555+ ppbpp = self ._get_camera_bitpp ()
556556 if ppbpp is not None and ppbpp != fgbpp :
557557 msg = ( "PhotonFocus pixel format {} does not agree with the frame grabber {} bits per pixel; "
558558 "changing PhotonFocus pixel format accordingly; to use the original format, alter the camera file" .format (self .cav ["DataResolution" ],fgbpp ))
@@ -584,7 +584,7 @@ def open(self):
584584 self ._ensure_pixel_format ()
585585
586586 def _ensure_pixel_format (self ):
587- ppbpp = self ._get_camera_bytepp ()
587+ ppbpp = self ._get_camera_bitpp ()
588588 if ppbpp is not None :
589589 self .setup_camlink_pixel_format (ppbpp ,2 )
590590
@@ -622,12 +622,9 @@ def setup_acquisition(self, mode="sequence", nframes=100, frame_merge=None):
622622
623623 def _ensure_pixel_format (self ):
624624 fgbpp = self ._get_board_info ("bpp" )
625- ppbpp = self ._get_camera_bytepp ()
625+ ppbpp = self ._get_camera_bitpp ()
626626 if ppbpp is not None and ppbpp != fgbpp :
627- msg = ( "PhotonFocus pixel format {} does not agree with the frame grabber {} bits per pixel; "
628- "changing PhotonFocus pixel format accordingly; to use the original format, alter the camera file" .format (self .cav ["DataResolution" ],fgbpp ))
629- warnings .warn (msg )
630- self ._set_camera_bytepp (fgbpp )
627+ self ._change_board_parameters (bpp = ppbpp )
631628
632629
633630
0 commit comments