Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
2017 - Gabrielle Simard-Moore - Calculating the...
Search
PyBay
August 13, 2017
Programming
0
640
2017 - Gabrielle Simard-Moore - Calculating the Epicenter of an Earthquake with Python
PyBay
August 13, 2017
Tweet
Share
More Decks by PyBay
See All by PyBay
2017 - The Packaging Gradient
pybay
2
950
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
670
2017 - Bringing Python 3 to LinkedIn
pybay
1
570
2017 - Python Debugging with PUDB
pybay
0
730
2017 - Opening up to Open Source
pybay
0
260
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
200
2017 - Performant Asynchronous Programming at Quora
pybay
1
390
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
530
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
650
Other Decks in Programming
See All in Programming
なぜGoのジェネリクスはこの形なのか? Featherweight Goが明かす設計の核心
ryotaros
7
1k
ネイティブ製ガントチャートUIを作って学ぶUICollectionViewLayoutの威力
jrsaruo
0
130
PostgreSQLで手軽にDuckDBを使う!DuckDB&pg_duckdb入門/osk2025-duckdb
takahashiikki
1
240
CSC305 Lecture 02
javiergs
PRO
1
260
CSC305 Lecture 03
javiergs
PRO
0
230
プログラミングどうやる? ~テスト駆動開発から学ぶ達人の型~
a_okui
0
190
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
140
Catch Up: Go Style Guide Update
andpad
0
140
10年もののAPIサーバーにおけるCI/CDの改善の奮闘
mbook
0
750
アメ車でサンノゼを走ってきたよ!
s_shimotori
0
130
Pull-Requestの内容を1クリックで動作確認可能にするワークフロー
natmark
2
440
AIエージェント時代における TypeScriptスキーマ駆動開発の新たな役割
bicstone
4
1.5k
Featured
See All Featured
Building an army of robots
kneath
306
46k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.4k
Imperfection Machines: The Place of Print at Facebook
scottboms
269
13k
Mobile First: as difficult as doing things right
swwweet
224
10k
GitHub's CSS Performance
jonrohan
1032
460k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
229
22k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.6k
Music & Morning Musume
bryan
46
6.8k
Writing Fast Ruby
sferik
629
62k
Code Review Best Practice
trishagee
72
19k
Measuring & Analyzing Core Web Vitals
bluesmoon
9
610
Become a Pro
speakerdeck
PRO
29
5.5k
Transcript
Calculating the Epicenter of an Earthquake with Python Gabrielle Simard-Moore
From Seismograph to Epicenter • 3 Seismic Stations • P-
and S-wave arrival time difference • Distance to Earthquake • Draw 3 circles • Intersection = Epicenter
Seismic Data
Getting the Distance and Magnitude
None
Tech Stack • Python • Numpy • Datetime • Math
• Flask • Ajax/Jquery • Google Maps JS API
Assumptions • Wave velocity in CA crustal rocks P-wave velocity
~ 6.34 km/s (varies by +/- 2+) S-wave velocity ~ 3.67 km/s (varies by +/- 1+) • Homogeneity of materials (very unrealistic for a heterogeneous lithosphere)
3 stations
Many steps
Degrees to Radians
Geodetic (latitude, longitude) to ECEF X, Y, Z coordinates to
Numpy array ECEF = “Earth centered, Earth fixed”
Vector Normalization
Final Trilateration point: Epicenter
ECEF XYZ to Lat, Lon
Front end
Thanks! github.com/gsimore/earthquakes
[email protected]