!General

    This table-editing widget allows you to:

    a) type in new line lists

    b) amend the current line list

    c) read in a new line list from an ASCII file.


!Editing current list

    The current line list (as displayed) may be edited on an
    item-by-item basis.  Use the cursor to focus on a
    particular item (widget box) and use the keyboard to
    edit as normal (note that a double click on a contiguous
    set of characters within a box, followed by the delete
    key will delete all the highlighted characters).

!Logic

    The program attempts to provide some help to the user
    typing in new line details.  In order to do this it
    follows some simple rules.

    a) The detector involved is assumed to be that which was
    defined within TPLAN at the time of the call to the
    line-editing program.

    b) If the user enters a new (or revised) wavelength, the
    program assumes a grating order of 1 unless '2' has been
    entered previously in the appropriate box.  Given that
    information, the program can supply the central pixel
    value and the detector waveband.

    c) If the central pixel value is edited, the waveband of
    the detector must have a valid number (no defaults or
    assumptions).  If it has, then the wavelength is
    calculated on the basis of a first-order spectrum.

    d) The user must supply the line identification. 
    Whatever is in the widget (including whitespace) at the
    time the program exits (via 'OK') is saved as the line
    ID.


!Complete line actions

    Sometimes it will be convenient to act upon a complete
    line of data rather than individual items.  Three actions
    are possible, to delete the entries in a line (but
    retain the blanked items), to insert a new line of data
    or to remove a complete set of line data.

    Click on the button to select any of these modes.  Click
    on any item within the row (insertion will take place
    BEFORE the selected row) to be operated upon and then
    hit 'return' to perform the action.

    Note that 'return' must be pressed since no events are
    generated by the widgets until it is, and so the program
    does not know you want to do anything until you hit
    'return'.


    Note also that these "Complete line" actions are only
    active for one operation.  After the operation is
    complete the mode returns to a null state and must be
    explicitly selected again before use.  This allows the
    user to easily return to editing individual items.


!Row/Column-skip

    If you are entering new data you can control where the
    cursor focus goes to when you press the 'return' button
    using the "Column-skip" or "Row-skip" buttons.  If
    "Row-skip" is ON (default), the cursor focus will move
    along the ROW of items.  If you wished, for instance to
    enter  some new lines and wanted to type in all the line
    identifications first, it would be easier to click on
    "Column-skip" first.  After hitting the 'return' button
    to enter each identification, the focus would skip down
    to the next line identification rather than proceeding
    along the previous row. 




!Quit

    This button will cause the line editing (this) program
    to exit without remembering anything that has taken
    place during this editing session.  The line definitions
    and details will be unchanged from those that were input
    to the session (see Reset).


!Reset

    All details will be returned to the state they were when
    the editing program was started.  That is all edits,
    file reads etc will be erased.

    If you want to erase the current line list you can do it
    on a line-by-line basis here (use the REMOVE option) or
    exit from this stage and use the option under the RESET
    menu in the main mk_raster widget.


!OK

    The editing session will be terminated and all values
    contained in the widgets will be read and transferred to
    the main TPLAN program.

!Help

    Calls up this help file

!Sort

    Summons a Pull-Down-Menu to determine the mode and
    perform a sort of the line list. The lines may be 
    sorted by pixel or wavelength.

!Read ascii file

    It is possible to read line details from an ascii file. 
    Certain restrictions do apply however. An example data 
    file is available in $CDS_PLAN_TECH/eg_ll_ascii.nis

    1) The file should have a name extension of .nis or
    .gis.  A filter for the correct type of file is applied
    in the call to the file-selection program.  The more
    perverse user can override this by specifying the filter
    in the file-selection program. 

    2) Internally the file can begin with comment lines (!
    in first  character).  All such comments MUST be at the
    beginning of the file.

    3) The next two lines MUST contain the line list title
    and description (in that order and with  10 and 50
    character lengths (max) respectively).

    4) The line details must be in the form:

       Line_id   wavelength  grating_order

    No other information is required but note that there
    must be no white space in the line name. Use underscores
    to separate items in the line name and these will be
    stripped out when the file is read (eg Fe_XIV will be
    entered as Fe XIV).

    5) No special end-of-data marker is required.

    There is a limit on the number of lines that can be 
    used with each spectrograph.  For the GIS this limit is 48 
    and for NIS it is 24 (or 20 if background windows are
    enabled).


!Line List Title

    If the displayed line list is modified in any way, a new
    title (10 characters max.) should be entered in the text
    widget.  At the first edit you will get a tedious
    warning to this effect.

!Line List Description

    If the displayed line list is modified in any way, a new
    description (50 characters max.) should be entered in
    the text widget.  At the first edit you will get a
    tedious warning to this effect.

     
