FliCamera
FliCamera
FliCamera (camera_index=0, camera_id=None, verbose=False, cam_settings=None, cropdims=None, darkpath='./', darkfile=None, buffersize_ims=1000)
*First Light Imaging (FLI) camera implementation of the BaseCameraInterface.
This class provides concrete implementations of all abstract methods defined in the BaseCameraInterface for FLI cameras using the FliSdk_V2 SDK. It handles camera initialization, image acquisition, configuration management, and resource cleanup.
The camera can be used in a context manager (with statement) for automatic resource management.*
FliCamera.external_trigger
FliCamera.external_trigger (enabled, syncdelay=None, verbose=False)
Configure external triggering for the camera.
Type | Default | Details | |
---|---|---|---|
enabled | bool | If True, enables external triggering; if False, disables it. | |
syncdelay | NoneType | None | Synchronization delay in milliseconds. |
verbose | bool | False | If True, prints the commands and responses. |
FliCamera.check_nims_buffer
FliCamera.check_nims_buffer ()
Check the number of images in the camera buffer.
FliCamera.get_buffer_images
FliCamera.get_buffer_images (return_im=True, verbose=False)
Retrieve all images currently stored in the camera buffer.
Type | Default | Details | |
---|---|---|---|
return_im | bool | True | If True, returns the image cube; otherwise just updates internal buffer. |
verbose | bool | False | If True, prints additional information. |
Returns | numpy.ndarray or None | 3D array of images (frames, height, width) if return_im is True, otherwise None. |
FliCamera.get_latest_image
FliCamera.get_latest_image (return_im=True, waitfornewframe=True)
*Retrieve the latest image frame from the camera.
Implementation of the abstract get_image method from BaseCameraInterface.*
Type | Default | Details | |
---|---|---|---|
return_im | bool | True | If True, returns the image; otherwise just updates the internal buffer. |
waitfornewframe | bool | True | If True, blocks until a new frame is available. |
Returns | numpy.ndarray or None | The image as a 2D numpy array if return_im is True, otherwise None. |
FliCamera.get_n_images
FliCamera.get_n_images (blocking=True, return_ims=False, coadd=False, subtract_dark=False)
Acquire a specified number of images from the camera.
Type | Default | Details | |
---|---|---|---|
blocking | bool | True | If True, blocks until all requested images are acquired. |
return_ims | bool | False | If True, returns the acquired images. |
coadd | bool | False | If True, returns the average of all acquired images. |
subtract_dark | bool | False | If True, subtracts the dark frame from each image. |
Returns | numpy.ndarray or None | If return_ims is True, returns either a 3D array of images or a 2D array (if coadd=True). Otherwise returns None. |
FliCamera.mro
FliCamera.mro ()
Return a type’s method resolution order.
FliCamera.newim_callbackfunc
FliCamera.newim_callbackfunc (image, ctx)
*Callback function executed by the SDK when a new image is available.
This function is registered with the FliSdk_V2 and called automatically when new frames are captured. It handles updating the latest image buffer and logging images when requested.*
Type | Details | |
---|---|---|
image | pointer | Pointer to the raw image data from the SDK. |
ctx | pointer | Context pointer passed by the SDK. |
FliCamera.reset_buffer
FliCamera.reset_buffer ()
Reset the camera’s internal buffer, clearing any stored images.
FliCamera.send_command
FliCamera.send_command (commandstr, return_response=True, verbose=False)
Send a command to the camera through the SDK.
Type | Default | Details | |
---|---|---|---|
commandstr | str | Command string to send to the camera. | |
return_response | bool | True | If True, returns the camera’s response. |
verbose | bool | False | If True, prints the command and response. |
Returns | str or None | The camera’s response if return_response is True, otherwise None. |
FliCamera.set_nims_tolog
FliCamera.set_nims_tolog (nims)
Set the number of images to acquire in subsequent operations.
Type | Details | |
---|---|---|
nims | int | Number of images to acquire and store. |
FliCamera.set_tint
FliCamera.set_tint (tint, verbose=False)
Set the camera integration time (exposure time).
Type | Default | Details | |
---|---|---|---|
tint | float | Integration time in seconds. | |
verbose | bool | False | If True, prints the command and response. |