;   This routine collects a set of field data needed to determine
; the aberration induced in the wavefront due to the mis-alignment
; of the primary and secondary optical axes.
;   This routine will work for all stations because only wfsc
; data are needed (ie images in the focal plane are not needed)
;   The steps need to collect field data are:
; 1) Read the target star name and off-axis guide stars
; 3) Loop over the off-axis guide star list
;     a) Collimate the telescope to the requested wavefront error using the
;            on-axis star as the guide star:
;        - Preset in ACTIVE mode if GCS is to collimate
;        - Preset in GUIDE mode if IDL is to collimate
;     b) Preset to off-axis guide star, placing it on the y-axis of
;           the guide probe, and collect three wfsc images.
;           without sending wavefront corrections to PSF
;    End Loop
; 4) Write out TWiki and field_process_set _field.log file
; ** NOTES **
; - Usually this routine does not need any interaction to proceed.
;   However, if the collimation is slow, then a message box may pop up
;   and say "Not collimated below...".  Click "Yes" to continue
;   collimating and "No" to proceed to the next off-axis star
; - If this routine or the telescope has a problem, the script can be
;   restarted at a specific guide star entry by adding START=2, for
;   example, flag to the command
; Example:
; % cd /OldRepository/AGW_Data
; % mkdir -p 20101222/field
; % cd 20101222/field
; % IDL
; IDL> agw_set_station, IRTC
; IDL> field_collect, filename, logname, retval
; To add flags:
; IDL> field_collect, filename, logname, retval, START=2, /GCS
; Routine Call:
;     field_collect, filename, logname, retval, START=start, LIMIT=limit, $
;                   DEBUG=debug, TEST=test, VERBOSE=verbose, GCS=gcs
; Inputs:
;     NONE:
; Optional Inputs:
;        START=start  Indicate which guide star entry in the list to
;                       start.  This is useful if the transform_collect
;                       script fails part way through, the script can be
;                       restarted at any entry (ie START=2 starts with
;                       the second guides star listed in filename)
;        LIMIT=limit  Indicate the collimation limit, in nm, required
;                       before presetting to the next guide star.  If no
;                       value is given, 400 nm is used.
;             /DEBUG  The script writes out extra infomation to the terminal
;              /TEST  Commands are sent neither the TCS nor the
;                       camera.  This allows the script and .list file
;                       to be tested off-line.
;           /VERBOSE  Prints out the full Active Optics collimation
;                       information.  By default the Adaptive Optics
;                       only prints the WaveFront RMS in nm.
;               /GCS  Allow the GCS to run the Active Optics
;                       collimation.  In this case the PresetTelescope
;                       is sent in ACTIVE mode and this script just
;                       reads the output of each collimation to
;                       determine whether the telescope is collimated
;                       and can move to the next guide star.  By
;                       default, the Active Optics corrections are
;                       performed by this IDL routine, so the
;                       PresetTelescope is sent in GUIDE mode.
; Return:
;           filename: Name of the file read containing the star
;                       information.  This includes the name of the
;                       central star (eg StoneO) and the guide stars to
;                       use.  The default location of these file is 
;                       env('IDL_WFSC_HOME')/field/lists/*.list
;            logname: Name of the file written containing all the
;                       information needed by field_process_set to
;                       analyze these transformation data.  This file is
;                       written in the present working directory.  Then
;                       name of the file is the filename above, with the
;                       .list removed and _field.log added.
;             retval: 0/1 for succuess/failure
pro field_collect, filename, logname, retval, START=start, LIMIT=limit, $
                   DEBUG=debug, TEST=test, VERBOSE=verbose, GCS=gcs

-- DougMiller - 23 Dec 2010
Topic revision: r1 - 23 Dec 2010, DougMiller
This site is powered by FoswikiCopyright © by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
Ideas, requests, problems regarding Foswiki? Send feedback