obspy-users Digest, Vol 58, Issue 16

Hi Martin;

My fault, I forgot to include the next part:

file = open(‘meca.dat’,‘r’)
lines = file.readlines()
file.close()

x1 =[]
x2=[]
x3=[]
x4=[]
x5=[]
x6=[]

for line in lines:
p=line.split()
x1.append(float(p[0]))
x2.append(float(p[1]))
x3.append(float(p[2]))
x4.append(float(p[3]))
x5.append(float(p[4]))
x6.append(float(p[5]))

strike=np.array(x1)
dip=np.array(x2)
rake=np.array(x3)
dep=np.array(x4)
vrd=np.array(x5)
mag=np.array(x6)

What about the focal mechanism?

Thanks,

-Esteban

Hi Esteban,

a quick fix might be

for i in range(len(x1)):
bball = Beach([strike[i], dip[i], rake[i]], xy=([dep[i],vrd[i]]), width=(0.80,0.45), linewidth=1, alpha=0.85)
bball.set_zorder(1)
ax.add_collection(bball)

This should work but isn’t very elegant. I have not worked with Beach before, so I have no idea what it is good for.
Hope it works for you.

Cheers,
Martin