Changeset 1167 for SHX


Ignore:
Timestamp:
08.02.2016 17:44:16 (4 years ago)
Author:
klaus
Message:

bugfix in amplitude display; little progress in compare_location

Location:
SHX/trunk/SeismicHandler/modules
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/modules/seismics.py

    r1165 r1167  
    464464    evpar['includeallorigins'] = False 
    465465    evpar['includeallmagnitudes'] = False 
     466    resultstr = "" 
    466467    for src in cmplist.split(','): 
    467468        client = Client( src ) 
     
    473474            magn = ev.magnitudes[0] 
    474475            origdiff = origin - orig.time 
     476            depdiff = depth - orig.depth/1000. 
    475477            dist, az, baz = gps2DistAzimuth( lat, lon, orig.latitude, 
    476478                orig.longitude ) 
    477479            kmdist = dist / 1000. 
    478480            degdist = kmdist / DEG_TO_KM 
    479             print "%s: locdiff %3.1f km or %4.2f deg, timediff %3.1f s" % (src, 
    480                 kmdist,degdist,origdiff) 
     481            resultstr += "%s: locdiff %3.1f km or " % (src,kmdist)\ 
     482                +"%4.2f deg, timediff %3.1f s, " % (degdist,origdiff)\ 
     483                +"depdiff %3.1f\n" % depdiff 
    481484            if centerlat == None or centerlon == None: 
    482485                continue 
     
    497500                        cmpval = a.ray_param_sec_degree 
    498501                        break 
     502                resultstr += "   slowness %s %3.1f" % (phase,ownslowness) 
    499503                if cmpval != None: 
    500504                    print "dbg: slownesses", phase, ownslowness, cmpval 
    501  
    502  
    503 #------------------------------------------------------------------------------- 
     505                    resultstr += ", diff %3.1f" % (ownslowness-cmpval) 
     506                resultstr += '\n' 
     507    print "dbg:", resultstr 
     508    return resultstr 
     509 
     510 
     511#------------------------------------------------------------------------------- 
  • SHX/trunk/SeismicHandler/modules/wx_.py

    r1166 r1167  
    297297        else: 
    298298            drawtrc = othertrace 
    299         amplscale = 1./norm * self.pixheight/2. 
     299        # negative scaling due to inversed pixel addressing in y direction 
     300        amplscale = -1./norm * self.pixheight/2. 
    300301        self._magn_bitmap = wx.EmptyBitmap(self.pixwidth, self.pixheight) 
    301302        mdc = wx.MemoryDC(self._magn_bitmap) 
     
    17711772        except: 
    17721773            trczoom = 1.0 
    1773         amplscale = 1. / norm * height / 2 * zoom * trczoom 
     1774        # negative scaling due to inversed pixel addressing in y direction 
     1775        amplscale = -1. / norm * height / 2 * zoom * trczoom 
    17741776        return zip( 
    17751777            np.linspace( 0., pixel_width, len(pt.data) ), 
Note: See TracChangeset for help on using the changeset viewer.