Main Page   Class Hierarchy   Compound List   File List   Compound Members   File Members  

read_arc.h

Go to the documentation of this file.
00001 
00002 /*
00003  *   THIS FILE IS UNDER RCS - DO NOT MODIFY UNLESS YOU HAVE
00004  *   CHECKED IT OUT USING THE COMMAND CHECKOUT.
00005  *
00006  *    $Id: read__arc_8h-source.html 2161 2006-05-19 16:55:03Z paulf $
00007  *
00008  *    Revision history:
00009  *     $Log$
00009  *     Revision 1.1  2006/05/19 16:55:02  paulf
00009  *     first inclusion
00009  *
00010  *     Revision 1.6  2000/12/06 17:47:07  lucky
00011  *     Removed Pph and Sph strings from Hpck, and added Plabel, Slabel, Ponset,
00012  *     and Sonset. We need these to properly track the onset.
00013  *
00014  *     Revision 1.5  2000/09/12 19:07:02  lucky
00015  *     Defined separate FM fields for S and P picks
00016  *
00017  *     Revision 1.4  2000/08/21 19:48:36  lucky
00018  *     Modified the Hpck structure to be able to handle both P and S
00019  *     picks at the same time, by specifying time, residual, quality, and phase
00020  *     remarks separately for P and S picks.
00021  *
00022  *     Revision 1.3  2000/06/12 21:34:00  lucky
00023  *     Changed NO_FLOAT_VAL, NO_INT_VAL, and NO_LONG_VAL to 0.
00024  *
00025  *     Revision 1.2  2000/03/30 15:35:30  davidk
00026  *     Added fields to Hsum and Hpck that contained information neccessary for
00027  *     orareport, so that the read_arc routines could be used by orareport.
00028  *
00029  *     Revision 1.1  2000/02/14 20:05:54  lucky
00030  *     Initial revision
00031  *
00032  *
00033  */
00034 
00035 #include <limits.h>
00036 
00037 /* Some special unlikely values */
00038 #define NO_FLOAT_VAL  0.0
00039 #define NO_INT_VAL    0
00040 #define NO_LONG_VAL   0
00041 
00042 /* Structure of info read from TYPE_HYP2000ARC message
00043  **************************************************/
00044 struct Hsum {
00045         long    qid;       /* event id from binder */
00046         double  ot;        /* origin time as sec since 1600   */
00047         float   lat;       /* latitude (North=positive)       */
00048         float   lon;       /* longitude(East=positive)        */
00049         float   z;         /* depth (down=positive)           */
00050         int     nph;       /* number of phases w/ weight >0.1 */
00051         int     gap;       /* maximum azimuthal gap           */
00052         int     dmin;      /* distance (km) to nearest station*/
00053         float   rms;       /* RMS travel time residual        */
00054         int     e0az;      /* azimuth of largest principal error */
00055         int     e0dp;      /* dip of largest principal error  */
00056         float   e0;        /* magnitude (km) of largest principal error */
00057         int     e1az;      /* azimuth of intermediate principal error */
00058         int     e1dp;      /* dip of intermediate principal error  */
00059         float   e1;        /* magnitude (km) of intermed principal error */
00060         float   e2;        /* magnitude (km) of smallest principal error */
00061         float   erh;       /* horizontal error (km) */
00062         float   erz;       /* vertical error (km) */
00063         float   Md;        /* duration magnitude */
00064         char    reg[4];    /* location region */
00065         char    cdate[20]; /* date character buffer */
00066         char    labelpref; /* character describing preferred magnitude */
00067         float   Mpref;     /* preferred magnitude */
00068         float   wtpref;    /* weight (~ # readings) of preferred Mag */
00069         char    mdtype;    /* Coda duration magnitude type code */
00070         float   mdmad;     /* Median-absolute-difference of duration mags */
00071         float   mdwt;      /* weight (~ # readings) of Md */
00072 };
00073 
00074 /* Structure to hold raw pick info from a phase line & its shadow
00075  ****************************************************************/
00076 struct Hpck {
00077         char    site[6];   /* site code */
00078         char    net[3];    /* seismic network code */
00079         char    comp[4];   /* station component code */
00080         char    Plabel;    /* P phase label */
00081         char    Slabel;    /* S phase label */
00082         char    Ponset;    /* P phase onset */
00083         char    Sonset;    /* S phase onset */
00084         double  Pat;       /* P-arrival-time as sec since 1600 */
00085         double  Sat;       /* S-arrival-time as sec since 1600 */
00086         float   Pres;      /* P travel time residual */  
00087         float   Sres;      /* S travel time residual */  
00088         int     Pqual;     /* Assigned P weight code */
00089         int     Squal;     /* Assigned S weight code */
00090         int     codalen;   /* Coda duration time */
00091         int     codawt;    /* Coda weight */
00092         char    Pfm;       /* P first motion */
00093         char    Sfm;       /* S first motion */
00094         char    cdate[18]; /* date character buffer */
00095         char    datasrc;   /* Data source code. */
00096         float   Md;        /* Station duration magnitude */
00097         int     azm;       /* azimuth */
00098         int     takeoff;   /* emergence angle at source */
00099         float   dist;      /* epicentral distance (km) */
00100         float   Pwt;       /* P weight actually used. */
00101         float   Swt;       /* S weight actually used. */
00102         int     pamp;      /* peak P-wave half amplitude */
00103         int     codalenObs;/* Coda duration time (Measured) */
00104         int     ccntr[6];  /* Window center from P time */
00105         int     caav[6];   /* Average Amplitude for ccntr[x] */
00106 };
00107 
00108 /* Function Prototypes
00109  *********************/
00110 int read_hyp( char *sumline, char *shdw, struct Hsum *sumP );
00111 int read_phs( char *phsline, char *shdw, struct Hpck *pckP );

Generated on Tue May 6 09:16:07 2003 for Earthworm Libs by doxygen1.3-rc3