Changeset 7400


Ignore:
Timestamp:
05/01/18 23:13:13 (6 months ago)
Author:
baker
Message:

silence warning: using the result of an assignment as a condition without parentheses

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/seismic_processing/raypicker/pick_series.c

    r7284 r7400  
    463463       */ 
    464464      c_sta_end = staSeries->sta_write_point - 1; 
    465     
     465 
    466466      /* maximum backdown when looking for trigger arrival, 
    467467       * that is, the farthest distance to search for the wave start. 
    468        *  
     468       * 
    469469       * Don't backdown more than 1/2 of the maximum phase width */ 
    470470      maxbackdown = (long)(rateConstants->maxph * 0.5); 
    471                  
     471 
    472472      STA_History = staSeries->sta_buffer; 
    473         
     473 
    474474      /* Initialize the pick refinement locations 
    475        * relative to the sta_write_point. */                   
     475       * relative to the sta_write_point. */ 
    476476      if ((a1 = c_sta_end - 3) < 0) 
    477477          a1 += c_sta_length; 
    478            
     478 
    479479      /* 
    480480       * It is expected that processing will arrive here when a possible trigger 
     
    484484       * be on the "trailing edge" because the leading edge would have already 
    485485       * caused this code to be executed. 
    486        *  
     486       * 
    487487       * Therefore, the idea is to work backwards in time -- down that signal -- 
    488488       * until a zero-crossing is found.  The time of that zero-crossing is 
    489489       * considered to be the pick time. 
    490        *  
     490       * 
    491491       * One might note that is is not the raw or pre-filtered data that is 
    492492       * used for this, but rather the STA series.  This is because some 
     
    496496       * cause the calculated pick time to be later than appropriate. 
    497497       */ 
    498              
     498 
    499499      /* FORTRAN LINE 30 */ 
    500       while (staSeries->mid_trigger < STA_History[a1]) /* if(bt1(k1).le.xmt1) go to 31 */ 
     500      while ( staSeries->mid_trigger < STA_History[a1] ) /* if(bt1(k1).le.xmt1) go to 31 */ 
    501501      { 
    502502          /* move working index back one point */ 
    503           if ((--a1) < 0) 
     503          if ( (--a1) < 0 ) 
    504504              a1 += c_sta_length; 
    505                       
    506           if ((a1 == c_sta_end)) /* if(k1-ntb)30,32,30 */ 
     505 
     506          if ( a1 == c_sta_end ) /* if(k1-ntb)30,32,30 */ 
    507507          { 
    508508              /* Backed past the earliest sta value available 
    509509               * go to 32 */ 
    510510              /* k1 = k1 % ntblm + 1;   LINE 32, then go to 41 */ 
    511                          
     511 
    512512              /* adjust to the earliest time index */ 
    513               if ((++a1) == c_sta_length) 
     513              if ( (++a1) == c_sta_length ) 
    514514                  a1 = 0; 
    515515              foundarrival = TRUE;  /* go to 41 */ 
    516                           break; 
     516              break; 
    517517          } 
    518518      } 
    519                 
    520                 
     519 
    521520      if (!foundarrival) 
    522521      { 
    523522          /*   Compute a new search threshold. */ 
    524                 
     523 
    525524          /* FORTRAN LINE 31 */ 
    526      
     525 
    527526          cc = 0.5 * (staSeries->lta + staSeries->mid_trigger); 
    528     
     527 
    529528          if ((a2 = a1 + 1) == c_sta_length) 
    530529              a2 = 0; 
    531     
     530 
    532531          if ((a3 = a2 + 1) == c_sta_length) 
    533532              a3 = 0; 
Note: See TracChangeset for help on using the changeset viewer.