MDI Guide

An Overview of the /mdisw System

Ver 0.1 M.Morrison Apr-94

This Copy Printed: April 29, 1994

MDI-340026 Some suggested reference books, material, and methods of finding more information:

• “MDI Guide: An Overview of the /mdisw System”

• TBD - what is useful to list here????

• The official MDI IDL software should have a detailed description of the routine in the header of the source file. It is possible to access this header from within IDL by using DOC LIBRARY. A sample call is: IDL> doc library,’mdipict’

If you have general comments, suggestions, or questions regarding this document or software, please send them to:

morrison@quake.stanford.edu

Contents

1 Introduction 1 1.1 Setting up Your Account to Use /mdisw System . . . . . . . . . . . . . . . . . . 1

2 Some Capabilities of the /mdisw System 2 2.1 Personal IDL PATH Definition . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 2.2 Personal IDL Startup ($IDL STARTUP) . . . . . . . . . . . . . . . . . . . . . . . 2 2.3 Finding and Copying Routines to/from /mdisw . . . . . . . . . . . . . . . . . . . 2

3 The /mdisw Tree Organization 4

4 The MDI Data Tree Organization (/md50, /md51, ...) 6

5 How the /mdisw Trees are Maintained Identical 7

A Details of the MDI Setup 8

B Details on the “ms” Scripts 9 B.1 msloc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 B.2 msput . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 9 B.3 msdiff . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 B.4 msget . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 B.5 msdel . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 ii LIST OF FIGURES

List of Figures Preface

The conventions used in this manual are:

• Bold face for examples of what the user should type

• Program names are capitalized when mentioned in the text, but are not capitalized in the user input examples

• Variable names are italicized when mentioned in the text

• Dates and times are in Universal Time (UT) and have the convention “dd-mmm-yy”

• There are several different types of prompts that appear in the examples. The prompt IDL> is used for when the user has already entered and is running IDL. The prompt % is used to signify Unix commands, and the prompt $ signifies VMS commands. There are also FTP> prompts for ‘File Transfer Protocol.’

For example, you would only type .run show data for the following description. You would not type IDL>. IDL> .run show data iv PREFACE

1 Introduction

1.1 Setting up Your Account to Use /mdisw System

1. You need to add the following line to your /.cshrc file

          source /mdisw/setup/mdi_setup

See point (3) below for details on where in the .cshrc to execute it. It should generally be the last command executed (ie: at the bottom of the .cshrc file)

2. If you want to be able to contribute software to the /mdisw system, you need to edit your /.rhosts file and add the following lines

             mdibbs.space.lockheed.com
             umbra.space.lockheed.com
             quake.stanford.edu

This needs to be done for you account on all of those machines. If you don’t have accounts on those machines and contribute software, please send a mail message to “morrison@umbra.space.lockheed.com”. You could temporarily get around this problem by using the general use “mdi” account.

3. An overview of what the setup does:

• Add the directory /mdisw/bin to your path. If you have some commands somewhere that DEFINE path, and do not simply append to it, then those commands must come BEFORE the call to “mdi setup”.

• Define an alias “idl” (see capabilities discussion below). It is critical that this alias for “idl” is not overwritten by other definitions.

• Define several environmental variables which point to certain directories.

• Sets up your prompt

2 Some Capabilities of the /mdisw System

2.1 Personal IDL PATH Definition

You can have a personal IDL PATH. IDL allows a user to define an environmental variable which points to the directories that IDL should search when looking for routines. The “mdisw” setup allows the user to have a personal path AND a “/mdisw/idl” path. The user’s personal path is appended AFTER the “/mdisw/idl” path by default, but if you start idl with the command “idl ahead”, then your personal path is searched before the “/mdisw/idl” path.

You can see a list of the IDL directories by issuing the command:

IDL> pr path

after entering IDL. This will only work if you have executed the “mdisw” setup properly. Some sample definitions are:

        setenv IDL_PATH /ys/gen/atest/gen:/ys/gen/atest/sxt
        setenv IDL_PATH +/2p/morrison/soft

