API¶
Actor¶
- class lvmcam.actor.actor.LVMCamActor(*args, **kwargs)[source]¶
Bases:
BaseCameraActor,AMQPActorThe LVMCam actor.
Camera¶
- class lvmcam.camera.BlackflyCamera(*args, **kwargs)[source]¶
Bases:
BaseCamera,ExposureTypeMixIn,ImageAreaMixIn,CoolerMixIn,GainMixInA FLIR (formerly Point Grey Research) Blackfly camera. Given the pixel scale on the benches of LVMi and the assumption of 9 um pixel sizes of the LVMi cameras, we assume that the cameras have roughly 1 arsec per pixel, so they are used without binning.
In addition we let the camera flip the standard image orientation of the data values assuming that values are stored into a FITS interface (where the first values in the sequential data are the bottom row). So this is not done in this python code but by the camera.
- async expose(*args, **kwargs)[source]¶
Exposes the camera.
This is the general method to expose the camera. It receives the exposure time and type of exposure, along with other necessary arguments, and returns an
Exposureinstance with the data and metadata for the image.The
Exposureobject is created and populated byexposeand passed to the parent mixins for the camera class. It is also passed to the internal expose method where the concrete implementation of the camera expose system happens.- Parameters:
exptime – The exposure time for the image, in seconds.
image_type – The type of image (
{'bias', 'dark', 'object', 'flat'}).stack – Number of images to stack.
stack_function – The function to apply to the several images taken to generate the final stacked image. Defaults to the median.
fits_model – A
FITSModelthat can be used to override the default model for the camera.filename – The path where to write the image. If not given, a new name is automatically assigned based on the camera instance of
ImageNamer.num – If specified, a
numvalue to pass wotImageNamerto define the sequence number of the exposure filename.write – If
True, writes the image to disk immediately.postprocess – Whether to run the post-process stage. This argument is ignored if the subclass of
BaseCameradoes not override_post_process_internal.kwargs – Other keyword arguments to pass to the internal expose and post-process methods.
- Returns:
exposure – An
Exposureobject containing the image data, exposure time, and header datamodel.
- class lvmcam.camera.BlackflyCameraSystem(camera_class=None, camera_config=None, include=None, exclude=None, logger=None, log_header=None, log_file=None, verbose=False)[source]¶
Bases:
CameraSystemA collection of GenICam cameras, possibly online.
- Parameters:
camera_class (
BaseCamerasubclass) – The subclass ofBaseCamerato use with this camera system.camera_config (dict or path) – A dictionary with the configuration parameters for the multiple cameras that can be present in the system, or the path to a YAML file. Refer to the documentation for details on the accepted format.
include (list) – List of camera UIDs that can be connected.
exclude (list) – List of camera UIDs that will be ignored.
logger (Logger) – The logger instance to use. If
None, a new logger will be created.log_header (str) – A string to be prefixed to each message logged.
log_file (str) – The path to which to log.
verbose (bool) – Whether to log to stdout.