#include "azcam.h"
Functions | |
| int | ClearArray (azcam_t *cam, char *reply) |
| Clear (erase) the detector array. | |
| int | StartExposure (azcam_t *cam, int wait, char *reply) |
| Start an exposure (integration). | |
| int | SetExposure (azcam_t *cam, float exptime, char *reply) |
| Set the exposure (integration) time. | |
| int | ReadExposure (azcam_t *cam, char *reply) |
| Query the AzCam server for the current elapsed exposure time. | |
| int | AbortExposure (azcam_t *cam, char *reply) |
| Abort an exposure in progress. | |
| int | PauseExposure (azcam_t *cam, char *reply) |
| Pause an exposure in progress. | |
| int | ResumeExposure (azcam_t *cam, char *reply) |
| Resume a paused exposure. | |
| int | SetFormat (azcam_t *cam, char *reply) |
| Define the detector format in unbinned pixels. | |
| int | SetConfiguration (azcam_t *cam, char *reply) |
| Define the detector readout configuration. | |
| int | SetROI (azcam_t *cam, char *reply) |
| Define the detector region of interest for the next readout. | |
| int | OpenShutter (azcam_t *cam, char *reply) |
| Open the Shutter. | |
| int | CloseShutter (azcam_t *cam, char *reply) |
| Close the Shutter. | |
| int | RowShift (azcam_t *cam, int nrows, char *reply) |
| Shift the image on the array by a given number of rows. | |
| int | GetDetPars (azcam_t *cam, char *reply) |
| Query the AzCam server for the current image size. | |
| int | GetPixelCount (azcam_t *cam, char *reply) |
| Query the AzCam server for the number of pixels readout. | |
| int | SetShutterMode (azcam_t *cam, int mode, char *reply) |
| Set the shutter mode. | |
| int | SetReadoutMode (azcam_t *cam, int mode, char *reply) |
| Set the detector readout mode. | |
The following are a suite of interface functions that provide access to all of the AzCam server exposure control functions.
Most function names recapitulate the analogous AzCam server commands, while others serve as interface functions that provide access to server commands that provide more than one function (e.g., SetMode)
All routines call the communication layer routines in iosubs.c to take care of common handling of timeout, errors, and reply processing.
All of the server exposure control commands documented in Section 9 of the AzCam Programmers Reference Manual have been implemented except the following:
Expose - not implemented (doesn't work well with the OSU cameras) ReadImage - deprecated in recent AzCam versions SetSyntheticImage - future expansion Guide - future expansionTwo new functions
SetShutterMode() SetReadoutMode()Are defined to implement the "SetMode 1 X" and "SetMode 2 X" commands, respectively.
Finally, ParShift has been renamed RowShift in this implementation.
|
||||||||||||
|
Clear (erase) the detector array.
|
|
||||||||||||||||
|
Start an exposure (integration).
If wait=EXP_WAIT, the AzCam server will not return status until the integration is completed. This is usually only done for zero-length (ZERO or BIAS) images, or very short integrations where the application decides not to poll the exposure progress using ReadExposure() calls. If wait=EXP_NOWAIT, the AzCam server will return status immediately after starting the integration. Integration progress can be monitored using the ReadExposure() function. IMPORTANT: if wait=EXP_WAIT, the timeout interval for the AzCam server communications (azcam::Timeout) must be set long enough as as to not timeout before the integration is complete. To ensure that this does not happen, we store the current default timeout, compute a new timeout of the exposure time + 10 seconds, and then make the call, resetting the default timeout after completion (or error). The exposure time used is the value in the azcam::ExpTime data member.
|
|
||||||||||||||||
|
Set the exposure (integration) time.
|
|
||||||||||||
|
Query the AzCam server for the current elapsed exposure time.
|
|
||||||||||||
|
Abort an exposure in progress.
Because of some odd hardware interactions that we have observed, an AbortExposure() command must be preceeded by PauseExposure(). We do not know if this is generic to all ARC controllers or just the ones we're working with at OSU. Applications calling this API should call AbortExposure() with some circumspection. |
|
||||||||||||
|
Pause an exposure in progress.
A PauseExposure should be followed by either AbortExposure() or ResumeExposure(). We test the value of the azcam::State flag and only send a PauseExposure command if EXPOSING. Sending a PauseExposure directive otherwise may be unpredictable.
|
|
||||||||||||
|
Resume a paused exposure.
Does not send ResumeExposure if the controller is not in a PAUSE state. If you send a ResumeExposure() command when the AzCam server is not actually in a paused state, very bad things can happen (e.g., it crashes and reboots its host computer).
|
|
||||||||||||
|
Define the detector format in unbinned pixels.
azcam::NCtotal - Total number of columns (serial pixels)
azcam::NCpredark - Number of physical dark prescan columns
azcam::NCunderscan - Number of underscan columns to read
azcam::NCoverscan - Number of overscan columns to read
azcam::NRtotal - Total number of rows (lines)
azcam::NRpredark - Number of physical dark prescan rows
azcam::NRunderscan - Number of underscan rows to read
azcam::NRoverscan - Number of overscan rows to read
azcam::NRframexfer - Number of rows to shift for frame transfer mode
A calling application would first set the various parameters in the azcam struct and then call this function to send them to the AzCam server.
|
|
||||||||||||
|
Define the detector readout configuration.
azcam::ReadMode - Readout Mode, one of SINGLE_AMP, TWO_AMP_PARALLEL,
TWO_AMP_SERIAL, FOUR_AMP_QUAD, or MOSAIC
azcam::Splits - Split register flag, one of NO_SPLIT, SPLIT_SERIAL,
SPLIT_PARALLEL, or SPLIT_QUAD
azcam::NumDetX - Number of X (columns) direction detectors in a
multi-detector mosaic
azcam::NumDetY - Number of Y (rows) direction detectors in a
multi-detector mosaic
azcam::AmpConfig - Amplifier configuration string, one parameter per
amp, 0=no flip, 1=flip cols, 2=flip rows, 3=flip both
A calling application would first set the various parameters in the azcam struct and then call this function to send them to the AzCam server.Note, if the ReadMode is changed, you must call SetROI immediately after, or bad things will happen.
|
|
||||||||||||
|
Define the detector region of interest for the next readout.
azcam::FirstCol - first column to read in unbinned pixels
azcam::LastCol - last column to read in unbinned pixels
azcam::ColBin - column-axis binning factor
azcam::FirstRow - first row to read in unbinned pixels
azcam::LastRow - last row to read in unbinned pixels
azcam::RowBin - row-axis binning factor
Note that regions of interest that are smaller than the physical size of the device in unbinned pixels are only supported for single-amplifier readout modes. |
|
||||||||||||
|
Open the Shutter.
|
|
||||||||||||
|
Close the Shutter.
|
|
||||||||||||||||
|
Shift the image on the array by a given number of rows.
We allow nrows=0 as a way to take repeated images without row shifts (commonly done for shutter shading correction images). If nrows=0, it returns success rather than sending "ParShift 0" to the server. This function implements the ParShift server command. We elected to call it RowShift since that syntax is closer to what we do in other OSU instruments (ParShift stands for "PARallel SHIFT": the ITL folks use "Parallel" and "Serial" the same way OSU folks use "Vertical" and "Horizontal"). |
|
||||||||||||
|
Query the AzCam server for the current image size.
|
|
||||||||||||
|
Query the AzCam server for the number of pixels readout.
Note that unlike ReadExposure(), experiments have so far shown that calling GetPixelCount() is benign in all circumstances.
|
|
||||||||||||||||
|
Set the shutter mode.
DARK_IMAGE: shutter kept closed during integration
LIGHT_IMAGE: shutter is opened during integration
TDI: shutter open during readout (currently unsupported)
Shutter mode settings stay in force for the rest of the AzCam session unless changed.This function implements the "SetMode 1 X" server command.
|
|
||||||||||||||||
|
Set the detector readout mode.
IMMEDIATE: readout is initiated immediately after integration
DEFERRED: readout is deferred until an explicit readout is requested
IMMEDIATE mode should be used for all normal exposures, whereas DEFERRED is used for custom multiple exposures like focus plates, nod-and-shuffle, shutter shading calibrations, etc.This function implements the "SetMode 2 X" server command, where we have introduced the "immediate" and "deferred" mode names.
|
1.4.2