Changeset 1171 for SHX


Ignore:
Timestamp:
09.02.2016 22:52:10 (4 years ago)
Author:
klaus
Message:

started to put help texts in command source; access to help texts

Location:
SHX/trunk/SeismicHandler
Files:
56 edited

Legend:

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

    r1156 r1171  
    207207        print "maxlocklength: %d" % self.maxlocklength 
    208208 
     209 
     210class CommandDocs: 
     211    "Access command docs from all modules preventing import loops." 
     212    __metaclass__ = Singleton 
     213    def __init__( self ): 
     214        self.docdict = None 
     215    def getDoc( self, cmd ): 
     216        return self.docdict.get(cmd.lower(),"") 
     217    def getCommands( self ): 
     218        return self.docdict.keys() 
     219    def setDict( self, docdict ): 
     220        self.docdict = docdict 
    209221 
    210222class EventTextParser: 
  • SHX/trunk/SeismicHandler/commands/al.py

    r1063 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShAl 
     18 
     19    [Wiki Doc Text] 
     20 
     21    == align traces == 
     22 
     23    '''command''': AL [<trc-list> <time-info>] [<time-pos>] 
     24 
     25    Aligns traces along points selected by values of the specified time info entries.  Only traces given in <trc-list> are affected. If parameters one and two are omitted you have to select the traces and time points by graphic cursor.  Cursor selection is finished by the "E"-key. After the (automatic) redraw each trace has its selected point at time position <time-pos> (if <time-pos> is omitted it is set to zero). 
     26 
     27    === parameters === 
     28 
     29     * <trc-list> ''parameter type: trace list''[[br]] 
     30      List of traces to be aligned.  If omitted, traces must be selected by graphic cursor. 
     31 
     32     * <time-info>  ''parameter type: info entry''[[br]] 
     33      Name of time info entry to be used for aligning traces. 
     34 
     35     * <time-pos>  ''parameter type: real''[[br]] 
     36      Picked points of traces are positioned at this time.  If the parameter is omitted, it is set to zero. 
     37 
     38    === qualifiers === 
     39 
     40     * /nomark[[br]] 
     41       Only valid if <trc-list> & <time-info> are omitted.  The selected time points are not marked. 
     42 
     43 
     44    === examples === 
     45 
     46     `al`:: 
     47     align all selected points (selected interactivly by graphic cursor) at zero time 
     48 
     49     `al all p-onset`:: 
     50     aligns all P-onsets at zero time 
    1851    """ 
    1952 
  • SHX/trunk/SeismicHandler/commands/am.py

    r1063 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShAm 
     18 
     19    [Wiki Doc Text] 
     20 
     21    == determine amplitude == 
     22 
     23    '''command''': AM [<trc> <lo-time> <hi-time>] [<min>] [<max>] [<minpos>] [<maxpos>] 
     24 
     25    Determines maximum amplitude of trace <trc> within time window from <lo-time> to <hi-time>.  If no parameter is specified the trace and the time window is selected simultaneously by graphic cursor. If no output parameter is specified the result is displayed on the dialog channel(s). 
     26 
     27    === parameters === 
     28 
     29     * <trc>  ''parameter type: trace''[[br]] 
     30       Trace to determine maximum amplitude 
     31 
     32     * <lo-time>, <hi-time>  ''parameter type: real''[[br]] 
     33       Time window to search for maximum amplitude.  If no parameter is specified the trace and time window is selected simultaneously by graphic cursor. 
     34 
     35     * <min>  ''parameter type: symbol address''[[br]] 
     36       Output symbol for minimum value 
     37 
     38     * <max>  ''parameter type: symbol address''[[br]] 
     39       Output symbol for maximum value 
     40 
     41     * <minpos>  ''parameter type: symbol address''[[br]] 
     42       Output symbol for position of minimum (relative time) 
     43 
     44     * <maxpos>  ''parameter type: symbol address''[[br]] 
     45       Output symbol for position of maximum (relative time) 
     46 
     47    === qualifiers === 
     48 
     49     * /nomark[[br]] 
     50       Selections are not marked on display 
     51 
     52     * /abs[[br]] 
     53       <max> contains largest absolute value in specified time window 
     54 
     55    === examples === 
     56 
     57     `am 1 0. 10.`:: 
     58     determine maximum and minimum of first trace between 0 and 10 sec and display it on screen 
     59 
     60     `am 1 0. 10. &min &max`:: 
     61     determine maximum and minimum of first trace between 0 and 10 sec and store results in symbols "min" and "max" 
     62 
     63     `am 1 0. 10. ;;;;&MAXPOS`:: 
     64     determine position of maximum between 0 and 10 sec of first trace and store it in symbol "maxpos" 
    1865    """ 
    1966    numberOfParameters = [3, 5, 7] 
  • SHX/trunk/SeismicHandler/commands/append.py

    r1063 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShAppend 
     18 
     19    [Wiki Doc Text] 
     20 
     21    == append one trace to another == 
     22 
     23    '''command''': APPEND <src> <dst> 
     24 
     25    Appends trace <src> to trace <dst>. Both traces must have the same sample rate. It is not accounted for any time gaps between the traces. Trace <dst> is changed by this command (greater length). 
     26 
     27    === parameters === 
     28 
     29     * <trc> ''parameter type: trace''[[br]] 
     30       Trace to be appended. 
     31 
     32     * <dst> ''parameter type: trace''[[br]] 
     33       Trace to which <src> is appended to. 
     34 
     35    === examples === 
     36 
     37     `append 2 1`:: 
     38      appends trace 2 to trace 1 
    1839    """ 
    1940    numberOfParameters = [2,] 
  • SHX/trunk/SeismicHandler/commands/arp.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShArp 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == autoregressive process == 
     23 
     24    '''command''': ARP <trc-list> <N> <c1> <c2> ... <cN> [<s1> <s2> ... <sN>] 
     25 
     26    Generates autoregressive process of order <N> on all traces specified in <trc-list>: 
     27 
     28       smp[k] = smp[k] + sum{i=1..N} c[i]*smp[k-i]  (k=0,1,..,K-1), 
     29 
     30    where N=<N> and c[i] (i=1,2,..,N) are given by <c1>,<c2>,..,<cN>. The N start values c[-1],c[-2],..,c[-N] are given by <s1>,<s2>,..,<sN> respectively. 
     31 
     32    Improper values of <c1>..<cN> may result in a floating overflow error and crash the program.  So be careful in selecting parameters. 
     33 
     34    The process operates on the samples of a trace and does not care for the sample rate. Traces are processed in total, a global window (see [ShStw STW]) is neglected. 
     35 
     36    === parameters === 
     37 
     38     * <trc-list>  ''parameter type: trace list''[[br]] 
     39       List of traces to be processed. 
     40 
     41     * <N>  ''parameter type: integer''[[br]] 
     42       Order of autoregressive process. 
     43 
     44     * <c1>,<c2>,..,<cN>  ''parameter type: real''[[br]] 
     45       Coefficents of autoregressive process.  The program does not check for improper values, they may result in a floating overflow error. 
     46 
     47     * <s1>,<s2>,..,<sN>  ''parameter type: real''[[br]] 
     48       Start values of autoregressive process.  If not specified they are assumed to be zero. 
     49 
     50    === examples === 
     51 
     52     `arp 1-3 2 1.8 -0.9`:: 
     53     traces 1,2,3 are processed with order 2 
    1954    """ 
    2055    parameterQueries = [ 
  • SHX/trunk/SeismicHandler/commands/beam.py

    r1166 r1171  
    2525    """ 
    2626    URI:http://www.seismic-handler.org/portal/wiki/ShBeam 
     27 
     28    [Wiki Doc Text] 
     29 
     30    == beam traces == 
     31 
     32    '''command''': BEAM <trc-list> <azimuth> <slowness> 
     33 
     34    Delays traces specified in <trc-list> to align seismic phases with the same azimuth and slowness. The computed delays are added to already existing delays of the traces unless the "/abs" qualifier is specified. 
     35 
     36    SH needs to know the station names where the traces in <trc-list> were recorded. If not all station names are given, an error occurs. SH uses a location file to look for the location of a station. If a station name is not listed in this file, an error occurs. In this case the unknown station must be inserted to the location file using the "[ShFct FCT] station" command. For each station latitude and longitude (in degrees) must be entered. SH uses this information to compute the relative distances between the stations. Therefore the location information must be accurate enough. For station arrays there can be specified an array-relative location (in km) and an array ID number. If all stations of <trc-list> belong to the same array (same array ID number), SH uses the array relative location to shift the traces rather than the latitude,longitude information. The "/noarray" qualifier forces seismic handler to use latitude,longitude information instead of using the relative positions (if specified). 
     37 
     38    === parameters === 
     39 
     40     * <trc-list> ''parameter type: trace list''[[br]] 
     41       List of traces to be beamed. 
     42 
     43     * <azimuth> ''parameter type: real''[[br]] 
     44       Azimuth of phase to be aligned given in degrees. 
     45 
     46     * <slowness> ''parameter type: real''[[br]] 
     47       Slowness of phase to be aligned given in sec/degree. 
     48 
     49    === qualifiers === 
     50 
     51     * /noarray[[br]] 
     52       The stations are assumed to be no array even if array coordinates are given for all stations in the location file. If no array coordinates are given the qualifier has no effect. 
     53 
     54     * /abs[[BR]] 
     55       The delays computed are used as new delay values for each trace and are not added to already existing delays. 
     56 
     57    === example === 
     58 
     59     `beam all 30.0 5.0`:: 
     60     shift all traces to beam a phase of azimuth 30 degrees and slowness 5.0 sec/deg 
    2761    """ 
    2862    numberOfParameters = [3] 
  • SHX/trunk/SeismicHandler/commands/calc.py

    r1063 r1171  
    3030    """ 
    3131    URI:http://www.seismic-handler.org/portal/wiki/ShCalc 
     32 
     33    [Wiki Doc Text] 
     34 
     35    == simple calculations == 
     36 
     37    '''command''': CALC <type> <&var> <=> <operand1> [<operation> [<operand2>]] [<p>] 
     38 
     39    === parameters === 
     40 
     41     * <type> ''parameter type: char''[[BR]] 
     42       Determines type of operators <operand1>, <operand2> and result type. Possible values are "i" (integer), "r" (real), "s" (string) and "t" (time). 
     43 
     44     * <&var> ''parameter type: symbol address''[[BR]] 
     45       Variable where to store the result of the calculation. This may be a local or global variable. 
     46 
     47     * <=> ''parameter type: constant''[[BR]] 
     48       Must be "="-character. 
     49 
     50     * <operand1>, <operand2> ''parameter type: depends on <type>''[[BR]] 
     51       operators 
     52 
     53     * <operation> ''parameter type: string''[[BR]] 
     54       Operation to be applied to operators. 
     55 
     56    For detailed information see [#typetable type table] below. 
     57 
     58    === type table === 
     59 
     60    {{{ 
     61    #!rst 
     62    .. note: some of the operation signs are escaped by back slash to disable their special meaning inside ReST markup 
     63 
     64    ====== ========== ========== ========== =========== ==== 
     65    <type> operation  <operand1> <operand2> result-type task 
     66    ------ ---------- ---------- ---------- ----------- ---- 
     67    operations on integer numbers 
     68    -------------------------------------------------------- 
     69    i      \+         i          i          i           addition of integers 
     70    i      \-         i          i          i           subtraction of integers 
     71    i      \*         i          i          i           multiplication of integers 
     72    i      div        i          i          i           division of integers (no remainder) 
     73    i      mod        i          i          i           remainder of integer division 
     74    i      int        f                     i           return integer value of float 
     75    ------ ---------- ---------- ---------- ----------- ---- 
     76    operations on real numbers 
     77    -------------------------------------------------------- 
     78    r      \+         r          r          r           addition of real numbers 
     79    r      \-         r          r          r           subtraction of real numbers 
     80    r      \*         r          r          r           multiplication of real numbers 
     81    r      div        r          r          r           division of real numbers 
     82    r      abs        r                     r           remove sign 
     83    r      arccos     r                     r           arccos of <operand1> in degrees 
     84    r      arcsin     r                     r           arcsin of <operand1> in degrees 
     85    r      arctan     r                     r           arctan of <operand1> in degrees 
     86    r      arctan2    r          r          r           arctan of <operand1>/<operand2> in degrees 
     87    r      cos        r                     r           cosine of <operand1> (input in degrees) 
     88    r      sin        r                     r           sine of <operand1> (input in degrees) 
     89    r      tan        r                     r           tangens of <operand1> (input in degrees) 
     90    r      cosh       r                     r           cosh of <operand1> 
     91    r      sinh       r                     r           sinh of <operand1> 
     92    r      tanh       r                     r           tanh of <operand1> 
     93    r      exp        r                     r           exp(<operand1>) 
     94    r      ln         r                     r           natural logarithm 
     95    r      log        r                     r           decimal logarithm 
     96    r      power      r          r          r           exponentiation of <operand1> by <operand2> 
     97    r      sqrt       r                     r           square root of <operand1> 
     98    ------ ---------- ---------- ---------- ----------- ---- 
     99    operations on strings 
     100    -------------------------------------------------------- 
     101    s      \+         s          s          s           concatenation with blank 
     102    s      parse      s          i          s           takes "<operand2>"-th substring of <operand1> 
     103    s      extract    s          i(+i)      s           extracts <p> chars from pos <operand2> 
     104    s      lower      s          s          s           turn one character after <operand2> into lower case 
     105    s      lowercase  s                     s           change <operand1> into lower case 
     106    s      upper      s                     s           change <operand1> into upper case 
     107    s      phaseupper s                     s           pre-seed all lower case characters with V and return upper case string 
     108    s      doslash    s                     s           replace back-slash by forward slash 
     109    s      qname      s          t          s           construct filename from station (<operand1>) and time (<operand2>) 
     110    s      strlen     s                     i           return length of <operand1> 
     111    ------ ---------- ---------- ---------- ----------- ---- 
     112    operations on time values 
     113    -------------------------------------------------------- 
     114    t      tdiff      t          t          r           computes difference of absolute times in sec 
     115    t      tadd       t          r          t           adds <operand2> secs to <operand1> 
     116    t      julian     t                     i           return julian day of <operand1> 
     117    t      cnv_julian i          i          s           calc month and day out of year (<operand1>) and julian day (<operand2>) 
     118    t      make_time  s                     t           turn string "year month day hour minute second ms" into SH time string 
     119    ====== ========== ========== ========== =========== ==== 
     120    }}} 
     121 
     122    ''Note:'' The "extract" operation requires an additional parameter <p> specifying the number of characters to be extracted. 
     123 
     124    === qualifier === 
     125 
     126     * /fmt[[BR]] 
     127       Produces output in a special format. Format string must be entered as in C printf commands. The format string should be enclosed in "< >" brackets. Note the automatic lowercase to uppercase conversion of the command line interpreter. To prevent this conversion for a single character within a format string precede this character by a "@"-sign (Example: /fmt=<%5.2@f> creates real number in floating point format "%5.2f" with two decimal digits). 
     128 
     129    === examples === 
     130 
     131     `calc r &res = 2.0 * ^delta(1)`:: 
     132     computes real multiplication of sample distance of second trace by two and stores the result in variable "res" 
     133 
     134     `calc s &str = teststring`:: 
     135     copies string "TESTSTRING" to variable "str" 
     136 
     137     `calc r &res = ^maxval(2) sqrt`:: 
     138     computes square root of maximum value of trace 2 and stores result in variable "res" 
    32139    """ 
    33140    numberOfParameters = [3, 4, 5, 6, 7] 
  • SHX/trunk/SeismicHandler/commands/call.py

    r1155 r1171  
    2525    call locdiff <elat> <elon> <slat> <slon> <distvar> [<azvar>] 
    2626    call travel <phase> <distance> <depth> <ttvar> 
     27 
     28    [Wiki Doc Text] 
     29 
     30    == special utilities == 
     31 
     32    '''command''': CALL <subfunction> <p1> <p2> ... <pN> 
     33 
     34    Special utilities for the user. The action depends on the <subfunction> keyword. 
     35 
     36    === parameters === 
     37 
     38     * <subfunction> ''parameter type: string''[[br]] 
     39       Subfunction of utility. For possible values see table [#subfunctiontable subfunction table] below 
     40 
     41    === subfunction table === 
     42 
     43    {{{ 
     44    #!rst 
     45    +-------------+---------------------------------------------------------------------+ 
     46    | subfunction | description                                                         | 
     47    +=============+=====================================================================+ 
     48    | slowness    | computes slowness in sec/deg for an event at <p2> deg distance and  | 
     49    |             | depth <p3> km. Uses travel time table set with command "FCT_        | 
     50    |             | TT_TABLE <table-file>".                                             | 
     51    |             +---------------------------------------------------------------------+ 
     52    |             | - <p1> string: phase (valid P or S)                                 | 
     53    |             | - <p2> real: distance station-event in degrees                      | 
     54    |             | - <p3> real: depth of event in km                                   | 
     55    |             | - <p4> symbol address: output variable (slowness)                   | 
     56    +-------------+---------------------------------------------------------------------+ 
     57    | travel      | computes travel time in sec for an event at <p2> deg distance and   | 
     58    |             | depth <p3> km. Uses travel time table set with command              | 
     59    |             | "FCT_ TT_TABLE <table-file>".                                       | 
     60    |             +---------------------------------------------------------------------+ 
     61    |             | - <p1> string: phase (valid P or S)                                 | 
     62    |             | - <p2> real: distance station-event in degrees                      | 
     63    |             | - <p3> real: depth of event in km                                   | 
     64    |             | - <p4> symbol address: output variable (travel time in sec)         | 
     65    +-------------+---------------------------------------------------------------------+ 
     66    | locdiff     | computes difference of two locations given in latitude and          | 
     67    |             | longitude (in deg).                                                 | 
     68    |             +---------------------------------------------------------------------+ 
     69    |             | - <p1> real: latitude of first location (in deg)                    | 
     70    |             | - <p2> real: longitude of first location (in deg)                   | 
     71    |             | - <p3> real: latitude of second location (in deg)                   | 
     72    |             | - <p4> real: longitude of second location (in deg)                  | 
     73    |             | - <p5> symbol address: output variable (distance in deg)            | 
     74    |             | - <p6> symbol address: output variable (azimuth)                    | 
     75    +-------------+---------------------------------------------------------------------+ 
     76    | locadd      | adds a distance vector of a specified length and direction to a     | 
     77    |             | given location                                                      | 
     78    |             +---------------------------------------------------------------------+ 
     79    |             | - <p1> real: latitude of input location (in deg)                    | 
     80    |             | - <p2> real: longitude of input location (in deg)                   | 
     81    |             | - <p3> real: length of distance vector (in deg)                     | 
     82    |             | - <p4> real: direction of distance vector (in deg)                  | 
     83    |             | - <p5> symbol address: output variable (new latitude in deg)        | 
     84    |             | - <p6> symbol address: output variable (new longitude in deg)       | 
     85    +-------------+---------------------------------------------------------------------+ 
     86    | statloc     | returns station information                                         | 
     87    |             +---------------------------------------------------------------------+ 
     88    |             | - <p1> string: station name                                         | 
     89    |             | - <p2> symbol address: station latitude                             | 
     90    |             | - <p3> symbol address: station longitude                            | 
     91    |             | - <p4> symbol address: station relative x location                  | 
     92    |             | - <p5> symbol address: station relative y location                  | 
     93    |             | - <p6> symbol address: station elevation in km                      | 
     94    +-------------+---------------------------------------------------------------------+ 
     95    | phasediff   | computes difference travel times of various phases generated at a   | 
     96    |             | discontinuity.                                                      | 
     97    |             +---------------------------------------------------------------------+ 
     98    |             | - <p1> string: phase; valid: S-P, Ppp-P, Pps-p, XS-P                | 
     99    |             | - <p2> real: conversion depth in km                                 | 
     100    |             | - <p3> real: slowness in (sec/deg)                                  | 
     101    |             | - <p4> symbol address: output variable (time in sec)                | 
     102    +-------------+---------------------------------------------------------------------+ 
     103    | inci        | computes theoretical angle of incidence of P                        | 
     104    |             +---------------------------------------------------------------------+ 
     105    |             | - <p1> real: distance in deg                                        | 
     106    |             | - <p2> real: depth in km                                            | 
     107    |             | - <p3> symbol address: output variable (angle in deg)               | 
     108    +-------------+---------------------------------------------------------------------+ 
     109    | random      | generates uniform random number within a given interval.            | 
     110    |             +---------------------------------------------------------------------+ 
     111    |             | - <p1> real: lo bound of interval                                   | 
     112    |             | - <p2> real: hi bound of interval                                   | 
     113    |             | - <p3> symbol address: output variable (random number)              | 
     114    +-------------+---------------------------------------------------------------------+ 
     115    | grandom     | generates normally distributed random number.                       | 
     116    |             +---------------------------------------------------------------------+ 
     117    |             | - <p1> real: center of gaussian                                     | 
     118    |             | - <p2> real: half-width of gaussian                                 | 
     119    |             | - <p3> symbol address: output variable (random number)              | 
     120    +-------------+---------------------------------------------------------------------+ 
     121 
     122    .. _FCT: ShFct 
     123    }}} 
     124 
     125    === example === 
     126 
     127     `call slowness p ^distance(2) ^depth(2) &slo`:: 
     128     computes P-slowness of second trace on display and stores result in variable "slo". 
    27129    """ 
    28130    numberOfParameters = [1,2,3,4,5,6,7] 
  • SHX/trunk/SeismicHandler/commands/chanselect.py

    r1107 r1171  
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShChanselect 
    1717     
    18     Keep only one channel per station/component. 
     18    [Wiki Doc Text] 
     19 
     20    == Reduce channels and location codes == 
     21 
     22    '''command''': CHANSELECT <chanlist> [<loclist>] 
     23 
     24    Reduces traces on display to one trace per station/component pair. The 
     25    surviving channel and location codes are taken from the lists specified 
     26    in parameters 1 and 2 with priority in the given order. E.g. assume you 
     27    have for station NN.AAA channels HHZ, BHZ, LHZ, VHZ, UHZ and for station 
     28    NN.BBB channels BHZ, LHZ and for station NN.CCC channels UHZ and VHZ on 
     29    screen. After a command "chanselect hh,bh" station NN.AAA would have only 
     30    channel HHZ left, station NN.BBB would have channel BHZ left and station 
     31    NN.CCC would have no channels left. Location codes are treated similarly 
     32    in a second stage if the second parameter is specified. 
     33 
     34    === parameters === 
     35 
     36     * <chanlist> ''parameter type: string''[[br]] 
     37       Comma separated list of channels (without component). The first channel 
     38       found for each station/component pair survives this command, all others 
     39       are deleted. 
     40 
     41     * <loclist> ''parameter type: string''[[br]] 
     42       Comma separated list of location codes. The first location code found 
     43       for each station/component pair survives this command, all others are 
     44       deleted. 
     45 
     46 
     47    === qualifiers === 
     48 
     49    no qualifiers 
     50 
     51    === example === 
     52 
     53     `chanselect`:: chanselect hh,bh 
     54     After this command either one HH or one BH channel is left for each 
     55     station/component pair. 
     56 
     57     `chanselect`:: chanselect hh,bh ,00,10,11 
     58    First step like in past example. In a second step the remaining channels 
     59    are reduces to only one location code per channel. The leading comma means 
     60    that the highest priority is given to the empty location code, followed by 
     61    00, 10 and then 11. 
    1962    """ 
    2063    numberOfParameters = [1,2] 
  • SHX/trunk/SeismicHandler/commands/cmd.py

    r1063 r1171  
    1818    """ 
    1919    URI:http://www.seismic-handler.org/portal/wiki/ShCmd 
     20 
     21    [Wiki Doc Text] 
     22 
     23    == create command file == 
     24 
     25    '''command''': CMD <cmd-file> 
     26 
     27    Creates command file containing all previously entered commands since beginning of SH session or since last "cmd" command. This file is an editable file which can be arbitrarily changed. Command files have an extension ".SHC". 
     28 
     29    === parameters === 
     30 
     31     * <cmd-file> ''parameter type: filename (without extension)''[[br]] 
     32       Name of command file to be created.  An extension ".SHC" is 
     33       appended to the name. 
     34 
     35    === example === 
     36 
     37     `cmd allcmds`:: 
     38      creates file ALLCMDS.SHC 
    2039    """ 
    2140    numberOfParameters = [1,] 
  • SHX/trunk/SeismicHandler/commands/connect.py

    r1063 r1171  
    1818    """ 
    1919    URI:http://www.seismic-handler.org/portal/wiki/ShConnect 
     20 
     21    [Wiki Doc Text] 
     22 
     23    == connect traces == 
     24 
     25    '''command''': CONNECT <subfct> <trc1> <trc2> [<lo-wdw> <hi-wdw>] 
     26 
     27    Connects (multiplication or division) two traces and stores the result in a new created output trace. If no time window specified, the result trace is computed within the current display window. 
     28 
     29    === parameters === 
     30 
     31     * <par> ''parameter type: type''[[br]] 
     32       explaination 
     33 
     34     * <subfct> ''parameter type: string''[[BR]] 
     35       Specifies subfunction. Valid is either "mul" (multiplication of traces) or "div" (division of traces). 
     36 
     37     * <trc1>, <trc2> ''parameter type: trace''[[BR]] 
     38       Input traces to be connected. 
     39 
     40     * <lo-wdw>, <hi-wdw> ''parameter type: real''[[BR]] 
     41       The result trace is computed within this time window. If omitted the current display window is used. 
     42 
     43    === examples === 
     44 
     45     `connect mul 1 2`:: 
     46     multiplies the first two traces on display within the current display window 
     47 
     48     `connect mul 1 2 0 100`:: 
     49     multiplies the first two traces within the time window from 0 to 100 sec. 
    2050    """ 
    2151    numberOfParameters = [3, 5] 
  • SHX/trunk/SeismicHandler/commands/copy_.py

    r1063 r1171  
    1515    """ 
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShCopy 
     17 
     18    [Wiki Doc Text] 
     19 
     20    == copy traces == 
     21 
     22    '''command''': COPY <trc-list> [<wdw-lo> <wdw-hi>] 
     23 
     24    Makes copies of all traces specified in <trc-list>. The copies are added to the trace display. If a time window (<wdw-lo>,<wdw-hi>) is set, only the samples within this window are copied. 
     25 
     26    === parameters === 
     27 
     28     * <trc-list> ''parameter type: trace list''[[BR]] 
     29       List of traces to be copied. 
     30 
     31     * <wdw-lo>, <wdw-hi> ''parameter type: real''[[BR]] 
     32       Time window in sec. If specified only samples within this window are copied. 
     33 
     34    === example === 
     35 
     36     `copy 1-3`:: 
     37     adds copies of first three traces to the top of the display 
     38 
     39     `copy 1-3 0. 10.`:: 
     40     copies first three traces within time window from 0 to 10 sec 
    1741    """ 
    1842    numberOfParameters = [1, 3] 
  • SHX/trunk/SeismicHandler/commands/corr.py

    r1063 r1171  
    2020    """ 
    2121    URI:http://www.seismic-handler.org/portal/wiki/ShCorr 
     22 
     23    [Wiki Doc Text] 
     24 
     25    == compute crosscorrelation == 
     26 
     27    '''command''': CORR <wavelet> <wl-start> <wl-end> <corr-trc> 
     28 
     29    Computes crosscorrelation of two traces specified by <wavelet> and 
     30    <corr-trc>. At the trace <wavelet> a time window from <wl-start> to 
     31    <wl-end> is selected. This wavelet is crosscorrelated with the trace 
     32    <corr-trc> from <cl-start> sec to <cl-end> sec relative to the selected 
     33    wavelet window. The correlation length <cl-start>..<cl-end> is selected 
     34    by the "[ShCorrl CORRL]" command (default is -30..100 sec). The output 
     35    trace is positioned at the lower value of the time bound given in the 
     36    "corrl" command, i.e. after a "[ShCorrl CORRL] -50 200" instruction the 
     37    output traces start at time position -50. 
     38 
     39    There are three different correlation modes available. The correlation 
     40    mode can be selected by "[ShFct FCT] CORRMODE <mode>". Mode number 1 is 
     41    default. 
     42 
     43    mode description (x[i]: samples of <wavelet>, y[j]: samples of <corr-trc>) 
     44 
     45    {{{ 
     46     <mode> = 1: 
     47                      sum_{i} (x[i]-x_mean) * (y[i]-y_mean) 
     48     cc  =   ---------------------------------------------------------- 
     49             sqrt(sum_{j}(x[j]-x_mean)^2) * sqrt(sum{k}(y[k]-y_mean)^2) 
     50 
     51     <mode> = 2: 
     52             sum_{i} (x[i]-x_mean) * (y[i]-y_mean) 
     53     cc  =   ------------------------------------- 
     54                  sum_{j}(x[j]-x_mean)^2) 
     55 
     56     <mode> = 3: 
     57             sum_{i} x[i] * y[i] 
     58     cc  =   ------------------- 
     59              sum_{i} (x[i])^2 
     60    }}} 
     61 
     62    === parameters === 
     63 
     64     * <wavelet> ''parameter type: trace''[[BR]] 
     65       Trace of correlation wavelet (see above). 
     66 
     67     * <wl-start>, <wl-end> ''parameter type: real''[[BR]] 
     68       Wavelet time window in seconds. This selected time window on trace 
     69       <wavelet> is crosscorrelated with the <corr-trc> trace. 
     70 
     71     * <corr-trc> ''parameter type: trace''[[BR]] 
     72       The correlation waveletis correlated with this trace. 
     73 
     74    === qualifiers === 
     75 
     76     * /m[[br]] 
     77       The wavelet window is marked. 
     78 
     79    === example === 
     80 
     81     `corr 1 100.0 110.0 4`:: 
     82     correlates time window from 100.0 to 110.0 sec of trace 1 with trace 4; 
     83     the result is appended to the display 
    2284    """ 
    2385    numberOfParameters = [4,] 
  • SHX/trunk/SeismicHandler/commands/corrl.py

    r1063 r1171  
    1515    """ 
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShCorrl 
     17 
     18    [Wiki Doc Text] 
     19 
     20    == select correlation length == 
     21 
     22    '''command''': CORRL <cl-start> <cl-end> 
     23 
     24    Select correlation length for all following correlations ([ShCorr CORR] 
     25    command). The correlation wavelet selected by the [ShCorr CORR] command 
     26    is crosscorrelated with a trace from <cl-start> to <cl-end> relative to 
     27    the selected wavelet window. Default is -30.0 sec and 100.0 sec. 
     28 
     29    === parameters === 
     30 
     31     * <cl-start>, <cl-end> ''parameter type: real''[[br]] 
     32       Correlation length (see above). 
     33 
     34    === example === 
     35 
     36     `CORRL -30.0 100.0`:: 
     37     set default corrrelation length 
    1738    """ 
    1839    numberOfParameters = [2] 
  • SHX/trunk/SeismicHandler/commands/create.py

    r1063 r1171  
    2929    """ 
    3030    URI:http://www.seismic-handler.org/portal/wiki/ShCreate 
     31 
     32    [Wiki Doc Text] 
     33 
     34    == create synthetics == 
     35 
     36    '''command''': CREATE <type> <dt> <length> <amplitude>[<p1>[...<pN>]] 
     37 
     38    Creates a synthetic trace. There exist different types of traces which can 
     39    be created (see parameter <type>). 
     40 
     41    === parameters === 
     42 
     43     * <type> ''parameter type: string''[[BR]] 
     44       Type of synthetic trace to be created.  Valid parameters are: 
     45       * SPIKE - spike trace, spike is positioned at <p1> seconds (time axis) 
     46       * GAUSS - gauss peak at position <p1> seconds, <p2> specifies width 
     47       * EXP - (one sided) exponential peak at <p1> seconds, <p2> = decay 
     48       * SHARP - explosive point source at position <p1>, formula is 
     49         g(t) = exp( -<p2>*(t-<p1>) * sin(<p3>*(t-<p1>))/<p3> 
     50       * KUEPPER - kuepper impulse at position <p1>, width <p2> and order <p3> 
     51       * SIN - sinus wave train with frequency <p1> and phase <p2> 
     52       * RANDOM - random trace 
     53 
     54     * <dt> ''parameter type: real''[[BR]] 
     55       Sample distance of trace. 
     56 
     57     * <length> ''parameter type: real''[[BR]] 
     58       Length of trace in seconds. 
     59 
     60     * <amplitude> ''parameter type: real''[[BR]] 
     61       Maximum amplitude of trace. 
     62 
     63    === example === 
     64 
     65     `CREATE SPIKE .05 30 1 10`:: 
     66     create spike 
    3167    """ 
    3268    numberOfParameters = [4, 5, 6, 7] 
  • SHX/trunk/SeismicHandler/commands/cut.py

    r1063 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShCut 
     18 
     19    [Wiki Doc Text] 
     20 
     21    == cut traces == 
     22 
     23    '''command''': CUT <trc-list> <lo-bound> <hi-bound> 
     24 
     25    Changes length of traces. All data samples of the specified traces in 
     26    <trc-list> not within the given time window from <lo-bound> to <hi-bound> 
     27    are deleted from memory. 
     28 
     29    === parameters === 
     30 
     31     * <trc-list> ''parameter type: trace list''[[BR]] 
     32       List of traces to be cut. 
     33 
     34     * <lo-bound>, <hi-bound> ''parameter type: real''[[BR]] 
     35       Time window (relative to time axis) for cutting traces. 
     36 
     37    === qualifiers === 
     38 
     39     * /pos=<time-info> (SH only)[[BR]] 
     40       Changes the reference time of the time window [<lo-bound>..<hi-bound>] 
     41       to the value of the info entry <time-info>. In this case <time-info> 
     42       must be of time type. If <time-info> is of real type it is assumed to 
     43       be a distance value which is used in combination with the value of a 
     44       "/vel=<velocity>" qualifier to compute reduced velocity time windows 
     45       (see [#examples examples]). 
     46 
     47    === examples === 
     48 
     49     `cut 1-3 40 100`:: 
     50     cuts traces 1,2,3 to time window from 40 sec to 100 sec 
     51 
     52     `cut/pos=p-onset all -20 100`:: 
     53     cuts all traces 20 sec before p-onset and 100 sec after it. 
     54 
     55     `cut/pos=distance/vel=6.0 all 40 100`:: 
     56     reduced time window (velocity 6.0) 
    1857    """ 
    1958    numberOfParameters = [3] 
  • SHX/trunk/SeismicHandler/commands/decimate.py

    r1063 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShDecimate 
     18 
     19    [Wiki Doc Text] 
     20 
     21    == decimate traces == 
     22 
     23    '''command''': DECIMATE <trc-list> <factor> 
     24 
     25    Decimates traces specified in <trc-list> to by a factor of <factor>. Each 
     26    output sample is an average of <factor> input samples. The input traces 
     27    are modified, no new traces are created. 
     28 
     29    === parameters === 
     30 
     31     * <trc-list> ''parameter type: trace list''[[BR]] 
     32       List of traces to be resampled. 
     33 
     34     * <factor> ''parameter type: integer''[[BR]] 
     35       Decimation factor 
     36 
     37    === qualifiers === 
     38 
     39     * /nomean 
     40       Makes plain decimation, i.e. does not average samples, just throws them 
     41       away. 
     42 
     43    === example === 
     44 
     45     `decimate all 4`:: 
     46     decimates all traces on display by a factor of 4 
    1847    """ 
    1948    numberOfParameters = [2] 
  • SHX/trunk/SeismicHandler/commands/del.py

    r1063 r1171  
    1515    """ 
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShDel 
     17 
     18    [Wiki Doc Text] 
     19 
     20    == delete traces == 
     21 
     22    '''command''': DEL <trc-list> 
     23 
     24    Removes traces from memory (and from display). If these traces are not 
     25    stored on a q-file, all information about these traces is lost. 
     26 
     27    === parameters === 
     28 
     29     * <trc-list> ''parameter type: trace list''[[BR]] 
     30       List of traces to be deleted. 
     31 
     32    === example === 
     33 
     34     `del 1-3`:: 
     35     delete first three traces of display 
     36 
     37     `del *`:: 
     38     delete traces selected by graphic cursor exit with "E"-key 
    1739    """ 
    1840    numberOfParameters = [1,] 
  • SHX/trunk/SeismicHandler/commands/demean.py

    r1063 r1171  
    1818    """ 
    1919    URI:http://www.seismic-handler.org/portal/wiki/ShDemean 
     20 
     21    [Wiki Doc Text] 
     22 
     23    == remove mean value == 
     24 
     25    '''command''': DEMEAN <trc-list> [<lo-bound> <hi-bound>] 
     26 
     27    Removes mean value from all traces given by <trc-list>. If the parameters 
     28    <lo-bound>, <hi-bound> are not specified, the mean value is determined 
     29    inside the current display window. You can enter a "*" as second parameter 
     30    (<lo-bound>), then the time window is selected by graphic cursor. 
     31 
     32    === parameters === 
     33 
     34     * <trc-list> ''parameter type: trace list''[[BR]] 
     35       List of traces to remove mean value. 
     36 
     37     * <lo-bound>, <hi-bound> ''parameter type: real''[[BR]] 
     38       Time window in sec. (rel. to time axis) for determining mean value. If 
     39       omitted the current display window is used. If an astrisk ("*") is 
     40       entered as <lo-bound> the time window can be selected by graphic cursor. 
     41 
     42    === example === 
     43 
     44     `demean 1 10. 20.`:: 
     45     removes mean value of time window from 10 sec to 20 sec from all samples 
     46     of first trace 
     47 
     48     `demean all`:: 
     49     removes mean value of all traces on display. The mean values are determined 
     50     inside the current display window. 
     51 
     52     `demean 1-3 *`:: 
     53     removes mean value from first three traces on display. The time window can 
     54     be selected by graphic cursor. 
    2055    """ 
    2156    numberOfParameters = [1, 3] 
  • SHX/trunk/SeismicHandler/commands/derive.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShDerive 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == compute derivative == 
     23 
     24    '''command''': DERIVE <trc-list> <algorithm> 
     25 
     26    Computes derivatives of all traces given by <trc-list>. The input traces 
     27    remain unchanged. The DERIVE command creates new traces containing the 
     28    derivatives. A global time window (see [ShStw STW]) is not respected. 
     29 
     30    === parameters === 
     31 
     32     * <trc-list> ''parameter type: trace list''[[BR]] 
     33       List of traces to be derived. These traces remain unchanged. 
     34 
     35     * <algorithm> ''parameter type: integer''[[BR]] 
     36       ID of algorithm used to compute derivative. Valid vales are 1 to 5. The 
     37       algorithms are listed below (h is sample distance): 
     38       1. y'[i] = 1/(2h) (-y[i-1] + y[i+1]) 
     39       2. y'[i] = 1/(12h) (y[i-2] - 8y[i-1] + 8y[i+1] - y[i+2]) 
     40       3. y'[i] = 1/h (-y[i] + y[i+1]) 
     41       4. y'[i] = 1/(2h) (-3y[i] + 4y[i+1] - y[i+2]) 
     42       5. y'[i] = 1/(12h) (-3y[i-1]-10y[i]+18y[i+1]-6y[i+2]+y[i+3]) 
     43 
     44    === example === 
     45 
     46     `derive 1-3 3`:: 
     47     computes derivative of traces 1-3 by algorithm number 3 
    1948    """ 
    2049    numberOfParameters = [2,] 
  • SHX/trunk/SeismicHandler/commands/despike.py

    r1063 r1171  
    1919    """ 
    2020    URI:http://www.seismic-handler.org/portal/wiki/ShDespike 
     21 
     22    [Wiki Doc Text] 
     23 
     24    == despikes traces == 
     25 
     26    '''command''': DESPIKE <trc-list> <detec> [<lo-t> <hi-t>] [<nsp>] [<ndc>] 
     27 
     28    Removes spikes from one or more traces specified by <trc-list>. If a time 
     29    window <lo-t>, <hi-t> is entered the despiking is restricted to this 
     30    window, otherwise the whole trace is used (ignoring a globally set time 
     31    window by [ShStw STW]). A spike is recognized if the difference between 
     32    two samples is larger than <detec> times the mean difference on the whole 
     33    trace. 
     34 
     35    === parameters === 
     36 
     37     * <trc-list> ''parameter type: trace list''[[BR]] 
     38       List of traces to be despiked. 
     39 
     40     * <detec> ''parameter type: real''[[BR]] 
     41       A spike is detected if the difference between two samples is larger 
     42       than <detec> times the mean difference. 
     43 
     44     * <lo-t>, <hi-t> ''parameter type: real''[[BR]] 
     45       If specified the spike detection is restricted to this time window 
     46       given in seconds. 
     47 
     48     * <nsp> ''parameter type: symbol address''[[BR]] 
     49       Receives total number of removed spikes on all input traces. 
     50 
     51     * <ndc> ''parameter type: symbol address''[[BR]] 
     52       Receives total number of detected discontinuties on all input traces. 
     53 
     54    === qualifiers === 
     55 
     56     * /log=NAME[[br]] 
     57       write processing information into file NAME 
     58 
     59    === example === 
     60 
     61     `despike 1-3 100.`:: 
     62     despikes the whole traces 1,2,3 with a factor of 100. 
     63 
     64     `despike 1 1000. 10. 15.`:: 
     65     despikes traces 1 between 10 sec and 15 sec on time axis 
     66 
     67     `despike 1 1000. *`:: 
     68     despikes trace 1 within a window which must be selected by graphic cursor 
    2169    """ 
    2270    numberOfParameters = [2,4,5,6] 
  • SHX/trunk/SeismicHandler/commands/display.py

    r1063 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShDisplay 
     18 
     19    [Wiki Doc Text] 
     20 
     21    == redisplay traces == 
     22 
     23    '''command''': DISPLAY <trc-list> <pos> 
     24 
     25    Rearranges display and/or redisplays hidden traces (HIDE command). The 
     26    traces specified by <trc-list> are displayed at positions 
     27    <pos>, <pos+1>, ..., <pos>+N (N = length of trace list). The traces in 
     28    <trc-list> may be traces from the display (then the traces can be 
     29    rearranged) or hidden traces (then they are redisplayed). Hidden traces 
     30    can be accessed by the "ALL_H" trace list parameter, using global lists 
     31    or by info value expressions (example "_DISTANCE(50:80)"). 
     32 
     33    === parameters === 
     34 
     35     * <trc-list> ''parameter type: trace list''[[BR]] 
     36       List of traces to be rearranged or redisplayed. 
     37 
     38     * <pos> ''parameter type: integer''[[BR]] 
     39       Position number of first trace in <rec-list>. 
     40 
     41    === example === 
     42 
     43     `display h:all 1`:: 
     44     display all hidden traces 
    1845    """ 
    1946    numberOfParameters = [1, 2] 
  • SHX/trunk/SeismicHandler/commands/dtw.py

    r1063 r1171  
    1414    """ 
    1515    URI:http://www.seismic-handler.org/portal/wiki/ShDtw 
     16 
     17    [Wiki Doc Text] 
     18 
     19    == delete time window == 
     20 
     21    '''command''': DTW 
     22 
     23    Deletes a time window previously set by [ShStw STW] command. After 
     24    [ShDtw DTW] command the time window is chosen automatically in a way, 
     25    that all traces can be displayed in full length. This is default at the 
     26    beginning of Seismic Handler session. 
    1627    """ 
    1728    numberOfParameters = [0] 
  • SHX/trunk/SeismicHandler/commands/dyw.py

    r1063 r1171  
    1414    """ 
    1515    URI:http://www.seismic-handler.org/portal/wiki/ShDyw 
     16 
     17    [Wiki Doc Text] 
     18 
     19    == delete y-window == 
     20 
     21    '''command''': DYW 
     22 
     23    Deletes y-windows previously set by [ShSyw SYW]. 
    1624    """ 
    1725    numberOfParameters = [0] 
  • SHX/trunk/SeismicHandler/commands/echo.py

    r1063 r1171  
    8585 
    8686    URI:http://www.seismic-handler.org/portal/wiki/ShEcho 
     87 
     88    [Wiki Doc Text] 
     89 
     90    == text output == 
     91 
     92    '''command''': ECHO <text1>[ <text2>[ ...<textN>]] 
     93 
     94    Writes text to echo channel (set by [ShEchoCh ECHO_CH] command). Default 
     95    output channel is the seismic handler text window. All parameters entered 
     96    are displayed, separated by blanks. 
     97 
     98    === parameters === 
     99 
     100     * <text1>, <text2>, ..., <textN> ''parameter type: string''[[BR]] 
     101       Text to be written to echo channel, parameters are separated by blanks. 
     102 
     103    === qualifiers === 
     104 
     105     * /no_lf[[BR]] 
     106       Writes no line feed at the of the line. Next [ShEcho ECHO] command 
     107       overwrites this one. 
     108 
     109     * /no_crlf[[BR]] 
     110       Writes no line feed and no carriage return at the end of the line. Next 
     111       [ShEcho ECHO] text is appended to this one. 
     112 
     113    === example === 
     114 
     115     `echo THIS   IS A    TEST`:: 
     116     writes string "THIS IS A TEST" to the currently selected ECHO-file 
     117 
     118     `echo DISTANCE ^DISTANCE(2)`:: 
     119     writes string "DISTANCE " and value of distance information of second 
     120     trace on display to the currently selected ECHO-file 
    87121    """ 
    88122 
  • SHX/trunk/SeismicHandler/commands/echo_ch.py

    r1063 r1171  
    6464 
    6565    URI:http://www.seismic-handler.org/portal/wiki/ShEchoCh 
     66 
     67    [Wiki Doc Text] 
     68 
     69    == select echo channel == 
     70 
     71    '''command''': ECHO_CH [<filename>] 
     72 
     73    Selects the text output channel. Any non-blank parameter opens an ASCII 
     74    file name "<filename>.STX". If <filename> is omitted, the text channel 
     75    is reset to the default channel (seismhandler text window). Any file 
     76    previously opened is closed. 
     77 
     78    If the text channel is switched to an existing file, the following output 
     79    is appended to the file, unless the /NEW [#qualifiers qualifier] is entered. 
     80 
     81    === parameters === 
     82 
     83     * <filename> ''parameter type: filename (no extension)''[[BR]] 
     84       Name of file to be opened as text channel. Any file previously opened 
     85       is closed. If this parameter is omitted, the text channel is reset to 
     86       the seismic handler text window. 
     87 
     88    === qualifiers === 
     89 
     90     * /new[[BR]] 
     91       A new output file is created (output is not appended to an already 
     92       existing file; creates a new version of a file on a VAX). 
     93 
     94     * /ovwr[[BR]] 
     95       Overwrites an existing file (output is not appended). 
     96 
     97    === example === 
     98 
     99     `echo_ch LOGFILE`:: 
     100     appends all following [ShEcho ECHO]-output to file LOGFILE.STX 
     101 
     102     `echo_ch/ovwr LOGFILE`:: 
     103     creates new output file LOGILE.STX; a possibly existing file of this name 
     104     is deleted 
     105 
     106     `echo_ch`:: 
     107     closes a previously opened ECHO-file and switches output back to screen 
    66108    """ 
    67109 
  • SHX/trunk/SeismicHandler/commands/enter.py

    r1063 r1171  
    2525    """ 
    2626    URI:http://www.seismic-handler.org/portal/wiki/ShEnter 
     27 
     28    [Wiki Doc Text] 
     29 
     30    == read symbol value == 
     31 
     32    '''command''': ENTER <&symbol> [<prompt1>[ <prompt2>[ ...<promptN>]]] 
     33 
     34    Valid only in [ShProcedures command procedures]. Reads new value of a 
     35    previously defined symbol (local or global set) from the input level which 
     36    is passed at the command procedure call (the input level can be redirected 
     37    by qualifiers, see also [ShProcCall PROC_CALL]). 
     38 
     39    === parameters === 
     40 
     41     * <&symbol> ''parameter type: symbol address''[[BR]] 
     42       Name of the symbol (previously defined) to store the result of input. 
     43 
     44     * <prompt1>, <prompt2>, ..., <promptN> ''parameter type: string''[[BR]] 
     45       Text for prompting user input. The text parameters are separated by 
     46       blanks. 
     47 
     48    === qualifiers === 
     49 
     50     * /parent (SH only)[[BR]] 
     51       The input is read from the parent command level, no regard is payed to 
     52       the local input level (see [ShProcCall PROC_CALL]) passed. 
     53 
     54     * /interactive (SH only)[[BR]] 
     55       The input is read from the main input level (see [ShProcCall PROC_CALL]), 
     56       no regard is payed to the local input level. 
     57 
     58    === example === 
     59 
     60     `enter &NAME Q-FILE NAME:`:: 
     61     prompts from within a command procedure "Q-FILE NAME: " and stores the received value in the symbol "NAME" 
    2762    """ 
    2863    numberOfParameters = [i for i in xrange(1, 15)] 
  • SHX/trunk/SeismicHandler/commands/events.py

    r1123 r1171  
    2121    """ 
    2222    URI:http://www.seismic-handler.org/portal/wiki/ShEvents 
     23 
     24    [Wiki Doc Text] 
     25 
     26    == Access event data via FDSN webservice == 
     27 
     28    '''command''': EVENTS <lat> <lon> <radius> <minmagn> [<maxmagn>] [<offset>] [<reflat> <reflon> <refphase>] 
     29 
     30    Read event list from FDSN webservice, selected by geographic location. 
     31    Result is printed to echo channel (default screen, may be redirected into 
     32    a file via echo_ch command). 
     33 
     34    === parameters === 
     35 
     36     * <lat> ''parameter type: float''[[br]] 
     37       Latitude in deg of geographic location. 
     38 
     39     * <lon> ''parameter type: float''[[br]] 
     40       Longitude in deg of geographic location. 
     41 
     42     * <radius> ''parameter type: float''[[br]] 
     43       Radius of area around given lat,lon location. 
     44 
     45     * <minmagn> ''parameter type: float''[[br]] 
     46       Minimum magnitude in event list. 
     47 
     48     * <maxmagn> ''parameter type: float''[[br]] 
     49       Maximum magnitude in event list. 
     50 
     51     * <offset> ''parameter type: float''[[br]] 
     52       Constant offset subtracted from the output times (origin times). Useful 
     53       for computing trace start times. 
     54 
     55     * <reflat> ''parameter type: float''[[br]] 
     56       Latitude of reference location to compute onset time at this point. See 
     57       parameter <refphase>. 
     58 
     59     * <reflon> ''parameter type: float''[[br]] 
     60       Longitude of reference location to compute onset time at this point. 
     61       See parameter <refphase>. 
     62 
     63     * <refphase> ''parameter type: string''[[br]] 
     64       Phase to use for travel time computation. The triple <reflat>, 
     65       <reflon>, <refphase> is used to recompute the origin times of the event 
     66       list into theoretical arrival times at the given point. Together with 
     67       the <offset> parameters, suitable time windows for trace retrieval may 
     68       be computed. 
     69 
     70 
     71    === qualifiers === 
     72 
     73     * /addr[[br]] 
     74       Address or alias of the FDSN server, e.g. "IRIS". 
     75 
     76     * /skipnodepth[[br]] 
     77       Omit events with no depth specified. 
     78 
     79    === example === 
     80 
     81     `events -9.6 -71.3 3. 6.0`:: 
     82     Get eventlist from FDSN webserver with locations around (-9.6,-71.3) with 
     83     magnitudes of 6 and larger. 
     84 
     85     `events -9.6 -71.3 3. 6.0 ;; 60. 49. 11. p`:: 
     86     Modify the origin times in this list to trace start times according to P 
     87     arrival at location (49.,11.) and a constant time offset of 60 s. 
    2388    """ 
    2489    numberOfParameters = [4,5,6,9] 
  • SHX/trunk/SeismicHandler/commands/exec.py

    r1063 r1171  
    1414    """ 
    1515    URI:http://www.seismic-handler.org/portal/wiki/ShExec 
     16 
     17    [Wiki Doc Text] 
     18 
     19    == execute command line == 
     20 
     21    '''command''': EXEC <cmd-line> 
     22 
     23    Executes the command line given by the string <cmd-line>. Useful if the 
     24    command lines is stored in a string variable. As an example, let the string 
     25    "G1 be 'READ QFILE ALL'. Then the statement "G1 will produce an error, 
     26    because the command line is parsed first and then translated. This will 
     27    result in a command verb 'READ QFILE ALL', which is not valid. In contrast 
     28    to this the parameter <cmd-line> of the EXEC command is first translated, 
     29    then parsed and then the verb and the parameters are translated again. 
     30    That means the statement EXEC "G1 executes the command 'READ QFILE ALL' as 
     31    desired. 
     32 
     33    If <cmd-line> contains an incomplete command line, the possibly following 
     34    prompts are displayed on the information channel (IC) and all input is 
     35    read from the main input level (usually level 0). 
     36 
     37    === parameters === 
     38 
     39     * <cmd-line> ''parameter type: text''[[BR]] 
     40       Command line to be executed. 
     41 
     42    === example === 
     43 
     44     `exec |READ|$BLANK|#1|$BLANK|ALL|`:: 
     45     same as command "[ShRead READ] !#1 ALL" 
     46 
     47     `exec "G1`:: 
     48     executes command given by variable "G1 
     49 
     50     `exec #1`:: 
     51     executes command which is passed as first parameter to the current 
     52     command procedure 
    1653    """ 
    1754    numberOfParameters = [1,] 
  • SHX/trunk/SeismicHandler/commands/extract.py

    r1063 r1171  
    1515    """ 
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShExtract 
     17 
     18    [Wiki Doc Text] 
     19 
     20    == extract info from q-file == 
     21 
     22    '''command''': EXTRACT <q-file> <trcno> <info> <symbol> 
     23 
     24    Extracts information from given q-file and stores it in specified symbol. 
     25 
     26    === parameters === 
     27 
     28     * <q-file> ''parameter type: filename (without extension)''[[BR]] 
     29       Name of q-file, where the information should be extracted. 
     30 
     31     * <trcno> ''parameter type: integer''[[BR]] 
     32       Number of trace in the q-file to read the information from. If <info> 
     33       equals to "NO_OF_RECS" this parameter is ignored. 
     34 
     35     * <info> ''parameter type: info entry''[[BR]] 
     36       Name of info entry to be extracted from specified trace or keyword 
     37       "NO_OF_RECS" to get total number of traces in the q-file. The 
     38       mandantory <trcno> parameter is here omitted. 
     39 
     40     * <symbol> ''parameter type: symbol address''[[BR]] 
     41       Name of symbol where the information value is to be stored. 
     42 
     43    === examples === 
     44 
     45     `extract MYQFILE 3 SLOWNESS &SLO`:: 
     46     extracts slowness value from 3 trace in file "MYQFILE" and stores it in 
     47     symbol "SLO". 
     48 
     49     `extract MYQFILE 1 NO_OF_RECS &NO`:: 
     50     returns number of traces in q-file "MYQFILE" in symbol "NO". 
    1751    """ 
    1852    expectFilename = 0 
  • SHX/trunk/SeismicHandler/commands/fct.py

    r1069 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShFct 
     18    [Wiki Doc Text] 
     19 
     20    == multi-functional command == 
     21 
     22    '''command''': FCT <subfunction> <p1> ...<pN> 
     23 
     24    Some low level commands. Action depends on <subfunction>. 
     25 
     26    === parameters === 
     27 
     28     * <subfunction> ''parameter type: string''[[BR]] 
     29       Valid inputs are: 
     30       * AMPLICUT[[BR]] 
     31         sets maximum amplitude to be displayed if AMPLICUT flag is set on a 
     32         trace. With this flag set the display manager cuts off peaks with 
     33         larger amplitudes than <p1>. 
     34         * <p1> = maximum amplitude for all traces with AMPLICUT flag set 
     35       * AUTHOR[[BR]] 
     36         prints program info 
     37       * AXIS[[BR]] 
     38         sets axis parameters of axis <p1> 
     39         * <p1> = name of axis (string) 
     40         * <p2> = name of axis item (string, see list below) 
     41         * <p3> = new value of axis item 
     42         valid axis items: VPOS, LINE_S, LINE_E, TICK_S, TICK_INTV, LAB1VAL, 
     43         LAB_INTV, LAB1CNT, LABCNT, TICK_LTH, LTICK_LTH, LABSHIFT, LABDIST, 
     44         STYLE, LABFMT 
     45       * CHANGE_VEL[[BR]] 
     46         changes P or S velocities (read in by [ShFct FCT] READ_VEL) by a 
     47         constant factor <p2> 
     48         * <p1> = P or S 
     49         * <p2> = multiplication factor 
     50       * CORRMODE[[BR]] 
     51         sets correlation mode 
     52         * <p1> = correlation mode number (integer: 1,2 or 3) 
     53       * LOCAL[[BR]] 
     54         executes command which is machine dependend 
     55       * LOCFILE[[BR]] 
     56         sets location file name (file containing location of various stations) 
     57         * <p1> = name and path of location file 
     58       * MARGIN[[BR]] 
     59         sets margin widths of display (in units of width & height) 
     60         * <p1> = name of margin: L(eft), R(ight), T(op), B(ottom) 
     61         * <p2> = margin width in units of width (L,R) and height (T,B) 
     62       * PATH[[BR]] 
     63         sets directory paths 
     64         * <p1> = directory name (valid directory names: SCRATCH, HELP, INPUTS, 
     65         COMMAND, GLOBALS, FILTER, ERRORS, CURVES) 
     66         * <p2> = new directory string (string)      
     67       * QCOMMENT[[BR]] 
     68         inserts text file as a comment into header of q-file 
     69         * <p1> = comment file 
     70         * <p2> = q-file 
     71       * QDIR[[BR]] 
     72         set file prefix for q-file operations. To be used if header and binary 
     73         files are on different directories. 
     74         * <p1> = H (for header files) or B (for binary files) 
     75         * <p2> = file prefix 
     76       * QLINES[[BR]] 
     77         add info lines to a q-header file. If a new trace is appended to an 
     78         existing q-file it may occur that there are not enough info lines in 
     79         the q-file to hold all the information assigned to the new trace. 
     80         With this command you can extend the number of info lines pre trace 
     81         in the q-file by <p2> lines. 
     82         * <p1> = q-file name 
     83         * <p2> = number of info lines to be added on each trace 
     84       * READ_VEL[[BR]] 
     85         reads velocity file (for PS-delay routines) 
     86         * <p1> = name of velocity file (default extension ".VEL") 
     87       * SETPAR[[BR]] 
     88         sets graphics parameters 
     89         * <p1> = channel map 
     90         * <p2> = item to be changed (depends on graphic channel) 
     91         * <p3> = new value of item 
     92       * SETSTYLE[[BR]] 
     93         changes style attribute block number <p1>. 
     94         * <p1> = line attribute block number (integer) 
     95         * <p2> = attribute name (string, see list below) 
     96         * <p3> = new value of attribute 
     97         valid attribute names: CHARSIZE, COLOR, FONT, LINESTYLE, LINEWIDTH, 
     98         WRMODE (REPLACE, XOR) 
     99       * STATION[[BR]] 
     100         insert station to location file 
     101         * <p1> = station name  (string) 
     102         * <p2> = latitude  (real) 
     103         * <p3> = longitude  (real) 
     104         * <p4> = array code  (integer) 
     105         * <p5> = rel. array x-position  (real) 
     106         * <p6> = rel. array y-position  (real) 
     107         * <p7> = comment (string) 
     108       * TT_TABLE[[BR]] 
     109         set name of travel time table 
     110         * <p1> = name of ASCII travel time table 
     111 
     112    Deprecated values: 
     113       * TERMINATORS[[BR]] 
     114         changes terminator set of command line parser (dangerous command! May 
     115         confuse beginners, included [ShProcedures command procedures] won't 
     116         run anymore!) 
     117         * <p1> = string containing new terminator set (1. char: BLANK; 
     118         2. char: qualifier; all others: additional terminators; default 
     119         is " /;" 
     120       * SETHC[[BR]] 
     121         sets hardcopy parameters (will be replaced by SETPAR in future) 
     122         * <p1> = item to be changed (VAX: JOB_QUEUE HC_QUEUE CCPAR CCROT) 
     123         * <p2> = new value of item 
     124 
     125 
     126    === example === 
     127 
     128     `fct qdir b opdir:`:: 
     129      adds string "opdir:" at the beginning on every file access to a q-binary file. 
    18130    """ 
    19131    parameterQueries = [ 
  • SHX/trunk/SeismicHandler/commands/fdsnws.py

    r1155 r1171  
    2222    """ 
    2323    URI:http://www.seismic-handler.org/portal/wiki/ShFdsnws 
     24 
     25    [Wiki Doc Text] 
     26 
     27    == Retrieve waveforms via FDSN webservice == 
     28 
     29    '''command''': FDSNWS <network> <station> <location> <channel> <start> <seclength>[[br]] 
     30    or[[br]] 
     31    '''command''': FDSNWS <circledef> <station> <location> <channel> <start> <seclength>[[br]] 
     32    or[[br]] 
     33    '''command''': FDSNWS <bulkfile>[[br]] 
     34 
     35    Retrieve waveform data from an FDSN webserver. In the current 
     36    implementation of the request protocol the request is not routed or 
     37    forwarded in any way, so the user needs to know which data are available 
     38    at each server. Wildcards are supported also the station selection by area 
     39    (see parameter descriptions). 
     40 
     41    === parameters === 
     42 
     43     * <network> ''parameter type: string''[[br]] 
     44       Network code or comma separated list of network codes to request 
     45       stations from. Examples "GR" or "GR,TH". 
     46 
     47     * <station> ''parameter type: string''[[br]] 
     48       Station or comma separated list of stations data from. Accepts wildcards. 
     49       Examples "GRA1", "GRA1,GRA2", "GR*" or "*". 
     50 
     51     * <location> ''parameter type: string''[[br]] 
     52       Location code or comma separated list of location codes. Accepts 
     53       wildcards. Examples ",00" or "*". 
     54 
     55     * <channel> ''parameter type: string''[[br]] 
     56       Channel code. Accepts wildcards. Examples "BHZ", "BH*" or "*". 
     57 
     58     * <starttime> ''parameter type: string''[[br]] 
     59       Start time in SH notation. Example "12-Jul-2015_06:30:22". 
     60 
     61     * <seclength> ''parameter type: float''[[br]] 
     62       Length of requested data window in s. 
     63 
     64     * <circledef> ''parameter type: list of float''[[br]] 
     65       Comma separated triple of floating point numbers, specifying latitude, 
     66       longitude of a location on earth and radius in deg around this point. 
     67       Data from all stations known to the FDSN server and located in this 
     68       circle around point (latitude,longitude) are returned in this request. 
     69       Example "49.,11.,1.". 
     70 
     71     * <bulkfile> ''parameter type: string''[[br]] 
     72       File containing the data request to the FDSN server. Format see 
     73       qualifier "/bulkline". Currently FDSN servers deliver data which are  
     74       not properly aligned to the time windows specified, but contain complete 
     75       SEED records. 
     76 
     77    === qualifiers === 
     78 
     79     * /addr[[br]] 
     80       Specify FDSN server or alias name. Default server is read from 
     81       configuration file, section [fdsnws], variable "default_data_source". 
     82       Known server names are "BGR", "GFZ", "INGV", "IRIS" and others, see 
     83       ObsPy documentation. 
     84 
     85     * /bulkline[[br]] 
     86       Do not process the given request but return a line for a bulk request. 
     87       Combined with the "echo" command a bulk request file can be assembled. 
     88       Does not work with <circledef> parameter. 
     89 
     90    === example === 
     91 
     92     `fdsnws gr gr* * bhz 17-aug-15_8:30 300 /addr=bgr`:: 
     93     Reads five minutes of GRF array BHZ data from the BGR FDSN server. 
     94 
     95     `fdsnws 51.,10.,2. * * bhz 7-aug-15_00:16:30 600`:: 
     96     Reads ten minutes of BHZ data from the default FDSN server, take all 
     97     stations with 1 deg distance from point (51.,10.). See "help;;" command 
     98     for more examples. 
    2499    """ 
    25100    numberOfParameters = [1,6] 
  • SHX/trunk/SeismicHandler/commands/fetch.py

    r1136 r1171  
    2323    """ 
    2424    URI:http://www.seismic-handler.org/portal/wiki/ShFetch 
     25 
     26    [Wiki Doc Text] 
     27 
     28    == Fetch seismograms from arclink servers == 
     29 
     30    '''command''': FETCH <stations> <channel> <components> <start> <length> 
     31 
     32    Load waveform data from remote arclink servers. The downloaded data is 
     33    cached by default. 
     34 
     35    === parameters === 
     36 
     37     * <stations> ''parameter type: string''[[br]] 
     38       Denotes the stations. The notation in SEED-Format style is mandantory, 
     39       e.g. GR.GRA. (network GR, station GRA1, location empty). If you did 
     40       configure station aliases, they will be resolved. 
     41 
     42     * <channel> ''parameter type: string''[[br]] 
     43       Request channel type, e.g. '''BH'''. 
     44 
     45     * <components> ''parameter type: string''[[br]] 
     46       Set component(s), e.g. '''Z''' or '''ZNE''' 
     47 
     48     * <start> ''parameter type: time''[[br]] 
     49       Beginning of the data window. 
     50 
     51     * <duration> ''parameter type: float''[[br]] 
     52       Duration of the data window in seconds. 
     53 
     54 
     55    === qualifiers === 
     56 
     57     * /host[[br]] 
     58       Use other arclink server than specified in configuration file. 
     59 
     60     * /usecache[[br]] 
     61       Use cache for reading. As default SHX requests data remotely if the 
     62       local cache does not contain data for start time and of given length. 
     63       There's no method to check whether a in-between gap results from missing 
     64       local or original data without remote request (this would make the cache 
     65       irrelevant). Therefore you should only save "final" data to cache (see 
     66       next parameter). Does not support wildcards. 
     67 
     68     * /save[[br]] 
     69       Save downloaded data into local cache. SHX builds an SDS structure in 
     70       {{{$HOME/.shx/sds/}}}. 
     71 
     72     * /user[[br]] 
     73       Set username for request (override "user" value in section [arclink] of 
     74       configuration file) 
     75 
     76     * /password[[br]] 
     77       Set password for request (override "login" value in configuration file) 
     78 
     79     * /storemeta[[br]] 
     80       Store meta data of fetched streams in user's data base. 
     81 
     82     * /local[[br]] 
     83       Disable remote access. Sets implicitly {{{USECACHE}}} option. 
     84 
     85    === examples === 
     86 
     87     `fetch gr.gra1. bh z 1-jan-12_1:44:44 600 /save`:: 
     88     Download and save data into cache for station GRA1 in given time-range. 
     89 
     90     `fetch gra1,grb1,grc1 hh ne 1-jan-12_12:12:12 300 /local`:: 
     91     Load 100 Hz data for three station aliases of Graefenberg array, read 
     92     only from cache. 
    2593    """ 
    2694    numberOfParameters = [5] 
  • SHX/trunk/SeismicHandler/commands/fetch_area.py

    r1090 r1171  
    2828    URI:http://www.seismic-handler.org/portal/wiki/ShFetchArea 
    2929     
    30     fetch_area centerlat centerlon degradius channelprio start length 
     30    [Wiki Doc Text] 
     31 
     32    == Fetch waveforms from arclink servers selected by area == 
     33 
     34    '''command''': FETCH_AREA <lat> <lon> <halfwidth> <chanlist> <start> <seclength> 
     35 
     36    Retrieve waveform data from arclink servers selected by area. 
     37 
     38    === parameters === 
     39 
     40     * <lat> ''parameter type: float''[[br]] 
     41       Area center point latitude. Defines rectangular area together with 
     42       <lon> and <halfwidth>. 
     43 
     44     * <lon> ''parameter type: float''[[br]] 
     45       Area center point longitude. Defines rectangular area together with 
     46       <lon> and <halfwidth>. 
     47 
     48     * <halfwidth> ''parameter type: float''[[br]] 
     49       All stations are selected which differ less than <halfwidth> degrees in 
     50       latitude and longitude. 
     51 
     52     * <chanlist> ''parameter type: string''[[br]] 
     53       Comma separated channel list (without components). Only the first 
     54       channel found is this list is read from the server. Example "hh,bh". 
     55 
     56     * <start> ''parameter type: string''[[br]] 
     57       Start time in SH notation. Example "16-Jun-2016_08:30:22". 
     58 
     59     * <seclength> ''parameter type: float''[[br]] 
     60       Length in s of data traces requested. 
     61 
     62    === qualifiers === 
     63 
     64     * /host[[br]] 
     65       Address the request to this arclink server (default in SHX config file). 
     66 
     67     * /usecache[[br]] 
     68       Try to read data from cache first before sending a request to the 
     69       arclink server. 
     70 
     71     * /save[[br]] 
     72       Save retrieved waveforms into local cache. 
     73 
     74     * /storemeta[[br]] 
     75       Store station metadata into local database. 
     76 
     77     * /local[[br]] 
     78       Do not send requests to arclink servers, only use cache. 
     79 
     80     * /location=<loclist>[[br]] 
     81       Priority list for location codes, similar to the <chanlist> parameter 
     82       for channels. 
     83 
     84     * /comp=<compspec>[[br]] 
     85       Specify components to read. Default "zne,z12", i.e. 3 component data. Alternative is "z" to read only verticals. 
     86 
     87 
     88    === example === 
     89 
     90     `fetch_area 51. 10. 2. bh,sh,hh,eh 7-aug-15_00:16:30 600 /comp=z /save /storemeta`:: 
     91     Read 10 min of data of stations around point (51.,10.) with maximum 
     92     difference of 2 deg in lat and lon. Read the first vertical channel found 
     93     in BH, SH, HH, EH for each station. Store delivered data in local cache, 
     94     put metadata into local database. 
    3195    """ 
    3296    numberOfParameters = [6] 
  • SHX/trunk/SeismicHandler/commands/fili.py

    r1063 r1171  
    1818    """ 
    1919    URI:http://www.seismic-handler.org/portal/wiki/ShFili 
     20 
     21    [Wiki Doc Text] 
     22 
     23    == read filter(s) == 
     24 
     25    '''command''': FILI <kind> <filter1>[ <filter2>[ ...<filterN>]] 
     26 
     27    Reads one or more filters from file into memory (only one digital 'D' 
     28    filter). All following FILTER commands of the same <kind> will use these 
     29    filters read in. Filters read in by previous FILI commands are overwritten. 
     30    The filters are searched in the current directory and if not found there, 
     31    they are read from the filter directory. The filter directory can be 
     32    changed by [ShFct FCT] PATH FILTER <dir-string>. 
     33 
     34    The filter file extensions must be omitted. The extensions are ".FLF" for 
     35    FFT and digital filters (<kind> = 'F', <kind> = 'D') and ".FLR" for 
     36    recursive filters (<kind> = 'R'). 
     37 
     38    For detailed information about filter file format see FILTFORM.INF. If a 
     39    sequence of FFT filters is read in, zeroes in numerator and denominator of 
     40    all transfer functions are shortened automatically if possible. 
     41 
     42    === parameters === 
     43 
     44     * <kind> ''parameter type: char''[[BR]] 
     45       Determines kind of filter file. Valid values are 'F' (FFT filters), 
     46       'D' (digital filters) and 'R' (recursive filters). 
     47 
     48     * <filter1> ... <filterN> ''parameter type: filename (without extension)''[[BR]] 
     49       Name of filter files to be read into memory. 
     50 
     51    === qualifiers === 
     52 
     53     * /compress[[BR]] 
     54       Only valid for FFT filters (<kind> = 'F'). The transfer functions of the whole sequence is squeezed to a single transfer function. This way the filtering is done in a single step and not by a cascade of filters. 
     55 
     56    === example === 
     57 
     58     `fili F WWSSN_SP`:: 
     59     reads WWSSN-SP FFT filter 
    2060    """ 
    2161    numberOfParameters = [2, 3, 4, 5] 
  • SHX/trunk/SeismicHandler/commands/filter_.py

    r1120 r1171  
    2020    """ 
    2121    URI:http://www.seismic-handler.org/portal/wiki/ShFilter 
     22 
     23    [Wiki Doc Text] 
     24 
     25    == filter traces == 
     26 
     27    '''command''': FILTER <kind> <trc-list> [<lo-wdw> <hi-wdw>] [<att>] 
     28 
     29    Filters traces with filters read in previously by a FILI command (kinds 
     30    'F' and 'R') ar attenuates traces (kind 'A'). All filters of the specified 
     31    kind (<kind>) in memory are applied sequentially to the traces. If no time 
     32    window (<lo-wdw>, <hi-wdw>) is specified, the whole traces are filtered. 
     33    No respect is payed to a globally set time window (see [ShStw STW]). If 
     34    <kind> 'A' is selected, the desired attenuation must be passed in parameter 
     35    <att> (t* in sec). 
     36 
     37    The result of filtering is displayed in new traces. The input traces remain 
     38    unchanged. 
     39 
     40    === parameters === 
     41 
     42     * <kind> ''parameter type: char''[[BR]] 
     43       Kind of filter.  Valid values are 
     44       * 'F' - applies FFT filter, previously read in by a "[ShFili FILI] F <file>" command 
     45       * 'T' - applies digital filter, previously read in by a "[ShFili FILI] T <file>" command 
     46       * 'R' - applies recursive filter, previously read in by a "[ShFili FILI] R <file>" command 
     47       * 'A' - attenuation with t* = <att> sec 
     48       * 'H' - computes Hilbert transformation 
     49       * 'M' - computes minimum delay wavelet 
     50       * 'P' - (undocumented) 
     51 
     52     * <trc-list> ''parameter type: trace list''[[BR]] 
     53       Input traces for filtering. These trace remain unchanged. If no time 
     54       window is entered, all traces are filtered. 
     55 
     56     * <lo-wdw>, <hi-wdw> ''parameter type: real''[[BR]] 
     57       Time window on all traces. The filtering of the input traces is 
     58       restricted to this time window. 
     59 
     60     * <att> ''parameter type: real''[[BR]] 
     61       Attenuation (t* in sec). Only valid for <kind> = 'A'. 
     62 
     63    === qualifiers === 
     64 
     65     * /taper=<tapval>[[BR]] 
     66       Valid only for FFT and digital filters. Applies a cosine taper to 
     67       filtered trace in frequency domain. <tapval> ranges from 0.0 to 1.0. 
     68       Default value is 1.0. The taper is started at sample <tapval>*N if N is 
     69       the length of the trace in frequency domain. A value of 1.0 and greater 
     70       means that no taper is applied. 
     71 
     72     * /demean[[BR]] 
     73       (undocumented) 
     74 
     75     * /lpc[[BR]] 
     76       (undocumented) 
     77 
     78    === example === 
     79 
     80     `filter F ALL`:: 
     81     filters all traces with the previous read filter in full length 
     82 
     83     `filter F 1-3 10 110`:: 
     84     filters traces 1-3 within time window 10..110 
    2285    """ 
    2386    numberOfParameters = [2, 4] 
  • SHX/trunk/SeismicHandler/commands/findgap.py

    r1063 r1171  
    1818    """ 
    1919    URI:http://www.seismic-handler.org/portal/wiki/ShFindGap 
     20 
     21    [Wiki Doc Text] 
     22 
     23    == find samples of constant value == 
     24 
     25    '''command''': FINDGAP <trc-list> <outfile> <minzeroes> [<from>  <to>] 
     26 
     27    Scans the specified traces for sequences of samples with constant values 
     28    (e.g. 0). Since data gaps are filled by zeroes automatically when reading 
     29    the traces this command will find gaps as well as time intervals with 
     30    ill-conditioned data. 
     31 
     32    The search will be triggered when it find a sequence of equal to or more 
     33    than <minzeroes> samples of the same value.  The result of the search is 
     34    written to a file <outfile>. 
     35 
     36    === parameters === 
     37 
     38     * <trc-list> ''parameter type: trace list''[[br]] 
     39       List of traces to be searched. 
     40 
     41     * <outfile> ''parameter type: filename''[[br]] 
     42       Output file where the gaps are written to. 
     43 
     44     * <from>, <to> ''parameter type: real''[[br]] 
     45       Optional time window to restrict the search. If omitted the whole trace 
     46       is processed. 
     47 
     48    === qualifiers === 
     49 
     50     * /WRITECHAN[[br]] 
     51       Also write data channel to <outfile> (not only station and component) 
     52 
     53     * /REQSTART=X 
     54       (undocumented) 
     55 
     56    === example === 
     57 
     58     `findgap all gap 8`:: 
     59     Find gaps on all traces, write to GAP.STX 
    2060    """ 
    2161    numberOfParameters = [3, 5] 
  • SHX/trunk/SeismicHandler/commands/fixgap.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShFixGap 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == fix gap == 
     23 
     24    '''command''': FIXGAP <trc-list> <value> [<lo-wdw> <hi-wdw>] 
     25 
     26    Removes zeros from traces introducing a straight line connecting non-zero 
     27    values. The input trace is modified. 
     28 
     29    === parameters === 
     30 
     31     * <trc-list> ''parameter type: trace list''[[br]] 
     32       Input traces. 
     33 
     34     * <value> ''parameter type: real''[[br]] 
     35       Value that should be fixed (normally zero). 
     36 
     37     * <lo-wdw>, <hi-wdw> ''parameter type: real''[[br]] 
     38       Time window on all traces. 
     39 
     40    === qualifiers === 
     41 
     42     * /one[[br]] 
     43       Replace even one single <value>. 
     44 
     45     * /const[[br]] 
     46       Use constant line for gap filling. 
     47 
     48    === example === 
     49 
     50     `fixgap 1 0`:: 
     51     Replace all contiguous zero values by a straight line on trace 1. 
    1952    """ 
    2053    numberOfParameters = [2, 4] 
  • SHX/trunk/SeismicHandler/commands/fk.py

    r1118 r1171  
    4646    URI:http://www.seismic-handler.org/portal/wiki/ShFk 
    4747     
    48     fk <trclist> <time1> <time2> [<frqmin> <frqmax>] [<slomax>] [<slores>] {<azres>] 
    49     /winlen /winfrac /prewhiten /slostep 
     48    [Wiki Doc Text] 
     49 
     50    == Slowness-wavenumber analysis on array traces == 
     51 
     52    '''command''': FK <trclist> <starttime> <endtime> [<minfreq>] [<maxfreq>] [<maxslowness>] [<sloresult>] [<azresult>] 
     53 
     54    Perform FK analysis on array traces, determine slowness and azimuth of 
     55    incoming plane wave. Based on obspy routine "array_processing". 
     56 
     57    === parameters === 
     58 
     59     * <trclist> ''parameter type: trace list''[[br]] 
     60       List of input traces for FK algorithm. 
     61 
     62     * <starttime> ''parameter type: float''[[br]] 
     63       Start time of time window in seconds read from time axis. 
     64 
     65     * <endtime> ''parameter type: float''[[br]] 
     66       End time of time window in seconds read from time axis. 
     67 
     68     * <minfreq> ''parameter type: float''[[br]] 
     69       Lower bound of frequency window for FK in Hz. 
     70 
     71     * <maxfreq> ''parameter type: float''[[br]] 
     72       Upper bound of frequency window for FK in Hz. 
     73 
     74     * <maxslowness> ''parameter type: float''[[br]] 
     75       Upper bound of slowness in s/deg in x and y direction. 
     76 
     77     * <sloresult> ''parameter type: output variable''[[br]] 
     78       Name of output variable for slowness result in s/deg. 
     79 
     80     * <azresult> ''parameter type: output variable''[[br]] 
     81       Name of output variable for azimuth result. 
     82 
     83    === qualifiers === 
     84 
     85     * /winlen=<winlen>[[br]] 
     86       Window length in s for segments put into FK algorithm. Default: 
     87       <endtime> - <starttime>, i.e. only one time step is computed. 
     88 
     89     * /winfrac=<winfrac>[[br]] 
     90       Fraction of window used as step size (see description of obspy 
     91       array_processing routine). Default 0.05. 
     92 
     93     * /slostep=<slostep>[[br]] 
     94       Slowness step size, determines resolution of output matrix, default 
     95       <maxslowness>/100. 
     96 
     97     * /scatter=<outfile>[[br]] 
     98       Output filename for scatter plot. The scatter plot contains the results 
     99       of each time step. 
     100 
     101     * /polar=<outfile>[[br]] 
     102       Output filename for polar plot. The polar plot contains a histogram of 
     103       the results of all time steps. 
     104 
     105     * /slownessmap=<outfile>[[br]] 
     106       Output filename for slowness map. The slowness map contains the slowness 
     107       matrix of a single time step. 
     108 
     109     * /kmunits[[br]] 
     110       Input numbers and plot scalings are given in s/km instead of s/deg. 
     111 
     112    === example === 
     113 
     114     `fk 17-51 53. 69. 0.4 3.0 15.0 &slo &az /slownessmap=slmap.png`:: 
     115     Compute slowness and azimuth for signals between seconds 53. and 69. for 
     116     traces 17 to 51 in a frequency range between 0.4 and 3 Hz and a maximum 
     117     slowness of 15 s/deg. The results are copied into variables "slo" and "az". 
     118     The slownessmap of this single time step is produced in file "slmap.png". 
    50119    """ 
    51120    # Define number and type of parameters, possible qualifiers. 
  • SHX/trunk/SeismicHandler/commands/fold.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShFold 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == fold traces with filter == 
     23 
     24    '''command''': FOLD <trc-list> [<lo-bound> <hi-bound>] <filter> 
     25 
     26    Folds traces with a filter trace <filter>. If no time window <lo-bound>, 
     27    <hi-bound> is specified the whole traces are filtered. 
     28 
     29    === parameters === 
     30 
     31     * <trc-list> ''parameter type: trace list''[[BR]] 
     32       List of traces to be filtered. 
     33 
     34     * <lo-bound>, <hi-bound> ''parameter type: real''[[BR]] 
     35       If specified the filtering is restricted to this time window given in 
     36       seconds relative to the time axis, otherwise the whole trace is filtered. 
     37 
     38     * <filter> ''parameter type: trace'' 
     39       Filter trace. 
     40 
     41    === example === 
     42 
     43     `fold 1-3 10. 20. 4`:: 
     44     folds traces 1,2,3 with trace 4 between 10 sec and 20 sec 
     45 
     46     `fold 1;;;4`:: 
     47     folds whole trace 1 with trace 4 
    1948    """ 
    2049    numberOfParameters = [4] 
  • SHX/trunk/SeismicHandler/commands/hc.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShHc 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == hardcopy == 
     23 
     24    '''command''': HC [<wdw>] [<out>] 
     25 
     26    Makes hardcopy of <wdw> on channel <out>. If no <wdw> parameter is passed 
     27    the current graphics channel is hardcopied. If the <out> parameter is 
     28    omitted the default output channel is used. The default output channel can 
     29    be changed with the /DEFAULT qualifier. 
     30 
     31    === parameters === 
     32 
     33     * <wdw> ''parameter type: string''[[BR]] 
     34       Window number and channel (example "X1" for X-window number 1) 
     35 
     36     * <out> ''parameter type: string''[[BR]] 
     37       Channel name of output channel (example "P" for !PostScript or "C" for 
     38       Calcomp). 
     39 
     40    === qualifiers === 
     41 
     42     * /default=<out>[[BR]] 
     43       Changes the default output channel which is used if no <out> parameter 
     44       is used. If this qualifer is specified no hardcopy will be produced. 
     45 
     46    === example === 
     47 
     48     `hc`:: 
     49     Makes hardcopy of your current graphic window on the current default 
     50     output channel. 
     51 
     52     `hc/default=C`:: 
     53     Produces no hardcopy but changes the default output channel to Calcomp. 
    1954    """ 
    2055    numberOfParameters = [0, 1, 2, 3] 
  • SHX/trunk/SeismicHandler/commands/help.py

    r1166 r1171  
    99from SeismicHandler.modules.traces import Traces as BaseTraces, traces_from_list 
    1010from SeismicHandler.basics import timeit 
     11from SeismicHandler.basics.tools import CommandDocs 
    1112from SeismicHandler.config import Settings 
    1213import os 
     
    142143    """ 
    143144    URI:http://www.seismic-handler.org/portal/wiki/ShDisplay 
     145 
     146    [Wiki Doc Text] 
     147 
     148    == help utility == 
     149 
     150    '''command''': HELP [<cmds>] 
     151 
     152    Displays help information about seismic handler commands. It is possible to get a directory of all commands available ([ShHelp HELP]/DIR), a command menu with short catchwords ([ShHelp HELP]/KEY), a list of lines containing command verb and its parameters ([ShHelp HELP]/CALL) or detailed information about one or more commands specified by <cmds> (without qualifier). 
     153 
     154    === parameters === 
     155 
     156     * <cmds> ''parameter type: string''[[BR]] 
     157       Name of command or wild card expression ("*" is wild card for arbitrary text). The HELP command without parameter is equivalent to the command "[ShHelp HELP]/DIR *", it displays the directory of all help items available. 
     158 
     159    === qualifiers === 
     160 
     161     * /dir (SH only) [[BR]] 
     162       Displays all command verbs matching the wild card expression <cmds>. The HELP command without any parameter is equivalent to "[ShHelp HELP]/DIR *". 
     163 
     164     * /call (SH only) [[BR]] 
     165       Displays all commands matching the wild card expression <cmds> with their parameter lists (without description of parameters). 
     166 
     167     * /key (SH only) [[BR]] 
     168       Displays a menu of commands matching the wild card expression <cmds> with a very short description of the command. 
     169 
     170    === examples === 
     171 
     172     `help`:: 
     173     displays a list of all available command verbs 
     174 
     175     `help FILTER`:: 
     176     displays the whole information about the FILTER command 
     177 
     178     `help FIL*`:: 
     179     displays the whole information about all commands beginning with "FIL" 
     180 
     181     `help/key`:: 
     182     displays a list of all available command verbs with catch words 
     183 
     184     `help/key FIL*`:: 
     185     same as above restricted to commands beginning with "FIL" 
     186 
     187     `help/dir FIL*`:: 
     188     list of all command verbs beginning with "FIL" 
     189 
     190     `help/dir *`:: 
     191     equivalent to plain "HELP" 
     192 
     193     `help/call`:: 
     194     displays all available commands with parameter list 
     195 
     196     `help/call FIL*`:: 
     197     displays commands beginning with "FIL" with parameter list 
    144198    """ 
    145199    numberOfParameters = [1] 
     
    167221            os.system( "%s %s &" % (textdisplay,tpath) ) 
    168222        elif cmd: 
    169             url = "https://www.seismic-handler.org/wiki/Sh%s" % cmd.capitalize() 
    170             shellcmd = "wget -O - %s | html2text" % url 
    171             os.system( shellcmd ) 
    172             print 
    173             print "__________________________________________________________" 
    174             print 
    175             print "Tried to read text from site '%s'. " % url 
    176             print "Use your browser for better performance." 
    177             print "__________________________________________________________" 
    178             print 
     223            lcmd = cmd.lower() 
     224            if lcmd.startswith('*'): 
     225                lst = [] 
     226                for command in sorted(CommandDocs().getCommands()): 
     227                    if command.endswith(lcmd[1:]): 
     228                        lst.append( command ) 
     229                print ' '.join(lst) 
     230            elif lcmd.endswith('*'): 
     231                lst = [] 
     232                for command in sorted(CommandDocs().getCommands()): 
     233                    if command.startswith(lcmd[:-1]): 
     234                        lst.append( command ) 
     235                print ' '.join(lst) 
     236            else: 
     237                print CommandDocs().getDoc(cmd) 
    179238        else: 
    180239            print firststeps 
  • SHX/trunk/SeismicHandler/commands/hide.py

    r1063 r1171  
    1515    """ 
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShHide 
     17 
     18    [Wiki Doc Text] 
     19 
     20    == hide traces == 
     21 
     22    '''command''': HIDE <trc-list> 
     23 
     24    Removes traces from display but keeps them in memory. Hidden traces can be redisplayed with the [ShDisplay DISPLAY] command. 
     25 
     26    === parameters === 
     27 
     28     * trc-list> ''parameter type: trace list''[[BR]] 
     29       List of traces to be hidden. 
     30 
     31    === example === 
     32 
     33     `hide ALL`:: 
     34     clears display, keeps traces in memory 
     35 
     36     `hide 1,4`:: 
     37     remove two specified traces from display 
    1738    """ 
    1839    numberOfParameters = [1,] 
  • SHX/trunk/SeismicHandler/commands/int_.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShInt 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == integrate traces == 
     23 
     24    '''command''': INT <trc-list> 
     25 
     26    Integrates all traces specified in <trc-list>. The input traces remain 
     27    unchanged, the INT command creates new traces containing the integration 
     28    output. 
     29 
     30    === parameters === 
     31 
     32     * <trc-list> ''parameter type: trace list''[[BR]] 
     33       List of traces to be integrated. 
     34 
     35    === qualifiers === 
     36 
     37     * /mode=<mode>[[BR]] 
     38       Specifies integration mode. Possible values are SUM (this is default; 
     39       the output trace is not normalized, are the sums of all previous samples 
     40       of the input trace), MEAN (the output trace is normalized by the number 
     41       of samples 1/N) and INT (the output trace is normalized by the sample 
     42       distance). 
     43 
     44    === examples === 
     45 
     46     `int 1`:: 
     47     Integrates first trace on display. 
     48 
     49     `int ALL`:: 
     50     Integrates all traces on display. 
     51 
     52     `mode/mode=MEAN 1`:: 
     53     Integrates 1 trace on display and normalizes the output trace by the 
     54     sample distance. 
    1955    """ 
    2056    numberOfParameters = [1] 
  • SHX/trunk/SeismicHandler/commands/locate.py

    r1145 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShLocate 
     18     
     19    [Wiki Doc Text] 
     20     
     21    Docs missing ... 
    1822    """ 
    1923    numberOfParameters = [1,2,3,4] 
  • SHX/trunk/SeismicHandler/commands/magnitude.py

    r1151 r1171  
    3434    magnitude set <magtype> <station> <value> 
    3535    magnitude plot <magtype> 
     36 
     37    [Wiki Doc Text] 
     38 
     39    == Magnitude handling == 
     40 
     41    '''command''': MAGNITUDE <subcmd> <magtype>[[br]] 
     42    or[[br]] 
     43    '''command''': MAGNITUDE DETERMINE <magtype> <trclist> <from> <to>[[br]] 
     44    or[[br]] 
     45    '''command''': MAGNITUDE DETERMINE <magtype> <trclist> <phaselist> <span> 
     46    or[[br]] 
     47    '''command''': MAGNITUDE SET <magtype> <station> <value> 
     48 
     49    Magnitude management. Magnitudes are stored in a separate container, which is controlled via this command set. 
     50 
     51    === parameters === 
     52 
     53     * <subcmd> ''parameter type: string''[[br]] 
     54       Magnitude subcommand: possible values are:[[br]] 
     55       DETERMINE: determine magnitude from waveform data[[br]] 
     56       SET: set magnitude values (mainly used for recovery operations)[[br]] 
     57       CLEAR: delete a subset of magnitudes[[br]] 
     58       CLEAR_ALL: delete all magnitudes[[br]] 
     59       MEAN: compute mean magnitude[[br]] 
     60       PLOT: create magnitude vs distance plot[[br]] 
     61       DUMP: dump all phases on screen. 
     62 
     63     * <magtype> ''parameter type: string''[[br]] 
     64       Magnitude type, possible values: 'ml', 'mb', 'mS', 'mBB'. 
     65 
     66     * <trclist> ''parameter type: trace list''[[br]] 
     67       List of traces to compute magnitudes. 
     68 
     69     * <from> ''parameter type: float''[[br]] 
     70       Start of (fixed) time window to find magnitude on waveforms. 
     71 
     72     * <to> ''parameter type: float''[[br]] 
     73       End of (fixed) time window to find magnitude on waveforms. 
     74 
     75     * <phaselist> ''parameter type: string''[[br]] 
     76       Comma separated list of phases. Find magnitude windows around phases. Uses manual (preferred) and theoretical phases. Takes the largest magnitude found in all windows. 
     77 
     78     * <span> ''parameter type: float''[[br]] 
     79       Width of time span to find magnitudes around phases. <span> is taken after manual phases or around (centered) theoretical phases. 
     80 
     81    === qualifiers === 
     82 
     83    None 
     84 
     85    === example === 
     86 
     87     `@MAGNITUDE DETERMINE ml ALL Pg,Sg 8.`:: 
     88     Determine ml-magnitudes in 8s windows around Pg and Sg phases on all traces. 
     89 
     90     `magnitude mean ml &g1`:: 
     91     Compute mean ml magnitude on all stations and put the result into variable g1. 
     92 
     93     `magnitude plot ml`:: 
     94     Generate magnitude vs distance plot with all ml magnitudes and show figure on screen. 
     95 
     96     `magnitude clear ml`:: 
     97     Delete all ml magnitudes. 
     98 
     99     `magnitude clear ml gr.gra1`:: 
     100     Delete ml magnitude on station gr.gra1. 
    36101    """ 
    37102    numberOfParameters = [1,2,3,4,5] 
  • SHX/trunk/SeismicHandler/commands/mark.py

    r1098 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShMark 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == mark time at trace == 
     23 
     24    '''command''': MARK <trc> <time> 
     25 
     26    Marks time point on the specified trace by a vertical bar. 
     27 
     28    === parameters === 
     29 
     30     * <trc> ''parameter type: trace''[[BR]] 
     31       Trace to be marked at time <time>. 
     32 
     33     * <time> ''parameter type: real''[[BR]] 
     34       Time position to be marked at <trc>. The time value can be entered as a 
     35       relative time (example: "23.132") or, if the "/ABS"-qualifier is 
     36       specified, as an absolute time value (example: "14-JUL-1990_18:30:02.132"). 
     37 
     38    === qualifiers === 
     39 
     40     * /abs[[BR]] 
     41       The specified time <time> is an absolute value rather than a relative. 
     42 
     43     * /label=<text>[[BR]] 
     44       Prints a label <text> on the marked position. 
     45 
     46     * /pos=<pos>[[BR]] 
     47       Determines the position of the label. A <pos>-value of 1.0 puts the text 
     48       on top of the vertical mark line, a value of 0.0 puts it on the bottom. 
     49       You can specify any real value in between (or even outside but then the 
     50       text will be apart from the mark line). The default value is 1.0. 
     51 
     52     * /size=<size>[[BR]] 
     53       Specifies the length of the vertical marker. Default value is 1.0 (full 
     54       length). You get shorter markers if you set <size> smaller than 1.0. 
     55 
     56     * /trcrel[[BR]] 
     57       (undocumented) 
     58 
     59    === examples === 
     60 
     61     `mark/abs 2 ^P-ONSET(2)`:: 
     62     marks onset time of second trace 
     63 
     64     `mark 1 0.`:: 
     65     marks zero time of trace 1 
     66 
     67     `mark/label=PKP/pos=0.0 1 23.0`:: 
     68     marks trace 1 at time 23.0 with a labelled ("PKP" at the bottom) bar 
    1969    """ 
    2070    numberOfParameters = [0,2] 
  • SHX/trunk/SeismicHandler/commands/maxampl.py

    r1063 r1171  
    1414    """ 
    1515    URI:http://www.seismic-handler.org/portal/wiki/ShMaxAmpl 
     16 
     17    [Wiki Doc Text] 
     18 
     19    == cut amplitudes == 
     20 
     21    '''command''': MAXAMPL <trc-list> <ampl> [<lo-bound> <hi-bound>] 
     22 
     23    Cut the amplitudes of the traces in the trace list down to a specified 
     24    value <ampl>. All values larger than <ampl> are replaced by <ampl>, all 
     25    values smaller than -<ampl> replaced by -<ampl>. If <lo-bound> and 
     26    <hi-bound> are specified the modifications are restricted to this time 
     27    window. Modifies existing traces instead of creating new traces. A global 
     28    time window (see [ShStw STW]) is not respected. 
     29 
     30    === parameters === 
     31 
     32     * <trc-list> ''parameter type: trace list''[[BR]] 
     33       List of traces to be modified. 
     34 
     35     * <ampl> ''parameter type: real''[[BR]] 
     36       Maximum amplitude 
     37 
     38     * <lo-bound>, <hi-bound> ''parameter type: real''[[BR]] 
     39       Time window (relative to time axis) for modifying traces. If omitted 
     40       the whole traces are searched. 
     41 
     42    === example === 
     43 
     44     `maxampl 1-3 100.0`:: 
     45     Replaces all amplitude values larger than 100 by 100 on the first three 
     46     traces. 
    1647    """ 
    1748    numberOfParameters = [2,] 
  • SHX/trunk/SeismicHandler/commands/maximum.py

    r1063 r1171  
    1616    """ 
    1717    URI:http://www.seismic-handler.org/portal/wiki/ShMaximum 
     18    [Wiki Doc Text] 
     19 
     20    == trace of maximum values == 
     21 
     22    '''command''': MAXIMUM <trc-list> <info-entry> 
     23 
     24    Takes the traces given in <trc-list> as input and computes two new output 
     25    traces. The first output trace contains in each sample the maximum 
     26    amplitude of all input traces for the sample time. The second trace 
     27    contains in each sample the value of the info entry <info-entry> of that 
     28    trace which provided the maximum amplitude for the sample time. The 
     29    specified info entry must be real-valued. If <info-entry> is set to 
     30    "NUMBER" then the second output trace holds just the trace numbers instead 
     31    of an info entry value. 
     32 
     33    The computation of the output traces is restricted to the time window where 
     34    samples are available for each input trace. I global time window (see 
     35    [ShStw STW]) is not respected. 
     36 
     37    === parameters === 
     38 
     39     * <trc-list> ''parameter type: trace list''[[BR]] 
     40       List of input traces. 
     41 
     42     * <info-entry> ''parameter type: info entry''[[BR]] 
     43       Name of real valued info entry or "NUMBER". 
     44 
     45    === examples === 
     46 
     47     `maximum all SLOWNESS`:: 
     48     Create one trace containing maximum amplitude of all traces and another 
     49     trace containing slowness value of the individiual trace selected. 
     50 
     51     `maximum 1-3 NUMBER`:: 
     52     Create one trace containing maximum amplitude of all traces and another 
     53     trace containing just the number of the individiual trace selected. 
    1854    """ 
    1955    numberOfParameters = [2, 4] 
  • SHX/trunk/SeismicHandler/commands/mdir.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShMdir 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == direction of polarisation == 
     23 
     24    '''command''': MDIR <trc-list> <wdw-lo> <wdw-hi> [<azim>] [<inci>] 
     25 
     26    Determines the direction of maximum polarisation in two or three dimensions. 
     27    The direction is determined by diagonalising the coherence matrix of the 
     28    specified traces in the given time window. The direction of the eigenvector 
     29    with the largest eigenvalue is the desired direction. The output angles 
     30    can be used directly as input values for a rotation (ROT command) to get 
     31    an optimum separation of components. The MDIR command operates in 2-dim or 
     32    3-dim mode depending on the length of <trc-list> (2 or 3 traces). 
     33 
     34    === parameters === 
     35 
     36     * <trc-list> ''parameter type: trace list''[[BR]] 
     37       List of 2 or 3 traces to determine direction of polarisation. 
     38 
     39     * <wdw-lo>, <wdw-hi> ''parameter type: real''[[BR]] 
     40       Time window for computation of direction of polarisation. 
     41 
     42     * <azim> ''parameter type: symbol address''[[BR]] 
     43       Symbol to receive the value of azimuth (2- or 3-dimensional mode). 
     44 
     45     * <inci> ''parameter type: symbol address''[[BR]] 
     46       Symbol to receive value of angle of incidence. Valid only in 
     47       3-dimensional mode. 
     48 
     49    === examples === 
     50 
     51     `mdir 1,2 100.0 110.0`:: 
     52     computes rotation angle in time window from 100.0 to 110.0 sec the result 
     53     is displayed. 
     54 
     55     `mdir 1,2 100.0 110.0 &AZIM`:: 
     56     computes rotation angle in time window from 100.0 to 110.0 sec the result 
     57     is stored in symbol "AZIM" 
     58 
     59     `mdir 1-3 10.0 20.0 &A &I`:: 
     60     computes two rotation angles in time window from 10.0 to 20.0. The results 
     61     are stored in "A" and "I". 
    1962    """ 
    2063    numberOfParameters = [3, 4, 5] 
  • SHX/trunk/SeismicHandler/commands/mend.py

    r1063 r1171  
    1818    """ 
    1919    URI:http://www.seismic-handler.org/portal/wiki/ShMend 
     20 
     21    [Wiki Doc Text] 
     22 
     23    == mends a trace == 
     24 
     25    '''command''': MEND <trc> <order> <lo-bound> <hi-bound> 
     26 
     27    Replaces samples on trace <trc> between <lo-bound> and <hi-bound> by 
     28    polynamial (or rational) interpolation of order <order>. A globally set 
     29    time window is not respected (see [ShStw STW]). 
     30 
     31    === parameters === 
     32 
     33     * <trc> ''parameter type: trace''[[BR]] 
     34       Trace to be mended. 
     35 
     36     * <order> ''parameter type: integer''[[BR]] 
     37       Order of interpolation.  Shouldn't exceed 6-9. 
     38 
     39     * <lo-bound>, <hi-bound> ''parameter type: real''[[BR]] 
     40       Inside this time window the samples are relaced by polynomial 
     41        interpolation. It is recommended not to try to interpolate more than 
     42        10 samples. 
     43 
     44    === qualifiers === 
     45 
     46     * /rational[[br]] 
     47       Rational instead of polynomial interpolation is used. 
     48 
     49     * /widening=FACTOR[[br]] 
     50       Undocumented 
     51 
     52    === examples === 
     53 
     54     `mend 1 6 10.1 10.25`:: 
     55     mends trace 1 between 10.1 and 10.25 sec by interpolation of order 6 
     56 
     57     `mend 1 6 *`:: 
     58     mends trace 1 inside a window to be selected by graphic cursor. The order 
     59     of interpolation is 6. 
    2060    """ 
    2161    numberOfParameters = [4,] 
  • SHX/trunk/SeismicHandler/commands/merge.py

    r1063 r1171  
    1717    """ 
    1818    URI:http://www.seismic-handler.org/portal/wiki/ShMerge 
     19 
     20    [Wiki Doc Text] 
     21 
     22    == merges two traces together == 
     23 
     24    '''command''': MERGE <trc1> <trc2> 
     25 
     26    Merges two traces <trc1> and <trc2>. Both traces must have the same sample 
     27    rate. The input traces remain unchanged. The (new) output trace in general 
     28    contains samples of <trc1> and <trc2> and are properly aligned in time. 
     29    Three cases are distinguished: 
     30     1. The time span of one trace is completely contained in the time span of 
     31        the other. Then the output trace is a copy of the long trace. 
     32     2. In all other cases where we have overlapping traces, the trace with 
     33        less gaps takes preference. 
     34     3. The traces do not overlap in time. Then the gap is filled with samples 
     35        of constant values (value of the first sample of the later trace). 
     36    The output trace will have the same station information as the trace 
     37    starting earlier in time. The station information of the other trace is 
     38    ignored. You may merge two traces with different names and components. 
     39 
     40    === parameters === 
     41 
     42     * <trc1>, <trc2> ''parameter type: trace''[[BR]] 
     43       Traces to be merged. 
     44 
     45    === example === 
     46 
     47     `merge 1 2`:: 
     48     merges trace 1 and 2 
    1949    """ 
    2050    numberOfParameters = [2,] 
  • SHX/trunk/SeismicHandler/commands/mergepair.py

    r1063 r1171  
    1515    """ 
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShMergePair 
     17 
     18    [Wiki Doc Text] 
     19 
     20    == search for traces to be merged == 
     21 
     22    '''command''': MERGE_PAIR <&var1> <&var2> 
     23 
     24    Searches all traces currently displayed and returns the first pair (two 
     25    trace numbers) which have the same station name, component and channel 
     26    identifiers (CHAN1 and CHAN2). If no such pair is found, two zeroes are 
     27    returned. Called in a loop, using commands [ShMerge MERGE] and [ShDel DEL] 
     28    all traces with the same stream identification may be merged. 
     29 
     30    === parameters === 
     31 
     32     * <&var1>, <&var2> ''parameter type: trace''[[BR]] 
     33       Variables to store the trace numbers found. 
     34 
     35    === example === 
     36 
     37     `merge_pair &t1 &t2`:: 
     38     find next two traces to be merged and store the results in "t1 and "t2 
     39     (to be defined before) 
    1740    """ 
    1841    numberOfParameters = [2] 
  • SHX/trunk/SeismicHandler/commands/meta.py

    r1130 r1171  
    2121    """ 
    2222    URI:http://www.seismic-handler.org/portal/wiki/ShDisplay 
     23 
     24    [Wiki Doc Text] 
     25 
     26    == Manage metadata of traces == 
     27 
     28    '''command''': META <trclist> <subcmd> 
     29 
     30    Lists or completes metadata of traces on display via FDSN webservers. 
     31 
     32    === parameters === 
     33 
     34     * <trclist> ''parameter type: trace list''[[br]] 
     35       List of traces to apply metadata processing. Example: 'ALL' 
     36 
     37     * <subcmd> ''parameter type: trace list''[[br]] 
     38       Subcommand to execute. Possible values are:[[br]] 
     39       LIST: list metadata information for each trace on the display, showing 
     40           station location, gain and existence of transfer function (poles and zeros).[[br]] 
     41       COMPLETE_LOCATION: access FDSN webserver and try to retrieve missing 
     42           station location information.[[br]] 
     43       COMPLETE_RESPONSE: access FDSN webserver and try to retrieve missing 
     44           station, location, gain constant and transfer function.[[br]] 
     45       COMPLETE: alias name of COMPLETE_RESPONSE 
     46 
     47 
     48    === qualifiers === 
     49 
     50     * /DEL_INCOMPLETE[[br]] 
     51       Traces with missing metadata information (after executing the metadata 
     52       request) are deleted. 
     53     * /ADDR=<fdsnserver>[[br]] 
     54       Address or alias name for FDSN webserver. Examples: "bgr", "gfz" or 
     55       "iris". 
     56    === example === 
     57 
     58     `META ALL LIST`:: 
     59     List all metadata information 
     60 
     61     `META ALL COMPLETE /ADDR=IRIS /DEL_INCOMPLETE`:: 
     62     Tries to complete missing metadata by accessing the IRIS FDSN webservice. 
     63     Traces which do not have complete metadata after this request are deleted. 
    2364    """ 
    2465    numberOfParameters = [2] 
  • SHX/trunk/SeismicHandler/commands/mirror.py

    r1063 r1171  
    1414    """ 
    1515    URI:http://www.seismic-handler.org/portal/wiki/ShMirror 
     16 
     17    [Wiki Doc Text] 
     18 
     19    == mirror traces == 
     20 
     21    '''command''': MIRROR <trc-list> 
     22 
     23    Mirrors traces in time. 
     24 
     25    === parameters === 
     26 
     27     * <trc-list> ''parameter type: trace list''[[BR]] 
     28       List of traces to be mirrored. 
     29 
     30    === example === 
     31 
     32     `mirror 1-3`:: 
     33     mirrors traces 1,2,3 
    1634    """ 
    1735    numberOfParameters = [1,] 
  • SHX/trunk/SeismicHandler/modules/parse.py

    r1154 r1171  
    3030from SeismicHandler.config import Settings 
    3131from SeismicHandler.basics.messages import log_message, msgs 
     32from SeismicHandler.basics.tools import CommandDocs 
    3233from SeismicHandler.core import Traces 
    3334 
     
    11541155    return s._translate(name) 
    11551156 
     1157def _collectdocs(): 
     1158    "Collect all command docs into a dictionary." 
     1159    def prepdoc(text): 
     1160        txt = [] 
     1161        indoc = False 
     1162        pos = 0 
     1163        for line in StringIO.StringIO(text): 
     1164            if '[Wiki Doc Text]' in line: 
     1165                indoc = True 
     1166                pos = line.find('[') 
     1167                continue 
     1168            if indoc: 
     1169                txt.append( line[pos:] ) 
     1170        return ''.join(txt) 
     1171    cmddoc = {} 
     1172    for cmd in dir(commands): 
     1173        mod = getattr(commands,cmd) 
     1174        for a in dir(mod): 
     1175            cls = getattr(mod,a) 
     1176            #print mod,a,cls, dir(cls) 
     1177            if hasattr(cls,'run'): 
     1178                if '[Wiki Doc Text]' in cls.__doc__: 
     1179                    cmddoc[a.strip('_')] = prepdoc(cls.__doc__) 
     1180    return cmddoc 
     1181 
    11561182 
    11571183history_called = False 
    11581184messagefeed = MessageFeed() 
     1185CommandDocs().setDict( _collectdocs() ) 
    11591186 
    11601187if __name__ == "__main__": 
Note: See TracChangeset for help on using the changeset viewer.