Dummy Camera Model

Dummy camera class for testing GUI and other functionality. This specific version generates randomly diffusing particles. However, the settings are controlled in a different class, SimBrownian.

Todo

The camera defines plenty of parameters that are not used or that they are confusing later on. Rasing exceptions does not happen even if trying to extend beyond the maximum dimensions of the CCD.

Todo

The parameters for the simulation of the brownian motion should be made explicitly here, in such a way that can be used from within the config file as well.

Todo

Some of the methods do not return the same datatype as the real models

copyright

Aquiles Carattino <aquiles@uetke.com>

license

GPLv3, see LICENSE for more details

class pynta.model.cameras.dummy_camera.Camera(camera)[source]

Bases: pynta.model.cameras.base_camera.BaseCamera

GetCCDHeight()[source]
Returns

The CCD height in pixels

GetCCDWidth()[source]
Returns

The CCD width in pixels

MODE_CONTINUOUS = 1
MODE_SINGLE_SHOT = 0
acquisition_ready()[source]

Checks if the acquisition in the camera is over.

getSerialNumber()[source]

Returns the serial number of the camera.

get_acquisition_mode()[source]

Returns the acquisition mode, either continuous or single shot.

get_exposure()[source]

Gets the exposure time of the camera.

get_size()[source]
Returns

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

initialize()[source]

Initializes the camera.

read_camera()[source]

Reads the camera

set_ROI(X, Y)[source]

Sets up the ROI. Not all cameras are 0-indexed, so this is an important place to define the proper ROI.

Parameters
  • 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]

Returns

set_acquisition_mode(mode)[source]

Set the readout mode of the camera: Single or continuous.

Param

int mode: One of self.MODE_CONTINUOUS, self.MODE_SINGLE_SHOT

set_binning(xbin, ybin)[source]

Sets the binning of the camera if supported. Has to check if binning in X/Y can be different or not, etc.

Param

xbin: binning in x

Param

ybin: binning in y

set_exposure(exposure)[source]

Sets the exposure of the camera.

stopAcq()[source]

Stops the acquisition without closing the connection to the camera.

stop_camera()[source]

Stops the acquisition and closes the connection with the camera.

trigger_camera()[source]

Triggers the camera.