BaseCamera#

class lsst.ts.observatory.control.BaseCamera(components, instrument_setup_attributes, domain=None, log=None, intended_usage=None, tcs_ready_to_take_data=None)#

Bases: RemoteGroup

Base class for camera instruments.

Parameters:
  • components (list [str]) – A list of strings with the names of the SAL components that are part of the camera group.

  • instrument_setup_attributes (list [str]) – Names of the attributes needed to setup the instrument for taking an exposure. This is used to check for bad input with functions calls.

  • domain (lsst.ts.salobj.Domain) – Domain for remotes. If None create a domain.

  • log (logging.Logger) – Optional logging class to be used for logging operations. If None, create a new logger.

  • intended_usage (int) – Optional integer that maps to a list of intended operations. This is used to limit the resources allocated by the class by gathering some knowledge about the usage intention. By default allocates all resources.

  • tcs_ready_to_take_data (coroutine) – A coroutine that waits for the telescope control system to be ready to take data.

Attributes Summary

camera

Camera remote.

Methods Summary

assert_support_stuttered()

Verify the camera support taking stuttered images.

check_kwargs(**kwargs)

Utility method to verify that kwargs are in self.instrument_setup_attributes.

expose(camera_exposure)

Encapsulates the take image command.

get_available_instrument_setup()

Return available instrument setup.

get_effective_wavelength(filter_name)

Retrieve the effective wavelength for the specified filter name.

get_image_types()

List of valid image types accepted by the take_imgtype method.

handle_take_images(camera_exposure)

Handle take images command.

init_guider(roi_spec)

Initialize guiders with the provided region of interest specification.

next_exposure_id()

Get the exposure id from the next endReadout event.

next_group_id()

Get the next group ID.

parse_sensors(sensors)

Parse input sensors.

reset_guider_roi()

Clear guider roi and reset it.

set_init_guider()

Wait until the camera is IDLE and send the init guiders command.

setup_instrument(**kwargs)

Generic method called during take_imgtype to setup instrument.

take_acq([exptime, n, group_id, test_type, ...])

Take acquisition images.

take_bias(nbias[, group_id, test_type, ...])

Take a series of bias images.

take_cbp(exptime[, n, group_id, test_type, ...])

Take images with the camera shutter pointed at the CBP.

take_cwfs(exptime[, n, group_id, test_type, ...])

Take images for curvature wavefront sensing.

take_darks(exptime, ndarks[, group_id, ...])

Take a series of dark images.

take_dflat(exptime[, n, group_id, ...])

Take a series of dark flat images.

take_engtest(exptime[, n, group_id, ...])

Take a series of engineering test images.

take_flats(exptime, nflats[, group_id, ...])

Take a series of flat field images.

take_focus(exptime[, n, group_id, ...])

Take images for classical focus sequence.

take_imgtype(imgtype, exptime, n[, n_snaps, ...])

Take a series of images of the specified image type.

take_indome(exptime[, n, group_id, ...])

Take in-dome images.

take_object(exptime[, n, n_snaps, group_id, ...])

Take a series of object images.

take_sflat(exptime[, n, group_id, ...])

Take sky/twilight-flat images.

take_stuttered(exptime, n_shift, row_shift)

Take stuttered images.

wait_for_camera_readiness()

Wait until the camera is ready to take data.

wait_for_camera_state(substate)

Wait for the camera command state to match the specified one.

Attributes Documentation

camera#

Camera remote.

Methods Documentation

assert_support_stuttered()#

Verify the camera support taking stuttered images.

Raises:

AssertionError – If stuttered image is not supported.

Return type:

None

check_kwargs(**kwargs)#

Utility method to verify that kwargs are in self.instrument_setup_attributes.

Parameters:

**kwargs (Union[int, float, str, None]) – Optional keyword,value pair.

Raises:

RuntimeError: – If keyword in kwargs is not in self.instrument_setup_attributes.

Return type:

None

async expose(camera_exposure)#

Encapsulates the take image command.

This basically consists of configuring and sending a takeImages command to the camera and waiting for an endReadout event.

Parameters:

camera_exposure (CameraExposure) – Camera exposure definitions.

Returns:

exp_ids – List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

abstract async get_available_instrument_setup()#

