A common task is that you have a data base of S-files in one place and the corresponding waveform files at another place and there is a need to put the waveform file names into the S-files. This can easily be done by editing if only a few files but for many files a program is needed. WAV_ADD uses as input a filenr.lis of the waveform files and some input of the S-files. The S-file input can be a data base or a file etc. For each event, the time in every waveform file (the channel with the earliest time) is compared to the origin time and if within a given time limit, the wavform file name is added to the event. It is thus possible that several waveform file names are added to the same event or that a wavform file name is added to several events. There is no requirement for the name of the wavform files since the time of the waweform file start is read from the wavform file itself. Note however, tha tid the waveform file are to stored in a WAV data base, the file names must be standard. Since all wavform files are compared to all events there is no requirement that the waveform file names are in any order in filenr.lis.
An output file is written with all the events in the input and with the added waveform file names. The waveform file names of waveform files not associated with an event are wrtten out in a file with filnr.lis format and can potentially be used with AUTOREG to create events in the corresponding data base.
Files with errrors are also listed in an output file.
A procdure could be:
Collect all S-files from data base using COLLECT
Make dirf of waveform file names
Run WAV_ADD and check the output file for associations. If too many or too few, test with a another time difference.
Once output is ok put data back into data base with SPLIT.
Possibely make new events with waveform files not associated.