next up previous contents index
Next: 18.2 GET_ARC, extract waveform Up: 18. Waveform file management Previous: 18. Waveform file management   Contents   Index


18.1 APPEND, Append two or more waveform files

The program uses a filenr.lis input file. All files are read, and then written out as one new file. The maximum number of channels is max_chan_out which is set as a parameter (currently 7). Only the first max_chan_out channels are used or less if fewer channels in file. A blank line followed by a new group of files will make a new output file. There is also a question of how many files should be megerd at a time so e.g. every 10 files will be mergged. This is independent of the option with blank lines. The output file cannot have more than standard SEISAN dimension number of samples ( more than 1 200 000, see file ../INC/seidim.inc for exact number) per channel.

It is assumed that all channels have the same sample rate and that files follow each other in time.

Input format can be many but output format is SEISAN.

AUTOREG, automatic registering of events

When a large number of waveform files are available and it is known that they are real events, it might be an advantage to automatically register them into a database. Remember, the database can be made beforehand with MAKEREA. If the filename follows the SEISAN filename convention, the date and time used to generate the S-file are taken from the filename. Otherwise, the file is read to get the date and time from waveform headers. Obviously, the first option is faster. It is possible to register events both to the default database, any other database or the local directory. To run the program, make a filenr.lis of the waveform files and run AUTOREG. It is possible to put blank lines into the filenr.lis to separate into events, in case there is more than one waveform file from the same event. All waveform files before a blank line are put together into one S-file. Optionally, the waveform files can also be moved or copied to WAV or a WAV database subdirectory (including year and month). This can either be the default parameter COPY_WAV_DIR (in SEISAN.DEF) if different from blank. COPY_WAV_DIR should be the same as the data base used by the S-files. However an optionally data base directory entered interactively can also be used.

You can run AUTOREG with the flag -model, to set the location model indicator in the header line, e.g. autoreg -model G for the G model. Then you get the questions:


 autoreg
  Event type for all events: Local:    L (default)
                             Regional: R
                             Distant:  D

  Move (m) or copy (c) waveform files to WAV (enter=n) ?
m
 Files will be moved to default WAV base: TEST_
 Enter new WAV data base to copy or move to
 enter for default base or m for main WAV directory 
LVC
  Operator, max 4 chars
jh
 2010.018.12.26.15.0695.IU.LVC.10.LH1.R.SAC                  
 /home/s2000/seismo/REA/LVC__/2010/01/18-1226-15L.S201001
 mv   2010.018.12.26.15.0695.IU.LVC.10.LH1.R.SAC /home/s2000/seismo/WAV/LVC__/2010/01/                                                                                                                   
  File transferred to WAV base LVC__ **********
 2010.018.12.26.52.0695.IU.LVC.10.LHZ.R.SAC                  
.....
.....

In this case wavform files were moved to  data base LVC instead of the default TEST.

Now comes a listing of waveform file names and S-file names. The program will check if the event is already registered and the same options are available as in program SPLIT (section 13). Since AUTOREG automatically creates S-files for all events in filenr.lis, they will all be given an event type.

CONGAP, check completeness of continuous waveform database

This program checks for completeness of continuous data for a given time interval. The program reads the waveform data to see what data are available and checks for gaps, defined by a constant amplitude value (e.g. 0). The input can come either from an input file (congap.par) or the command line.

Parameters in the input file are:

CONT BASE: name of database, you can have more than one
START DATE: start time and date of interval to be read (yyyymmddhhmmss)
STOP DATE: stop time and date of interval to be read (yyyymmddhhmmss)
INTERVAL: duration of intervals read at a time in minutes (e.g. 60. for one hour)

When started from the command line, the same parameters can be given:

congap -start <yyyymmddhhmmss> -stop <yyyymmddhhmmss> -cbase <text> -interval <number>

The output file (congap.out) looks like this:

EDI   HHZ 20080101 0000 0.00   3600.00   3600.00  
EDI   HHN 20080101 0000 0.00   3600.00   3600.00  
EDI   HHE 20080101 0000 0.00   3600.00   3600.00  
EDI   HHZ 20080101 0100 0.00   3600.00   3600.00  
EDI   HHN 20080101 0100 0.00   3600.00   3600.00  
EDI   HHE 20080101 0100 0.00   3600.00   3600.00  
...

The fields are station and component code, date and time, expected duration and actual time with data. The output file can be used to produce plots showing data completeness (tool for this not included). When the program runs it also produces a summary output at the end, where the last column gives the percantage of data completeness, and the actual and expected times are in seconds:

--------------------------------------------
 # stat comp       actual     expected     %