Return available instrument setup. :rtype: Any

See also

setup_instrument

Set up instrument.

get_effective_wavelength(filter_name)#

Retrieve the effective wavelength for the specified filter name.

Parameters:

filter_name (str) – The full filter name (e.g. i_39).

Returns:

effective_wavelength – The filter effective wavelength (in microns).

Return type:

float

classmethod get_image_types()#

List of valid image types accepted by the take_imgtype method.

Return type:

List[str]

async handle_take_images(camera_exposure)#

Handle take images command.

Parameters:

camera_exposure (CameraExposure) – Camera exposure definitions.

Returns:

exp_ids – List of exposure ids.

Return type:

list of int

async init_guider(roi_spec)#

Initialize guiders with the provided region of interest specification.

Parameters:

roi_spec (ROISpec) – Region of interest specification.

Return type:

None

async next_exposure_id()#

Get the exposure id from the next endReadout event.

Await for the next camera.evt_endReadout event, without flushing, parse the imageName into YYYYMMDD and sequence number and construct an integer that represents the exposude id.

Returns:

Exposure id from next endReadout event.

Return type:

int

static next_group_id()#

Get the next group ID.

The group ID is the current TAI date and time as a string in ISO format. It has T separating date and time and no time zone suffix. Here is an example: “2020-01-17T22:59:05.721”

Returns:

group_id

Return type:

string

abstract parse_sensors(sensors)#

Parse input sensors.

Parameters:

sensors (str or None) – A colon delimited list of sensor names to use for the image.

Returns:

sensors – A validated set of colon delimited list of sensor names to use for the image.

Return type:

str

reset_guider_roi()#

Clear guider roi and reset it.

Return type:

None

async set_init_guider()#

Wait until the camera is IDLE and send the init guiders command.

Return type:

None

abstract async setup_instrument(**kwargs)#

Generic method called during take_imgtype to setup instrument.

Parameters:

**kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Return type:

None

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

expose

Low level expose method.

async take_acq(exptime=1.0, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take acquisition images.

Acquisition images are generaly used to check the position of the targets in the FoV, the image quality after a focus/cwfs sequence or any other quick verification purposes.

Because they are supposed to be short exposures, this method provide a default value for the exposure time of 1 second, so one can call it with no argument.

Parameters:
  • exptime (float, optional) – Exposure time for flats.

  • n (int, optional) – Number of frames to take.

  • group_id (str, optional) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str, optional) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_bias(nbias, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None)#

Take a series of bias images.

