pyobs-alpaca

This is a pyobs (documentation) module for ALPACA, which is a HTTP proxy for ASCOM.

Example configuration

This is an example configuration for a telescope:

class: pyobs_alpaca.AlpacaTelescope
name: ASCOM Telescope
server: 1.2.3.4
port: 11111
device_type: telescope
device: 0
wait_for_dome: dome
weather: weather
alive_parameter: Name

# communication
comm:
  jid: test@example.com
  password: ***

And for a focussing unit (without the comm block):

class: pyobs_alpaca.AlpacaFocuser
name: ASCOM Focuser
server: 1.2.3.4
port: 11111
device_type: focuser
device: 0
alive_parameter: Position

And finally, for a dome:

class: pyobs_alpaca.AlpacaDome
server: 1.2.3.4
port: 11111
device_type: dome
device: 0
follow: telescope
weather: weather

Available classes

These classes are meant more as a means of an example for own implementations. AlpacaTelescope is an implementation for telescopes, while AlpacaFocuser works for focusing devices and AlpacaDome can operate a dome.

AlpacaTelescope

class AlpacaTelescope(settle_time: float = 3.0, park_position: tuple[float, float] = (180.0, 15.0), **kwargs: Any)

Bases: BaseTelescope, FitsNamespaceMixin, IFitsHeaderBefore, IOffsetsRaDec, ISyncTarget

Initializes a new ASCOM Alpaca telescope.

Parameters:
  • settle_time – Time in seconds to wait after slew before finishing.

  • park_position – Alt/Az park position.

async get_fits_header_before(namespaces: list[str] | None = None, **kwargs: Any) dict[str, FitsHeaderEntry][source]

Returns FITS header for the current status of this module.

async init(**kwargs: Any) None[source]

Initialize telescope.

async open() None[source]

Open module.

async park(**kwargs: Any) None[source]

Park telescope.

async set_offsets_radec(dra: float, ddec: float, **kwargs: Any) None[source]

Move an RA/Dec offset.

async stop_motion(device: str | None = None, **kwargs: Any) None[source]

Stop the motion.

async sync_target(**kwargs: Any) None[source]

Synchronize telescope on current target using current offsets.

AlpacaFocuser

class AlpacaFocuser(**kwargs: Any)

Bases: Module, MotionStatusMixin, IFocuser, IFitsHeaderBefore

Parameters:
  • label – Label for module. If None, name is used.

  • own_comm – If True, module owns comm and opens/closes it.

  • additional_config_variables – List of additional variable names available to remote config getter/setter.

  • acl – Access control config, with either an “allow” or a “deny” key (mutually exclusive), and an optional “mode” key (“enforce”, the default, or “log”). No acl block means fully open access.

async get_fits_header_before(namespaces: list[str] | None = None, **kwargs: Any) dict[str, FitsHeaderEntry][source]

Returns FITS header for the current status of this module.

async init(**kwargs: Any) None[source]

Initialize device.

async open() None[source]

Open module.

async park(**kwargs: Any) None[source]

Park device.

async set_focus(focus: float, **kwargs: Any) None[source]

Sets new focus.

async set_focus_offset(offset: float, **kwargs: Any) None[source]

Sets focus offset.

async stop_motion(device: str | None = None, **kwargs: Any) None[source]

Stop the motion.

AlpacaDome

class AlpacaDome(tolerance: float = 3, park_az: float = 180, follow: str | None = None, **kwargs: Any)

Bases: BaseDome, FollowMixin

Initializes a new ASCOM Alpaca dome.

Parameters:
  • tolerance – Tolerance for azimuth.

  • park_az – Azimuth for park position.

  • follow – Name of other device (e.g. telescope) to follow.

async init(**kwargs: Any) None[source]

Open dome.

async move_altaz(alt: float, az: float, **kwargs: Any) None[source]

Moves to given coordinates.

async open() None[source]

Open module.

async park(**kwargs: Any) None[source]

Close dome.

async stop_motion(device: str | None = None, **kwargs: Any) None[source]

Stop the motion.