Changeset 1137


Ignore:
Timestamp:
21.01.2016 18:35:20 (4 years ago)
Author:
klaus
Message:

bugfixes

Location:
SHX/trunk/SeismicHandler
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/commands/sum_.py

    r1063 r1137  
    6969 
    7070        sumtrace = self.summation(traces, start, end, norm) 
     71        if len(sumtrace.data) == 0: 
     72            print "empty sum trace deleted" 
     73            del( sumtrace ) 
     74            return 
    7175 
    7276        result = "%d traces summed" % len(traces) 
  • SHX/trunk/SeismicHandler/modules/wx_.py

    r1136 r1137  
    11591159        "Return polygon ready for plotting via wx." 
    11601160 
    1161         # get data slice of current time window 
    1162         if not timewindow: 
    1163             # use trace's total dimensions 
    1164             windowstart, windowend = (trc.get_info("relstart"), 
    1165                 trc.get_info("relend")) 
    1166         else: 
    1167             windowstart, windowend = timewindow 
     1161        windowstart, windowend = timewindow 
    11681162        try: 
    11691163            pt = trc.slice_relative(windowstart, windowend) 
    11701164        except: 
    1171             return None 
     1165            return [] 
    11721166             
    11731167        # scaling in time direction 
     
    11981192        amplscale = 1. / norm * height / 2 * zoom * trczoom 
    11991193        return zip( 
    1200             np.linspace( 0., width, len(pt.data) ), 
     1194            np.linspace( 0., pixel_width, len(pt.data) ), 
    12011195            pt.data*amplscale + height/2 
    12021196        ) 
Note: See TracChangeset for help on using the changeset viewer.