next up previous contents index
Next: 18.6 SEIASC, converting SEISAN Up: 18. Waveform file management Previous: 18.4 RDSEED_MANY, chop up   Contents   Index


18.5 RESAMP, resampling waveform files

RESAMP is a simple resampling program, which can resample one or several waveform files. It only works with SEISAN format. All files are read, filtered and resampled. Then written out as one new file with the data from one or several input files. The maximum number of channels is max_chan_out, which is set as a parameter in the program, currently it is set to 7. Only the first max_chan_out channels are used or less if fewer channels in input file. It is assumed that all channels have the same sample rate and will be resampled to the same lower sample rate, which is an integer fraction of the original sample rate. If e.g. the original sample rate is 50, new rates of 25,10,5,2 etc can be obtained. The anti-alias filter is a single pass Butterworth with 6 poles. The user specifies manually both the decimation rate (2,5,10,25 in the above example) and the filter frequency. The new file(s) can have a new component specification, which is asked for interactively. Finally the user is asked for a new network code.

The input files(s) come from a filenr.lis file generated with DIRF. If more than one file is given in the filenr.lis, these will be put together in one file and some samples are saved from one file to the next in order to assure that there are no overlap problems when using the filter. IT IS ASSUMED THAT ALL FILES HAVE THE SAME LENGTH OF TIME. The program will check if a following file has the correct header time based on the length of the previous file. If the following file starts before the end of the previous file (err_samp samples, default 70), it is assumed that the timing is wrong and that the files should follow each other. A warning is given and the program continues. If the following file has a header time that is more that a given err_samp samples after where it should be, it is assumed that the next file is missing and zeros are inserted in the channel data. The number of sample errors, err_samp, is hardwired in the program, currently 70. The program will continue to put data together in one file until there are no more file names in the filenr.lis file or a blank line is encountered. After a blank line in the input file, a new output file will be created. This can be used to make daily files of e.g. 2 weeks on continuous data by manually placing a blank line in the filenr.lis file for every 24 hours. The program recalculates the sample rate based on time in first and last file. The output file name will be given the standard waveform file name with type R for resampled like 1999-07-02-1112-22R.BERGE_005.

Works ONLY with SEISAN format


next up previous contents index
Next: 18.6 SEIASC, converting SEISAN Up: 18. Waveform file management Previous: 18.4 RDSEED_MANY, chop up   Contents   Index
Peter Voss : Wed Aug 9 08:16:56 UTC 2017