<?xml version="1.0" encoding="UTF-8"?>

<!-- <!DOCTYPE sddlschema SYSTEM "sddlschema.xsd">-->

<sddl>

<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
<!-- -->
<!--  SDDL Name:  STIS_MSM.SDDL -->
<!-- -->
<!--  Purpose:      This SDDL file defines the STIS_MSM relation.-->
<!-- -->
<!--  Modification History:-->
<!-- -->
<!--    Date       OPR      Who                       Reason-->
<!--  - - - -    - - - -    - -   - - - - - - - - - - - - - - - - - - - - - -->
<!--  06/14/96    29753     Baum   Original implementation-->
<!--  01/03/97    32946     Baum   Redefine pixels as offsets-->
<lm>  07/03/03   48821     CTB   Converted to XML format </lm> <!-- last mod -->
<!-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -->
 

    <record name="STIS_MSM_TYPE"> 
 
 
        <description>"This relation is used to define the values OPUS needs for
                   WCS calculations for observations using dispersive elements.
                   There must be a record in this table for every STIS spectral
                   element (except MIRROR and PRISM) and valid central
                   wavelength (as listed in the proposal instructions). If
                   significant MSM changes are made during the mission that
                   requires different data for different observation times,
                   the valid_date is used by OPUS to fetch the right record. "</description>


            <field name="detector">
                    <type>C8</type>
                    <description>"STIS/CCD, STIS/MA1, STIS/MA2 are the values of
                         OPUS DGX keyword SS_DTCTR found in qelogsheet.config. "</description>
            </field>
	
            <field name="grating">
                    <type>C8</type>
                    <description>"G140L,G140M,E140M,E140H,X140M,X140H,G230L,G230M,E230M,
                         E230H,X230M,X230H,G230LB,G230MB,G430M,G750L,or G750M.
                         The mirror and prism values are also allowed:
                         MIRVIS,MIRCUV,MIRFUV,MIRNUV or PRISM.

                         These are the values from OPUS DGX keyword SS_GRTNG
                         that come from qelogsheet.ap_1. "</description>
            </field>
	
            <field name="cen_wave">
                    <type>I4</type>
                    <description>"The central wavelength supplied in the proposal and
                         found in OPUS DGX keyword SS_CWAVE that comes from
                         qelogsheet.min_wave. The allow values are in the
                         proposal instructions. For mirror elements the value
                         can be zero. "</description>
            </field>
	
            <field name="dith_id">
                    <type>I2</type>
                    <description>"This number indicates which set of MAMA dither offsets
                         are being used. The value 0 is the baseline MSM
                         positions (not dithered). "</description>
            </field>
 
            <field name="valid_date">
                    <type>C17</type>
                    <description>"YYYY.DDD:HH:MM:SS, the date-time of either the SMS
                         which loads a new dither table or a time preceding
                         the first STIS observation that uses a new dither
                         table. "</description>
            </field>
	
            <field name="msm_step1">
                    <type>I2</type>
                    <description>"This number indicates the motor step position for
                         cylinder 1 used for this dither position. "</description>
            </field>
 
            <field name="msm_step2">
                    <type>I2</type>
                    <description>"This number indicates the MSM motor step position for
                         cylinder 3 used for this dither position. "</description>
            </field>
 
            <field name="msm_step3">
                    <type>I2</type>
                    <description>"This number indicates the MSM motor step position for
                         cylinder 4 used for this dither position. "</description>
            </field>
 
            <field name="axis1_pix">
	            <type>R4</type>
                    <description>"Axis 1 pixel offset for this MSM position. "</description>

            </field>

            <field name="axis2_pix">
	            <type>R4</type>
                    <description>"Axis 2 pixel offset for this MSM position. "</description>

            </field>

    </record>
 
 
 
 
    <relation name="stis_msm">
 
        <type>STIS_MSM_TYPE</type>

        <description>STIS Mode Select Mechanism Relation</description>

        <subsystem_using>OPUS</subsystem_using>

        <index name="stis_msm_1">
            <type>unique clustered</type>
            <field name="detector"/>
            <field name="grating"/>
            <field name="cen_wave"/>
            <field name="dith_id"/>
            <field name="valid_date"/>
        </index>

    </relation>
 
 
 
    <instance  name="stis_msm" scope="global" type="STIS_MSM_TYPE" />
 
</sddl>
