next up previous contents index
Next: 6.4.1 Searching for text Up: 6. Description of Programs Previous: 6.3.4 SEIS2VIEWER, Plotting hypocentres   Contents   Index


6.4 Searching in the database, SELECT

Whenever selective search and extraction is wanted SELECT is used. The program can run on the CAT database, single CAT files (Nordic or Nordic compact) or the S-file data base. The output file, select.out, will also be in Nordic format. Since the input CAT database can contain both normal and compact files, the output will always be a normal file with blank lines between events. If however the input is one compact file, the output will also be a compact file. Note: If SELECT is used on the CAT database (normal operation), you need to UPDATE your S-file database in order to transfer changes from the S-files to the CAT database. Select can work with input in 3 different ways:

  1. The user is asked for selections
  2. The selection parameters are in a file
  3. Parameters are given on the prompt line
The program is started by typing SELECT (parameters from screen), SELECT `input file' (parameters from input file) or SELECT -options. A typical user interactive run is shown below. Comments following !


POSSIBLE INPUT IS: 
     STANDARD CAT DATABASE: RETURN
     ALTERNATIVE DATABASE, GIVE 1-5 LETTER CODE:
     FILENAME FOR ONE FILE, MUST BE 6 OR MORE CHARACTERS:
     Type of base: CAT (Return) or Sfiles (s):
 Updating database TEST_              ! standard base
 The database TEST_ has  10 files
 The first file starts: 199309
 The  last file starts: 199909
 
  Start time (blank is 1980), yyyymmddhhmmss: 199309! time range
  End time, enter for 2015                  : 199607

             PARAMETERS
  
      1   - Fault Plane Solution
      2   - Earthquake Felt
      3   - Magnitude Type(s)                            
      4   - Distance ID(s)                               
      5   - Event ID(s)                                  
      6   - Magnitude Limits
      7   - Latitude Limits
      8   - Longitude Limits
      9   - Depth Limits
      10  - RMS Limits
      11  - Number of Stations Limits
      12  - Hypocenter Errors Latitude Limits
      13  - Hypocenter Errors Longitude Limits
      14  - Hypocenter Errors Depth Limits
      15  - Minimum Number of Polarities
      16  - Hypocenter Agencies
      17  - Magnitude Agencies
      18  - Station Codes, components and distance range
      19  - Polygon
      20  - Use all header lines
      21  - Look for wave form file names
      22  - Gap range          
      23  - Phases    
      24  - Volcanic subclasses
         
  
  SELECT NUMBER TO CHANGE PARAMETER, RETURN TO SEARCH: 6   
  Minimum Magnitude, return for default:   5
  Maximum Magnitude, return for default:   7

             PARAMETERS
  
      1   - Fault Plane Solution
      2   - Earthquake Felt
      3   - Magnitude Type(s)                            
      4   - Distance ID(s)                               
      5   - Event ID(s)                                  
      6   - Magnitude Limits                          5.0        7.0
      7   - Latitude Limits
      8   - Longitude Limits
      9   - Depth Limits
      10  - RMS Limits
      11  - Number of Stations Limits
      12  - Hypocenter Errors Latitude Limits
      13  - Hypocenter Errors Longitude Limits
      14  - Hypocenter Errors Depth Limits
      15  - Minimum Number of Polarities
      16  - Hypocenter Agencies
      17  - Magnitude Agencies
      18  - Station Codes, components and distance range
      19  - Polygon
      20  - Use all header lines
      21  - Look for wave form file names
      22  - Gap range
      23  - Phases                   
      24  - Volcanic subclasses

  Ok. Input realized successfully.
  SELECT NUMBER TO CHANGE PARAMETER, RETURN TO SEARCH:   
 199309.CAT  No of events:     1  Selected:     1  Selected total:     1
 199406.CAT  No of events:     1  Selected:     1  Selected total:     2
 199410.CAT  No of events:     1  Selected:     0  Selected total:     2
 199508.CAT  No of events:     1  Selected:     0  Selected total:     2
 199511.CAT  No of events:     1  Selected:     0  Selected total:     2
 199606.CAT  No of events:     6  Selected:     3  Selected total:     5
 199607.CAT  No of events:     5  Selected:     1  Selected total:     6
  
  TOTAL NUMBER OF EVENTS IN TIME INTERVAL   16
  NUMBER OF DISTANT EVENTS   - - - - -      7
  NUMBER OF REGIONAL EVENTS  - - - - -      0
  NUMBER OF LOCAL EVENTS     - - - - -      9
  ---------------------------------------------------
  NUMBER OF EVENTS SELECTED *************   6
  NUMBER OF WAVEFORM FILES SELECTED         9
  NUMBER OF INDEXES SELECTED                6
  SELECTED EARTHQUAKES ARE IN FILE: select.out 
  LOCAL INDEX FILE IN:              index.out
  NAMES FOR WAVEFORM FILES IN FILE: waveform_names.out
  SELECT COMMANDS IN FILE:          select.inp


Note above, that the second time the menu is shown, the choice of magnitude limits is shown. For each CAT file in the catalog, the number of events in file, number of events selected from that file and the accumulated number are listed. The last file might not show the correct number of events in file since SELECT might stop before reading the whole file if the end time is in the middle of the file. If start time is blank, 1980 is used. The end time can also be blank, and 2015 is used. This option is useful when selection on whole data base or whole file. Input parameters:

In the input database (or file) a time window must always be given. If no more selection is done, all data in time window is selected. Further selection can be done by choosing a number and giving parameters. The chosen parameters are then shown on the next parameter selection menu as shown above for magnitude. Parameters can be reentered. Parameters not entered will have no influence in the selection. If several parameters (numbered selections below) are entered, conditions for all must be true for the event to be selected. Within each numbered selection, usually only one of the entered conditions must be fulfilled for the event to be selected. If e.g. Ml and Mb are selected, events, which have either magnitude, will be selected. When no more parameters are desired, press enter.

  1. - Fault Plane Solution
    Selects events with a fault plane solution (F- line in S-file). There will also be the question: "Give quality, e.g. A or ABC, enter for all", in this way different qualities can be selected.
  2. - Earthquake Felt
    Events felt indicated by a type 2 line
  3. - Magnitude Type(s)
    Normally, all magnitudes for one event are searched to see if any magnitude fits the selection criteria. With option 3 it is possible to use one or a combination of magnitude types e.g. L and B. If magnitudes without type are to be selected, use underscore ``_'' for magnitude type. If there is no magnitude in the first magnitude position, chose ``N'' for one of the magnitude types to be able to select the other 2 magnitudes on the line. Magnitude types are: C: Coda magnitude, L: Local magnitude, b: mb, B: mB, s: Ms, S: MB and W: Moment magnitude. N: Find events with no magnitude in first position. An event is selected if any one of the types of magntudes are found. Magnitudes are only searched on first header line unless ``Use all header lines is set''.
  4. - Distance ID(s)
    Restricting the search to be for one or a combination of the distance id's L, R and D.
  5. - Event ID(s)
    Restricting the search to one or a combination of event id's, e.g. E and V for explosion and volcanic events. The letters used for selection are not limited to the examples shown above, they are however the ones used currently. It is thus e.g. possibly to label events as X for unknown type (column 23 in header line) and then later on select out all those events by specifying X for event ID. For the 3 questions about types, up to 5 letters can be used. The currently used codes are: E: Explosion, P: Probable explosion, V: Volcanic, S: Sonic boom, Q: Earthquakes which is equivalent to blank for type. However, if blank is selected, all event types are selected, while if Q is used as input, only events with no ID or Q ID are selected. So if all earthquakes and volcanic event are to be selected, use QV. Without the Q, only volcanic events are selected. Selection is made if either one of criteria is met.
  6. - Magnitude Limits
    Range of magnitudes to select. Note that if no magnitude type is given, the extreme of all magnitude types reported is used. Magnitudes are only searched on first header line unless Üse all header lines is set.
  7. - Latitude Limits
    Range of latitude. NOTE: If no latitude or longitude values are chosen, SELECT will include an event even when it is not located if the remaining criteria are OK. If it is required that only located events are searched for, enter at least one value like an upper latitude limit of 95.
  8. - Longitude Limits
    Range of longitude.
  9. - Depth Limits
    Range of depths.
  10. - RMS Limits
    Range of rms travel time residuals.
  11. - Number of Stations Limits
    Range of number of stations.
  12. - Hypocenter Errors Latitude Limits
    Range of hypocenter latitude errors. Works only if error line (E-type) is present in S-file. Currently error lines are generated by HYP and the ISC conversion program ISCNOR. There should only be one error line in file associated with the prime solution in first header line. However, if more than one error line is present, all are checked and if one fulfills the selection criteria, the event can be selected.
  13. - Hypocenter Errors Longitude Limits, See 12.
  14. - Hypocenter Errors Depth Limits, See 12.
  15. - Minimum Number of Polarities, only P-phases are used
    Counts all polarities, useful to find potential events for fault plane solutions.
  16. - Hypocenter Agencies
    Selects events only with given hypocenter agencies as indicated on header line.
  17. - Magnitude Agencies
    Select only events with given magnitude agencies as indicated on header line. Magnitudes are only searched on first header line unless Üse all header lines is set.
  18. - Station Codes, components, distance range and phase
    Selects only events with given stations, component, distance range and phase. A formatted help line comes up for selecting items. Any one or a combination can be selected, however, a station code or component code must be selected. The distance can be hypocentral or epicentral. Distances are integers right justified.

    A special option is to make a file used for input to CODAQ. The station name CODAQ is selcted and all stations present within the specified distance range are seleted and the output is written in file index.codaq which then contains the event-station combinations used as input to CODAQ. For componet selection, only the orientation code can be used. In addtion to to Z, N or E, also A can be used. This will select all 3 components for a selected station. In example below, all components for stations with 100 km are selected.

    
     STAT CO Mindis Maxdis Phas All stat hdist->FF
     CODAQ A      0    100
    

  19. - Polygon
    Selects events within a given polygon of at least 3 latitude-longitude pairs.
  20. - Use all header lines
    All header lines are searched for relevant information
  21. - Look for waveform file names
    Search the database for particular waveform files, input can use a fraction of file name or * for any name. No wildcards can be used in the string so e.g. ASK* will select all due to the *. Use just ASK in this case to select all filenames with the string ASK.
  22. - Gap range
    The range of gap as given on the E-line (normally 2. header line). Only hypocenters calculated with SEISAN version 7.0 have gap.
  23. - Phase
    Look for events with particular phases. Up to 6, 4 character phase names can be selected. The event is selected if at least one of the phases is present for the event. For a more selective selection based on phase, see option 18.
  24. - Volcanic subclasses
    Search for events of given subclasses given by up to 10 codes. Any code can be given, however, normally they will be as defined in VOLCANO.DEF. The program searches for lines starting with `VOLC MAIN'.

