Crosscorrelation (Anti-correlation) Obspy

Dear all

I would like to ask you about cross correlation in obspy, there is a way to obtain values bewteen (-1 to 1)?? This is to obtain also anticorrelation!!

I am using obspy…templates_max_similarity(), but I obtain only positive values but in numpy corrcoef function says that corrcoerf fuction takes values between -1 to 1, is obtain these range values using templates_max_similarity().

And also, is posible to correlate signals with diferents code names (or id’s) with template also with diferent code name, is because I used a template with other code station and I obtained

“Skipping trace CM.CHI.00.HHZ in template correlation (not present in stream to check)”

CM.CHI.00.HHZ is the template
CM.ARG.00.HHZ is the signal

And I want to correlate one templated sliced from the same station but also with diferent stations.

I appreciate a lot of your help,

Best regards!

Juan,

some of the cross correlation routines in ObsPy have switches to control
if absolute maximum will be returned (positive or negative) or if only
the highest positive values are regarded. I do not think that this is
possible with pick correction or template similarity though and this is
by design I would say, because I think that in these cases you usually
do not want to consider anticorrelation.
As a workaround, you might be able to run the routine twice with one
trace multiplied with -1 to check for anticorrelation maximum.

If your code names changed but you still want to check similarity you
should just simply adapt the Trace ID manually before plugging it into
the matched filter routine.

T