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
650
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
960
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
680
2017 - Bringing Python 3 to LinkedIn
pybay
1
580
2017 - Python Debugging with PUDB
pybay
0
750
2017 - Opening up to Open Source
pybay
0
270
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
210
2017 - Performant Asynchronous Programming at Quora
pybay
1
390
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
540
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
660
Other Decks in Programming
See All in Programming
Phronetic Team with AI - Agile Japan 2025 closing
hiranabe
2
620
しっかり学ぶ java.lang.*
nagise
1
380
Nitro v3
kazupon
2
310
Verilator + Rust + gRPC と Efinix の RISC-V でAIアクセラレータをAIで作ってる話 RTLを語る会(18) 2025/11/08
ryuz88
0
360
アーキテクチャと考える迷子にならない開発者テスト
irof
8
3k
詳細の決定を遅らせつつ実装を早くする
shimabox
1
1.2k
Bakuraku E2E Scenario Test System Architecture #bakuraku_qa_study
teyamagu
PRO
0
760
歴史から学ぶ「Why PHP?」 PHPを書く理由を改めて理解する / Learning from History: “Why PHP?” Rediscovering the Reasons for Writing PHP
seike460
PRO
0
160
[堅牢.py #1] テストを書かない研究者に送る、最初にテストを書く実験コード入門 / Let's start your ML project by writing tests
shunk031
2
760
What's New in Web AI?
christianliebel
PRO
0
130
高単価案件で働くための心構え
nullnull
0
140
Claude Code on the Web を超える!? Codex Cloud の実践テク5選
sunagaku
0
550
Featured
See All Featured
Why Our Code Smells
bkeepers
PRO
340
57k
Thoughts on Productivity
jonyablonski
73
4.9k
YesSQL, Process and Tooling at Scale
rocio
174
15k
個人開発の失敗を避けるイケてる考え方 / tips for indie hackers
panda_program
118
20k
Become a Pro
speakerdeck
PRO
29
5.6k
Scaling GitHub
holman
463
140k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.2k
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.1k
Exploring the Power of Turbo Streams & Action Cable | RailsConf2023
kevinliebholz
36
6.1k
Typedesign – Prime Four
hannesfritz
42
2.9k
Visualization
eitanlees
150
16k
A better future with KSS
kneath
239
18k
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]