Historical data: When working with historical data, it can be useful to work with catalogs of several centuries. The century is available in the Nordic Format, so catalogs can go back to year 0. Output:

select.out: A CAT-file or compact file (depending on input) of selected events.

index.out: A list of event id's of selected events can be used with EEV or other programs accepting index files. This could be used e.g. to work on only distant events in the database by first selecting all distant events and then working with these directly in the database using command EEV index.out. Index files can have any name (must contain a `.') so different subsets can be available with different index files.

Waveform_names.out: A list of corresponding waveform files. It is mainly intended for copying to or from tape specific waveform files. It has the format of the filenr.lis files and can be used directly with e.g. MULPLT. See also program get_wav for selecting waveform files from the database.

select.inp: A file with all the parameters used for the run. The file can be renamed, edited and used as input for select. This is particularly an advantage if a complex set of selection parameters are used and the selection is wanted again with just a small change. An example file is shown below

 Base or file name            : TEST_                             
 Start time                   : 19930300000000
 End time                     : 19961231235959
 Minimum number of stations   :              0
 Maximum number of stations   :            999
 Minimum latitude             :        -90.000
 Maximum latitude             :         90.000
 Minimum longitude            :       -360.000
 Maximum longitude            :        360.000
 Minimum magnitude            :          5.000
 Maximum magnitude            :          7.000
 Magnitude agencies           :                               
 Hypocenter agencies          :                               
 Minimum rms                  :          0.000
 Maximum rms                  :        999.000
 Minimum depth                :        -99.000
 Maximum depth                :      99999.000
 Minimum error in latitude    :          0.000
 Maximum error in latitude    :      99999.000
 Minimum error in longitude   :          0.000
 Maximum error in longitude   :      99999.000
 Minimum error in depth       :        -99.000
 Maximum error in depth       :      99999.000
 Magnitude types (L,C,B,S,W)  :      
 Distance (ID) types (L,R,D)  :      
 Event types (e.g. E,V,P)     :      
 Minimum number of polarities :              0
 Felt earthquakes             :              F
 Fault plane solution         :              F
 Check all header lines       :              F
 Waveform files to check      :                                         
 Minimum gap                  :          0.000
 Maximum gap                  :        360.000
 Phases                       : P   SSS PP
 Volcanic subclasses          :        
 Stat., comp. dist range, phase (1x,a5,a2,2i7,1x,a4) one pr line, end blank line:
 STAT CO Mindis Maxdis Phas All stat hdist->TT
 BER  SZ      1    999 P    

 Polygon points (lat,lon), one pair pr line, end with blank line :

