giant.opnav_class¶
The opnav_class module provides an OpNav object that serves as the foundation for other high-level user interface objects throughout GIANT.
Essentially, the OpNav class serves as a container for both a Camera
and
ImageProcessing
instance, and then provides aliases (in the way of properties) to be able to access a few
of the attributes of these instances directly from the OpNav class instance.
Example¶
In general, the OpNav class is not used directly in any setups. Instead, it is used as the super class for other high
level user interface classes, such as StellarOpNav
and RelativeOpNav
. For instance, say we want to
create a new high-level interface class called MyAwesomeNewOpNav. If we subclass the OpNav class when creating this
new class then we automatically get a camera
attribute, a image_processing
attribute, and a few aliases to the
attributes of the camera and image processing instances
>>> from giant.opnav_class import OpNav
>>> from giant.camera import Camera
>>> class MyAwesomeNewOpNav(OpNav):
... def __init__(self, camera, image_processing, image_processing_kwargs):
... super().__init__(camera, image_processing=image_processing,
... image_processing_kwargs=image_processing_kwargs)
... self.new_attribute = 2
...
>>> inst = MyAwesomeNewOpNav(Camera())
>>> hasattr(inst, 'camera')
True
>>> hasattr(inst, 'image_processing')
True
Classes
This serves as a container for |