UUTrack.Model.Cameras.Hamamatsu.py

Model class for controlling Hamamatsu cameras via de DCAM-API. At the time of writing this class, little documentation on the DCAM-API was available. Hamamatsu has a different time schedule regardin support of their own API. However, Zhuang’s lab Github repository had a python driver for the Orca camera and with a bit of tinkering things worked out.

DCAM-API relies mostly on setting parameters into the camera. The correct data type of each parameter is not well documented; however it is possible to print all the available properties and work from there. The properties are stored in a filed named params.txt next to the Hamamatsu Driver

Note

When setting the ROI, Hamamatsu only allows to set multiples of 4 for every setting (X,Y and vsize, hsize). This is checked in the function. Changing the ROI cannot be done directly, one first needs to disable it and then re-enable.

Section author: Aquiles Carattino <aquiles@aquicarattino.com>

class UUTrack.Model.Cameras.Hamamatsu.camera(camera)[source]

Bases: UUTrack.Model.Cameras._skeleton.cameraBase

GetCCDHeight()[source]

Returns The CCD height in pixels

GetCCDWidth()[source]

Returns The CCD width in pixels

acquisitionReady()[source]

Checks if the acquisition in the camera is over.

getAcquisitionMode()[source]

Returns the acquisition mode, either continuous or single shot.

getExposure()[source]

Gets the exposure time of the camera.

getSerialNumber()[source]

Returns the serial number of the camera.

getSize()[source]

Returns the size in pixels of the image being acquired. This is useful for checking the ROI settings.

initializeCamera()[source]

Initializes the camera.

Returns:
readCamera()[source]

Reads the camera

setAcquisitionMode(mode)[source]

Set the readout mode of the camera: Single or continuous. Parameters mode : int One of self.MODE_CONTINUOUS, self.MODE_SINGLE_SHOT

setExposure(exposure)[source]

Sets the exposure of the camera.

setROI(X, Y)[source]

Sets up the ROI. Not all cameras are 0-indexed, so this is an important place to define the proper ROI. X – array type with the coordinates for the ROI X[0], X[1] Y – array type with the coordinates for the ROI Y[0], Y[1]

stopCamera()[source]

Stops the acquisition and closes the connection with the camera.

triggerCamera()[source]

Triggers the camera.