Changeset 4973


Ignore:
Timestamp:
07/24/12 16:42:00 (6 years ago)
Author:
paulf
Message:

added in UseS for counts of phases

Location:
trunk/src/seismic_processing/eqassemble
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/seismic_processing/eqassemble/eqassemble.c

    r4188 r4973  
    1010 *               eqrapid (Caltech variant of eqprelim) and eqproc. 
    1111 * Pete Lombard, UC Berkeley 2006/08/10 
     12 * V0.1.3 2012-07-10 - added in UseS option (only P phases used in rule counts otherwise) 
    1213 */ 
    1314 
    14 #define VERSION "0.1.2" 
     15#define VERSION "0.1.3 2012-07-10" 
    1516 
    1617#define X(lon) (facLon * ((lon) - orgLon)) 
     
    9798static int  LogSwitch;            /* 0 if no logging should be done to disk */ 
    9899static int  ReportS;              /* 0 means don't send S to next process   */ 
     100static int  UseS = 0;                 /* 0 means don't use S in phase count (default) */ 
    99101static char NextProc[150];        /* actual command to start next program   */ 
    100102static char DataSrc[2];           /* Source of data for picks               */ 
     
    201203     ******************************/ 
    202204    if ( argc != 2 ) { 
    203         fprintf( stderr, "Usage: Arg0 <configfile>\n" ); 
     205        fprintf( stderr, "Usage: %s <configfile>\n", Arg0 ); 
     206        fprintf( stderr, "%s version %s\n", Arg0, VERSION ); 
    204207        exit( 0 ); 
    205208    } 
     
    874877            if(Pck[ip].phase%2 == 0) {     /* It's a P-phase... */ 
    875878                nphs_P++;                  /* ...count them     */ 
    876             } 
    877             else {                         /* It's an S-phase... */ 
     879            } else {                         /* It's an S-phase... */ 
    878880                if(ReportS == 0) continue; /* ...see if it should be skipped */ 
    879881            } 
     
    912914    date20( tNow, cdate ); 
    913915 
    914     if (nphs_P < minPPhases) { 
     916    if (UseS && nSrt < minPPhases) { 
     917        if (nphs_P > 0) { 
     918            /* don't bother logging this if binder "killed" the event */ 
     919            logit( "", 
     920                   "%s:%8ld #### %s report delayed: %3d P-phs; %3d Total phases seen, %3d picks total in report\n", 
     921                   cdate+10, Hyp[iq].id, reportPrefix, nphs_P, nSrt, Hyp[iq].nph ); 
     922        } 
     923        return; 
     924    } else if (!UseS && nphs_P < minPPhases) { 
    915925        if (nphs_P > 0) { 
    916926            /* don't bother logging this if binder "killed" the event */ 
     
    983993    date20( Hyp[iq].tOrigin, corg ); 
    984994 
    985     logit( "", "%s:%8ld #### %s report: %04d%02d%02d%02d%02d%_%02d\n", 
     995    logit( "", "%s:%8ld #### %s report: %04d%02d%02d%02d%02d_%02d\n", 
    986996           cdate+10, Hyp[iq].id, reportPrefix, g.year, g.month, g.day, 
    987997           g.hour, g.minute, (int) (Hyp[iq].id % 100) ); 
     
    12171227 
    12181228    /* Build an event message an write it to the pipe */ 
    1219     sprintf( msg ,"%d\n",Hyp[iq].id); 
     1229    sprintf( msg ,"%ld\n",Hyp[iq].id); 
    12201230     
    12211231    /* write cancel event message to pipe */ 
     
    14271437                init[7] = 1; 
    14281438            } 
     1439            /*OPTIONAL*/    else if( k_its("UseS") ) { 
     1440                UseS = k_int(); 
     1441            } 
    14291442 
    14301443            /* At least one of these commands is required */ 
  • trunk/src/seismic_processing/eqassemble/eqassemble.d

    r3670 r4973  
    4848                    #   to see if it's time to report an event 
    4949 
     50# UseS # an OPTIONAL flag to indicate S phases should be used in rules below, 
     51#        otherwise just P phases are used in counts  
    5052 
    5153# Rules for reporting events 
Note: See TracChangeset for help on using the changeset viewer.