Note: The TT at STAT line indicates that all stations must be present (True) and hypocentral distance is used (True)

Select with input from the prompt line

This option is particular useful when using select with automated operations and has been made specifically to deal with extracting data out of the data bases using WEB based software. This option do not have all of the above options. The following are implemented:

-base : 5 letter data base
-seisweb: if set, WEB output parameters
-time : time interval (2 variables)
-web_out: complete path to where data is placed, only
active if seisweb set. 3 files are made:
web_out.id : id's, like index.out without
web_out.all : like select.out
web_out.head : header lines
-area : lat-lon grid, minlat,maxlat,minlon,maxlon
-depth : depth range, mindepth,maxdepth
-mag : magnitude range, minmag,maxmag
-nstat : range of number of stations, min,max
-gap : range of gap, min,max
-rms : range of rms, min,max
-magtypes : up to 5 mag types, one string, e.g L
-disttype : distance type, e.g D
-eventtype : event type, e.g. E

Problems: An event might be found and listed in index.out, but when looking for it with EEV, it is not there. This can happen if an event has been deleted with EEV and no UPDATE has been made, so that the event is still present in the CAT part of the database.



Subsections
next up previous contents index
Next: 6.4.1 Searching for text Up: 6. Description of Programs Previous: 6.3.4 SEIS2VIEWER, Plotting hypocentres   Contents   Index
Peter Voss : Thu Jun 25 12:59:49 UTC 2015