
!General

    XCPT runs the the Command Preparation Tool (CPT).  CPT itself
    takes the CDS plan (from the science details database and possibly
    from the flag and alt_sci databases) and formats the commands to
    load the on board tables necessary to perform the planned
    observations.  CPT is intimately connected with the Perl script
    LOADPLAN (run from the EGSE command window) in the sense that the
    system expects LOADPLAN to be run after each running of CPT. If it
    is not, and the user is not fully aware of the consequences, the
    wrong tables, or incorrect number of tables, may be uplinked.

    CPT creates a number of files which are written to the
    directories defined with the CDS_CP_xxx environment
    variables.  LOADPLAN will take the last created versions of
    files to act upon, unless a specific file name is given it as
    a parameter.


!Reset 

    Reset CPT parameter values to their default values.

!Preview Detailed Plans

    Produce concise listing of detailed plans that will be processed
    for the specified START/STOP times.


!View CPT Run Log

    List the most recent START/STOP times for which CPT was run

!Go Run CPT

    Self-explanatory


!Start time

    CPT takes the keyword STARTOFPERIOD and this may be set to
    define the UT at which CPT will begin translating studies
    from the detailed plan.   Entering a date/time in this widget
    is the equivalent of setting that keyword.

!Stop time

    CPT takes the keyword ENDOFPERIOD and this may be set to
    define the UT at which CPT will stop translating studies from
    the detailed plan. Entering a date/time in this widget is the
    equivalent of setting that keyword.



!Delete ALL existing onboard tables ....

    Setting this button is the equivalent of using the /NEW
    keyword in the command version of CPT.  It is a signal to CPT
    that, for whatever reason, the planner does not want CPT to
    assume any previous knowledge of the ID of on board tables. 
    CPT keeps a record of loaded tables and only reloads the new
    ones it requires.  Setting this button wipes CPT's memory  of
    what is on board.

    Never use this option (and the subsequent LOADPLAN) when
    studies are still running on board.  The effect will be
    catastrophic in terms of what gets run.


!Append emergency study

    CDS has what is called an Emergency Study for use in cases where
    commanding has not been possible in order to uplink a new plan. 
    The STUDY_ID of the emergency study is kept in the state database. 
    If this option is chosen in XCPT, this emergency study will be
    uplinked and planned to run at 01:00 UT on the day after all the
    other planned studies are finished.  It is expected that the
    emergency study will be one of 'infinite' duration in the sense
    that it will keep on observing until interrupted by ground
    command. If the emergency study does not run it must be
    explicitly deleted from the DCS by the operator.


!Allow adjustment of mirror....


    When CPT formulates the commands for a study to be run, it
    has to command the mechanisms to the correct locations
    required by the rasters.  Normally the OPS is commanded to
    the location requested in the plan and the mirror and slit
    are used to perform the actual raster scan, if any.  Under
    special circumstances, the accuracy of the OPS might not be
    sufficient for the scientific requirements of the move
    between rasters.  If this option is chosen, CPT will attempt
    to use the mirror/slit movement to reposition the CDS
    pointing, rather than using the OPS.  It is anticipated that
    this will give more accurate relative registration, but
    obviously can only be used where the repositioning required
    is substantially  less than the mirror/slit field of view.  


!Automatically write and submit....

    When CPT is completed, a new set of daily IAP files will be
    written and sent to the SOC system.

!Automatically print table load files....

    When CPT is completed, print the TCC and TLB files.
