Dear users,
I want find a way to insert into the CC header's files the pair stations distance
for each CC.
In the file 'database_tools.py' I found in 'MISCS' this code:
############ MISCS ############
def azimuth(coordinates, x0, y0, x1, y1):
if coordinates == "DEG":
dist, azim, bazim = gps2DistAzimuth(y0, x0, y1, x1)
# print dist, azim, bazi
return azim
elif coordinates == 'UTM':
azim = 90. - np.arctan2((y1 - y0), (x1 - x0)) * 180. / np.pi
# print azim
return azim
else:
print "woooooow, please consider having a single coordinate system for all
stations"
return 0
So my idea was insert this code inside the 'correlation' section to insert these
information in the header's files like it happens with other parameters below:
if sac_format == "doublets":
tr.SetHvalue('A', 120)
else:
tr.SetHvalue('B', -maxlag)
tr.SetHvalue('DEPMIN', np.min(corr))
tr.SetHvalue('DEPMAX', np.max(corr))
tr.SetHvalue('DEPMEN', np.mean(corr))
tr.SetHvalue('SCALE', 1)
tr.SetHvalue('NPTS', len(corr))
tr.WriteSacBinary(filename)
del st, tr
return
I think also that insert this type of implementation in the code could be very helpful. I
hope that someone can help me.
cheers,
Carmelo
-----------
Mr Carmelo Sammarco MSc BSc FGS
PhD student in Geology and Petroleum Geology
University of Aberdeen
The University of Aberdeen is a charity registered in Scotland, No SC013683.
Tha Oilthigh Obar Dheathain na charthannas clàraichte ann an Alba, Àir. SC013683.
Show replies by date