pyobs-asi

This is a pyobs (documentation) module for ASI ZWO cameras.

Example configuration

This is an example configuration, tested on a ASI 071 MC:

class: pyobs_asi.AsiCoolCamera
camera: ZWO ASI071MC Pro

# file naming
filenames: /cache/pyobs-{DAY-OBS|date:}-{FRAMENUM|string:04d}-{IMAGETYP|type}00.fits

# additional fits headers
fits_headers:
  'DET-PIXL': [0.00478, 'Size of detector pixels (square) [mm]']
  'DET-NAME': ['SONY IMX071', 'Name of detector']
  'DET-RON': [2.3, 'Detector readout noise [e-]']
  'DET-SATU': [46000, 'Detector saturation limit [e-]']

# opto-mechanical centre
centre: [2472.0, 1642.0]

# rotation (east of north)
rotation: 3.06
flip: True

# location
timezone: utc
location:
  longitude: 9.944333
  latitude: 51.560583
  elevation: 201.

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

# virtual file system
vfs:
  class: pyobs.vfs.VirtualFileSystem
  roots:
    cache:
      class: pyobs.vfs.HttpFile
      upload: http://localhost:37075/

Available classes

There is one single class for ASI ZWO cameras.

AsiCamera

class AsiCamera(camera: str, sdk: str = '/usr/local/lib/libASICamera2.so', **kwargs: Any)

Bases: BaseCamera, ICamera, IWindow, IBinning, IImageFormat, IAbortable

A pyobs module for ASI cameras.

Initializes a new AsiCamera.

Parameters:
  • camera – Name of camera to use.

  • sdk – Path to .so file from ASI SDK.

async get_binning(**kwargs: Any) Tuple[int, int][source]

Returns the camera binning.

Returns:

Tuple with x and y.

async get_full_frame(**kwargs: Any) Tuple[int, int, int, int][source]

Returns full size of CCD.

Returns:

Tuple with left, top, width, and height set.

async get_image_format(**kwargs: Any) ImageFormat[source]

Returns the camera image format.

Returns:

Current image format.

async get_window(**kwargs: Any) Tuple[int, int, int, int][source]

Returns the camera window.

Returns:

Tuple with left, top, width, and height set.

async list_binnings(**kwargs: Any) List[Tuple[int, int]][source]

List available binnings.

Returns:

List of available binnings as (x, y) tuples.

async list_image_formats(**kwargs: Any) List[str][source]

List available image formats.

Returns:

List of available image formats.

async open() None[source]

Open module.

async set_binning(x: int, y: int, **kwargs: Any) None[source]

Set the camera binning.

Parameters:
  • x – X binning.

  • y – Y binning.

Raises:

ValueError – If binning could not be set.

async set_image_format(fmt: ImageFormat, **kwargs: Any) None[source]

Set the camera image format.

Parameters:

fmt – New image format.

Raises:

ValueError – If format could not be set.

async set_window(left: int, top: int, width: int, height: int, **kwargs: Any) None[source]

Set the camera window.

Parameters:
  • left – X offset of window.

  • top – Y offset of window.

  • width – Width of window.

  • height – Height of window.

Raises:

ValueError – If binning could not be set.