Changeset 1174 for SHX


Ignore:
Timestamp:
11.02.2016 15:48:33 (4 years ago)
Author:
klaus
Message:

added documentation

Location:
SHX/trunk/SeismicHandler
Files:
4 edited

Legend:

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

    r1166 r1174  
    1616    URI:http://www.seismic-handler.org/portal/wiki/ShExport 
    1717     
    18     Export data traces to obspy using pickle. 
     18    [Wiki Doc Text] 
     19 
     20    == Export data traces to obspy == 
     21 
     22    '''command''': EXPORT <inputfile> 
     23 
     24    Export a pickle file with data traces in obspy compatible form. To read such 
     25    a file within obspy use (example OBSDATA.STREAM):[[br]] 
     26        import pickle[[br]] 
     27        fp = open( 'OBSDATA.STREAM' )[[br]] 
     28        stream = pickle.load( fp )[[br]] 
     29        fp.close()[[br]] 
     30 
     31    === parameters === 
     32 
     33     * <outputfile> ''parameter type: string''[[br]] 
     34       Name of output file containing a pickle-dump of an obspy stream object. 
     35 
     36 
     37    === qualifiers === 
     38 
     39    None 
     40 
     41    === example === 
     42 
     43     `export obsdata.stream`:: 
     44     Write data to file containing pickle-dumped obspy stream object. 
    1945    """ 
    2046 
  • SHX/trunk/SeismicHandler/commands/help.py

    r1172 r1174  
    261261                self.showCmds( lst ) 
    262262            else: 
    263                 print CommandDocs().getDoc(cmd) 
     263                print CommandDocs().getDoc(cmd).replace('[[br]]','') 
    264264        else: 
    265265            print firststeps 
  • SHX/trunk/SeismicHandler/commands/import.py

    r1166 r1174  
    1919    URI:http://www.seismic-handler.org/portal/wiki/ShImport 
    2020     
    21     Import data traces from obspy using pickle. 
     21    [Wiki Doc Text] 
     22 
     23    == Import data traces from obspy == 
     24 
     25    '''command''': IMPORT <inputfile> 
     26 
     27    Import a pickle file with obspy data traces. To create a file within 
     28    obspy use (example OBSDATA.STREAM):[[br]] 
     29        stream = read() # take some traces in a stream variable[[br]] 
     30        import pickle[[br]] 
     31        fp = open( 'OBSDATA.STREAM', 'w' )[[br]] 
     32        pickle.dump( stream, fp )[[br]] 
     33        fp.close()[[br]] 
     34 
     35    === parameters === 
     36 
     37     * <inputfile> ''parameter type: string''[[br]] 
     38       Name of input file containing a pickle-dump of an obspy stream object. 
     39 
     40 
     41    === qualifiers === 
     42 
     43    None 
     44 
     45    === example === 
     46 
     47     `import obsdata.stream`:: 
     48     Read data from file containing pickle-dumped obspy stream object. 
    2249    """ 
    2350 
  • SHX/trunk/SeismicHandler/data/help.txt

    r1166 r1174  
    88access to trace operations without typing command lines. However, all of these 
    99menu entries are converted into a command line and executed. Everything entered 
    10 via the menu system can also be achived via the command line system. 
     10via the menu system can also be achived via the command line system. Help texts 
     11about the command line options are available via the HELP command (try 
     12'HELP *'). 
    1113 
    1214Additionally to the traces SHX has three containers holding parameters sets: 
     
    1719 
    1820 
    19 Description of menu entries: 
     21Description of menu entries (many of them have keyboard shortcuts): 
    2022 
    2123File Menu - Read Data File(s) 
     
    3941    details of this data request. Metadata are read from local database, missing 
    4042    metadata are requested from the FDSN webserver and copied into the local 
    41     database. 
     43    database. Uses SHX commands FDSNWS and META. 
     44 
     45File Menu - Add stations around epicenter 
     46    Adds data traces from stations within a circular area around a location 
     47    defined by the SHX variables 'epi_latitude' and 'epi_longitude' by accessing 
     48    an FDSN webserver. The radius of the area is taken from variable 
     49    'sta_radius'. The FDSN webserver, channels and data window is taken from 
     50    'readws_server', 'readws_chan', 'read_time' and 'read_length', respectively. 
     51    New data which match in channel name already existing traces are ignored. 
     52    Uses SHX commands FDSNWS and META. 
     53 
     54File Menu - Complete Metadata 
     55    Ask an FDSN webserver for missing metadata of traces on screen. Missing 
     56    metadata are indicated by traces colored in red (dark red: transfer function 
     57    missing, bright red: station location missing). Uses SHX variable 
     58    'readws_server'. This function is called automatically when reading new 
     59    data via the menu options described above. Uses SHX command META. 
     60 
     61File Menu - Import Obspy Traces 
     62    Open and read a data file containing a pickle dump of an obspy stream 
     63    object. Uses SHX command IMPORT (details see 'HELP IMPORT'). 
     64 
     65File Menu - Export Traces to Obspy 
     66    Write a a data file containing a pickle dump of all traces on display as 
     67    an obspy stream object. Uses SHX command EXPORT (details see 'HELP EXPORT'). 
     68     
     69File Menu - Quit 
     70    Close graphical window. Does not exit SHX, this has to be entered on the 
     71    command line. 
     72 
     73Display Menu - Set Time Window 
     74    Take the time position of the current zoom box (selected by right mouse 
     75    button) and use this as new time window for all traces on display. Uses 
     76    SHX command 'STW'. 
     77 
     78Display Menu - Delete Time Window 
     79    Delete possible previous set time windows on the main display window, i.e. 
     80    returns to the display showing the complete trace data read in. Uses 
     81    SHX command 'DTW'. 
     82 
     83Display Menu - Move Zoom Right/Left/Up/Down 
     84    Moves the blue zoom box (created using the right mouse button) to the right 
     85    or left by 50% or on to the following or previous trace. Usually called 
     86    via shortcuts. 
     87 
     88Display Menu - Zoom Amplitude Up/Down 
     89    Increase or decrease the trace amplitudes (factors 2 or 0.5, respectively) 
     90    shown on screen (does not alter any trace data). Uses SHX command 'ZOOM'. 
     91 
     92Display Menu - Trace Scroll On 
     93    Reduces the number of traces displayed in the main window to 21. Use the 
     94    mouse wheel or the menue entries below to scroll traces up or down (in 
     95    steps of 6 traces). Useful if many traces are on screen. 
     96 
     97Display Menu - Trace Scroll Off 
     98    Switches off trace scroll mode described above and returns to showing all 
     99    traces in the main window. 
     100 
     101Display Menu - Trace Scroll Up/Down 
     102    Scroll traces up or down when in trace scroll mode (see entries described 
     103    above). Alternatively use the mouse wheel. 
     104 
     105Display Menu - Show All Components in Magnify 
     106    Toggle switch to enable/disable showing all components in the magnify 
     107    window. This means that together with the seected trace all other components 
     108    of this channel appear in the magnify window in shaded colors. This may 
     109    help to identify onsets in local event data. 
     110 
     111Display Menu - Norm All/Single 
     112    Toggle switch to change display normalization between separate normalization 
     113    (i.e. each trace is shown with the same amplitude on screen) or a common 
     114    normalization value for all traces to show comparable amplitudes between 
     115    the traces. 
     116 
     117Display Menu - Overlapping/Clipped Traces 
     118    Toggle switch to change between two zoom display modes. When amplitudes 
     119    are zoomed (see menu entry above) the high amplitude parts of the traces 
     120    overlap into each other (default) or are clipped to prevent overlapping 
     121    trace lines. 
     122 
     123Traces menu - Demean 
     124    Remove mean value from all traces. This changes trace data and is not only 
     125    a matter of display. Uses SHX command 'DEMEAN'. 
     126 
     127Traces menu - Sort By Distance 
     128    Sort traces in the main display by distance to a given epicenter (taken 
     129    from SHX variables 'epi_latitude' and 'epi_longitude'). Uses SHX command 
     130    'SORT_BY_DISTANCE'. 
     131 
     132Traces menu - Delete Selected Trace 
     133    Deletes the trace with the zoom box on it (created via right mouse button). 
     134    Uses SHX command 'DEL'. 
     135 
     136Traces Menu - Delete Selected Station 
     137    Deletes the trace with the zoom box on it and all other traces with the 
     138    same station name. Uses SHX command 'DEL'. 
     139 
     140Traces Menu - Delete Selected And Above 
     141    Deletes the trace with the zoom box on it and all traces above. Particularly 
     142    useful after a 'SORT_BY_DISTANCE' command (see menu entry above). Uses SHX 
     143    command 'DEL'. 
     144 
     145Traces Menu - Spectrogram 
     146    Compute and display a spectrogram of the content of the blue zoom box 
     147    created by dragging the right mouse button. Uses the obspy spectrogram 
     148    method using the SHX command 'SPECTROGRAM'. 
     149 
     150Array Menu - FK 
     151    Compute an FK diagram of all traces on display using the time window 
     152    selected by the zoom box (created by dragging the right mouse button). 
     153    The windows in slowness and frequency are taken from the SHX variables 
     154    'fk_max_slowness', 'fk_min_freq' and 'fk_max_freq'. Needs correct metadata 
     155    of the traces. Uses SHX command 'FK'. 
     156     
     157Array Menu - FK (Auto Freq) 
     158    Compute an FK diagram of all traces on display using the time window 
     159    selected by the zoom box (created by dragging the right mouse button). 
     160    The maximum slowness is taken from the SHX variable 'fk_max_slowness'. 
     161    The frequency window is determined from the width of the selection window 
     162    (zoom box) (f1 = 1./width, f2 = 10*f1). Needs correct metadata of the 
     163    traces. Uses SHX command 'FK'. 
     164 
     165Array Menu - Beam/Del Beam 
     166    Toggle switch for displaying a beam trace using SHX variables 'slowness' 
     167    (in s/deg) and 'azimuth' (in deg). Traces are shifted to align a phase with 
     168    this direction and sums up all shifted traces. A second call deletes the 
     169    sum traces and restores the correct time position of traces. Needs correct 
     170    metadata of the traces. Uses SHX commands 'BEAM' and 'SUM' (and others). 
     171 
     172Array Menu - Plane Wave 
     173    Compute slowness and azimuth of a picked phase at all stations on display. 
     174    Takes the currently selected phase name (see Phase Menu), collects all 
     175    phases of this name from all traces and computes slowness and azimuth. 
     176    The resulting values are put to the SHX variables 'slowness' and 'azimuth'. 
     177    Needs correct metadata of the traces. Uses SHX command 'PHASE'. 
     178 
     179Array Menu - Correlation Picker 
     180    Takes the current selection window (zoom box) and the first phase found in 
     181    it and correlates all other traces with the content of the selection window. 
     182    New automatic phases are generated at all other traces accordingly to the 
     183    position of the phase within the selection window. Compares the result with 
     184    a plane wave and evaluates the residuals of the found picks. Picks with 
     185    large time residuals are removed or changed to another (smaller) 
     186    correlation maximum. Needs correct metadata of the traces. Uses SHX 
     187    command 'CORRPICK'. 
     188 
     189Filter Menu - Simulate <name> 
     190    Simulate the specified instrument by removing the transfer function (TF) of 
     191    the recording instrument and applying the TF of the simulated instrument. 
     192    Appropriate bandpass filters are added to enhance stability: 
     193       wood-anderson      :   0.1   to   10 Hz 
     194       wood-anderson-1hz  :   0.1   to    1 Hz 
     195       wwssn-sp           :   0.01  to  100 Hz 
     196       wwssn-lp           :   0.004 to    1 Hz 
     197       kirnos             :   0.004 to  100 Hz 
     198       sro-lp             :   0.004 to    1 Hz 
     199       lrsm-lp            :   0.004 to   10 Hz 
     200       lrsm-sp            :   0.01  to 1000 Hz 
     201    Needs correct TF specification in the metadata. Uses SHX command 'SIMULATE'. 
     202 
     203Filter Menu - Filter BP 1-8Hz 
     204    Apply a bandpass filter of 1-8 Hz on all traces. Hides original traces. 
     205    Use SHX commands 'FILI', 'FILTER' and 'HIDE'. 
     206 
     207Filter Menu - Undo Filter 
     208    Return to the unfiltered traces after 'Filter' or 'Simulate' operations. 
     209     
     210Events Menu - Get Eventlist 
     211    Creates a list of events within an area by accessing an FDSN webserver. 
     212    Makes use of the SHX variables: 
     213        epi_latitude, epi_longitude, sta_radius: define area of interest 
     214        ev_list: define name of output file containing event list 
     215        ev_minmagn: minimum magnitude requested 
     216        ev_offset: offset time in s subtracted from the event time 
     217        sta_latitude, sta_longitude: define a reference station 
     218        ev_phase: define a phase at the reference station. The arrival time 
     219                  of this phase is computed and written into the event list 
     220                  instead of the origin time. 
     221        ev_agency: address of the FDSN webserver 
     222    Uses SHX command 'EVENTS'. 
     223 
     224Events Menu - Next Event 
     225    Reads next event/read time from event list (created by "Get Eventlist", 
     226    see above). Puts read time into SHX variable 'read_time' and increments 
     227    line counter 'ev_line'. 
     228 
     229Events Menu - Previous Event 
     230    Reads previous event/read time from event list (created by "Get Eventlist", 
     231    see above). Puts read time into SHX variable 'read_time' and decrements 
     232    line counter 'ev_line'. 
     233 
     234Events Menu - Event Info Parser 
     235    Prepare SHX variables 'read_time', 'epi_latitude' and 'epi_longitude' 
     236    for event reading. Opens dialog box with two text fields. One for a 
     237    reference station and a second for event information. The event information 
     238    field is parsed in a number of ways and recognizes many different formats 
     239    of event data. It tries to recognize origin time, latitude and longitude 
     240    and computes the first arrival for the reference station, removes 60s and 
     241    writes this time into the 'read_time' variable. Also copies event location 
     242    into variables 'epi_latitude' and 'epi_longitude'. Implemented line formats 
     243    are e.g. data lines from the EMSC website ('for seismologists') and the 
     244    SZGRF event page (www.szgrf.bgr.de/analysis_reports/index.html). You may 
     245    also manually write some text like '2016-11-27 11:23 -9.1 -71.3'. 
     246 
     247Events Menu - Locate Local Event 
     248    Call a locator and pass all picked phases to it. Read resulting origin and 
     249    epicenter data into SHX variables. Input data for the locator are taken 
     250    from SHX variable 'locator'. Currently implemented as external 
     251    locator is: LocSAT. 
     252    The locator string format is as follows> 
     253        LocSAT: locsat,<model>,<depth>[,<degfree>[,maxiter]] 
     254            <model> model name (needs existing travel time tables), e.g. 'bgr' 
     255                    or 'tab'. 
     256            <depth> value for fixed depth if this is a floating point number. 
     257                    Any other text allows a free depth determination. 
     258            <degfree> number of degrees of freedom 
     259            <maxiter> maximum number of iterations 
     260    Needs correct metadata of the traces. Uses SHX comand 'LOCATE'. 
     261 
     262Events Menu - Locate Tele Event with P 
     263    Locate teleseismic event using P and possible depth phases. Computes 
     264    slowness and azimuth for P wave and fits distance to it using the 
     265    iasp91 taupi model (obspy). If depth phases are specified, fits travel 
     266    time difference between depth phases and main phases into a depth and 
     267    relocates the event with the new depth found. Output SHX variables are 
     268    'epi_altitude', 'epi_longitude', 'epi_region', 'origin_time', 
     269    'source_depth', 'depth-type', 'sta_latitude and 'sta_longitude' 
     270    (contains center of station array). Needs correct metadata of the traces. 
     271    Uses SHX command 'LOCATE_TELE'. 
     272 
     273Events Menu - Plot Location 
     274    Creates and show a plot with stations and epicenter. Uses SHX command 
     275    'PLOT_STATIONS'. Needs correct metadata of the traces.  
     276 
     277Events Menu - Compare Location 
     278    Compares the own location in SHX variables 'epi_latitude', 'epi_longitude', 
     279    'source_depth' and 'origin_time' with events retrieved from FDSN event 
     280    webservers. Lists differences and slowness deviations in a dialog box. 
     281    Uses SHX command 'COMPARE_LOCATION'. Needs correct metadata of the traces. 
     282 
     283Phases Menu - Pg, Pn, Sg, ..., pPKPab 
     284    Set the phase name for the next phase pick (left mouse button click) to the 
     285    name in the menu entry. Uses SHX command 'PHASE'. 
     286 
     287Phases Menu - Use ev_phase 
     288    Set the phase name for the next phase pick (left mouse button click) to the 
     289    name found in SHX variable 'ev_phase'. This way any string can be entered 
     290    as phase name. Uses SHX command 'PHASE'. 
     291 
     292Phases Menu - Theo Phases (local) 
     293    Compute and define phases at theoretical arrival times on all stations. The 
     294    phases are marked in green color. Computes phases Pg,Pn,Sg and Sn where 
     295    possible. Needs correct metadata of the traces. Uses SHX command 
     296    'THEOPHASE'. 
     297 
     298Phases Menu - Theo Phases (tele) 
     299    Compute and define phases at theoretical arrival times on all stations. The 
     300    phases are marked in green color. Computes all phases provided as default 
     301    in the method 'get_travel_times' of obspy-taupy. Needs correct metadata of 
     302    the traces. Uses SHX command 'THEOPHASE'. 
     303 
     304Phases Menu - Delete All Theo Phases 
     305    Deletes all phases marking theretical arrival times (green phase picks). 
     306    Uses SHX command 'PHASE'. 
     307 
     308Phases Menu - Plot Phases 
     309    Create and show a plot with phase travel times over distance. Fit lines 
     310    to each phase type and writes slope (slowness/apparent velocity) to it. 
     311    Uses SHX command 'PHASE'. 
     312     
     313Magnitude Menu - ml on All Traces (analytic) 
     314    Needs traces with simulated Wood-Anderson records (see 'Filter' menu). 
     315    Takes time windows around phase picks of Pg,Pn,Sg,Sn and finds maximum 
     316    values in horizontal components to feed the local magnitude (Richter) 
     317    algorithm (uses analytic IASPEI ml formula). Manually picked phases are 
     318    preferred, but theoretical phases are accepted. After calling 'Theo Phases 
     319    (local)' (see above) a ml determination will be performed at all stations. 
     320    If a selection window is present (blue zoom box), the ml values are 
     321    determined only for the selected station and all stations closer to the 
     322    epicenter than this (so distant stations can be excluded). Needs correct 
     323    metadata of the traces. Uses SHX command 'MAGNITUDE'. 
     324 
     325Magnitude Menu - ml on Single Trace (analytic) 
     326    Needs traces with simulated Wood-Anderson records (see 'Filter' menu). 
     327    Uses the time window of the selection window (blue zoom box) to find maxima 
     328    on the horizontal components of the selected station. Puts these maxima 
     329    into the analytic IASPEI ml formula. Needs correct metadata of the traces. 
     330    Uses SHX command 'MAGNITUDE'. 
     331 
     332Magnitude Menu - ml Delete All 
     333    Deletes ml magnitudes at all stations. Uses SHX command 'MAGNITUDE'. 
     334 
     335Magnitude Menu - ml Delete Selected. 
     336    Deletes a single magnitude value at the stations selected by the selection 
     337    window (blue zoom window). Uses SHX command 'MAGNITUDE'. 
     338 
     339Magnitude Menu - ml Plot magnitudes 
     340    Creates and show a plot with magnitudes over distance. The points are 
     341    labelled by the station name. Uses SHX command 'MAGNITUDE'. 
     342 
     343Control Menu - Save Traces/Params 
     344    Saves trace information and SHX parameters (phases, magnitudes and SHX 
     345    variables) into an SHX command file 'TRACES_PARAMS_RECOVER.SHC'. This 
     346    command file may be executed to recover the current session. Please note 
     347    that it does not save the trace data itself, the recovery operation 
     348    reads the data from the same place as it was done during the saved SHX 
     349    session. Uses SHX command 'PARAM SAVEASCMD ...'. 
     350 
     351Control Menu - Save Traces/Params as ... 
     352    Same functionality as above, but opens a file dialog to prompt for the 
     353    name of an output file. Uses SHX command 'PARAM SAVEASCMD ...'. 
     354 
     355Control Menu - Recover Traces/Params 
     356    Recover a session by executing the recovery command file 
     357    'TRACES_PARAMS_RECOVER.SHC' produced by the above 'Save Traces/Params' 
     358    entry. 
     359 
     360Control Menu - Recover Traces/Params from ... 
     361    Recover a session by executing a recovery command file specified in a 
     362    file dialog, produced by the above 'Save Traces/Params as ...' entry. 
     363     
     364Control Menu - Clear All Parameterrs And Traces 
     365    Deletes all traces and parameters. Uses SHX commands 'DEL ALL', 
     366    'PARAM RESET', 'PHASE CLEAR_ALL' and 'MAGNITUDE CLEAR_ALL'. 
     367 
     368Control Menu - Open Parameters Window 
     369    Opens parameter window if not yet open. 
     370 
     371Control menu - Open Magnify Window 
     372    Opens magnify window if not yet open. 
     373 
     374Control menu - Refresh 
     375    Performs a redraw of the main window content. This may become necessary if 
     376    the selection window (blue zoom box) was covered by another object. The 
     377    automatic redraw operation usually fails for this element producing weird 
     378    effects when dragging the zoom box. 
     379 
     380Help - Help 
     381    Opens this text. 
     382 
     383 
     384________________________________________________________________________________ 
     385 
     386 
     387 
     388Use of mouse buttons: 
     389 
     390Left mouse button: 
     391 
     392    in main window and magnify window: 
     393        Create, move or delete (double click) phases on traces. The phase name 
     394        for new phases is taken from the 'Phase' menu (use shortcuts!). 
     395 
     396 
     397Right mouse button: 
     398 
     399    in main window: 
     400        Create or move a selection window (zoom box). This box defines a time 
     401        window on a trace which is displayed in the magnify window (if opened). 
     402        To delete a zoom box use right double click or drag it out of the main 
     403        window. The size of a zoom box can be changed only via mouse wheel 
     404        (see below). 
     405     
     406    in magnify window: 
     407        Drag data trace in the magnify window, i.e. move the selection window 
     408        (zoom box) left and right in the main window. 
     409 
     410 
     411Mouse wheel: 
     412 
     413    in main window with trace scrolling (see Trace Menu - Trace Scroll On): 
     414        Scroll traces up and down, i.e. each wheel step moves 6 of the displayed 
     415        traces out of the display and brings in 6 traces from the other side. 
     416 
     417    in main window without trace scrolling: 
     418        Change size of the selection window (zoom box). 
     419     
     420    in magnify window: 
     421        Switch to next/previous trace, i.e. move the selection window (zoom box) 
     422        in the main window up and down. 
Note: See TracChangeset for help on using the changeset viewer.