MockPointGrey

class asgard_alignment.Cameras.MockPointGrey(image_path, n_samples, shift_type='random', noise_level=0.01)

Bases: object

Attributes Summary

EDITABLE_PARAMS

img_size

Get the image size.

Methods Summary

get_frame()

Get the next image frame from the mock camera.

release()

Mock release resources (no operation).

start_stream()

Mock start stream (no operation).

stop_stream()

Mock stop stream (no operation).

Attributes Documentation

EDITABLE_PARAMS = ['OffsetX', 'OffsetY', 'Height', 'Width', 'ExposureTime', 'Gain']
img_size

Get the image size.

Returns:

The height and width of the image.

Return type:

tuple

Methods Documentation

get_frame()

Get the next image frame from the mock camera.

Returns:

The next image frame as a numpy array.

Return type:

numpy.ndarray

release()

Mock release resources (no operation).

start_stream()

Mock start stream (no operation).

stop_stream()

Mock stop stream (no operation).

EDITABLE_PARAMS = ['OffsetX', 'OffsetY', 'Height', 'Width', 'ExposureTime', 'Gain']
__getitem__(key)

Get the value of a mock camera parameter.

Parameters:

key (str) – The name of the parameter to get.

Returns:

The value of the parameter.

Return type:

Any

Raises:

KeyError – If the key is not a valid parameter.

__setattr__(name, value)

Set the attribute of the mock camera.

Parameters:
  • name (str) – The name of the attribute to set.

  • value (Any) – The value to set the attribute to.

__setitem__(key, value)

Set the value of a mock camera parameter.

Parameters:
  • key (str) – The name of the parameter to set.

  • value (Any) – The value to set the parameter to.

Raises:

KeyError – If the key is not a valid parameter.

get_frame()

Get the next image frame from the mock camera.

Returns:

The next image frame as a numpy array.

Return type:

numpy.ndarray

property img_size

Get the image size.

Returns:

The height and width of the image.

Return type:

tuple

release()

Mock release resources (no operation).

start_stream()

Mock start stream (no operation).

stop_stream()

Mock stop stream (no operation).