flicamera Reference#
lib#
- exception flicamera.lib.FLIWarning[source]#
Bases:
UserWarningA warning from the FLI library.
- class flicamera.lib.LibFLI(shared_object: Optional[str] = None, debug: bool = False, simulation_mode: bool = False, log: Callable[[str], None] | None = None)[source]#
Bases:
ctypes.CDLLWrapper for the FLI library.
- Parameters
shared_object – The path to the FLI library shared object. If not provided, uses the default, internal version.
debug – Whether to use the debug mode.
- class flicamera.lib.LibFLIDevice(name, lib)[source]#
Bases:
objectA FLI device.
- get_visible_area() → Tuple[int, int, int, int][source]#
Returns the visible area.
- Returns
visible_area – The visible area in the format \((ul_x, ul_y, lr_x, lr_y)\). See
set_image_areafor details. The visible area does not change regardless of the binning or image area defined; it’s the total available area. Note that \(lr_x-ul_x\) and \(lr_y-ul_y\) match the total size of the CCD, but \(lr_x\) or \(lr_y\) are not necessarily zero.
- read_frame()[source]#
Reads the image frame.
This function reads the image buffer row by row. In principle it could be optimised by writing a C function to encapsulate the loop, but tests show that the gain is marginal so it’s ok to keep it as a pure Python method.
- set_binning(hbin, vbin)[source]#
Sets the binning.
The image area is automatically re-adjusted to be the full visible area. If you want to change this, use
set_image_areamanually.
- set_exposure_time(exp_time: float)[source]#
Sets the exposure time.
- Parameters
exp_time – The exposure time, in seconds.
- set_image_area(area: Optional[Tuple[int, int, int, int]] = None)[source]#
Sets the area of the image to exposure.
- Parameters
area (tuple) –
The area in the format \((ul_x, ul_y, lr_x, lr_y)\) where \(ul\) refers to the upper-left corner of the CCD, and \(lr\) to the lower right. The lower-right values to pass must take into account the horizontal and vertical binning factors. In practice one must pass \(lr_x^\prime\) and \(lr_y^\prime\) defined as
\[\begin{split}lr_x^\prime = ul_x + (lr_x - ul_x) / hbin \\ lr_y^\prime = ul_y + (lr_y - ul_y) / vbin\end{split}\]If you pass the area, it is assumed that you are using the full image area as reference; the binning is automatically taken into account. Although the visible area does not necessary start at
(0, 0), the area passed to this function should assume an origin at(0, 0). IfareaisNone, the full area of the chip is used, using the current binning.
- set_shutter(shutter_value: bool)[source]#
Controls the shutter of the camera.
- Parameters
shutter_value – If
True, opens the shutter, otherwise closes it.
- set_temperature(temp: float)[source]#
Sets the temperature of the CCD.
- Parameters
temp – Temperature in the range -55 to 45C.
- property model#
The model of the device.
- property serial#
The serial string of the device.
- property temperature#
Returns a dictionary of temperatures at different locations.
- flicamera.lib.c_double_p#
alias of
flicamera.lib.LP_c_double
- flicamera.lib.c_long_p#
alias of
flicamera.lib.LP_c_long