Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docs for the rest of observatory excluding observatory #298

Open
wants to merge 11 commits into
base: wwg-dev
Choose a base branch
from
14 changes: 10 additions & 4 deletions pyscope/observatory/_pwi4.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,17 @@


class _PWI4:
"""
Client to the PWI4 telescope control application.
"""

def __init__(self, host="localhost", port=8220):
"""
Client to the PWI4 telescope control application.

Parameters
----------
host : `str`, default : "localhost", optional
The hostname or IP address of the computer running PWI4.
port : `int`, default : 8220, optional
The port number on which PWI4 is listening for HTTP requests.
"""
self.host = host
self.port = port
self.comm = _PWI4HttpCommunicator(host, port)
Expand Down
1 change: 1 addition & 0 deletions pyscope/observatory/ascom_camera.py
Original file line number Diff line number Diff line change
Expand Up @@ -398,6 +398,7 @@ def LastExposureStartTime(self):

@property
def LastInputExposureDuration(self):
"""The duration of the last exposure in seconds. (`float`)"""
logger.debug(f"ASCOMCamera.LastInputExposureDuration property called")
return self._last_exposure_duration

Expand Down
17 changes: 17 additions & 0 deletions pyscope/observatory/ascom_rotator.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@

class ASCOMRotator(ASCOMDevice, Rotator):
def __init__(self, identifier, alpaca=False, device_number=0, protocol="http"):
"""
ASCOM implementation of the Rotator base class.

The class provides an interface to control an ASCOM-compatible rotator device, including methods for
moving, halting, and properties for determining the current position and movement state of the rotator.

Parameters
----------
identifier : `str`
The device identifier.
alpaca : `bool`, default : `False`, optional
Whether the device is an Alpaca device.
device_number : `int`, default : 0, optional
The device number.
protocol : `str`, default : "http", optional
The protocol to use for communication with the device.
"""
super().__init__(
identifier,
alpaca=alpaca,
Expand Down
19 changes: 19 additions & 0 deletions pyscope/observatory/ascom_safety_monitor.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,25 @@

class ASCOMSafetyMonitor(ASCOMDevice, SafetyMonitor):
def __init__(self, identifier, alpaca=False, device_number=0, protocol="http"):
"""
ASCOM implementation of the SafetyMonitor base class.

This class provides an interface to ASCOM-compatible safety monitors,
allowing the observatory to check if weather, power, and other
observatory-specific conditions allow safe usage of observatory equipment,
such as opening the roof or dome.

Parameters
----------
identifier : `str`
The device identifier.
alpaca : `bool`, default : `False`, optional
Whether the device is an Alpaca device.
device_number : `int`, default : 0, optional
The device number.
protocol : `str`, default : "http", optional
The device communication protocol.
"""
super().__init__(
identifier,
alpaca=alpaca,
Expand Down
17 changes: 17 additions & 0 deletions pyscope/observatory/ascom_switch.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,23 @@

class ASCOMSwitch(ASCOMDevice, Switch):
def __init__(self, identifier, alpaca=False, device_number=0, protocol="http"):
"""
ASCOM implementation of the Switch base class.

The class provides an interface to ASCOM-compatible switch devices, including methods for
getting and setting switch values, and getting switch names and descriptions.

Parameters
----------
identifier : `str`
The device identifier.
alpaca : `bool`, default : `False`, optional
Whether the device is an Alpaca device.
device_number : `int`, default : 0, optional
The device number.
protocol : `str`, default : "http", optional
The protocol to use for communication with the device.
"""
super().__init__(
identifier,
alpaca=alpaca,
Expand Down
Loading
Loading