LATISS

class lsst.ts.observatory.control.auxtel.LATISS(domain: Optional[Domain] = None, log: Optional[Logger] = None, intended_usage: Optional[int] = None, tcs_ready_to_take_data: Optional[Callable[[], Awaitable]] = None)

Bases: BaseCamera

LSST Auxiliary Telescope Image and Slit less Spectrograph (LATISS).

LATISS encapsulates core functionality from the following CSCs ATCamera, ATSpectrograph, ATHeaderService and ATOODS CSCs.

Parameters:
domainlsst.ts.salobj.Domain

Domain for remotes. If None create a domain.

loglogging.Logger

Optional logging class to be used for logging operations. If None, creates a new logger. Useful to use in salobj.BaseScript and allow logging in the class use the script logging.

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.

components

List of components names.

components_attr

List of remotes names.

usages

Define class usages.

valid_use_cases

Returns valid usages.

Methods Summary

assert_all_enabled([message])

Check if all components are in the enabled state.

assert_liveliness()

Assert liveliness of components belonging to the group.

assert_support_stuttered()

Verify the camera support taking stuttered images.

cancel_not_done(tasks)

Cancel all coroutines in coro_list.

check_comp_heartbeat(component)

Monitor heartbeats from the specified component and raises and exception if not.

check_component_state(component[, desired_state])

Monitor the summary state of a component and raises an exception if it is or goes to a state different than the desired state.

check_kwargs(**kwargs)

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

close()

components_to_check()

Return components for which check is enabled.

enable([overrides])

Enable all components.

expand_overrides([overrides])

Expand an overrides dict with entries for every component.

expose(camera_exposure)

Encapsulates the take image command.

get_available_instrument_setup()

Return available instrument setup.

get_heartbeat(component)

Get last heartbeat for component.

get_identity()

Get user identity.

get_required_resources(component, intended_usage)

Return the required resources based on the intended usage of the class.

get_setup()

Get the current filter, grating and stage position

get_simulation_mode([components])

Return a list with the simulation mode for components in the group.

get_software_versions([components])

Return a list with the software versions for components in the group.

get_state(component[, ignore_timeout])

Get summary state for component.

get_work_components([components])

Parse input into a list of valid components from the group.

handle_request_authorization(...)

Handle requesting authorization.

handle_take_images(camera_exposure)

Handle take images command.

next_exposure_id()

Get the exposure id from the next endReadout event.

next_group_id()

Get the next group ID.

next_heartbeat(component)

Get next heartbeat for component.

next_state(component)

Get summary state for component.

offline()

Put all CSCs in offline.

parse_sensors(sensors)

Parse input sensors.

process_as_completed(tasks)

Process tasks are they complete.

release_authorization()

Release authorization to command all required components from the group.

request_authorization()

Request authorization to command all required components from the group.

reset_checks()

Reset all checks, enabling check for all components.

set_rem_loglevel(level)

Set remotes log level.

set_state(state[, overrides, components])

Set summary state for all components.

setup_atspec([filter, grating, linear_stage])

Encapsulates commands to setup spectrograph.

setup_instrument(**kwargs)

Implements abstract method to setup instrument.

standby()

Put all CSCs in standby.

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_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_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_object(exptime[, n, n_snaps, group_id, ...])

Take a series of object images.

take_stuttered(exptime, n_shift, row_shift)

Take stuttered images.

Attributes Documentation

camera

Camera remote.

components

List of components names.

The name of the CSC follow the format used in the class constructor, e.g. CSCName or CSCName:index (for indexed components), e.g. “Hexapod:1” (for Hexapod with index=1) or “ATHexapod”.

Returns:
componentslist of str

List of CSCs names.

components_attr

List of remotes names.

The remotes names are reformatted to fit the requirements for object attributes. It will be the name of the CSC (as in components) in lowercase, replacing the colon by an underscore, e.g. “Hexapod:1” -> “hexapod_1” or “ATHexapod” -> “athexapod”.

Returns:
components_attrlist of str

List of remotes attribute names.

usages
valid_use_cases

Returns valid usages.

Returns:
usages: enum

Methods Documentation

async assert_all_enabled(message: str = '') None

Check if all components are in the enabled state.

Parameters:
message: `str`

Additional message to append to error.

async assert_liveliness() None

Assert liveliness of components belonging to the group.

The assertion is done by waiting for a new heartbeat from the component. The check feature will apply to the assertion so components marked with check=False will be skipped.

Raises:
AssertionError

If cannot get heartbeat for one or more components.