--------------------------------------------
 1 EDI   HHZ     86400.00     86400.00 100.0  
 2 EDI   HHN     86400.00     86400.00 100.0  
 3 EDI   HHE     86400.00     86400.00 100.0  
--------------------------------------------

CONNOI and EVANOI, noise power spectral density

These two programs with the help of GMT allow to produce noise power spectral density (PSD) plots similar to the ones produced by the PQLX software. CONNOI is the tool that reads the continuous database and produces output files that are evaluated by EVANOI. The computation of the noise PSD follows the method described by McNamara and Buland [2004].

To run CONNOI on a SEISAN continuous database BER use for example:

connoi -start 20100501 -stop 20100502 -cbase BER

To run CONNOI on an archive structure BER use for example:

connoi -start 20100501 -stop 20100502 -arc BER

In both examples BER is the database, you can also specify 'def' and the program will take all default continuous databases or archives defined in SEISAN.DEF. The default output filename is connoi.out.

Example of output:

stat comp date and time       duration frequency noise PSD
----------------------------------------------------------
BER   HHZ 20100501 0000 0.00   3600.00  0.00200    -159.14
BER   HHZ 20100501 0000 0.00   3600.00  0.00204    -159.14
BER   HHZ 20100501 0000 0.00   3600.00  0.00209    -159.14
...

The output from CONNOI can then be used as input to EVANOI. You can enter station and component, give a time interval, select a time of day interval, and chose a reference station. EVANOI produces GMT plotting scripts files that are named after the station. Then simply run the script file to get a plot.

You can also output the data in a compact format using the -compact option. This output does not work with EVANOI, but it is fairly easy to read in your own scripts. An example output :

CONNOI: NF= 500 START=2008120101   STOP=2008120103   DURATION= 60.0min, SPACING= 50.%
STATN CMP yyyymmdd HHMMSS.FF   SPECLEN  -2.69897 -2.68955 -2.68014 ... 
BER   HHZ 20100501 0100 0.00   3600.00   -102.94  -102.94  -102.94 ... 
BER   HHN 20100501 0100 0.00   3600.00   -117.85  -117.85  -117.85 ... 
BER   HHE 20100501 0100 0.00   3600.00   -115.81  -115.81  -115.81 ...
VASAV BHZ 20100501 0100 0.00   3600.00   -134.16  -134.16  -134.16 ... 
VASAV BHN 20100501 0100 0.00   3600.00   -131.06  -131.06  -131.06 ... 
VASAV BHE 20100501 0100 0.00   3600.00   -124.60  -124.60  -124.60 ... 
...

By default, CONNOI calculates spectra every 30 minutes, with each spectra calculated over a 60-minute interval. You can change this using the -spectlen and -spectspace options, where -spectlen gives the interval over which to calculate the spectra (in minutes) and -spectspace gives the spacing between spectra with respect to -spectlen (1.0 for no overlap, 0.5 for 50% overlap, etc). For example:

connoi -start 20100501 -stop 20100502 -cbase BER -spectlen 60 -spectspace 1.

will calculate spectra over a 60-minute interval, spaced every 60 minutes (no overlap). Finally, you can calculate the spectra for a single channel of a single station using the -sgram option. This option always uses the -compact output format and sets spectspace to 1.0. For example:

connoi -start 20100501 -stop 20100502 -cbase BER -sgram TOTI BHZ

Figure 18.1: Example of plot created using CONNOI and EVANOI. The plot shows noise PDFs for station BER for three components in January 2015.
\begin{figure}
\centerline{\includegraphics[width=0.9\linewidth]{fig/ber_noise_pdf}}
\end{figure}

DATABASE2MSEED, convert database to miniseed

This program can be used to convert the waveform data that is linked to from a parametric database to miniseed format. The user is asked to enter the database name, and start and end time for the operation.

One should do a small test with a copy of parts of the database before runnung it through the complete database.

WAVETOOL, extract and convert waveform data

The program was called extract in SEISAN 7.2 and earlier. The program extracts all or selected time sections of waveform data, optionally applies some signal processing and then creates the output file(s). The input formats supported are SEISAN, SEED, MINISEED, GSE, HELMBERGER (only made by MULPLT), GURALP (one channel files) and SAC (all platforms)and output formats are SEISAN, MINISEED, GSE and SAC (all platforms)and SEED on Linux. The program can be used as a conversion program between these formats, instead of using e.g. SACSEI. It would also be possible to convert for example SAC and GSE files to SEISAN in one go. When creating GSE, MINISEED or SAC files, the respective format code is added to the filenames. The program can also extract data from a SEISAN continuous data base or a large SEED file.

File name convention for output files:

In interactive mode, the output file name is SEISAN by default since

there is no question about file name.

