panoptes.pocs.camera.gphoto package¶
Submodules¶
panoptes.pocs.camera.gphoto.base module¶
- class panoptes.pocs.camera.gphoto.base.AbstractGPhotoCamera(*arg, **kwargs)[source]¶
Bases:
AbstractCamera
,ABC
Abstract camera class that uses gphoto2 interaction.
- Parameters:
config (Dict) – Config key/value pairs, defaults to empty dict.
- property cooling_power¶
Get current power level of the camera’s image sensor cooling system (typically as a percentage of the maximum).
Note: this only needs to be implemented for cameras which have cooled image sensors, not for those that don’t (e.g. DSLRs).
- get_command_result(timeout: float = 10) List[str] | None [source]¶
Get the output from the command.
Accepts a timeout param for communicating with the process.
Returns a list of strings corresponding to the output from the gphoto2 camera or None if no command has been specified.
- classmethod gphoto_file_download(port: str, filename_pattern: str, only_new: bool = True)[source]¶
Downloads (newer) files from the camera on the given port using the filename pattern.
- property is_exposing¶
True if an exposure is currently under way, otherwise False.
- load_properties() dict [source]¶
Load properties from the camera.
Reads all the configuration properties available via gphoto2 and returns as dictionary.
- set_properties(prop2index: Dict[str, int] = None, prop2value: Dict[str, str] = None)[source]¶
Sets a number of properties all at once, by index or value.
- set_property(prop: str, val: str | int, is_value: bool = False, is_index: bool = False)[source]¶
Set a property on the camera.
- classmethod start_tether(port, filename_pattern: str = '%Y%m%dT%H%M%S.%C')[source]¶
Start a tether for gphoto2 auto-download on given port using filename pattern.
- property target_temperature¶
Get current value of the target temperature for the camera’s image sensor cooling control.
Note: this only needs to be implemented for cameras which have cooled image sensors, not for those that don’t (e.g. DSLRs).
- property temperature¶
Get current temperature of the camera’s image sensor.
Note: this only needs to be implemented for cameras which can provided this information, e.g. those with cooled image sensors.
panoptes.pocs.camera.gphoto.canon module¶
- class panoptes.pocs.camera.gphoto.canon.Camera(readout_time: float = 1.0, file_extension: str = 'cr2', connect: bool = True, *args, **kwargs)[source]¶
Bases:
AbstractGPhotoCamera
- property bit_depth¶
ADC bit depth.
- connect()[source]¶
Connect to Canon DSLR.
Gets the serial number from the camera and sets various settings.
- property egain¶
Image sensor gain in e-/ADU as reported by the camera.
panoptes.pocs.camera.gphoto.remote module¶
- class panoptes.pocs.camera.gphoto.remote.Camera(endpoint: AnyHttpUrl = 'http://localhost:6565', *args, **kwargs)[source]¶
Bases:
Camera
A remote gphoto2 camera class.
- command(cmd, endpoint: AnyHttpUrl = None)[source]¶
Run the gphoto2 command remotely.
This assumes the remote camera service is running at the endpoint specified on the camera object or passed to the method.
- get_command_result(timeout: float = 10) List[str] | None [source]¶
Get the output from the remote camera service.
- property is_exposing¶
True if an exposure is currently under way, otherwise False.