assert_support_stuttered() None

Verify the camera support taking stuttered images.

Raises:
AssertionError

If stuttered image is not supported.

async static cancel_not_done(tasks: List[Task]) None

Cancel all coroutines in coro_list.

Remove futures from input tasks list and cancel them.

Parameters:
taskslist [futures]

A list of coroutines to cancel.

async check_comp_heartbeat(component: str) None

Monitor heartbeats from the specified component and raises and exception if not.

This method will run forever as long as the component continues to send heartbeats. The intention is that this can run alongside an operation, to make sure the component remains responsive.

Parameters:
componentstr

Name of the component to follow. The name of the CSC follow the format CSCName or CSCName:index (for indexed components), e.g. “Hexapod:1” (for Hexapod with index=1) or “ATHexapod”.

Raises:
RuntimeError

If the component does not send heartbeats in self.fast_timeout seconds.

async check_component_state(component: str, desired_state: State = State.ENABLED) None

Monitor the summary state of a component and raises an exception if it is or goes to a state different than the desired state.

This method will run forever as long as the summary state remains unchanged. The intention is that this can run alongside an operation that require the component to be in a certain state, when the operation is completed, the task can be canceled.

Parameters:
componentstr

Name of the component to follow. Must be one of: atmcs, atptg, ataos, atpneumatics, athexapod, atdome, atdometrajectory

desired_statesalobj.State

Desired state of the CSC.

Raises:
RuntimeError

If state is not desired_state.

KeyError

If component is not found.

check_kwargs(**kwargs: Optional[Union[int, float, str]]) None

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

Parameters:
**kwargs

Optional keyword,value pair.

Raises:
RuntimeError:

If keyword in kwargs is not in self.instrument_setup_attributes.

async close() None
components_to_check() List[str]

Return components for which check is enabled.

Returns:
list of str

Components to check.

async enable(overrides: Optional[Dict[str, str]] = None) None

Enable all components.

This method will enable all group components. Users can provide overrides for the start command (in a dictionary).

Parameters:
overrides: `dict`

Dictionary with overrides to apply. If None use recommended overrides.

async expand_overrides(overrides: Optional[Dict[str, str]] = None) Dict[str, str]

Expand an overrides dict with entries for every component.

Any components that have no specified override are set to “”.

Parameters:
overridesdict or None

A dictionary with (component name, overrides) pair or None. The component name is as it appears in the components_attr attribute, which is the name of the CSC in lowercase, replacing “:” by “_” for indexed components, e.g. “Hexapod:1” -> “hexapod_1” or “ATHexapod” -> “athexapod”.

Returns:
complete_overridesdict

Dictionary with overrides for every component in the group. Unspecifies components have override “”.

Raises:
RuntimeError

If an item in the parameter overrides dictionary is not a CSC in the group.

async expose(camera_exposure: CameraExposure) List[int]

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_exposureCameraExposure

Camera exposure definitions.

Returns:
exp_idslist of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

async get_available_instrument_setup() Tuple[List[str], List[str], List[str]]

Return available instrument setup.

Returns:
available_filters: list

List of available filters.

available_gratings: list

List of available gratings.

linear_state_limits: list

Min/Max values for linear state.

See also

setup_instrument

Set up instrument.

async get_heartbeat(component: str) BaseMsgType

Get last heartbeat for component.

Parameters:
componentstr

Name of the component.

Returns:
heartbeat

Last component heartbeat.

get_identity() str

Get user identity.

Returns:
str

Identity.

get_required_resources(component: str, intended_usage: Union[None, int]) Any

Return the required resources based on the intended usage of the class.

When subclassing, overwrite this method to add the child class use cases.

Parameters:
component: `str`

Name of the component, with index as it appears in components_attr attribute (e.g. test_1 for the Test component with index 1).

intended_usage: `int` or `None`

An integer constructed from the self.valid_use_cases. Usages can be combined to enable combined operations (see base class documentation). If None, returns appropriate values to load all resources.

Returns:
resources: types.SimpleNamespace

A simple namespaces with the following attributes:

add_this: bool

Should this remote be added to the collection?

readonly: bool

Create the remote for this component in readonly mode? Some operations does not require commanding.

include: list [str]

What topics should be included?

Raises:
KeyError: If component is not in the list of components.
async get_setup() Tuple[str, str, float]

Get the current filter, grating and stage position

Returns:
str

Name of filter currently in the beam

str

Name of disperser currently in the beam

float

Position of linear stage holding the dispersers

