Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,7 @@ seismo-learn 的 logo 由三部分组成:

## 相关脚本

- [`make_beachball.sh`](make_beachball.sh): 绘制震源球
- [`make_waveform.sh`](make_waveform.sh): 绘制 IU.HRV 台记录的南美大地震的波形
- [`make_logo.py`](make_logo.py): 绘制 logo

## 使用场景

Expand Down
10 changes: 0 additions & 10 deletions make_beachball.sh

This file was deleted.

37 changes: 37 additions & 0 deletions make_logo.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
#!/usr/bin/env python
import matplotlib.pyplot as plt
from obspy import UTCDateTime
from obspy.clients.fdsn import Client
from obspy.imaging.beachball import beach

fig, ax = plt.subplots(figsize=(5, 5))
ax.set_xlim(-0.5, 0.5)
ax.set_ylim(-0.5, 0.5)
ax.set_axis_off()
ax.add_collection(
beach([180, 18, -88], facecolor="gray", linewidth=0, width=1, xy=(0, 0), zorder=0)
)
# ax.text(0, 0, "学", fontsize="xx-large")

client = Client("IRIS")
starttime = UTCDateTime("2014-04-03T02:43:13.110") + 1000
endtime = UTCDateTime("2014-04-03T02:43:13.110") + 2400
st = client.get_waveforms(
network="IU",
station="HRV",
location="00",
channel="BH2",
starttime=starttime,
endtime=endtime,
)
st.filter("bandpass", freqmin=0.005, freqmax=0.01, corners=2)
st.normalize()

tr = st[0]
ax.plot(
tr.times() / tr.times().max() / 1.2 - 0.4,
tr.data / 4 - 0.2,
color="black",
linewidth=2.5,
)
fig.savefig("logo.pdf")
28 changes: 0 additions & 28 deletions make_waveform.sh

This file was deleted.