A “:” is used to separate directories. If a “+” is used before the directory name, it will look through all sub-directories and create a list of all directories which have .PRO files in them.

2.2 Personal IDL Startup ($IDL STARTUP)

You can have a personal IDL startup ($IDL STARTUP). A list of IDL commands can be placed in a file which will be executed when IDL starts up. The “mdisw” setup has it’s own IDL STARTUP file, and the user has one too.

A sample definition is:

       setenv IDL_STARTUP /usr/people/morrison/idl_startup.pro

Sample contents of a startup file are:

        setup_keys
        define_key, 'f9', 'wshow', /term

2.3 Finding and Copying Routines to/from /mdisw

You can copy new software or modified software into the “mdisw” tree by using the command “msput”. A sample call is

% msput mmap1pos.pro

You can find the location of a given IDL program in the /mdisw/idl tree by using the command “msloc”. A sample call is 2.3 Finding and Copying Routines to/from /mdisw 3 % msloc mdifocus.pro

If you have a copy of some IDL off-line, you can check the differences between that version and the version on-line by using the command “msdiff” A sample call is: % msdiff mdiiss.pro

3 The /mdisw Tree Organization

/mdisw                  -
/mdisw/setup            -
/mdisw/bin              -
/mdisw/egse_v1.3        -
/mdisw/egse_v1.4        -
/mdisw/egse_v1.5        -
/mdisw/egse_V2.0        -
/mdisw/egse_V2.1        -
/mdisw/exe/source
/mdisw/exe/sgi
/mdisw/exe/ultrix
/mdisw/dbase
/mdisw/dbase/cal/info
/mdisw/dbase/cal/results
/mdisw/dbase/cal/summary
/mdisw/dbase/maint                      -
/mdisw/idl/gen                          - GENERAL SOFTWARE
/mdisw/idl/gen/astron                   - would hold the astronomy library
/mdisw/idl/gen/fits                     - would hold general FITS stuff
/mdisw/idl/gen/utplot                   - holds the time plotting package
/mdisw/idl/gen/ys_util                  - general Yohkoh utilities
/mdisw/idl/cal                          - CALIBRATION SOFTWARE
/mdisw/idl/cal/egse                     - Routines used by EGSE ("near real time")
/mdisw/idl/cal/dust_map                 - Jesper's dust software
/mdisw/idl/cal/flat_field               - Peter's flat field software
/mdisw/idl/cal/general                  - LTC, Michelson Maps, ISS, Focus S/W
/mdisw/idl/anal                         - ANALYSIS SOFTWARE
/mdisw/idl/anal/corr_track              - Neal's correlation tracking
/mdisw/idl/ucon                         - USER CONTRIBUTED SOFTWARE
/mdisw/idl/ucon/quake_soi_idl           - was quake:~soi/src/idl
/mdisw/idl/ucon/shou                    - EMPTY
/mdisw/idl/ucon/hurlburt                - EMPTY
/mdisw/idl/ucon/milford                 - EMPTY

/mdisw/idl/ucon/tarbell                 - EMPTY
/mdisw/idl/ucon/morrison                - various things
/mdisw/idl/ucon/zayer                   - few things

4 The MDI Data Tree Organization (/md50, /md51, ...)

In order to be able to use the same definition files, the names of the directories have to be the same. All references are to /mdisw and all data directory references are made to /md60 or /md66 (see below).

The following links are being used in a consistent manner between UMBRA and MDIBBS (the first number is 5 for umbra and 6 for mdibbs, the second number is the disk number). /md50 umbra:/data0 /md51 umbra:/data1 /md52 umbra:/data2 /md53 umbra:/data3 /md54 umbra:/data4 /md55 umbra:/data5

/md60 mdibbs:/data0 /md66 mdibbs:/disk6

