Changeset 383


Ignore:
Timestamp:
05/12/2011 06:10:19 PM (12 years ago)
Author:
marcus
Message:
  • experiments with fast plotting
  • patching obspy stream for automatic trace merging (standard SH behaviour)
Location:
SHX/trunk
Files:
4 added
2 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/__init__.py

    r244 r383  
    11# -*- coding: utf-8 -*- 
    22# 
    3 # Copyright (C) 2008-2010 Marcus Walther (walther@szgrf.bgr.de) 
     3# Copyright (C) 2008-2011 Marcus Walther (walther@szgrf.bgr.de) 
    44# 
    55# This file is part of Seismic Handler eXtended (SHX) 
     
    1919# along with SHX (see license.txt); if not, write to the Free Software 
    2020# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA 
     21 
     22# patching obspy's Trace and Stream 
     23from obspy.core import Trace, Stream 
     24from SeismicHandler.patches.obspy import * 
     25 
     26# traces in a stream are merge automatically 
     27Stream.__shx_init__, Stream.__init__ = Stream.__init__, streamAutoMergeInit 
     28Stream.__shx_append, Stream.append = Stream.append, streamAutoMergeAppend 
     29Stream.__shx_extend, Stream.extend = Stream.extend, streamAutoMergeExtend 
     30Stream.__shx_insert, Stream.insert = Stream.insert, streamAutoMergeInsert 
     31Stream.__shx_add__, Stream.__add__ = Stream.__add__, streamAutoMergeAdd 
     32 
     33# add method for faster plotting 
     34Trace.shx_prepareImageData = tracePrepareDataForImage 
  • SHX/trunk/sandbox/GraphicsContext.py

    r378 r383  
    2828#        buffer = wx.PaintDC(self) 
    2929        buffer.Clear() 
    30          
    3130 
    3231#        printer = wx.PrintData() 
    3332#        dc = wx.PostScriptDC(printer) 
    3433        # only for screen, not for print nor postscript 
    35 #        dc = wx.GraphicsContext.Create(buffer) 
     34 
     35        # SetAxisOrientation doesn't work in versions <2.9. 
     36        # http://trac.wxwidgets.org/ticket/4010 
    3637#        dc = wx.GCDC(buffer) 
    3738        dc = buffer 
     
    4142 
    4243        dc.BeginDrawing() 
    43         dc.DrawLines([[10,10],[100,200]]) 
     44        dc.DrawLines([[10,-10],[100,200]]) 
    4445        dc.CrossHair(150,100) 
    4546        dc.EndDrawing() 
Note: See TracChangeset for help on using the changeset viewer.