Skip to content

Exposure Class

azcam.console.tools.exposure.ExposureConsole

Bases: ConsoleTools

Exposure tool for consoles. Usually implemented as the "exposure" tool.

abort()

Sets the global exposure abort flag and tries to abort a remote server exposure.

begin(exposure_time=-1, image_type='', image_title='')

Initiates the first part of an exposure, through image flushing. This is an advanced function.

:param exposure_time: the exposure time in seconds :param image_type: type of exposure ('zero', 'object', 'flat', ...) :param image_title: image title, usually surrounded by double quotes

end()

Completes an exposure by writing file and displaying image. This is an advanced function.

expose(exposure_time=-1, image_type='', image_title='')

Make a complete exposure. If arguments are not specified, then previous exposure_time and imagetype values are used.

:param exposure_time: the exposure time in seconds :param image_type: type of exposure ('zero', 'object', 'flat', ...) :param image_title: image title, usually surrounded by double quotes

expose1(exposure_time=-1, image_type='', image_title='')

Make a complete exposure with immediate return to caller.

:param exposure_time: the exposure time in seconds :param image_type: type of exposure ('zero', 'object', 'flat', ...) :param image_title: image title, usually surrounded by double quotes

flush(cycles=1)

Flush/clear detector.

:param cycles: number of times to flush the detector.

get_exposuretime()

Return current exposure time in seconds.

get_exposuretime_remaining()

Return current exposure time in seconds.

get_filename()

Return the current exposure image filename. :returns: imaeg filename

get_focalplane()

Returns the current focal plane configuration.

get_format()

Return the current detector format parameters.

get_image_title()

Get the current image title.

get_image_types()

Return a list of valid image types.

get_pixels_remaining()

Return current number of pixels remaing in readout.

get_roi()

Return detector ROI.

get_status()

Return JSON dictionary of a variety of system status data in one dictionary.

guide(number_exposures=1)

Make a complete guider exposure sequence.

:param number_exposures: number of exposures to make, -1 loop forever

guide1(number_exposures=1)

guide() with immediate return.

:param number_exposures: number of exposures to make, -1 loop forever

initialize()

Initialize exposure. Usually implemented as the "exposure" tool.

integrate()

Integrate exposure. This is an advanced function.

parshift(number_rows)

Shift detector by number_rows.

:param number_rows: number of rows to shift (positive is toward readout, negative is away)

pause_exposure()

Pause an exposure in progress (integration only).

readout()

Readout the exposure. This is an advanced function.

reset()

Reset exposure.

resume_exposure()

Resume a paused exposure.

roi_reset()

Resets detector ROI values to full frame, current binning.

sequence(number_exposures=1, flush_array=-1, delay=-1)

Take an exposure sequence.

:param number_exposures: number of exposures to make :param flush_array: flag defining detector flushing

  • -1 => current value defined by exposure.exposure_sequence_flush [default]
  • 0 => flush for each exposure
  • 1 => flush after first exposure only
  • 2 => no flush

:param delay: delay between exposures in seconds (-1 => no change)

sequence1(number_exposures=1, flush_array=-1, delay=-1)

Take an exposure sequence with immediate return.

:param number_exposures: number of exposures to make. :param flush_array: flag defining detector flushing

  • -1 => current value defined by exposure.exposure_sequence_flush [default]
  • 0 => flush for each exposure
  • 1 => flush after first exposure only
  • 2 => no flush

:param delay: delay between exposures in seconds (-1 => no change)

set_exposuretime(exposure_time)

Set current exposure time in seconds.

:param exposure_time: exposure time in seconds.

set_focalplane(numdet_x=-1, numdet_y=-1, numamps_x=-1, numamps_y=-1, amp_cfg=[0])

Sets focal plane configuration for subsequent exposures. Use after set_format(). Must call set_roi() after using this command and before starting exposure. This command replaces SetConfiguration. Default focalplane values are set here. numdet_x defines number of detectors in Column direction. numdet_y defines number of detectors in Row direction. numamps_x defines number of amplifiers in Column direction. numamps_y defines number of amplifiers in Row direction. amp_cfg defines each amplifier's orientation (ex: [1,2,2,3]). 0 - normal 1 - flip x 2 - flip y 3 - flip x and y

set_format(ns_total=-1, ns_predark=-1, ns_underscan=-1, ns_overscan=-1, np_total=-1, np_predark=-1, np_underscan=-1, np_overscan=-1, np_frametransfer=-1)

Set the detector format for subsequent exposures. Must call set_roi() after using this command and before starting exposure. ns_total is the number of visible columns. ns_predark is the number of physical dark underscan columns. ns_underscan is the desired number of desired dark underscan columns. ns_overscan is the number of dark overscan columns. np_total is the number of visible rows. np_predark is the number of physical dark underscan rows. np_underscan is the number of desired dark underscan rows. np_overscan is the number of desired dark overscan rows. np_frametransfer is the rows to frame transfer shift.

set_image_filename(filename)

Set the filename of the exposure image. Always use forward slashes. Not fully functional.

:param filename: image filename

set_image_title(title)

Set the image title.

set_roi(first_col=-1, last_col=-1, first_row=-1, last_row=-1, col_bin=-1, row_bin=-1, roi_number=0)

Sets the ROI values for subsequent exposures. Currently only one ROI (0) is supported. These values are for the entire focal plane, not just one detector.

set_shutter(state=0, shutter_id=0)

Open or close a shutter.

:param state: :param shutter_id: Shutter ID flag

  • 0 => controller shutter.
  • 1 => instrument shutter.

start_readout()

Start immediate readout of an exposing image. Returns immediately, not waiting for readout to finish.

tests(number_exposures=1, exposure_time=1.0, image_type='zero')

Make test exposures, which overwrite previous test images.

:param number_exposures: number of exposures to take :param exposure_time: exposure time in seconds :param image_type: image type