pyobs-brot

This is a pyobs (documentation) module for telescopes, domes and roll-off roofs controlled via BROTlib over MQTT.

Example configuration

This is an example configuration for a telescope:

class: pyobs_brot.BrotRaDecTelescope
host: 1.2.3.4
name: My telescope
roof: roof
dome: dome

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

The dome and roof connect to the same BROT device and MQTT broker:

class: pyobs_brot.BrotDome
host: 1.2.3.4
name: My telescope

# communication
comm:
  jid: test@example.com
  password: ***
class: pyobs_brot.BrotRoof
host: 1.2.3.4
name: My telescope

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

Available classes

BrotRaDecTelescope (based on BrotBaseTelescope) drives a telescope, BrotDome a dome, and BrotRoof a roll-off roof.

BrotBaseTelescope

class BrotBaseTelescope(host: str, name: str, port: int = 1883, temperatures: dict[str, str] | None = None, keepalive: int = 60, roof: str = 'None', dome: str = 'None', **kwargs: Any)[source]

Bases: BaseTelescope, IFocuser, ITemperatures, IPointingRaDec, IPointingAltAz, IPointingSeries, FitsNamespaceMixin

Initialize a new base telescope.

Parameters:
  • fits_headers – Additional FITS headers to send.

  • min_altitude – Minimal altitude for telescope.

  • wait_for_dome – Name of dome module to wait for.

async close() None[source]

Close module.

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

Initialize device.

Raises:

InitError – If device could not be initialized.

async open() None[source]

Open module.

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

Park device.

Raises:

ParkError – If device could not be parked.

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

Sets new focus.

Parameters:

focus – New focus value.

Raises:
  • MoveError – If telescope cannot be moved.

  • InterruptedError – If movement was aborted.

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

Sets focus offset.

Parameters:

offset – New focus offset.

Raises:
  • ValueError – If given value is invalid.

  • MoveError – If telescope cannot be moved.

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

Stop the motion.

Parameters:

device – Name of device to stop, or None for all.

BrotRaDecTelescope

class BrotRaDecTelescope(pointing_file: str = '/pyobs/pointing.csv', **kwargs: Any)[source]

Bases: BrotBaseTelescope, IOffsetsRaDec

Initialize a new base telescope.

Parameters:
  • fits_headers – Additional FITS headers to send.

  • min_altitude – Minimal altitude for telescope.

  • wait_for_dome – Name of dome module to wait for.

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

Add a new measurement to the pointing series.

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

Returns FITS header for the current status of this module.

Parameters:

namespaces – If given, only return FITS headers for the given namespaces.

Returns:

Dictionary containing FITS headers.

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

Move an RA/Dec offset.

Parameters:
  • dra – RA offset in degrees.

  • ddec – Dec offset in degrees.

Raises:

MoveError – If telescope cannot be moved.

BrotDome

class BrotDome(host: str, name: str, port: int = 1883, keepalive: int = 60, **kwargs: Any)[source]

Bases: BaseDome, IDome

Initialize a new base dome.

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

Initialize device.

Raises:

InitError – If device could not be initialized.

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

Moves to given coordinates.

Parameters:
  • alt – Alt in deg to move to.

  • az – Az in deg to move to.

Raises:

MoveError – If device could not be moved.

async open() None[source]

Open module.

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

Park device.

Raises:

ParkError – If device could not be parked.

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

Stop the motion.

Parameters:

device – Name of device to stop, or None for all.

BrotRoof

class BrotRoof(host: str, name: str, port: int = 1883, **kwargs: Any)[source]

Bases: BaseRoof

Initialize a new base roof.

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

Initialize device.

Raises:

InitError – If device could not be initialized.

async open() None[source]

Open module.

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

Park device.

Raises:

ParkError – If device could not be parked.

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

Stop the motion.

Parameters:

device – Name of device to stop, or None for all.