Changeset 8048


Ignore:
Timestamp:
08/14/19 23:19:08 (4 days ago)
Author:
stefan
Message:

math_contstants.h wasn't there, M_PI failed

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/seismic_processing/gmew/gm_util.c

    r8019 r8048  
    4747/* 
    4848 * gm_util.c: A bunch of utility functions used for gmew. 
    49  *   
     49 * 
    5050 *    Pete Lombard; January, 2001 
    5151 */ 
     
    5959#include <earthworm.h> 
    6060#include <chron3.h> 
     61#include <math_constants.h> 
    6162#include <fft_prep.h> 
    6263#include <read_arc.h> 
     
    102103{ 
    103104  int rc; 
    104    
     105 
    105106  /* Initialize the SAC trace saver. We assume that this is the   * 
    106107   * only type of trace saver; if more are added, then we'll need * 
     
    131132  if (pEv->eventId[0] && pgmParams->saveTrace == GM_ST_SAC) 
    132133    termSACSave(pEv, pgmParams); 
    133    
     134 
    134135  /* Terminate the XML writer */ 
    135136  if (pEv->eventId[0] && pgmParams->XMLDir && strlen(pgmParams->XMLDir) > 0) 
    136137  { 
    137     if (Close_XML_file( )== 0 && pgmParams->sendActivate == 1)  
     138    if (Close_XML_file( )== 0 && pgmParams->sendActivate == 1) 
    138139    { 
    139140       Send_XML_activate(pEv, pgmParams); 
     
    158159 *           -1 on failure (error allocating memory) 
    159160 */ 
    160 int addCompToEvent( char *sta, char *comp, char *net, char *loc, EVENT *pEvt,  
     161int addCompToEvent( char *sta, char *comp, char *net, char *loc, EVENT *pEvt, 
    161162                    GMPARAMS *pgmParams, STA **ppSta, COMP3 **ppComp) 
    162163{ 
     
    170171  int mSta, mComp, mNet, mLoc;   /* `match' flags */ 
    171172  char orientation; 
    172    
     173 
    173174  /* Is this SCNL on the selection "Add" list?                         * 
    174175   * If Add list is empty, assume that all stations are wanted.       */ 
     
    182183      if (thisSel->sta[0] == '*' || strcmp(thisSel->sta, sta) == 0) mSta = 1; 
    183184      if (thisSel->net[0] == '*' || strcmp(thisSel->net, net) == 0) mNet = 1; 
    184       if (thisSel->comp[0] == '*' ||  
     185      if (thisSel->comp[0] == '*' || 
    185186          memcmp(thisSel->comp, comp, strlen(thisSel->comp)) == 0) mComp = 1; 
    186       if (thisSel->loc[0] == '*' ||  
     187      if (thisSel->loc[0] == '*' || 
    187188          memcmp(thisSel->loc, loc, strlen(thisSel->loc)) == 0) mLoc = 1; 
    188189      if ( (selected = mSta && mNet && mComp && mLoc) == 1) 
    189190        break; 
    190        
     191 
    191192      thisSel = thisSel->next; 
    192193    } 
     
    207208    if (thisSel->sta[0] == '*' || strcmp(thisSel->sta, sta) == 0) mSta = 1; 
    208209    if (thisSel->net[0] == '*' || strcmp(thisSel->net, net) == 0) mNet = 1; 
    209     if (thisSel->comp[0] == '*' ||  
     210    if (thisSel->comp[0] == '*' || 
    210211        memcmp(thisSel->comp, comp, strlen(thisSel->comp)) == 0) mComp = 1; 
    211     if (thisSel->loc[0] == '*' ||  
     212    if (thisSel->loc[0] == '*' || 
    212213        memcmp(thisSel->loc, loc, strlen(thisSel->loc)) == 0) mLoc = 1; 
    213214    if ( (mSta && mNet && mComp && mLoc) == 1) 
     
    224225 
    225226  /* try map a number to a channel string */ 
    226   if (strlen(pgmParams->ChannelNumberMap) > 1)  
     227  if (strlen(pgmParams->ChannelNumberMap) > 1) 
    227228  { 
    228229    int num; 
    229230    num = atoi(&comp[2]); 
    230     if (num >= 1 && num <= 3)  
     231    if (num >= 1 && num <= 3) 
    231232    { 
    232233      orientation = pgmParams->ChannelNumberMap[num]; 
     
    235236    } 
    236237  } 
    237    
     238 
    238239  /* What direction is this component? We do this here, since it could 
    239240   * possibly fail. We don't want to allocate a new COMP1 structure (below) 
     
    247248    dir = GM_N; 
    248249    break; 
    249   case 'Z':  
     250  case 'Z': 
    250251    dir = GM_Z; 
    251252    break; 
     
    263264    { 
    264265        foundIt = 1; 
    265         break;   
     266        break; 
    266267    } 
    267268  } 
     
    296297    else 
    297298    { 
    298       logit("et",  
     299      logit("et", 
    299300            "addCompToEvent: station limit reached; skipping <%s.%s.%s.%s>\n", 
    300301            sta, comp, net, loc ); 
     
    304305  } 
    305306  *ppSta = &pEvt->Sta[i]; 
    306    
     307 
    307308  if ( pEvt->Sta[i].comp == (COMP1 *)NULL) 
    308   {  
     309  { 
    309310      /* No components for this station, so create a new one */ 
    310     if ( (pEvt->Sta[i].comp = (COMP1 *)calloc(sizeof(COMP1), 1)) ==  
     311    if ( (pEvt->Sta[i].comp = (COMP1 *)calloc(sizeof(COMP1), 1)) == 
    311312         (COMP1 *)NULL) 
    312313    { 
     
    330331      } 
    331332      last = this; 
    332     }  
     333    } 
    333334    while ( (this = this->next) != (COMP1 *)NULL); 
    334      
     335 
    335336    if (foundIt == 0) 
    336337    {           /* No match, so add a new COMP1 structure to the list */ 
    337       if  ( (last->next = (COMP1 *)calloc(sizeof(COMP1), 1)) ==  
     338      if  ( (last->next = (COMP1 *)calloc(sizeof(COMP1), 1)) == 
    338339            (COMP1 *)NULL) 
    339340        return -1; 
     
    346347  if (new == 1) 
    347348  {      /* Fill in the new COMP1 name */ 
    348     this->n2[0] = comp[0];  
     349    this->n2[0] = comp[0]; 
    349350    this->n2[1] = comp[1]; 
    350351  } 
     
    377378  else 
    378379    this->c3[dir].pSCNLPar = (SCNLPAR *)NULL; 
    379    
     380 
    380381  return 0; 
    381382} 
     
    392393 *           -1.0 if the station location could not be determined. 
    393394 */ 
    394 double getStaDist( char *sta, char *comp, char *net, char *loc, double *pLat,  
     395double getStaDist( char *sta, char *comp, char *net, char *loc, double *pLat, 
    395396                   double *pLon, EVENT *pEvt, GMPARAMS *pgmParams) 
    396397{ 
    397398  double r = -1.0;           /* Epicentral distance */ 
    398399  SITE *pSite;               /* Site table entry */ 
    399    
     400 
    400401  switch(pgmParams->staLoc) 
    401402  { 
    402403  case GM_SL_HYP: 
    403     if ( (pSite = find_site( sta, comp, net, loc )) ==  
     404    if ( (pSite = find_site( sta, comp, net, loc )) == 
    404405         (SITE *)NULL) 
    405406    { 
    406       logit("et", "getStaDist: <%s.%s.%s.%s> - Not in station list.\n",  
     407      logit("et", "getStaDist: <%s.%s.%s.%s> - Not in station list.\n", 
    407408            sta, comp, net, loc); 
    408409      return r; 
     
    433434 *    Uses the "tlay" routines for travel-time calculations using 
    434435 *    a single multi-layered regional velocity model. 
    435  */   
     436 */ 
    436437void EstPhaseArrivals(STA *pSta, EVENT *pEvt, int debug) 
    437438{ 
    438439  TPHASE treg[4]; 
    439440  int nreg; 
    440    
     441 
    441442  nreg = t_region(pSta->dist, pEvt->depth, treg); 
    442443  if (nreg == 2) 
    443   {     
     444  { 
    444445    pSta->p_est = treg[0].t; 
    445446    pSta->s_est = treg[1].t; 
     
    450451    pSta->s_est = (treg[1].t < treg[3].t) ? treg[1].t : treg[3].t; 
    451452  } 
    452    
     453 
    453454  if (debug) 
    454455  { 
     
    467468  pSta->p_est += pEvt->origin_time; 
    468469  pSta->s_est += pEvt->origin_time; 
    469    
     470 
    470471  return; 
    471472} 
     
    495496{ 
    496497  double start; 
    497    
     498 
    498499  start = pgmParams->peakSearchStart * (pSta->s_est - pSta->p_est); 
    499500  start = (start > pgmParams->peakSearchStartMin) ? start : 
     
    509510{ 
    510511  double end; 
    511    
     512 
    512513  end = pgmParams->peakSearchEnd * (pSta->s_est - pSta->p_est); 
    513514  end = (end > pgmParams->peakSearchEndMin) ? end : 
     
    525526 *   Returns: 0 on success 
    526527 *           +1 on non-fatal error (no response data for this SCN) 
    527  *           -1 on fatal errors   
    528  */ 
    529 int makeGM(STA *pSta, COMP3 *pComp, GMPARAMS *pgmParams, EVENT *pEvt,  
     528 *           -1 on fatal errors 
     529 */ 
     530int makeGM(STA *pSta, COMP3 *pComp, GMPARAMS *pgmParams, EVENT *pEvt, 
    530531            DATABUF *pTrace) 
    531532{ 
     
    533534  double tTaper, taperFreqs[4] = {1.0, 1.0, 10.0, 10.0}; 
    534535  long padlen, nfft; 
    535   
     536 
    536537  /* reject bad traces (gaps, S/N ratio, etc.)  */ 
    537538  if ( pComp->BadBitmap ) 
    538539     return 1; 
    539   
     540 
    540541  /* Get the instrument response */ 
    541   if ( (rc = getRespPZ(pSta->sta, pComp->name, pSta->net, pComp->loc, pgmParams,  
     542  if ( (rc = getRespPZ(pSta->sta, pComp->name, pSta->net, pComp->loc, pgmParams, 
    542543                       pEvt)) != 0) 
    543544  { 
     
    568569 
    569570  if (pgmParams->debug & (GM_DBG_PZG | GM_DBG_TRS | GM_DBG_ARS) ) 
    570     printf("\nResponse for <%s.%s.%s.%s> delta %e\nftaper %e %e %e %e\n",  
     571    printf("\nResponse for <%s.%s.%s.%s> delta %e\nftaper %e %e %e %e\n", 
    571572           pSta->sta, pComp->name, pSta->net, pComp->loc, pTrace->delta, taperFreqs[0], 
    572573           taperFreqs[1], taperFreqs[2], taperFreqs[3]); 
    573574 
    574575  padlen = -1;  /* let convertWave figure the padding */ 
    575   rc = gma(pTrace->rawData, pTrace->nRaw, pTrace->delta, &gScnPZ, taperFreqs,  
    576            tTaper, &padlen, &nfft, spectPer, NSP, spectDamp, NSD,  
     576  rc = gma(pTrace->rawData, pTrace->nRaw, pTrace->delta, &gScnPZ, taperFreqs, 
     577           tTaper, &padlen, &nfft, spectPer, NSP, spectDamp, NSD, 
    577578           pTrace->procData, pTrace->lenProc, gWork, gWorkFFT); 
    578579  if (rc < 0) 
     
    607608 
    608609  pTrace->padLen = padlen; 
    609    
     610 
    610611  return 0; 
    611612} 
     
    627628  else 
    628629    clipLimit = 7.55e6; /* 90% of 2^23; clip for 24-bit digitizer */ 
    629    
     630 
    630631  /* Fill in the peak-search window limits */ 
    631632  pComp->peakWinStart = peakSearchStart(pSta, pgmParams); 
     
    657658      gapEnd = pGap->starttime + (pGap->lastSamp - pGap->firstSamp + 1) * 
    658659        pTrace->delta; 
    659       if ( (pGap->starttime >= pComp->peakWinStart &&  
     660      if ( (pGap->starttime >= pComp->peakWinStart && 
    660661            pGap->starttime <= pComp->peakWinEnd) || 
    661662           (gapEnd >= pComp->peakWinStart && gapEnd <= pComp->peakWinEnd) || 
    662            (pGap->starttime < pComp->peakWinStart &&  
     663           (pGap->starttime < pComp->peakWinStart && 
    663664            gapEnd > pComp->peakWinEnd) ) 
    664665      { 
     
    675676      npoints++; 
    676677    } 
    677     if (pGap != (GAP *)NULL)     /* Move the counter over this gap */     
     678    if (pGap != (GAP *)NULL)     /* Move the counter over this gap */ 
    678679    { 
    679680      i = pGap->lastSamp + 1; 
     
    681682    } 
    682683  } while (i < pTrace->nRaw ); 
    683    
     684 
    684685  mean /= (double)npoints; 
    685686  if (dMax > clipLimit || dMin < -clipLimit) 
     
    689690    pComp->BadBitmap |= GM_BAD_CLIP; 
    690691  } 
    691    
     692 
    692693  /* Now remove the mean, and set points inside gaps to zero */ 
    693694  i = 0; 
     
    702703      pTrace->rawData[i] -= mean; 
    703704 
    704     if (pGap != (GAP *)NULL)     /* Fill in the gap with zeros */     
     705    if (pGap != (GAP *)NULL)     /* Fill in the gap with zeros */ 
    705706    { 
    706707      for ( ;i < pGap->lastSamp + 1; i++) 
     
    713714   * We hope and pray it isn't the coda of a previous event */ 
    714715  preP = postP = 0.0; 
    715   iEnd = (long)( 0.5 + (pSta->p_est - pTrace->starttime) /  
     716  iEnd = (long)( 0.5 + (pSta->p_est - pTrace->starttime) / 
    716717                 pTrace->delta ); 
    717718  for (i = 0; i < iEnd; i++) 
     
    720721  if (iEnd > 0) 
    721722    preP /= (double)iEnd; 
    722    
    723   iStart = (long)( 0.5 + (pComp->peakWinStart - pTrace->starttime) /  
     723 
     724  iStart = (long)( 0.5 + (pComp->peakWinStart - pTrace->starttime) / 
    724725                   pTrace->delta ); 
    725726  if (iStart < 0 ) 
    726727    iStart = 0; 
    727   iEnd = (long)( 0.5 + (pComp->peakWinEnd - pTrace->starttime ) /  
     728  iEnd = (long)( 0.5 + (pComp->peakWinEnd - pTrace->starttime ) / 
    728729                 pTrace->delta); 
    729730  if (iEnd > pTrace->nRaw) 
     
    734735  if (iEnd > iStart) 
    735736    postP /= (double)(iEnd - iStart); 
    736    
     737 
    737738  if (postP < preP * pgmParams->snrThresh) 
    738739  { 
    739740    logit("et", "prepTrace: <%s.%s.%s.%s> event signal (%5g) too small for pre-event threshold (%5g)\n", 
    740           pSta->sta, pComp->name, pSta->net, pComp->loc, postP,  
     741          pSta->sta, pComp->name, pSta->net, pComp->loc, postP, 
    741742          pgmParams->snrThresh * preP); 
    742743    pComp->BadBitmap |= GM_LOW_SNR; 
     
    787788  long i, iStart, iEnd;  /* start and end of peak-search window */ 
    788789  int isp; 
    789    
     790 
    790791  memset(pSms, 0, sizeof(SM_INFO)); 
    791792  strcpy(pSms->sta, pSta->sta); 
     
    796797  strcpy(pSms->qid, pEvt->eventId); 
    797798  strcpy(pSms->qauthor, pEvt->authorId); 
    798    
     799 
    799800  pSms->talt = 0.0; 
    800801  pSms->altcode = SM_ALTCODE_NONE; 
    801802  pSms->tload = -1.0; 
    802    
     803 
    803804  /* Search for the extrema in acc, vel, disp */ 
    804805  if ( pEvt->eventId[0]==0 ) { 
     
    806807        pComp->peakWinEnd = pComp->peakWinStart + pgmParams->alarmDuration; 
    807808  } 
    808   iStart = (long)( 0.5 + (pComp->peakWinStart - pTrace->starttime) /  
     809  iStart = (long)( 0.5 + (pComp->peakWinStart - pTrace->starttime) / 
    809810                                   pTrace->delta ); 
    810811  if (iStart < 0 ) 
    811812        iStart = 0; 
    812   iEnd = (long)( 0.5 + (pComp->peakWinEnd - pTrace->starttime ) /  
     813  iEnd = (long)( 0.5 + (pComp->peakWinEnd - pTrace->starttime ) / 
    813814                                 pTrace->delta); 
    814815  if (iEnd > pTrace->nProc) 
    815816        iEnd = pTrace->nProc; 
    816    
     817 
    817818  if (pgmParams->debug & GM_DBG_TIME) 
    818819  { 
    819     logit("e", "trace start: %10.4lf end: %10.4lf (%ld)\n",  
     820    logit("e", "trace start: %10.4lf end: %10.4lf (%ld)\n", 
    820821          pTrace->starttime - pEvt->origin_time, 
    821822          pTrace->endtime - pEvt->origin_time, pTrace->nProc); 
    822     logit("e", "search start: %10.4lf (%ld) end: %10.4lf (%ld)\n",  
    823           pComp->peakWinStart - pEvt->origin_time, iStart,  
     823    logit("e", "search start: %10.4lf (%ld) end: %10.4lf (%ld)\n", 
     824          pComp->peakWinStart - pEvt->origin_time, iStart, 
    824825          pComp->peakWinEnd - pEvt->origin_time, iEnd); 
    825826  } 
     
    828829  vel = &pTrace->procData[pTrace->lenProc]; 
    829830  disp = &pTrace->procData[pTrace->lenProc * 2]; 
    830    
     831 
    831832  mAcc = mVel = mDisp = 0.0; 
    832833  iAcc = iVel = iDisp = -1; 
     
    852853  pSms->tpga = pTrace->starttime + pTrace->delta * iAcc; 
    853854  pSms->t = pSms->tpga; 
    854    
     855 
    855856  pSms->pgv = mVel; 
    856857  pSms->tpgv = pTrace->starttime + pTrace->delta * iVel; 
    857858  if (pSms->tpgv < pSms->t) pSms->t = pSms->tpgv; 
    858    
     859 
    859860  pSms->pgd = mDisp; 
    860861  pSms->tpgd = pTrace->starttime + pTrace->delta * iDisp; 
    861862  if (pSms->tpgd < pSms->t) pSms->t = pSms->tpgd; 
    862    
     863 
    863864  /* Search for peak Spectral Response values.             * 
    864865   * This section is hard-coded to use the first           * 
    865    * spectDamp value, which is 0.05 as needed by ShakeMap. */  
    866   iStart = (long)( 0.5 + (pComp->peakWinStart - pTrace->starttime) /  
     866   * spectDamp value, which is 0.05 as needed by ShakeMap. */ 
     867  iStart = (long)( 0.5 + (pComp->peakWinStart - pTrace->starttime) / 
    867868                   pTrace->delta ); 
    868869  if (iStart < 0 ) 
     
    872873   * may occur  after the forcing is completed.      */ 
    873874  iEnd = pTrace->nProc + pTrace->padLen; 
    874    
     875 
    875876  for (isp = 0; isp < NSP; isp++) 
    876877  { 
     
    879880    for (i = iStart; i < iEnd; i++) 
    880881    { 
    881       if (mPsa < fabs(psa[i]))  
     882      if (mPsa < fabs(psa[i])) 
    882883      { 
    883884        mPsa = fabs(psa[i]); 
     
    891892  } 
    892893  pSms->nrsa = NSP; 
    893    
     894 
    894895  if (pgmParams->ariasIntensity) 
    895896  { 
     
    912913{ 
    913914  GAP *pGap; 
    914    
     915 
    915916  pTrace->nRaw = 0L; 
    916917  pTrace->nProc = 0L; 
     
    919920  pTrace->endtime = 0.0; 
    920921  pTrace->nGaps = 0; 
    921    
     922 
    922923  /* Clear out the gap list */ 
    923924  pTrace->nGaps = 0; 
     
    933934 * initBufs: allocate the three arrays needed for handling trace data 
    934935 *           The argument reqLen is the reqeusted length; this value 
    935  *           is used for the raw data array. That value or larger,  
     936 *           is used for the raw data array. That value or larger, 
    936937 *           if needed to find a multiple of the FFT factors, is used 
    937938 *           for the size of the processed data array. The work array 
     
    947948  long nfft; 
    948949  FACT *pF; 
    949    
     950 
    950951  /* Array for input data */ 
    951952  if ( (gTrace.rawData = (double *)malloc(reqLen * sizeof(double))) == 
     
    956957  } 
    957958  gTrace.lenRaw = reqLen; 
    958    
     959 
    959960  if ( (nfft = prepFFT( reqLen, &pF)) < 0) 
    960961  { 
     
    962963    return -1; 
    963964  } 
    964    
     965 
    965966  /* Number of processed data arrays: 3 for acc, vel and disp, plus * 
    966967   * the ones needed for Spectral Response */ 
    967968  gTrace.numProc = 3 + NSD * NSP; 
    968   if ( (gTrace.procData =  
    969         (double *)malloc(gTrace.numProc * (nfft + FFT_EXTRA) *  
     969  if ( (gTrace.procData = 
     970        (double *)malloc(gTrace.numProc * (nfft + FFT_EXTRA) * 
    970971                         sizeof(double))) == (double*)NULL) 
    971972  { 
     
    974975  } 
    975976  gTrace.lenProc = nfft + FFT_EXTRA; 
    976    
     977 
    977978  /* Work array for frequency response functions in gma:  * 
    978979   * 3 for acc, vel, disp, plus one for Spectral Response */ 
    979   if ( (gWork = (double *)malloc(4 * (nfft + 2) *  
     980  if ( (gWork = (double *)malloc(4 * (nfft + 2) * 
    980981                                 sizeof(double))) == (double*)NULL) 
    981982  { 
     
    985986 
    986987  /* Work array for Temperton FFTs */ 
    987   if ( (gWorkFFT =  
    988         (double *)malloc(gTrace.numProc * (nfft + FFT_EXTRA) *  
     988  if ( (gWorkFFT = 
     989        (double *)malloc(gTrace.numProc * (nfft + FFT_EXTRA) * 
    989990                         sizeof(double))) == (double*)NULL) 
    990991  { 
     
    10551056  else if (*d1 > *d2) 
    10561057    return 1; 
    1057    
     1058 
    10581059  return 0; 
    10591060} 
     
    10701071 *           +1 on non-fatal errors 
    10711072 */ 
    1072 static int getRespPZ(char *sta, char *comp, char *net, char *loc, GMPARAMS *pgmParams,  
     1073static int getRespPZ(char *sta, char *comp, char *net, char *loc, GMPARAMS *pgmParams, 
    10731074              EVENT *pEvt) 
    10741075{ 
    10751076  char respfile[PATH_MAX]; 
    10761077  int len, rc; 
    1077    
     1078 
    10781079  /* Make sure the respone structure doesn't have any old memory allocated */ 
    10791080  cleanPZ(&gScnPZ); 
    10801081  memset(respfile, 0, PATH_MAX); 
    1081    
     1082 
    10821083  switch(pgmParams->respSource) 
    10831084  { 
     
    10921093    break; 
    10931094  default: 
    1094     logit("et", "getRespPZ: unknown response source <%d>\n",  
     1095    logit("et", "getRespPZ: unknown response source <%d>\n", 
    10951096          pgmParams->respSource); 
    10961097    return -1; 
    10971098  } 
    1098    
     1099 
    10991100  /* Continue preparing respfile for PZ access: */ 
    11001101  len = strlen(respfile); 
     
    11041105    len++; 
    11051106  } 
    1106   if (fmtFilename(sta, comp, net, loc, respfile, PATH_MAX - len,  
     1107  if (fmtFilename(sta, comp, net, loc, respfile, PATH_MAX - len, 
    11071108                  pgmParams->respNameFormat) < 0) 
    11081109  { 
     
    11181119      break; 
    11191120    case -2: 
    1120       logit("et", "getRespPZ: error parsing pole-zero file <%s> for <%s.%s.%s.%s>\n",  
     1121      logit("et", "getRespPZ: error parsing pole-zero file <%s> for <%s.%s.%s.%s>\n", 
    11211122            respfile, sta, comp, net, loc); 
    11221123      return +1;  /* Maybe the other resp files will work */ 
     
    11261127      break; 
    11271128    case -4: 
    1128       logit("et", "getRespPZ: error opening pole-zero file <%s> for <%s.%s.%s.%s>\n",  
     1129      logit("et", "getRespPZ: error opening pole-zero file <%s> for <%s.%s.%s.%s>\n", 
    11291130            respfile, sta, comp, net, loc); 
    11301131      return +1;  /* Maybe the other resp files will work */ 
     
    11511152 
    11521153  /* Call `endEvent' for those data sinks that may need it: EWDB? */ 
    1153    
     1154 
    11541155  /* Clean up the EVENT structure in preparation for next event */ 
    11551156  for (i = 0; i < pgmParams->maxSta; i++) 
     
    12031204int addSR2list( double newSR ) { 
    12041205        if ( NSP == SM_MAX_RSA ) { 
    1205                 logit( "w", "Maximum of %d spectral periods allowed; ignoring '%lf'\n",  
     1206                logit( "w", "Maximum of %d spectral periods allowed; ignoring '%lf'\n", 
    12061207                        SM_MAX_RSA, newSR ); 
    12071208                return 1; 
     
    12131214 
    12141215/* 
    1215  * checkSRlist: if list of spectra responses to be processed is empty,  
     1216 * checkSRlist: if list of spectra responses to be processed is empty, 
    12161217 *           fill w/ default list 
    12171218 *   Returns: 0 on success 
Note: See TracChangeset for help on using the changeset viewer.