No output file name given: wavetool.out for SEISAN output file

wavetool.out_SEED for SEED output file

wavetool.out_MSEED for MSEED output file

wavetool.out_GSE for GSE output file

Output file name given as SEISAN: SEISAN name for SEISAN output file SEISAN_name_SEED for SEED output file SEISAN_name_MSEED for MSEED output file SEISAN_name_GSE for GSE output file

No output file name given and output format is SAC:

SEISAN_name_component_SAC

Output name given: That name is used exactly as specified. There

is no check if file exists and there is no

ending indicating format

Ouput of one channel files with SEISAN names: The channel code is added

to avoid overwrite of different channels

from the same station

Output format is SEISAN and ouput file exists: _SEI is added to file name

Note that for MINISEED writing, only Steim1 compression is used. Integer format is also possible, but requires a parameter change in WAVETOOL and recompilation.

There are two input options: (1) a single S-file or a list of S-files created with DIRF (is also an index file), which points to the waveform data or a filenr.lis type of file that gives the waveform file names; (2) a waveform file or a list of waveform files. The program can be started either interactively, without arguments, or non-interactive by specifying the commands as arguments.

Filtering: WAVETOOL only supports band pass filters hardwired to 4 poles and one pass (forwards). So if WAVETOOL is started from MULPLT to extract data as seen on the screen, the filter constants will ONLY be passed to WAVETOOL if 4 poles and band pass.

The arguments are: -sfile \bgroup\color{black}$ <$\egroup sfile-name \bgroup\color{black}$ >$\egroup : The S-file name of the event you want to extract waveform data from.

