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, ITemperatures, IAbortable

A pyobs module for SBIG cameras.

Initializes a new SbigCamera.

Parameters:

setpoint – Temperature setpoint.

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

Returns the camera binning.

Returns:

Dictionary with x and y.

async get_cooling_status(**kwargs: Any) Tuple[bool, float, float][source]

Returns the current status for the cooling.

Returns:

Enabled (bool): Whether the cooling is enabled SetPoint (float): Setpoint for the cooling in celsius. Power (float): Current cooling power in percent or None.

Return type:

Tuple containing

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_temperatures(**kwargs: Any) Dict[str, float][source]

Returns all temperatures measured by this module.

Returns:

Dict containing temperatures.

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 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: Optional[List[str]] = None, **kwargs: Any)

Bases: MotionStatusMixin, SbigCamera, IFilters

A pyobs module for SBIG cameras.

Initializes a new SbigCamera.

Parameters:

filter_names – List of filter names.

async get_filter(**kwargs: Any) str[source]

Get currently set filter.

Returns:

Name of currently set filter.

Raises:
  • ValueError – If filter could not be fetched.

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

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

Initialize device.

Raises:

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

async is_ready(**kwargs: Any) bool[source]

Returns the device is “ready”, whatever that means for the specific device.

Returns:

Whether device is ready

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

List available filters.

Returns:

List of available filters.

Raises:

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

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:
  • ValueError – If binning could not be set.

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

async stop_motion(device: Optional[str] = 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: Optional[List[str]] = 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 is_ready(**kwargs: Any) bool[source]

Returns the device is “ready”, whatever that means for the specific device.

Returns:

Whether device is ready

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

Park device.

Raises:

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

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

Stop the motion.

Parameters:

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