pyobs-sbig

This is a pyobs (documentation) module for SBIG cameras.

Example configuration

This is an example configuration for a SBIG-6303E camera:

class: pyobs_sbig.Sbig6303eCamera

# cooling setpoint
setpoint: -10

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

# additional fits headers
fits_headers:
  'INSTRUME': ['sbig', 'Name of instrument']
  'DET-PIXL': [0.009, 'Size of detector pixels (square) [mm]']
  'DET-NAME': ['KAF-6303E', 'Name of detector']
  'DET-RON': [13.5, 'Detector readout noise [e-]']
  'DET-SATU': [100000, 'Detector saturation limit [e-]']
  'DET-DARK': [0.3, 'Detector dark current [e-/s]']

# opto-mechanical centre
centre: [1536.0, 1024.0]

# rotation (east of north)
rotation: -1.76
flip: True

# filter wheel
filter_wheel: AUTO
filter_names: [Red, Green, Blue, Clear, Halpha]

# 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

The base class for all SBIG cameras is SbigCamera, which can be used for all camera types without an integrated filter wheel. For those that do have one, you must use SbigFilterCamera. There is a special implementation for SBIG-6303E cameras in Sbig6303eCamera.

SbigCamera

class SbigCamera(setpoint: float = -20, **kwargs: Any)

Bases: BaseCamera, ICamera, IWindow, IBinning, ICooling, ITemperatures, IAbortable

A pyobs module for SBIG cameras.

Initializes a new SbigCamera.

Parameters:

setpoint – Temperature setpoint.

async close() → None[source]

Close module and release the camera link.

async full_reset(**kwargs: Any) → None[source]

Reset the device completely, including cooling.

async open() → None[source]

Open module.

Raises:

ValueError – If cannot connect to camera or set filter wheel.

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

Set the camera binning.

Parameters:
  • x – X binning.

  • y – Y binning.

async set_cooling(enabled: bool, setpoint: float, **kwargs: Any) → None[source]

Enables/disables cooling and sets setpoint.

Parameters:
  • enabled – Enable or disable cooling.

  • setpoint – Setpoint in celsius for the cooling.

Raises:

ValueError – If cooling 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.

SbigFilterCamera

class SbigFilterCamera(filter_wheel: str, filter_names: list[str] | None = None, **kwargs: Any)

Bases: SbigCamera, MotionStatusMixin, IFilters

A pyobs module for SBIG cameras.

Initializes a new SbigCamera.

Parameters:

filter_names – List of filter names.

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

Initialize device.

Raises:

pyobs.utils.exceptions.InitError – If device could not be initialized.

async open() → None[source]

Open module.

Raises:

ValueError – If cannot connect to camera or set filter wheel.

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

Park device.

Raises:

pyobs.utils.exceptions.ParkError – If device could not be parked.

async set_filter(filter_name: str, **kwargs: Any) → None[source]

Set the current filter.

Parameters:

filter_name – Name of filter to set.

Raises:
  • InvalidArgumentError – If filter_name is unknown.

  • NotImplementedError – If camera doesn’t have a filter wheel.

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.

Sbig6303eCamera

class Sbig6303eCamera(filter_wheel: str, filter_names: list[str] | None = None, **kwargs: Any)

Bases: SbigFilterCamera

A pyobs module for SBIG6303e cameras.

Initializes a new SbigCamera.

Parameters:

filter_names – List of filter names.

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

Initialize device.

Raises:

pyobs.utils.exceptions.InitError – If device could not be initialized.

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

Park device.

Raises:

pyobs.utils.exceptions.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.