Changeset 4971


Ignore:
Timestamp:
07/23/12 15:44:41 (6 years ago)
Author:
paulf
Message:

1.0.9 version of binder_ew to fix culling quality check (as in, I didn't put it there, just assoc)

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

Legend:

Unmodified
Added
Removed
  • trunk/src/seismic_processing/binder_ew/bind.c

    r4922 r4971  
    996996        int is; 
    997997        int nscav; 
     998        int do_not_scavenge;  /* used in quality checks as a flag to indicate this is a lower qual pick for a given station */ 
    998999 
    9991000        nscav = 0; 
     
    10741075                       Site[is].net, Site[is].loc,   
    10751076                       rhyp, tres, Phs[iph]); 
     1077                    continue; 
    10761078                  } else if (is_an_S_phase(iph) && no_S_on_Z && !is_component_horizontal(Site[is].comp[2])) { 
    10771079                    logit( "t", 
     
    10801082                       Site[is].net, Site[is].loc,   
    10811083                       rhyp, tres, Phs[iph]); 
    1082                   } else { 
    1083                         logit( "t", "  bind : %8d %-5s %-3s %-2s %-2s %6.2f %6.2f - Scavenged as %s\n", 
    1084                                 lquake, Site[is].name, Site[is].comp,  
    1085                                 Site[is].net, Site[is].loc,  
    1086                                 rhyp, tres, Phs[iph]); 
    1087                         if(pPick[ip].quake != 0) 
    1088                                 bind_touch(pPick[ip].quake); 
    1089                         pPick[ip].quake = lquake; 
    1090                         pPick[ip].phase = iph; 
    1091                         bndr_link(lquake, l); 
    1092                         nscav++; 
     1084                    continue; 
    10931085                  } 
     1086                  /* add in check to see if same station has same phase already assoc, but higher quality, don't scavenge in poorer quality picks */ 
     1087                  do_not_scavenge = 0;   /* flag to use this pick if not already associated  for this station */ 
     1088                  for (i=0;i < mPick; i++) { 
     1089                       /* higher quality case */ 
     1090                       if (pPick[i].quake == lquake && (pPick[i].site == is || is_same_SNL(is, pPick[i].site)) && 
     1091                           pPick[i].phase == iph && pPick[i].wt < pPick[ip].wt) { 
     1092                           logit( "t",  
     1093       " rejected (already assoc %s with higher quality pick at this sta): %8d %-5s %-3s %-2s %-2s %6.2f %6.2f - Would have Scavenged. as %s\n", 
     1094                                 Phs[iph], lquake, Site[is].name, Site[is].comp,  
     1095                                 Site[is].net, Site[is].loc,   
     1096                                 rhyp, tres, Phs[iph]); 
     1097                           do_not_scavenge = 1; 
     1098                           continue; 
     1099                       } 
     1100                       /* what if there was a lower quality phase already linked */ 
     1101                       if (pPick[i].quake == lquake && (pPick[i].site == is || is_same_SNL(is, pPick[i].site)) && 
     1102                           pPick[i].phase == iph && pPick[i].wt > pPick[ip].wt) { 
     1103                           logit( "t",  
     1104       " Found a prior %s pick with poorer quality (%c) at same sta, Unlinking it: %8d %-5s %-3s %-2s %-2s as %s\n", 
     1105                                 Phs[iph], pPick[i].wt, lquake, Site[pPick[i].site].name, Site[pPick[i].site].comp,  
     1106                                 Site[pPick[i].site].net, Site[pPick[i].site].loc, Phs[iph]); 
     1107                           pPick[i].quake = 0; 
     1108                           bndr_link(0, i); 
     1109                           continue; 
     1110                       } 
     1111                       /* case of same quality same phase at same station, choose earlier one */ 
     1112                       if (pPick[i].quake == lquake && (pPick[i].site == is || is_same_SNL(is, pPick[i].site)) && 
     1113                           pPick[i].phase == iph && pPick[i].wt == pPick[ip].wt) { 
     1114                           if (pPick[i].t > pPick[ip].t) { 
     1115                               logit( "t",  
     1116       " Found a later %s pick with same quality (%c) at same sta, Unlinking it: %8d %-5s %-3s %-2s %-2s as %s\n", 
     1117                                 Phs[iph], pPick[i].wt, lquake, Site[pPick[i].site].name, Site[pPick[i].site].comp,  
     1118                                 Site[pPick[i].site].net, Site[pPick[i].site].loc, Phs[iph]); 
     1119                               pPick[i].quake = 0; 
     1120                               bndr_link(0, i); 
     1121                               continue; 
     1122                           } 
     1123                           /* otherwise this one is the later one, reject it */ 
     1124                           logit( "t",  
     1125       " rejected (already assoc %s with same quality pick at this sta but earlier): %8d %-5s %-3s %-2s %-2s %6.2f %6.2f - Would have Scavenged. as %s\n", 
     1126                                 Phs[iph], lquake, Site[is].name, Site[is].comp,  
     1127                                 Site[is].net, Site[is].loc,   
     1128                                 rhyp, tres, Phs[iph]); 
     1129                           do_not_scavenge = 1; 
     1130                           continue; 
     1131                       } 
     1132                } /* end of for loop testing prior associations */ 
     1133                if (do_not_scavenge) continue; /* don't use this pick because it failed some quality tests above */ 
     1134                logit( "t", "  bind : %8d %-5s %-3s %-2s %-2s %6.2f %6.2f - Scavenged as %s\n", 
     1135                       lquake, Site[is].name, Site[is].comp,  
     1136                       Site[is].net, Site[is].loc,  
     1137                       rhyp, tres, Phs[iph]); 
     1138                if(pPick[ip].quake != 0) 
     1139                       bind_touch(pPick[ip].quake); 
     1140                pPick[ip].quake = lquake; 
     1141                pPick[ip].phase = iph; 
     1142                bndr_link(lquake, l); 
     1143                nscav++; 
    10941144                } 
    10951145        } 
  • trunk/src/seismic_processing/binder_ew/binder_ew.c

    r4893 r4971  
    8585/* paulf - v1.0.8 - changed the association to unlink lower quality picks of same phase on same station, if equal quality on same phase, then 
    8686                    the code chooses the earlier of the two picks */ 
    87 #define BINDER_VERSION "1.0.8 2012.07.10" 
     87/* paulf - v1.0.9 - missed the scavenge check in 1.0.8, now bind_scavenge does the same things as assoc tests */ 
     88#define BINDER_VERSION "1.0.9 2012.07.23" 
    8889 
    8990#include <stdio.h> 
Note: See TracChangeset for help on using the changeset viewer.