Skip to content

Commit

Permalink
Update mk_sta.py
Browse files Browse the repository at this point in the history
  • Loading branch information
YijianZhou committed Jul 2, 2022
1 parent b523a9e commit 64ef795
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions hypodd/mk_sta.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@
# i/o paths
cfg = config.Config()
fout=open('input/station.dat','w')
done_list = []

f=open(cfg.fsta); lines=f.readlines(); f.close()
for line in lines:
codes = line.split(',')
net, sta = codes[0].split('.')
if sta in done_list: continue
lat = float(codes[1])
lon = float(codes[2])
fout.write('{} {} {}\n'.format(sta, lat, lon))
done_list.append(sta)
fout.close()

0 comments on commit 64ef795

Please sign in to comment.