Skip to content

CC of horizontal components (rotate cc to obtain RR,TT) #245

Answered by ThomasLecocq
kjdavidson asked this question in Q&A
Discussion options

You must be logged in to vote

Hey, sorry for the delay. This code will be part of the next release indeed.

In principle, you have to compute EE,NN,EN,NE for computing RR,TT.

The following code will read the REF stacks and compute the radial-radial and transverse-transverse components, using the station database for defining the azimuths:

import os, glob, logging
from obspy import read

from msnoise.api import *
db = connect()

filterid = 2

c = np.cos
s = np.sin

for comp in ["ZZ","EE","NN","EN","NE","RR","TT"]:
    dir = "STACKS/%02i/REF/%s"%(filterid, comp)
    if not os.path.isdir(dir):
        os.makedirs(dir)

for sta1,sta2 in get_station_pairs(db):
    station1 = "%s.%s" % (sta1.net, sta1.sta)
    station2 = "%s…

Replies: 1 comment 4 replies

Comment options

You must be logged in to vote
4 replies
@kjdavidson
Comment options

@ThomasLecocq
Comment options

@kjdavidson
Comment options

@ThomasLecocq
Comment options

Answer selected by kjdavidson
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
2 participants