






















                            The Amateur Seismology Package

                                    User's Manual






                            Rev 1.2.0 (September 25, 1991)






          Copyright (c) 1991 Robert K. Samuelson.  All rights reserved.
                             Dept. 256
                             4215 Winnetka Ave. N.
                             New Hope, MN 55428 USA

















          The Amateur Seismology Package User's Manual                    1












                                  Table of Contents


          1.0  Introduction . . . . . . . . . . . . . . . . . . . . . .   3
               1.1  Copyright Notices . . . . . . . . . . . . . . . . .   3
               1.2  Disclaimer  . . . . . . . . . . . . . . . . . . . .   4
               1.3  Distribution  . . . . . . . . . . . . . . . . . . .   4

          2.0  User Support . . . . . . . . . . . . . . . . . . . . . .   4

          3.0  Data File Distribution . . . . . . . . . . . . . . . . .   5

          4.0  Bibliography . . . . . . . . . . . . . . . . . . . . . .   6

          5.0  SEISGRAPH  . . . . . . . . . . . . . . . . . . . . . . .   9
               5.1  Overview  . . . . . . . . . . . . . . . . . . . . .   9
               5.2  Installation  . . . . . . . . . . . . . . . . . . .   9
               5.3  Guided Tour . . . . . . . . . . . . . . . . . . . .  10
               5.4  Features  . . . . . . . . . . . . . . . . . . . . .  13
                    5.4.1     Invoking SEISGRAPH  . . . . . . . . . . .  13
                    5.4.2     Reading Data Files  . . . . . . . . . . .  13
                    5.4.3     Adjusting X Limits  . . . . . . . . . . .  13
                    5.4.4     Adjusting Y Limits  . . . . . . . . . . .  14
                    5.4.5     Autorange . . . . . . . . . . . . . . . .  14
                    5.4.6     Guide Window  . . . . . . . . . . . . . .  15
                    5.4.7     Data Window . . . . . . . . . . . . . . .  15
                    5.4.8     Printing  . . . . . . . . . . . . . . . .  15
                    5.4.9     Setup String  . . . . . . . . . . . . . .  16
                         5.4.9.1   b (Binary File)  . . . . . . . . . .  16
                         5.4.9.2   e (Eight Bit File) . . . . . . . . .  17
                         5.4.9.3   x (Skip Bytes) . . . . . . . . . . .  17
                         5.4.9.4   c (Color)  . . . . . . . . . . . . .  17
                         5.4.9.5   a (Autorange)  . . . . . . . . . . .  18
                         5.4.9.6   s (Samples Per Second) . . . . . . .  18
                         5.4.9.7   b (Bin Size) . . . . . . . . . . . .  18
                         5.4.9.8   p (Printer Port) . . . . . . . . . .  18
                         5.4.9.9   d (Printer Driver) and r
                              (Resolution)  . . . . . . . . . . . . . .  19
               5.5  Data File Format  . . . . . . . . . . . . . . . . .  20
               5.6  Problems and Solutions  . . . . . . . . . . . . . .  20

          6.0  How Data Files Are Created . . . . . . . . . . . . . . .  22

          7.0  The Future . . . . . . . . . . . . . . . . . . . . . . .  23
























  1.0     Introduction

          The Amateur Seismology Package is a collection of programs, data
          files, and documentation which allows users of IBM (*1)
          compatible personal computers to load seismic data files and
          print seismograms.

          Seismograms are graphs of the motion of the Earth's surface at a
          given location due to the passing waves caused by a distant
          earthquakes and can be used to determine, among other things, the
          distance between the earthquake and the recording station's
          location.

          The Amateur Seismology Package is intended for use by 'amateur
          scientists' and students who are interested in the Earth sciences
          in general and seismology in particular.  The package will allow
          users to study seismograms of recent earthquakes using data files
          distributed by the author.  The data files are produced by the
          author's seismometer and recording system.

          Data files for notable events will be distributed as quickly as
          practical.  Data files which are contaminated with noise or
          contain little of interest will probably not be distributed
          unless requested by a user who has also recorded the event.

          ALL DATES AND TIMES ASSOCIATED WITH SEISMIC DATA WILL BE IN
          COORDINATED UNIVERSAL TIME (UTC), ALSO KNOWN AS GREENWICH MEAN
          TIME (GMT) OR 'ZULU' (Z).

          Rather than explain the science of seismology and the practices
          of seismometry here, the reader is directed to the Bibliography. 
          These sources will provide the information needed to gain a
          qualitative understanding of seismology and the techniques of
          seismometry.  Some sources describe the construction of
          seismometers and recording systems which can be constructed by
          electronic hobbyists.

          *1   IBM is a trademark of International Business Machines
               Corporation.


  1.1     Copyright Notices

          Elements of the Amateur Seismology Package (also referred to as
          'the package') are identified by the phrase 'part of the Amateur
          Seismology Package.' Those elements which are copyrighted contain
          a copyright notice.  This notice appears near the beginning of
          documents, on the opening screen of programs, and is encoded in
          ASCII near the beginning of data files.  The phrase 'all rights
          reserved' means a person or organization other than the author
          may copy and distribute elements of the package only under those
          conditions defined in the 'Distribution' portion of this manual. 
          In particular, no element of the package may be distributed
          unless accompanied by this user's manual.




          The Amateur Seismology Package User's Manual                    3








  1.2     Disclaimer

          The author hereby disclaims all warranties relating to the
          Amateur Seismology Package.  All elements of the package are
          provided 'as is' and are not guaranteed to be suitable for any
          particular purpose.


  1.3     Distribution

          The Amateur Seismology Package may be duplicated and distributed
          by persons or organizations other than the author subject to the
          following conditions:

               Elements may be duplicated for backup purposes as desired.

               Modified elements may not be distributed. 

               Elements may be distributed as long as no fee is charged
               other than a nominal fee to cover the cost of the media
               used.  

               If distributed via a bulletin board system (BBS), no
               additional charge beyond normal connect time or access fees
               may be made.

               Any element distributed must be accompanied by The Amateur
               Seismology Package User's Manual.


  2.0     User Support

          The first two versions of this package (versions 1.0.0 and 1.1.0)
          requested a support fee from users in exchange for adding the
          user's name to a mailing list.  The solicitation of a support fee
          implied that this package was 'commercial'.

          Many information resources (networks, government funded BBS's,
          etc.) do not permit such solicitation of funds.  In order to
          promote the free flow of information, I have decided to
          discontinue the solicitation of a support fee and distribute the
          package and data files free of charge.  However, my copyright and
          the restrictions set forth in the 'Distribution' portion remain.

          Since a support fee is no longer being solicited, users are asked
          to include return postage if requesting information via mail. 
          Users are also asked to remember that this is the author's
          'hobby' and that the demands of home and career will have a
          higher priority.

          The Amateur Seismology Package support address is contained in
          the copyright notice.  Support can also be obtained by contacting
          the author via electronic mail on CompuServe (ID 70531,3012) or
          either of the BBS's on which this package is distributed (address
          messages to user name Robert Samuelson).




          The Amateur Seismology Package User's Manual                    4








          There is no telephone support for this package.  Please use
          electronic mail when possible.


  3.0     Data File Distribution

          The primary location for this package and the activities
          associated with it will be the 'Mahoney MS-DOS file collection'
          of the EXEC-PC BBS.  EXEC-PC can re reached at (414) 789-4210
          (use 8 data bits, no parity, 1 stop bit).  EXEC-PC access costs
          about $20 for three months or $60 for one year.  You may
          subscribe online.  Even if primary distribution eventually moves
          to another BBS, the files will continue to be distributed in
          parallel on EXEC-PC at least through the end of 1992.

          The author is not associated with EXEC-PC and cannot guarantee
          that EXEC-PC will always be available.  Any questions about EXEC-
          PC should be directed to its sysop.

          Beginning September 25, 1991, this package and data files will
          also be distributed via the NEIC BBS on a trial basis (see
          Bibliography).

          Users are encouraged to form their own networks and post the data
          files regularly on other BBS systems.

          This package and the data files were originally distributed
          through CompuServe (*1).  The change to EXEC-PC was made largely
          due to the fact that files uploaded to EXEC-PC are immediately
          available while uploads to CompuServe can take a day or more to
          become available.  Also, CompuServe's service agreement appears
          to frown upon the practice of systematically copying files from
          CompuServe to other systems.  This is not to say that users
          cannot post these files on CompuServe, just that the author will
          be using another service as the primary distribution point.

          The author is currently using PKZIP (*2) and PKUNZIP for file
          compression.  These utilities are usually distributed as the
          self-extracting file PKZ110.EXE.  PKZ110.EXE (or a newer version)
          is available on most BBS system.  Remember that the PKWARE
          packages also depend upon user support.

          *1   CompuServe is a registered mark of CompuServe, Inc.
          *2   PKZIP and PKUNZIP are trademarks of PKWARE, Inc.















          The Amateur Seismology Package User's Manual                    5









          The data file for a given event will be a created from several
          individual data files and an optional text file.  The individual
          data files will each contain ten minutes of data and will have
          names of the form mmddhhmm.dat, where mmddhhmm represents the
          month, day, hour, and minute of the file time stamp.  The event
          data file will have a name of the form yymmddhh.zip, where
          yymmddhh represents the year, month, day, and hour of the first
          .dat file of the event.

          For example, 'unzipping' the event file 91070612.zip yields
          07061226.dat, 07061236.dat, 07061246.dat, 07061256.dat, and
          91070612.txt.

          As detailed information about the events becomes available, a
          bulletin file (probably named seisbull.zip) will be updated.

          All files uploaded will have the word 'earthquake' or
          'seismology' in the file description to aid online searches.


  4.0     Bibliography

          These sources will help the reader gain an understanding of some
          aspects of the sciences of seismology and seismometry.  The local
          library or an encyclopedia is the best place to start.

          Users finding a useful source of information are encouraged to
          contact the author so this bibliography can be expanded.

          Special thanks to those users who have already responded with new
          sources.


          Bolt, B. A. 1978.  "Earthquakes, A Primer".  W. H. Freeman and
          Company, San Francisco.

          Bolt, B. A. 1980.  "Earthquakes and Volcanoes".  W. H. Freeman
          and Company, San Francisco.  ISBN 0-7167-1164-8.
               This book is a collection of articles which appeared in
               Scientific American.

          Bolt, B. A. 1976.  "Nuclear Explosions and Earthquakes, The
          Parted Veil".  W. H. Freeman and Company, San Francisco.

          Eiby, G. A. 1980.  "Earthquakes".  Van Nostrand Reinhold Company,
          New York.  ISBN 0-442-25191-2.
               This book provides an excellent introduction to the study of
               earthquakes and seismology.

          Jeffreys, H. and Bullen, K.E.  1967.  "Seismological Tables".  
               This book contains the 'JB' tables used to determine the
               distance between a seismometer and an earthquake based upon
               the difference in arrival times of the different types of
               waves.  It is probably out of print.  If anyone does find a
               source for this book or the JB tables, please notify the
               author.


          The Amateur Seismology Package User's Manual                    6








          Kalmbach Publishing Co. "Earth Magazine".
               This magazine is a new spinoff from Astronomy Magazine.  It
               focuses on the Earth sciences.  No articles on seismology as
               yet, but it appears to be a good source of information for
               the Earth science student.  Kalmbach Publishing Co., 21027
               Crossroads Circle, P.O. Box 1612, Waukesha, WI 53187. 
               Subscription inquiries (800) 446-5489.

          Mims, Forrest M. III. 1990. "Engineer's Mini-Notebook Science
          Projects".  Radio Shack (catalog number 276-5018).
               This book contains several electronic science projects,
               including an 'earth movement sensor' and analog data logger.

          Neumann, F. 1960. "Principles Underlying the Interpretation of
          Seismograms".  U.S Department of Commerce, Government Printing
          Office.

          Science Probe, Inc. "Science PROBE! Magazine".
               This magazine has mentioned amateur seismology, and will
               probably present items of interest in the future.  The
               October 1991 issue contains an article "Science Online",
               which describes BBS systems of interest to Amateur
               Scientists.  Subscription address: Science PROBE!,
               Subscription Department, P.O. Box 54097, Boulder, CO 80322-
               4097.

          Simon, R. 1981.  "Earthquake Interpretations, A Manual for
          Reading Seismograms".  William Kaufmann, Inc.

          Stong, C. L. 1960.  "The Scientific American Book of Projects For
          the Amateur Scientist".  Simon and Schuster, New York.  Library
          of Congress Catalog Card Number 60-14286.
               This book is a classic collection of articles which appeared
               in the Amateur Scientist column in Scientific American
               during the 1950's.  Three of these articles describe amateur
               seismology and the construction of seismometers and
               seismographs.  The electronic information is dated, but the
               basic information is still useful.  The hardcover version of
               the book is long out of print.  There was a subsequent
               paperback version, but is also probably out of print.  This
               book is a good starting point.  The torsional seismometer
               kit mentioned in "The Attractions of Amateur Seismology" is
               no longer available.

          Stong, C. L. 1975.  The Amateur Scientist Column of Scientific
          American, September, 1975. "Electronic stratagems are the key to
          making a sensitive seismometer." Scientific American Inc., New
          York.
               This article describes an electronic seismograph suitable
               for construction by an electronic hobbyist.

          Stong, C. L. 1979.  The Amateur Scientist Column of Scientific
          American, July, 1979. Scientific American Inc., New York.
               This article describes an electronic seismograph suitable
               for construction by an electronic hobbyist.  

          U.S. Geological Survey.  Bimonthly.  "Earthquakes & Volcanoes".
               This publication contains articles of interest to students

          The Amateur Seismology Package User's Manual                    7








               of Earth science and the general public.  It is available
               from the Superintendent of Documents, U.S. Government
               Printing Office, Washington, DC 20402.  Order from GPO at
               (202) 783-3238 (VISA or MASTERCARD).  Also try 'go gpo' on
               CompuServe.

          U.S. Geological Survey.  Monthly.  "Preliminary Determination of
          Epicenters".
               This publication (commonly known as PDE) contains a listing
               of earthquakes for a given month along with the origin time,
               location, depth, magnitude, etc.  This publication is a few
               months behind; for example the issue containing earthquakes
               for July, 1990 was published in February, 1991. 
               Subscriptions are available from the Superintendent of
               Documents or try 'go gpo' on CompuServe (see above).  For a
               more timely source of this information, see the online
               sources, below.

          Online sources:

               NEIC BBS:
                    This BBS is operated by the National Earthquake
                    Information Center (NEIC).  The sysop has agreed to
                    create an area on this board to contain the Amateur
                    Seismology package and associated files.  This may also
                    be a good place for users to exchange ideas and
                    information.  This BBS can be reached at (303) 236-0848
                    (setup no parity, eight data bits, 1 stop bit).

               QED (Quick Epicenter Determinations):
                    This system is also operated by the NEIC.  The QED
                    system may be used to access NEIC epicenter
                    determinations for events from about two days to one
                    month old.  A description of this system and the
                    procedures to follow to connect it are contained in the
                    file QED.DOC in the SEIS file collection on the NEIC
                    BBS, above.

               Try the online news wire services offered on CompuServe and
               perform a keyword search on 'earthquake.'  Beware: news
               services do not always use UTC.


















          The Amateur Seismology Package User's Manual                    8









  5.0     SEISGRAPH - A Program for Viewing and Printing Seismograms

          SEISGRAPH is a computer program which allows the user to load
          seismic data files, select a portion of interest for viewing, and
          print the image displayed on a dot matrix printer.


  5.1     Overview

          SEISGRAPH is designed to run on IBM PC compatibles with Hercules,
          CGA, EGA, or VGA graphics.  SEISGRAPH is written in Borland Turbo
          C (*1) and makes use of the Quinn-Curtis Science/Engineering/
          Graphics Tools (part #IPC-TC-006) (*2).

          This program is not especially fast or sophisticated.  It is
          intended to be an inexpensive alternative to the many excellent
          (but expensive) data plotting software packages available.

          Since this program supports features for monitors and printers
          that the author does not have access to, it was not possible to
          fully test this program (for example, it has never been tried on
          a system with CGA graphics).  It is hoped that by carefully using
          the Quinn-Curtis tools, which have been tested on many systems,
          most problems have been avoided.  It is certain that this program
          contains undetected 'bugs'.  This statement is based upon
          experience as a programmer and a software tester.

          The detection of bugs depends upon the users.  Those who use the
          program in a predictable way on a limited variety of data files
          may never have a problem.  Those who take fiendish delight in
          stressing software (sometimes called 'malicious users') will
          probably encounter problems.  Malicious users are a quality
          conscious programmer's best allies.  Oddly enough, it seems to be
          a curious fact that many malicious users are named Al or Allen.

          The author encourages the reporting of bugs and freely admits
          that the users are performing the quality control function.

          *1   Turbo C is a trademark of Borland International, Inc.
          *2   This product is a trademark of Quinn-Curtis.  For
               information on this and other tools, contact: Quinn-Curtis,
               21 Highland Circle, Needham, MA 02194 USA


  5.2     Installation

          It is assumed that the user has some experience with installing
          PC software.  The installation procedure is very simple.

          This package is usually distributed in the form of a ZIP files
          which contain this manual, the SEISGRAPH program, and a sample
          data file.

          Copy the SEISGRAPH program (sg.exe) and the sample data file
          (sample.dat) to a directory (for example c:\seis).  In order to
          run the program while in another directory without having to type
          c:\seis\ before each command, it will be necessary to add c:\seis

          The Amateur Seismology Package User's Manual                    9








          to the PATH.

          If you are an inexperienced user and have problems, seek the help
          of a more experienced user.


  5.3     Guided Tour

          The easiest way to explain this program is to walk the user
          through a sample session.  The first step is to install the
          software as described above.

          Change the default directory to the directory in which the above
          files were installed or make sure the PATH has been properly set.

          To invoke SEISGRAPH, type the following at the prompt followed by
          return:
               sg sample.dat

          As SEISGRAPH executes, the following will appear on the screen:
               The copyright notice and support address.

               Reading data file: sample.dat
               Reading setup string: S10
               Samples per second: 10
               Time stamp: 910308114539.5

               The copyright notice encoded in the data file and any
               additional text describing the contents of the data file.

               Samples read: 6000
               First sample: 2065
               Last sample: 2179
               Press ESC to quit or any other key to continue.

          Press the ESC key.  The prompt should reappear and the computer
          should behave normally, allowing you to do a DIR or any other
          command.  This verifies that SEISGRAPH was able to allocate
          memory, read the data file, and deallocate memory without
          clashing with any other software that may be running on your
          computer.  If the computer is not operating normally at this
          point or a message appeared that was not listed above, you have
          found a bug (sorry  Al).  Proceed to the Problems and Solutions
          section.

          If things have gone well so far, invoke SEISGRAPH again and press
          the space bar (or any key other than ESC).

          The screen will go blank, the borders of several boxes will be
          drawn on the screen, and all but two of the bordered boxes will
          disappear as other information is placed on the screen.

          Across the top of the screen is an area called the 'stamp
          window.'  At the left side of the window is the file time stamp. 
          This contains the time of the first sample in the file in the
          format 'yr mo da ho:mi:se.t', where yr is the year, mo is the
          month, ho is the hour, mi is the minute, se is the second and t
          is tenths of a second.  ALL DATES AND TIMES ASSOCIATED WITH

          The Amateur Seismology Package User's Manual                   10








          SEISMIC DATA WILL BE IN UTC.  At the right side of the window is
          data describing the active range of y values in the format 'y_min
          y_span y_max' where y_min is the smallest value to be plotted,
          y_max is the largest value to be plotted, and y_span is the
          difference of y_max and y_min.

          Along the left side of the screen is a narrow vertical strip
          called the 'guide y window.'  At the top of this window is a
          (partially obstructed) + sign and at the bottom is a (partially
          obstructed) diamond.  These marks are used to graphically show
          the relative locations of y_min and y_max.

          Along the top of the screen, below the stamp window and to the
          right of the guide y window is the 'guide window.'  This window
          will be used to display the entire data file at a reduced scale,
          making it possible to plot a small section of the file and still
          'get the big picture.'

          Directly below the guide window is the 'guide x window.'  This
          window is used like the guide y window to show the locations of
          'x_min' (the first sample to be plotted) and 'x_max' (the last
          sample to be plotted) relative to the entire file.

          Directly below the guide x window is the 'x text window.'  This
          window is used to show the times associated with x_min and x_max
          in the format min:sec and the sample number within the file
          between the [].  The time difference between x_min and x_max (the
          span of time to be plotted) is centered in the x text window.

          Directly below the guide x window is the largest of the windows,
          the 'data window.'  This is where the data bounded by y_min,
          y_max, x_min, and x_max will be plotted.

          To the left of the data window is the 'data y window' and
          directly below the data window is the 'data x window.'  The
          functions of these windows parallel the functions of the guide y
          and guide x windows, respectively.

          Press the 'g' key.  The entire data file will be plotted in the
          guide window.  Depending on the speed of your computer, this may
          take from 3 to 30 seconds.  After the data is plotted, an x axis
          will be drawn in the guide window with tick marks at one minute
          intervals (the tick marks may be too small to see).

          Notice the diamond mark at the far left of the guide x window. 
          Press the right arrow key once.  The diamond will move to the
          right one tick along the x axis, and the x text window will be
          updated to show that x_min has increased by one minute.

          Press the space bar.  The diamond on the left of the guide x
          window will change to a + and the + on the far right of the guide
          x window will change to a diamond.  This signifies that x_max is
          now the active limit.  

          Press the left arrow key twice.  Notice that x_max decreases by
          two minutes.  Press the right arrow key once.  Notice that x_max
          increases by one minute. 


          The Amateur Seismology Package User's Manual                   11








          In general, a diamond indicates that the corresponding limit is
          active and will be adjusted when an appropriate arrow key is
          pressed.  The left and right arrow keys affect only x_min and
          x_max while the up and down arrow keys affect only y_min and
          y_max.  Pressing the space bar changes between adjusting the min
          or max limits.

          Using the space bar and arrow keys, adjust the y_min and y_max
          values in the guide y window and the x_min and x_max values in
          the guide x window until an area of interest in the guide window
          is bounded by the four limits.

          Press the 'g' key.  The guide window will be redrawn, with the
          y_min and y_max values selected, but the entire file will be
          plotted, not just the area between x_min and x_max.  This is
          because the guide window is designed to show the entire file.  In
          fact, it is desirable to redraw the guide window with different y
          limits only if the initial y limits do now allow enough detail to
          be shown.  The autorange feature (see Features, below) makes it
          possible to draw the guide window once with limits set based upon
          the actual minimum and maximum values of the data in the data
          file.

          Press the 'd' key.  The area of interest selected will now be
          plotted in the data window.  An x axis will be drawn along the
          bottom of the data window with tick marks at 10 second intervals.

          The four limits can be adjusted again. The guide x and guide y
          marks will show which area of the entire file will be plotted in
          the data window the next time the 'd' key is pressed and the data
          x and data y marks will show the same area but in greater
          precision since the data marks relate to the data window which is
          at a different scale than the guide window.

          The steps by which the limits move in response to the arrow keys
          is adjusted by the function keys.  The effect of each key is
          described in the Features section, below.

          Press the ESC key to exit.

          The sample data file used during this tour shows the p and s wave
          arrivals (at 30 seconds and 8 minutes 23 seconds into the file,
          respectively) recorded in Minnesota from an earthquake which
          struck near the northern end of the Kamchatka peninsula at about
          1136 UTC.  This is an excellent file, not all events are recorded
          this well.

          This completes the guided tour.  Read the Features section and
          experiment to gain an intuitive understanding of the operations
          of the various features.









          The Amateur Seismology Package User's Manual                   12








  5.4     Features

          The features of this program are presented in detail below
          roughly in the order they were used in the guided tour.


  5.4.1   Invoking SEISGRAPH

          SEISGRAPH is started by typing the name of the program, an
          optional 'setup string', and the name of the data file to be
          examined.  In the example above, no setup string was used.  The
          setup string can be used to change some of the ways SEISGRAPH
          executes.  See the Setup String section, below, for details.


  5.4.2   Reading Data Files

          After displaying the copyright message, SEISGRAPH reads the data
          file specified on the command line.  

          The first portion of the data file contains a setup string which
          contains information about the format of the data file.  In most
          cases, the only information contained in this setup string will
          be the rate at which data was sampled.  The setup string is read
          and displayed.  Any actions taken as a result of the information
          contained in the string will be displayed.  In the example above,
          the setup string S10 was found and was interpreted as meaning
          that the data in the file was sampled at 10 samples per second.

          The second portion of the data file contains the file time stamp
          which will be displayed in the stamp window.  This is the time of
          the first sample in the file.

          The next portion of the data file contains text such as copyright
          information or a description of the file contents.

          Finally, the data portion of the file is read.  SEISGRAPH can
          read a maximum of 32767 samples and will stop reading the data
          file when this many samples have been read.  Also, only an
          integral number of seconds worth of data will be read and any
          extra data will be discarded.  

          When finished reading the data, SEISGRAPH will display the number
          of samples read and the value of the first and last sample.


  5.4.3   Adjusting X Limits

          The x_min and x_max limits are adjusted using the left and right
          arrow keys.  The limit denoted by the diamond shape is the active
          limit which will be changed in response to the arrow keys.  The
          active limit is chosen by pressing and releasing the space bar
          until the desired limit changes from a + to a diamond.

          The function keys F1 through F4 determine the step size for x
          limit adjustments as follows:
               F1        1 second steps
               F2        10 second steps

          The Amateur Seismology Package User's Manual                   13








               F3        1 minute steps      (default at program start)
               F4        10 minute steps

          The TAB key moves the range of x values to the 'next' interval
          and the SHIFT-TAB key moves the range of x values to the
          'previous' interval.

          The END key moves the active x limit to the end of the current
          data window if the active x limit is currently within the current
          data window.  Otherwise it moves the active x limit to the
          beginning or end of the file.

          The x limits will not come closer together than the current x
          step size and TAB/SHIFT-TAB will not move the x range if there is
          not enough room left between the current range and the beginning
          or end of the file.


  5.4.4   Adjusting Y Limits

          The y_min and y_max limits are adjusted using the up and down
          arrow keys.  The limit denoted by the diamond shape is the active
          limit which will be changed in response to the arrow keys.  The
          active limit is chosen by pressing and releasing the space bar
          until the desired limit changes from a + to a diamond.

          The function keys F5 through F9 determine the step size for y
          limit adjustments as follows:
               F5        1 count steps
               F6        10 count steps
               F7        100 count steps
               F8        1000 count steps         (default at program
                                                  start)
               F9        10000 count steps

          The HOME key performs different functions depending upon whether
          the 'autorange' feature is enabled.  When autorange is not
          enabled, the HOME key moves y_min to 0 and moves y_max to a
          reasonable value (65535, 16383, 4095, 1023, or 255) depending
          upon the largest data value in the file.  When autorange is
          enabled, the HOME key moves y_min to the smallest value and y_max
          to the largest value present in the file.  See the autorange
          feature, below, for instructions on enabling autorange.

          The y limits will not come closer together than the current y
          step size.


  5.4.5   Autorange

          The autorange feature is enabled and disabled by the F10 function
          key.  When enabled, 'Autorange' will be displayed in the stamp
          window.  Autorange is not enabled when the program starts, but
          this can be changed through the use of the setup string.





          The Amateur Seismology Package User's Manual                   14








  5.4.6   Guide Window

          The guide window is used to display a plot of the entire file. 
          The guide window is drawn when the 'g' key is pressed.


  5.4.7   Data Window

          The data window is used to display a plot of the portion of the
          file bounded by x_min, x_max, y_min, and y_max.  The data window
          is drawn when the 'd' key is pressed.  The data window can be
          drawn with grids along the x axis by pressing the 'x' key or with
          grids along both the x and y axes by pressing the 'b' key.

          The timestamp can be displayed in the data window by pressing the
          't' key and the x and y limits can be displayed in the data
          window by pressing the 'i' key.  These features are useful when
          printing the data window.


  5.4.8   Printing

          The plot displayed in the data window can be printed by pressing
          the 'p' key.

          The portion of the plot on the right of the data window will be
          the first portion printed.

          When printing the contents of an entire file, select a range of x
          values which divides evenly into the file length (so each print
          operation will use the same scale), press TAB until the end of
          the range coincides with the end of the file, and press 'p'. 
          When finished printing this segment, press SHIFT-TAB to move the
          range toward the beginning of the file, press 'd' to draw the new
          range of data, and press 'p'.  Repeat this process until the
          beginning of the range coincides with the beginning of the file.

          Unfortunately, the printer driver inserts a blank space between
          print operations.  It is necessary to 'back up' the paper between
          operations or cut and paste the resulting plots.  Note that no
          tick mark is drawn at the left or right end of the x axis.

          An alternative to backing up the paper or cutting and pasting
          plots is to press 'c' (for 'continuous printing') instead of
          'p'.  This causes a modified version of printer driver 5 to be
          used, regardless of which printer driver has been selected.  This
          modified driver does not insert the blank space between print
          operations.  Unfortunately, this modified driver may leave a
          small portion of data unprinted.  It is not perfect, but it works
          well and is a good alternative for users of Epson FX printers. 
          For more details on this printer driver, see the Setup String
          section.

          Although time and range data normally do not appear in the data
          window, they may be displayed by pressing the 't' and 'i' keys,
          permitting them to be printed along with the data plot.

          The Quinn-Curtis tools support a number of printers and

          The Amateur Seismology Package User's Manual                   15








          resolutions.  For details on selecting the proper configuration
          for your printer, see the Setup String section.


  5.4.9   Setup String

          The setup string is a series of letters and numbers which can be
          placed in a data file and/or on the command line to affect the
          way SEISGRAPH performs certain operations.  When a setup string
          is encountered, SEISGRAPH displays the string and also displays
          the information extracted from the string.

          For example, invoking SEISGRAPH with a setup string (s50ea):
               sg s50ea sample.dat
          will cause SEISGRAPH to assume the data was sampled at 50 samples
          per second, that the data is eight bit data, and will enable the
          autorange feature.

          Any information contained in the command line setup string will
          override any similar information in the data file setup string. 
          For instance, if the data file contains the setup string s10
          (interpreted as 10 samples per second) and the command line
          contains the setup string s5 (interpreted as 5 samples per
          second), the 5 samples per second value will be used.

          The following sections describe the options available through use
          of the setup string.  The default values described are the values
          SEISGRAPH will use unless overridden by the setup string.


  5.4.9.1 b (Binary File)

          When a 'b' appears in a setup string, the data file will be
          assumed to be a binary file (which contains only data) and not a
          mixed file (which contains a setup string, timestamp, and
          possibly text information).  It makes no sense to place a 'b' in
          a setup string in a data file since a binary file by definition
          contains no setup string.

          Placing a 'b' in the command line setup string enables the user
          to read any file as a data file.  This option is intended to at
          least make it possible to read files other than those which are a
          part of the Amateur Seismology Package.

          If a binary file has been read, no file timestamp will be
          available.

          By default, SEISGRAPH expects data files to be of the mixed type.











          The Amateur Seismology Package User's Manual                   16








  5.4.9.2 e (Eight Bit File)

          When an 'e' appears in a setup string, the size of the samples in
          the data file will be assumed to be one byte instead of the
          default size of two bytes.

          This option makes it possible to read data files which contain
          eight bit information but do not fill the extra byte with zeros.


  5.4.9.3 x (Skip Bytes)

          An 'x' followed by a number in a setup string will cause
          SEISGRAPH to skip that number of bytes before beginning to read
          and store data.  The number of bytes to skip must be <= 32767. 
          Note that this is the number of BYTES to skip, which will not be
          the number of samples to skip if the sample size is TWO bytes.

          This option makes it possible to read mixed files which have all
          their text information grouped together by placing a 'b' and an
          'x' followed by the appropriate number of bytes in the setup
          string.

          The default value of Skip Bytes is 0.

  5.4.9.4 c (Color)

          Placing a 'c' followed by a number in the setup string permits
          the user to choose which color SEISGRAPH will use.

          The following list is based upon the table for the Turbo C
          setallpalette function. The CGA values have not been tested.

          The default value of Color is 63.

                    CGA            EGA/VGA
          0         black          black
          1         blue           blue
          2         green          green
          3         cyan           cyan
          4         red            red
          5         magenta        magenta
          6         brown
          7         light gray     light gray
          8         dark gray
          9         light blue
          10        light green
          11        light cyan
          12        light red
          13        light magenta
          14        yellow
          15        white
          20                       brown
          56                       dark gray
          57                       light blue
          58                       light green
          59                       light cyan
          60                       light red

          The Amateur Seismology Package User's Manual                   17








          61                       light magenta
          62                       yellow
          63                       white


  5.4.9.5 a (Autorange)

          Placing an 'a' in the setup string enables the autorange feature.
          This makes it possible to have autorange enabled when the program
          starts instead of having to press F10 HOME SPACE HOME before
          drawing the guide window.

          By default, autorange is not enabled.


  5.4.9.6 s (Samples Per Second)

          An 's' followed by a number in the setup string determines the
          sample rate SEISGRAPH will use.  Samples per second must be <=
          32767.  

          Samples per second is normally set in the data file, but may be
          changed on the command line.  This feature is useful when reading
          binary data files.  

          The default value of Samples Per Second is 10.


  5.4.9.7 b (Bin Size)

          A 'b' followed by a number in the setup string determines the bin
          size used when drawing in the guide window.  The number must be
          >= 2 and <= 32767.

          Instead of plotting every point in the guide window (which can be
          very time consuming), data is grouped into bins and the maximum
          value and the minimum value for each bin is plotted.

          Making the bin size small increases the fidelity of the plot in
          the guide window but slows down the plotting process due to the
          increased number of bins which must be plotted.  Making the bin
          size large decreases the fidelity of the plot but speeds up the
          plotting process.

          The default value of Bin Size is 10.


  5.4.9.8 p (Printer Port)

          A 'p' followed by an number in the setup string determines which
          printer port SEISGRAPH will use.  The number must be 0 (for
          LPT1:) or 1 (for LPT2:).

          The default printer port is LPT1:.





          The Amateur Seismology Package User's Manual                   18








  5.4.9.9 d (Printer Driver) and r (Resolution)

          Placing a 'd' or 'r' followed by a number in the setup string
          selects which printer driver and resolution will be used when
          printing the image contained in the data window.  The user needs
          to determine which driver and resolution are appropriate for the
          printer being used.

          The following table is taken from the documentation for the
          Quinn-Curtis ScreenDump function.  The author has only tested
          this package using drivers 5 and 99.

          The default value for Printer Driver is 5 and the default value
          for Resolution is 0.

          Important note:  The author made some modifications to the Quinn-
          Curtis source code (function GetVertByte in screen.c) to speed up
          screen dumps at the expense being unable to scale the screen
          dumps in the x and y directions.  GetVertByte is used by drivers
          0, 2, 5, and 99.  These modifications were tested with drivers 5
          and 99 and should work with drivers 0 and 2.  If troubles are
          encountered while using drivers 0, 2, 5, or 99, please notify the
          author and do not blame the Quinn-Curtis tools.

          Another important note:  The author made some modifications to
          the Quinn-Curtis source code (function EpsonFXScreenDump, driver
          5) to eliminate the space between print operations.  This
          modified driver (99) may leave a small amount of data unprinted,
          but it is a good alternative to backing up the paper or cutting
          and pasting plots.  In order to use this driver, press 'c'
          instead of 'p' to print the screen, or use the setup string to
          select driver 99 and press 'p' to print the screen.

          Driver:
               0    Epson MX driver
               1    Epson LQ driver
               2    Toshiba P driver
               3    HP Laser Jet driver
               4    HP Ink Jet driver
               5    Epson FX driver
               99   Modified (no gap) Epson FX driver

          Resolution:
               Epson MX, FX drivers
                    0    single density normal speed
                    1    double density half speed
                    2    double density normal speed
                    3    quadruple density

               Epson LQ driver
                    0    single density normal speed 8 pin mode
                    1    double density half speed 8 pin mode
                    2    double density normal speed 8 pin mode
                    3    quadruple density 8 pin mode
                    4    standard density 24 pin mode
                    5    double density 24 pin mode
                    6    CRT III 24 pin mode
                    7    triple density 24 pin mode

          The Amateur Seismology Package User's Manual                   19








                    8    hex density 24 pin mode

               Toshiba P driver
                    0    180x180 dot image transfer
                    1    180x360 dot image transfer

               HP Laser Jet driver
                    0    75 dots/inch
                    1    100 dots/inch
                    2    150 dots/inch
                    3    300 dots/inch


  5.5     Data File Format

          SEISGRAPH can be used to read almost any kind of data file
          (except ASCII formats, commonly used by spreadsheet programs). 
          This flexibility is provided by the 'b', 'e', 'x', and 's'
          options in the setup string.

          The data files distributed with SEISGRAPH and the data files
          periodically distributed following earthquakes will be in a
          'mixed' format.  The mixed format is described below.  Users with
          data acquisition capability are encouraged to use this format to
          facilitate the exchange of files.

          The first portion of a mixed file is a setup string.  This string
          may contain all of the types of information that a setup string
          on the command line may contain, but it should be limited to
          contain just the samples per second information.

          The second portion is the file time stamp.  This string should be
          in the format described in the guided tour section.  The time
          stamp in the sample files includes tenths of a second but uses
          spaces for place holders for hundredths and thousandths of a
          second.  This is to provide the ability to use more precise file
          time stamps in the future.

          The third portion is plain text.

          All strings must be 80 characters or fewer in length and must be
          terminated with a newline character ($0A).

          When SEISGRAPH encounters two newline characters in a row, the
          rest of the data file will be assumed to be binary data.

          Data files can be examined using a 'dump' utility or an editor
          which has the capability to edit binary files.  Trying to use a
          text editor on a data file may cause undesired results, possibly
          corrupting the data file.

  5.6     Problems and Solutions

          The following is a list of possible error messages, the probable
          cause, and the appropriate actions.

          Bad command or file name
               PC users are used to this one.  The user either mistyped sg,

          The Amateur Seismology Package User's Manual                   20








               the file sg.exe is not in the current directory, or sg.exe
               is not in the current directory and the path has not been
               properly set.  Get help from a more experienced PC user.

          No <optional setup string> or data file name on command line.
          Usage: SG <optional setup string> data file name.
               The user typed sg but did not specify a setup string or data
               file name.

          OUT OF MEMORY.
          Unable to create guide data array.
          Program terminated.
               SEISGRAPH was unable to find enough memory to hold a maximum
               and minimum value for each bin. This is due to a small bin
               size which results in the need for a large number of bins. 
               Increase Bin Size using the 'b' option in the setup string.

          OUT OF MEMORY.
          Unable to create data array.
          Program terminated.
               SEISGRAPH was unable to find enough memory to hold 32767 two
               byte samples.  Either the system does not have enough memory
               or other programs are using the rest or the memory.  Try
               running SEISGRAPH without any other programs (TSR utilities,
               etc.) present.

          Error opening file:
               SEISGRAPH was unable to find the specified data file.  If
               the filename displayed looks like the setup string, it is
               because the command line contained a setup string and no
               data file or the data file was entered on the command line
               before the setup string.

          No data read.
          Program terminated.
               SEISGRAPH read the data file but did not find any data. This
               may be because there were not two newline characters in a
               row after the end of plain text in a mixed file or because
               Skip Bytes was set to a number larger than the total number
               of samples in the file.

          Less than one second of data or > 32767 samples per second.
          Program terminated.
               SEISGRAPH read the data file but did not find at least one
               second's worth of data or Samples Per Second was set >
               32767.  Reduce Samples Per Second using the 's' option in
               the setup string.

          Problem with registerbgidriver call.
          Program terminated.
               One of the registerbgidriver calls returned an error
               response.  This should never happen unless sg.exe has
               somehow become corrupted.

          CANNOT FIND DRIVER FILE.
          Program terminated.
               SEISGRAPH was unable to correctly identify the graphics
               adapter installed in the computer.  SEISGRAPH will not work

          The Amateur Seismology Package User's Manual                   21








               with this graphics adapter.


  6.0     How Data Files Are Created

          The seismometer used to produce the data files is a horizontal
          pendulum with a period of about 20 seconds.  The transducer is a
          moving coil - fixed magnet type producing a velocity response. 
          The seismometer output is filtered, amplified, and sampled at a
          50 Hz rate by an analog to digital converter (A to D) card
          installed in a PC.

          The file time stamp is read from a Heath GC-1000 at the beginning
          of each data file.  This clock is synchronized to WWV and is
          usually accurate to 0.01 second, but the computer interface only
          reports time to the nearest 0.1 second (the delay introduced by
          the data transfer between the clock and computer is not presently
          known exactly, but it is less than 0.1 second).  The Heath clock
          is very accurate but the clock on the A to D card which actually
          controls the sample rate tends to drift.  This is confirmed by
          the fact that the file time stamps do not differ by exactly ten
          minutes.  A rough rule of thumb to follow until the system timing
          is examined and a better clock is used to control the sample rate
          is that times are accurate to within about one second.

          The seismometer is located at approximately 45 degrees north
          latitude and 93 degrees 20 minutes west longitude.  The pendulum
          is aligned along a roughly north-south axis and is therefore most
          sensitive to motion in the east-west direction.

          The calibration of the system is rather rough at the present
          time.  Pendulum movement toward the east with respect to the base
          of the seismometer (the equivalent of ground movement to the
          west) results in samples with higher values.

          The filter and amplifier are simple and uncalibrated.  If enough
          user support materializes, a better amplifier and filter will be
          built and calibrated.

          Although the sample rate is 50 Hz, the files are reduced to a
          sample rate of 10 Hz and compressed with PKZIP before
          distribution.  If this were not done, the files would be large
          and would require a much longer time (and more money) to
          download.

          The effective sample rate of 10 Hz is sufficient for amateur
          uses.  However, some of the noise picked up by the seismometer
          (traffic, trains, etc.) may contain frequencies higher than 5 Hz. 
          Those familiar with the Nyquist theorem know that this causes
          'aliasing'.  If enough supporting users want data without this
          aliasing, an anti-aliasing filter will be installed or the
          digital data will be filtered before being converted to a 10 Hz
          sample rate.






          The Amateur Seismology Package User's Manual                   22








  7.0     The Future

          Plans for additions and enhancements to this package include:

               A program for converting data files to/from the ASCII
               formats used by other plotting/spreadsheet programs.

               Moving the seismometer to a quieter location.

               Adjusting the amplifier gain or sampling at two or more
               different gains so large amplitude waves do not saturate the
               A to D card.

               Calibrating the amplifier gain and filter response so the
               data is more useful.

          The Amateur Seismology Package is intended to promote interest in
          the Earth sciences.  If amateur seismology becomes a popular and
          useful tool in this respect, it is hoped that organizations with
          access to better seismic data will make this data available on a
          regular basis.






































          The Amateur Seismology Package User's Manual                   23






         ----------------end-of-author's-documentation---------------

                         Software Library Information:

                    This disk copy provided as a service of

                           Public (software) Library

         We are not the authors of this program, nor are we associated
         with the author in any way other than as a distributor of the
         program in accordance with the author's terms of distribution.

         Please direct shareware payments and specific questions about
         this program to the author of the program, whose name appears
         elsewhere in  this documentation. If you have trouble getting
         in touch with the author,  we will do whatever we can to help
         you with your questions. All programs have been tested and do
         run.  To report problems,  please use the form that is in the
         file PROBLEM.DOC on many of our disks or in other written for-
         mat with screen printouts, if possible.  PsL cannot debug pro-
         programs over the telephone, though we can answer questions.

         Disks in the PsL are updated  monthly,  so if you did not get
         this disk directly from the PsL, you should be aware that the
         files in this set may no longer be the current versions. Also,
         if you got this disk from another vendor and are having prob-
         lems,  be aware that  some files may have become corrupted or
         lost by that vendor. Get a current, working disk from PsL.

         For a copy of the latest monthly software library newsletter
         and a list of the 4,000+ disks in the library, call or write

                           Public (software) Library
                               P.O.Box 35705 - F
                            Houston, TX 77235-5705

                                1-800-2424-PSL
                             MC/Visa/AmEx/Discover

                          Outside of U.S. or in Texas
                          or for general information,
                              Call 1-713-524-6394