async get_simulation_mode(components: Optional[List[str]] = None) Dict[str, BaseMsgType]

Return a list with the simulation mode for components in the group.

Parameters:
componentslist of str, optional

List with the name of components to get the simulation mode. If None (default) return the values for all components.

Returns:
simulation_mode: dict

Dictionary with the name of the component and the value of simulation mode.

async get_software_versions(components: Optional[List[str]] = None) Dict[str, BaseMsgType]

Return a list with the software versions for components in the group.

Parameters:
componentslist of str, optional

List with the name of components to get the software versions. If None (default) return the values for all components.

Returns:
software_versions: dict

Dictionary with the name of the component and the value of software versions.

async get_state(component: str, ignore_timeout: bool = False) State

Get summary state for component.

Parameters:
componentstr

Name of the component.

ignore_timeoutbool

If True will return None in case it times out getting the state. Default is False, which means raise TimeoutError.

Returns:
statesalobj.State or None

Current state of component.

Raises:
asyncio.TimeoutError

If can not get state in self.fast_timeout seconds.

get_work_components(components: Optional[List[str]] = None) List[str]

Parse input into a list of valid components from the group.

Parameters:
componentslist of str or None

Input list of components to process or None. If None return a list with all components.

Returns:
work_componentslist of str

List of valid components.

Raises:
RuntimeError

If a component in the components input list is not part of the group.

async handle_request_authorization(authorized_users: str, non_authorized_cscs: str) None

Handle requesting authorization.

Parameters:
authorized_usersstr

Comma separated list of users to request authorization to command the CSCs in this group, in the form user@host.

non_authorized_cscsstr

Comma separated list of CSC’s to deny authorization to command CSCs in this group, in the form name[:index].

async handle_take_images(camera_exposure: CameraExposure) List[int]

Handle take images command.

Parameters:
camera_exposureCameraExposure

Camera exposure definitions.

Returns:
exp_idslist of int

List of exposure ids.

async next_exposure_id() int

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:
int

Exposure id from next endReadout event.

static next_group_id() str

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”

async next_heartbeat(component: str) BaseMsgType

Get next heartbeat for component.

Parameters:
componentstr

Name of the component.

Returns:
heartbeat

Last component heartbeat.

async next_state(component: str) State

Get summary state for component.

Parameters:
componentstr

Name of the component.

Returns:
statesalobj.State

Current state of component.

async offline() None

Put all CSCs in offline.

parse_sensors(sensors: Optional[str]) str

Parse input sensors.

For ATCamera this should always be an empty string.

Parameters:
sensorsstr

This field is ignored by LATISS.

Returns:
sensorsstr

A valid set of sensors.

async process_as_completed(tasks: List[Task]) Any

Process tasks are they complete.

If the first task that finishes completes successfully, it will cancel all other tasks in the list, empty the input list and return the value of the task. If the task results in an exception, it will cancel all other tasks, empty the list and raise the exception.

Parameters:
taskslist`[`asyncio.Tasks]

List of asyncio tasks to process.

Returns:
ret_valobject

Return value from the first completed task.

async release_authorization() None

Release authorization to command all required components from the group.

async request_authorization() None

Request authorization to command all required components from the group.

reset_checks() None

Reset all checks, enabling check for all components.

set_rem_loglevel(level: int) None

Set remotes log level.

Useful to prevent the internal salobj warnings when read queues are filling up.

Parameters:
levelint

Log level.

async set_state(state: State, overrides: Optional[Dict[str, str]] = None, components: Optional[List[str]] = None) None

Set summary state for all components.

Parameters:
statesalobj.State

Desired state.

overridesdict or None

Settings to apply for each component.

