xcor - subroutine to perform cross correlation.
call xcor(npts,t1,t2,tlagmx,tzero,dt,c,v,cc)
Basic Seismic
Utilities (BSU) subroutine which cross correlates input
traces "c" and "v", producing output
trace, "cc". With the exception of an
autocorrelation, this is not a commutative process. The
sense of it is that trace "c" is the moving trace,
sliding past the stationary trace, "v", from left
to right. This might be useful to those planning to take an
FFT of the cross correlation who might make some use of the
phase. It is also relevant if one is looking for relative
shifts (like a static shift) between two traces. It is
assumed that "c" and v" are of the same
length, npts. Zero lag position is when the two signals are
aligned together (complete overlap). See subroutines
xcor1 (one-sided auto correlation) or cross,
E.A.Robinson’s correlation subroutine for alternative
codes.
Fortran Version.
Arguments
npts (int)
Number of samples in a trace
t1 (float)
Start time for the correlation aperture (or gate). Same for both "c" and "v".
t2 (float)
End time for the correlation aperture. Same for both "c" and "v".
tlagmx (int)
Maximum relative shift from zero lag (in units of time).
tzero (float)
Time at which zero lag occurs in the output signal, "cc".
dt (float)
Sample interval in seconds.
xcor1(3), cross(3)
No known bugs.
Copyright © 2024 by Paul Michaels
This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
P. Michaels, PE. <paulmichaels@.boisestate.edu>