-wav_files \bgroup\color{black}$ <$\egroup file-name \bgroup\color{black}$ >$\egroup : Extract from a list of waveform files in filenr.lis format. Input from S-file will be ignored. This option merges all files from list (if within a 'reasonable time window') and program is then partly doing what SEISEI is doing. If file-name is given as `SEISAN', then the output file name follows SEISAN convention.

-wav_in_file: input waveform file.

-maxpoints : Skip points to get approximately maxpoints

-wav_out_file \bgroup\color{black}$ <$\egroup file-name \bgroup\color{black}$ >$\egroup : Name of waveform output file, not used if output format is SAC.

-start \bgroup\color{black}$ <$\egroup time \bgroup\color{black}$ >$\egroup : Start time can be used to set start time the same for all channels instead of using chansel file, time can be absolute or relative to beginning of the first trace. Options are Start time relative earliest channnel, Abs start time string yy...s.sss for all channels.If ABS time used, string MUST contain a '.'.Abs start time string yyyymmddhhmmss (integer), used to define cont start time.

-duration \bgroup\color{black}$ <$\egroup time \bgroup\color{black}$ >$\egroup : Select duration of time window in seconds if -start is used.

-interactive : enable interactive mode

-cbase: name of file with selected continuous databases,all bases is default

-command_file: give arguments to wavetool in a file rather than on the command line (used by Seisweb)

-cwav: Input is from the SEISAN continuous data base, useful for extracting intervals

-cseed: Input from large SEED file, similar to -cwav -wav_in_file \bgroup\color{black}$ <$\egroup file-name \bgroup\color{black}$ >$\egroup : Input of one waveform file

-arc: Input from BUD or SeisComp archive.

-sfile \bgroup\color{black}$ <$\egroup file-name \bgroup\color{black}$ >$\egroup : Input of S-file name

-format \bgroup\color{black}$ <$\egroup output format \bgroup\color{black}$ >$\egroup : The output formats supported are SEISAN, SAC, GSE (GSECM6) and GSEINT. In case of SEISAN or GSE, multi-trace files including all selected traces are created, while for SAC, single trace files are generated. SEED is also possible on Linux.

-chansel \bgroup\color{black}$ <$\egroup file-name \bgroup\color{black}$ >$\egroup : Input file to select channels and time windows. The first line contains number of channels. The following lines give station code, start time (both absolute and relative to earliest trace allowed) and duration. If start time and duration are set to 0, complete traces are selected.

-chan_out_file: file name of file with channel description if this option is given, program terminates after writing out the file.

-chandef \bgroup\color{black}$ <$\egroup file-name \bgroup\color{black}$ >$\egroup : change station and/or channel names following standard also used in the conversion programs, for example:

Header line text (29 chars) ... NetCd (5 Chars), comment in next line
                                  
 chan stati  comi stato  como, In and Out definitions
             p0          HH Z
             p1          HH N
             p2          HH E

-ground : compute displacement, velocity or acceleration (1,2,3)

-seed_location: seed location code NOT USED.

-rsam: comput 1 min rsam data.

Example

Select the first three complete traces
3
1 0 0.0
2 0 0.0
3 0 0.0

Use absolute start time, and duration of 180 seconds

3
1 19991001124500.000 180
2 19991001124500.000 180
3 19991001124500.000 180

Use relative start time of 60 seconds from beginning of earliest trace, and 300 seconds duration

3
1 60 300
2 60 300
3 60 300

The program assumes that a large number is absolute time.

-chan_out_file \bgroup\color{black}$ <$\egroup file-name \bgroup\color{black}$ >$\egroup : Name of text file containing a list of available channels from a list of waveform files. If wav_out_file is not specified, program terminates after creating the list.

Example

 1 KBS   BV Z  1996  6  3 20  2 18.991  6000   20.000 2666.400  299.950  
 2 LOF   S  Z  1996  6  3 20  5  5.531  5800   50.000 2832.940  115.980  
 3 MOL   S  Z  1996  6  3 20  5 24.984 10000   50.000 2852.393  199.980  
 4 FOO   S  Z  1996  6  3 20  5 34.156  9650   50.000 2861.565  192.980  
 5 HYA   S  Z  1996  6  3 20  5 36.078  9900   50.000 2863.487  197.980

-filter \bgroup\color{black}$ <$\egroup flow \bgroup\color{black}$ >$\egroup \bgroup\color{black}$ <$\egroup fhigh \bgroup\color{black}$ >$\egroup : bandpass filter limits

If a filter is used, a 4 pole Butterworth filter is used one way. No other filters are possible. Filter in WAVETOOL

-ground \bgroup\color{black}$ <$\egroup 1,2,3 \bgroup\color{black}$ >$\egroup : compute displacement, velocity or acceleration (1,2,3)

-ichan \bgroup\color{black}$ <$\egroup id \bgroup\color{black}$ >$\egroup : select one channel only

-interactive : Flag to specify non-interactive use, in which case the program does not ask any questions (for example given by SEISAN-autodrm interface), default is interactive.

-seisweb : Flag to indicate that the program is started by SEISWEB.

-maxpoints \bgroup\color{black}$ <$\egroup number \bgroup\color{black}$ >$\egroup : Number specifies the total number of points desired for the total time window covering all selected traces. This option is meant to reduce the number of points to what is needed to visual correctly plot the traces. When plotting the trace using a number of pixels, which is smaller than the number of points on the trace, samples are plotted on top of each other for one time sample. This results in the maximum and minimum being plotted at the same place on the x-axis. The idea now is to reduce the trace to these maxima and minima only. Then using twice the number of samples than pixels will allow to visually correctly show the trace. Note that this is not a resample routine. Option mainly used with SEISWEB.

-stat_out : write out station location file, simple xy output file (station_list.out)

-rsam : convert data to RSAM (1-minute absolute average), which is commonly used in volcano seismology

-resp_out : write out list of all response files for channels given in waveform files (respfile_list.out)

Intercative input

The interactive input has less options as the mon interactive input, however the option are as above. The questions are:

Filename of s-file or waveform file, number or filenr.lis Maximum number of points in output trace, return for all same as -maxpoints Ground motion output (dis = 1, vel = 2, acc = 3, none = return) Filter low and high, return for no filter Select all data, y=return,n If answer is n, then the following 2 questions come: Number of channels to read Channel number, start time and window

Output formats (SEISAN, GSE (def=CM6), GSEINT, SAC, MSEED) Default is SEISAN=return

Another way of extracting waveform data is using MULPLT where many traces can be extracted as a binary SEISAN file (using WAVETOOL in the background) or a single trace as an ASCII file.

Accuracy of extracted data

If the data is filtered or corrected for instrument response, the number out can be less than one and an output file of zeros can be made. If the output format is SEISAN, the values will always be scaled to avoid this and the appropriate scaling factor is included in the waveform file. Subsequently reading of these files in SEISAN will produce the correct values. For this reason, it is advised to use SEISAN as output format when filtering or correcting for instrument response. SAC data can have values less than 1.0 so only if written in SAC or SEISAN will the values be correctly represented. If a more specific combination of filters and and response removal is required (like making a Wood Anderson trace with an addtional fileter) it can only be done for one event using the MULPLT OutW option which creates an ASCII Helmerger file which then can be converted with WAVETOOL to any other format. SAC input data is checked for max values. If smnaller then 10, output will be scaled in SEISAN format. Note: Parameter MERGE_WAVFORM in SEISAN.DEF sets the network extension of extracted files.


next up previous contents index
Next: 18.2 GET_ARC, extract waveform Up: 18. Waveform file management Previous: 18. Waveform file management   Contents   Index
Peter Voss : Mon Feb 27 10:16:12 UTC 2017