Similar links or mount names will be made on QUAKE and FAULT to point to these locations. /md00-/md49 were skipped so that they can be used by QUAKE and FAULT.

5 How the /mdisw Trees are Maintained Identical

The use of “msput” should keep the systems looking identical for the most part. When a routine is put on-line, it is put at all three sites.

“rdist” will be run periodically (hourly or daily) to see where the systems differ. It will either send a summary of where difference exist or will automatically update the systems to make them all identical.

A Details of the MDI Setup

mdi_xsession                 a) defines $MDI_XSESSION which says that this
   session is an X session (rather than a
   telnet or rlogin session)
b) figures which EGSE software version to select
c) defines $PATH
d) defines some fundamental enviroment variables
   like $GSE_BASE_DIR
e) access some of the X resource database setup
f) starts a clock, a window, and a "toolchest"
mdi_login                     a) does a setenv DISPLAY if $MDI_XSESSION is set
mdi_cshrc                     a) does some IDL setup (but not define IDL_PATH,
   see below).  It does defines an alias for "idl"
b) define some calibration directory variables
c) figures which EGSE software version to select
d) if not an $MDI_XSESSION, then perform the same
   steps as (c) and (d) of mdi_xsession
e) execute the appropriate definition file for
   the software version (defines directories and
   aliases)
mdi_egse_$EGSE_VER
f) Turbo csh specific setup
g) Setting the Prompt (figures if you are root)
h) site specific setup.  If the session is being
   run from umbra, it looks for the file
   /mdisw/setup/mdi_cshrc_umbra, and sources it
   if it exists
mdi_cshrc_$HOSTNAME

B Details on the “ms” Scripts

B.1 msloc

# NAME:
#       msloc
# PURPOSE:
#       To locate the directory of a given file.  The default is only
#       to search /mdisw/idl, but all /mdisw directories are searched
#       if "/all" is used.  The routine first checks to see if the file
#       is listed in the file "/mdisw/dbase/maint/list_idl_files.txt".
#       If it is not there, it executes a "find".
# CALLING SEQUENCE:
#       msloc filename.pro
#       msloc filename.pro /dir /all
# SWITCHES:
#       /dir    - return "ls -l" output rather than just the filename/location
#       /all    - search all /mdisw tree rather than just /mdisw/idl

B.2 msput

# NAME:
#       msput
# PURPOSE:
#       To copy a file onto the /mdisw tree
# CALLING SEQUENCE:
#       msput filename.pro
#       msput *.pro
#       msput filename.pro directory
#       msput mmap*.pro directory
#       msput filename.pro directory /noback
# METHOD:
#       * "msput" is called with a list of the files that should be
#         put on-line.
#       * The last parameter can be a directory where the file
#         should be copied (do NOT include trailing /)
#       * The routine does the following:
#               1. Check if the routine is already on-line
#               2. If on-line and you specified a directory, check
#                  that it is the same directory.  If not, do not

#                  copy the file
#               3. If it is replacing a copy that is already on-line,
#                  move the copy to a backup directory
#               4. Check that the file specified in the list does
#                  actually exist and is not a directory
#               5. Issue the copy command
# SWITCHES:
#       /noback - do not make a copy of the file being replaced in
#                 the /mdisw/save_copy directory

B.3 msdiff

# NAME:
#       msdiff
# PURPOSE:
#       To locate the on-line version of the program passed in and
#       run "diff" between the two copies
# CALLING SEQUENCE:
#       msdiff filename.pro
# SWITCHES:
#       /all    - search all /mdisw tree rather than just /mdisw/idl

B.4 msget

# NAME:
#       msget           * TO BE WRITTEN *
# PURPOSE:
#       To locate the on-line version of a program and to copy it to
#       the default directory.

B.5 msdel

# NAME:
#       msdel           * TO BE WRITTEN *
# PURPOSE:
#       To locate the on-line version of a program and to delete it
#       (actually it is moved to the backup area /mdisw/save_copy)

B.5 msdel 11