Changeset 1041 for SHX/trunk


Ignore:
Timestamp:
02.12.2015 17:26:52 (5 years ago)
Author:
klaus
Message:

title im mplplot; change licence text concerning BGR and DFG

Location:
SHX/trunk/SeismicHandler
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • SHX/trunk/SeismicHandler/basics/codes.py

    r889 r1041  
    1010Seismic Handler eXtended version %s, Copyright by Marcus Walther. C library 
    1111code originates from Seismic Handler by Klaus Stammler and others. Software 
    12 development was funded by Federal Institute for Geosciences and Natural 
    13 Resources (http://www.bgr.bund.de/) and German Research Foundation (Deutsche 
    14 Forschungsgemeinschaft - http://www.dfg.de/en/). 
     12development was funded by the German Research Foundation (Deutsche 
     13Forschungsgemeinschaft, DFG - http://www.dfg.de/en/) and supported by the 
     14Federal Institute for Geosciences and Natural Resources (Bundesanstalt fuer 
     15Geowissenschaften und Rohstoffe, BGR - http://www.bgr.bund.de/). 
    1516  
    1617Seismic Handler eXtended comes with ABSOLUTELY NO WARRANTY. This is free 
  • SHX/trunk/SeismicHandler/commands/help.py

    r1040 r1041  
    1010from SeismicHandler.basics.messages import get_runtime 
    1111import os 
    12 import numpy as np 
    13 import matplotlib.pyplot as plt 
    1412 
    1513firststeps = """ 
    1614First steps: 
     15------------ 
    1716 
    18     # Open graphic window: 
    19         wdw/gc=x1h/main create xh1 0. 6.8 33.9 22. 
    20         # or 
    21         xopen;; 
    22      
    23     # Read 10 min of data from arclink server (server see setup in 
    24     # $HOME/.shx/shx.conf) and store metadata in local database 
    25         fetch gr.gra1. bh zne 7-aug-15_00:16 600 /storemeta 
    26         fetch gr.gra1.,gr.gra2.,gr.gra3. bh z 7-aug-15_00:16 600 /storemeta 
    27      
    28     # Write first 3 traces to local Q file MYQFILE 
    29         write myqfile 1-3 
    30      
    31     # Read data from local Q file MYQFILE 
    32         read myqfile all 
    33      
    34     # Read 10 min of z-component data from all stations within area centered 
    35     # at (51.0,10.0) and +- 2.0 degrees interval in lat and lon. Store all 
    36     # data and metadata locally. 
    37         fetch_area 51. 10. 2. bh,sh,hh,eh 7-aug-15_00:16:30 600 /comp=z /save /storemeta 
     17# Open graphic window: 
     18    wdw/gc=x1h/main create xh1 0. 6.8 33.9 22. 
     19    # or 
     20    xopen;; 
     21 
     22# Read 10 min of data from arclink server (server see setup in 
     23# $HOME/.shx/shx.conf) and store metadata in local database 
     24    fetch gr.gra1. bh zne 7-aug-15_00:16 600 /storemeta 
     25    fetch gr.gra1.,gr.gra2.,gr.gra3. bh z 7-aug-15_00:16 600 /storemeta 
     26 
     27# Write first 3 traces to local Q file MYQFILE 
     28    write myqfile 1-3 
     29 
     30# Read data from local Q file MYQFILE 
     31    read myqfile all 
     32 
     33# Read 10 min of z-component data from all stations within area centered 
     34# at (51.0,10.0) and +- 2.0 degrees interval in lat and lon. Read the first 
     35# channel found in the list of 'bh,sh,hh,eh'. Store all data and metadata 
     36# locally. 
     37    fetch_area 51. 10. 2. bh,sh,hh,eh 7-aug-15_00:16:30 600 /comp=z /save /storemeta 
    3838""" 
    3939 
  • SHX/trunk/SeismicHandler/commands/mplplot.py

    r1040 r1041  
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShDisplay 
    1818    """ 
    19     numberOfParameters = [3] 
     19    numberOfParameters = [4] 
    2020    parameterQueries = [ 
    2121        { 
     
    3434            "question": False, 
    3535        }, 
     36        { 
     37            "text": "title", 
     38            "type": "str", 
     39            "question": False, 
     40        }, 
    3641    ] 
    3742 
     
    4348        "Here is the plotting done." 
    4449 
    45         # get parameter (outfile,normtype) 
     50        # get parameters (outfile,normtype,colors,title) 
    4651        outfile = self.parameters[0] 
    4752        try: 
     
    5358        except: 
    5459            colliststr = None 
     60        try: 
     61            title = self.parameters[3] 
     62        except: 
     63            title = None 
    5564         
    5665        # get color list from color list string 
     
    6170 
    6271        # prepare MPL plot 
     72        wdwset = False 
    6373        fig, ax = plt.subplots() 
    6474        timea, timeb = get_runtime("timewindow")  # contains time window ('stw') 
    6575        if timea != None and timeb != None: 
    6676            ax.set_xlim( timea, timeb ) 
     77            wdwset = True 
    6778        ax.set_xlabel( "time in s" ) 
     79        if title: 
     80            ax.set_title( title ) 
    6881 
    6982        displaydata = [] 
    7083        maxval = None 
     84        minx = None 
     85        maxx = None 
    7186 
    7287        # loop all traces, determine normalization and store data 
     
    87102            if maxval == None or maxv > maxval: 
    88103                maxval = maxv 
     104            # store maximum time window in case not given 
     105            if minx == None or t_origin < minx: 
     106                minx = t_origin 
     107            endtime = t_origin + len(t.data)*t.stats.delta 
     108            if maxx == None or endtime  > maxx: 
     109                maxx = endtime 
     110             
    89111         
     112        # set time window if not yet done 
     113        if not wdwset: 
     114            ax.set_xlim( minx, maxx ) 
    90115        # plot all stored seismograms 
    91116        ypos = 0.5 
  • SHX/trunk/SeismicHandler/commands/write.py

    r726 r1041  
    6060 
    6161        portions = Stream() 
    62         import pdb; pdb.set_trace() 
     62        #import pdb; pdb.set_trace() 
    6363        for t in stream: 
    6464            portions.append(t.slice_relative(start, end)) 
Note: See TracChangeset for help on using the changeset viewer.