Parameters:
  • nbias (int) – Number of bias frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_cbp(exptime, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take images with the camera shutter pointed at the CBP.

Take a series of in-dome images with the camera shutter open pointed at the Collimated Beam Projector (CBP). The CBP is an important part of the calibration system but is not the flatfield screen, and its images are not grouped with pinhole shots or scattered light tests.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_cwfs(exptime, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take images for curvature wavefront sensing.

Curvature wavefront sensing images are usually extremely out of focus images that are processed to determine the wavefront errors of the telescope optics. These results can later be processed thought a sensitivity matrix to yield optical corrections.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_darks(exptime, ndarks, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None)#

Take a series of dark images.

Parameters:
  • exptime (float) – Exposure time for darks.

  • ndarks (int) – Number of dark frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_dflat(exptime, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take a series of dark flat images.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_engtest(exptime, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take a series of engineering test images.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_flats(exptime, nflats, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take a series of flat field images.

Parameters:
  • exptime (float) – Exposure time for flats.

  • nflats (int) – Number of flat frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

Notes

This is an abstract method. To check additional inputs for instrument setup check setup_instrument.

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_focus(exptime, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take images for classical focus sequence.

Focus sequence consists of applying an initialy large focus offset, then, continually take data and move focus back in the direction of to the original position, until it has passed it by a similar amount in that direction.

By detecting a bright source in a focus sequence and finding the focus position with smaller full-width-half-maximum, we can estimate the best focus position.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_imgtype(imgtype, exptime, n, n_snaps=1, n_shift=None, row_shift=None, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take a series of images of the specified image type.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • n_snaps (int) – Number of snaps to take (default=1).

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • n_shift (int, optional) – Number of shift-expose sequences. Only used for stuttered images.

  • row_shift (int, optional) – How many rows to shift at each sequence. Only used for stuttered images.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str, optional) – A colon delimited list of sensor names to use for the image.

  • note (str, optional) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

setup_instrument

Set up instrument.

expose

Low level expose method.

Raises:

RuntimeError – If TCS takes took long to report.

Parameters:
async take_indome(exptime, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take in-dome images.

An in-dome image (pinhole, shutter test, etc.) behaves like a FLAT, but indicates that the image is taken inside the dome with the camera shutter open, and not pointed at the calibration screen or CBP. These images are used for in-dome testing, typically when the telescope is not tracking.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_object(exptime, n=1, n_snaps=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take a series of object images.

Object images are assumed to be looking through an open dome at the sky.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int, optional) – Number of frames to take (default=1).

  • n_snaps (int) – Number of snaps to take (default=1).

  • group_id (str, optional) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str, optional) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str, optional) – A colon delimited list of sensor names to use for the image.

  • note (str, optional) – Optional observer note to be added to the image header.

  • checkpoint (coro, optional) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

Notes

Object images support two nested ways of sequencing images; a regular sequence of independent observations (controlled by the n parameter) and sequence of snaps (controlled by the n_snaps parameter).

In fact the n parameter specify the number of “snaps” and n_snaps specify how many images per “snap”. Therefore, n=2 and n_snaps=2 is interpreted as 2 sequences of snaps, each snap with 2 images, accounting for 2x2=4 images total.

Snaps provide a special way of data aggregation employed by the data reduction pipeline and should be used only in specific cases. In general snaps are either 1 or 2 images, larger numbers are allowed but discouraged (and will result in a warning message).

async take_sflat(exptime, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take sky/twilight-flat images.

Parameters:
  • exptime (float) – Exposure time for flats.

  • n (int) – Number of frames to take.

  • group_id (str) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_stuttered

Take series of stuttered images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_stuttered(exptime, n_shift, row_shift, n=1, group_id=None, test_type=None, reason=None, program=None, sensors=None, note=None, checkpoint=None, **kwargs)#

Take stuttered images.

Stuttered image consists of starting an acquisition “manually”, then doing subsequent row-shifts of the image readout for a given number of times. This allows one to take rapid sequence of observations of sources as the detector does not need to readout completely, but the images end up with an odd appearence, as the field offsets at each iteration.

Parameters:
  • exptime (float) – Exposure time (in seconds).

  • n_shift (int) – Number of shift-expose sequences.

  • row_shift (int) – How many rows to shift at each sequence.

  • n (int, optional) – Number of frames to take.

  • group_id (str, optional) – Optional group id for the data sequence. Will generate a common one for all the data if none is given.

  • test_type (str, optional) – Optional string to be added to the keyword testType image header.

  • reason (str, optional) – Reason for the data being taken. This must be a short tag-like string that can be used to disambiguate a set of observations.

  • program (str, optional) – Name of the program this data belongs to, e.g. WFD, DD, etc.

  • sensors (str) – A colon delimited list of sensor names to use for the image.

  • note (str) – Optional observer note to be added to the image header.

  • checkpoint (coro) – A optional awaitable callback that accepts one string argument that is called before each bias is taken.

  • **kwargs (Union[int, float, str]) – Arbitrary keyword arguments.

Returns:

List of exposure ids.

Return type:

list of int

See also

take_bias

Take series of bias images.

take_darks

Take series of darks images.

take_flats

Take series of flats images.

take_object

Take series of object images.

take_engtest

Take series of engineering test images.

take_focus

Take series of focus images.

take_cwfs

Take series of curvature wavefront sensing images.

take_acq

Take series of acquisition images.

take_indome

Take series of in-dome testing images.

take_cbp

Take series of collimated beam projector images.

take_sflat

Take series of sky/twilight-flat images.

take_dflat

Take series of dark-flat images.

take_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async wait_for_camera_readiness()#

Wait until the camera is ready to take data.

Return type:

None

async wait_for_camera_state(substate)#

Wait for the camera command state to match the specified one.

Parameters:

substate (CameraSubstate) – Which substate to wait the camera to be.

Return type:

None