componentslist[`str]`

List of components to set state, as they appear in self.components_attr.

Raises:
RuntimeError
  • If a component in components is not part of the group.

  • If it fails to transition one or more components.

async setup_atspec(filter: Optional[Union[int, str]] = None, grating: Optional[Union[int, str]] = None, linear_stage: Optional[float] = None) None

Encapsulates commands to setup spectrograph.

Parameters:
filterNone or int or str

Filter id or name. If None, do not change the filter.

gratingNone or int or str

Grating id or name. If None, do not change the grating.

linear_stageNone or float

Linear stage position. If None, do not change the linear stage.

async setup_instrument(**kwargs: Optional[Union[int, float, str]]) None

Implements abstract method to setup instrument.

This method will call setup_atspec to set filter, grating and linear_stage.

Parameters:
**kwargs

Arbitrary keyword arguments.

See also

setup_atspec

Setup spectrograph.

take_bias

Take series of bias.

take_darks

Take series of darks.

take_flats

Take series of flat-field images.

take_object

Take series of object observations.

take_engtest

Take series of engineering test observations.

take_imgtype

Take series of images by image type.

expose

Low level expose method.

async standby() None

Put all CSCs in standby.

async take_acq(exptime: float = 1.0, n: int = 1, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

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:
exptimefloat, optional

Exposure time for flats.

nint, optional

Number of frames to take.

group_idstr, optional

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr, optional

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr

A colon delimited list of sensor names to use for the image.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_bias(nbias: int, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None) List[int]

Take a series of bias images.

Parameters:
nbiasint

Number of bias frames to take.

group_idstr

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr

A colon delimited list of sensor names to use for the image.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_cwfs(exptime: float, n: int = 1, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

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:
exptimefloat

Exposure time for flats.

nint

Number of frames to take.

group_idstr

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr

A colon delimited list of sensor names to use for the image.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_darks(exptime: float, ndarks: int, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None) List[int]

Take a series of dark images.

Parameters:
exptimefloat

Exposure time for darks.

ndarksint

Number of dark frames to take.

group_idstr

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr

Optional string to be added to the keyword testType image header.

sensorsstr

A colon delimited list of sensor names to use for the image.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_engtest(exptime: float, n: int = 1, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

Take a series of engineering test images.

Parameters:
exptimefloat

Exposure time for flats.

nint

Number of frames to take.

group_idstr

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr

A colon delimited list of sensor names to use for the image.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_flats(exptime: float, nflats: int, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

Take a series of flat field images.

Parameters:
exptimefloat

Exposure time for flats.

nflatsint

Number of flat frames to take.

group_idstr

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr

A colon delimited list of sensor names to use for the image.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

Notes

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

async take_focus(exptime: float, n: int = 1, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

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:
exptimefloat

Exposure time for flats.

nint

Number of frames to take.

group_idstr

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr

A colon delimited list of sensor names to use for the image.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_imgtype(imgtype: str, exptime: float, n: int, n_snaps: int = 1, n_shift: Optional[int] = None, row_shift: Optional[int] = None, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

Take a series of images of the specified image type.

Parameters:
exptimefloat

Exposure time for flats.

nint

Number of frames to take.

n_snapsint

Number of snaps to take (default=1).

test_typestr

Optional string to be added to the keyword testType image header.

n_shiftint, optional

Number of shift-expose sequences. Only used for stuttered images.

row_shiftint, optional

How many rows to shift at each sequence. Only used for stuttered images.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr, optional

A colon delimited list of sensor names to use for the image.

notestr, optional

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

Raises:
RuntimeError

If TCS takes took long to report.

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.

setup_instrument

Set up instrument.

expose

Low level expose method.

async take_object(exptime: float, n: int = 1, n_snaps: int = 1, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

Take a series of object images.

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

Parameters:
exptimefloat

Exposure time for flats.

nint, optional

Number of frames to take (default=1).

n_snapsint

Number of snaps to take (default=1).

group_idstr, optional

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr, optional

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr, optional

A colon delimited list of sensor names to use for the image.

notestr, optional

Optional observer note to be added to the image header.

checkpointcoro, optional

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

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_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_stuttered(exptime: float, n_shift: int, row_shift: int, n: int = 1, group_id: Optional[str] = None, test_type: Optional[str] = None, reason: Optional[str] = None, program: Optional[str] = None, sensors: Optional[str] = None, note: Optional[str] = None, checkpoint: Optional[Callable[[str], Awaitable]] = None, **kwargs: Union[int, float, str]) List[int]

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:
exptimefloat

Exposure time (in seconds).

n_shiftint

Number of shift-expose sequences.

row_shiftint

How many rows to shift at each sequence.

nint, optional

Number of frames to take.

group_idstr, optional

Optional group id for the data sequence. Will generate a common one for all the data if none is given.

test_typestr, optional

Optional string to be added to the keyword testType image header.

reasonstr, 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.

programstr, optional

Name of the program this data belongs to, e.g. WFD, DD, etc.

sensorsstr

A colon delimited list of sensor names to use for the image.

notestr

Optional observer note to be added to the image header.

checkpointcoro

A optional awaitable callback that accepts one string argument that is called before each bias is taken.

**kwargs

Arbitrary keyword arguments.

Returns:
list of int

List of exposure ids.

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_imgtype

Take series of images of specified imgage type.

setup_instrument

Set up instrument.

expose

Low level expose method.