Changeset 1032 for SHX/trunk


Ignore:
Timestamp:
08/19/15 20:40:06 (5 years ago)
Author:
klaus
Message:

activate zoom variable; fix deep copy recursion bug on trace copy

File:
1 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/patches/obspy_.py

    r931 r1032  
    167167    # Use a copy to save time if only y changes occur (e.g. zooming). 
    168168    # Apply normation, calibration and total height factor 
     169    try: 
     170        trczoom = self.stats.sh.ZOOM 
     171    except: 
     172        trczoom = 1.0 
    169173    y = self.shx.PlotData.copy() 
    170     y *= self.stats.calib / norm * height / 2 * zoom 
     174    y *= self.stats.calib / norm * height / 2 * zoom * trczoom 
    171175 
    172176#    print self.shxPlotData.min(), self.shxPlotData.max(), y.min(), y.max() 
     
    438442    Return copy of trace with respect to NOCOPY flags. 
    439443    """ 
     444     
     445    # exclude parent from deepcopy 
     446    parentstore = self.shx._parent 
     447    self.shx._parent = None 
    440448    new = self._obspy_copy() 
     449    self.shx._parent = parentstore 
     450    new.shx._parent = parentstore 
    441451 
    442452    # check for info entries that may not be copied: 
Note: See TracChangeset for help on using the changeset viewer.