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
660
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
1k
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
700
2017 - Bringing Python 3 to LinkedIn
pybay
1
590
2017 - Python Debugging with PUDB
pybay
0
780
2017 - Opening up to Open Source
pybay
0
280
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
220
2017 - Performant Asynchronous Programming at Quora
pybay
1
400
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
560
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
720
Other Decks in Programming
See All in Programming
CSC307 Lecture 09
javiergs
PRO
1
840
Oxlintはいいぞ
yug1224
5
1.4k
Honoを使ったリモートMCPサーバでAIツールとの連携を加速させる!
tosuri13
1
180
生成AIを活用したソフトウェア開発ライフサイクル変革の現在値
hiroyukimori
PRO
0
100
カスタマーサクセス業務を変革したヘルススコアの実現と学び
_hummer0724
0
730
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
1k
AIで開発はどれくらい加速したのか?AIエージェントによるコード生成を、現場の評価と研究開発の評価の両面からdeep diveしてみる
daisuketakeda
1
2.5k
今こそ知るべき耐量子計算機暗号(PQC)入門 / PQC: What You Need to Know Now
mackey0225
3
380
副作用をどこに置くか問題:オブジェクト指向で整理する設計判断ツリー
koxya
1
610
疑似コードによるプロンプト記述、どのくらい正確に実行される?
kokuyouwind
0
390
Smart Handoff/Pickup ガイド - Claude Code セッション管理
yukiigarashi
0
150
日本だけで解禁されているアプリ起動の方法
ryunakayama
0
170
Featured
See All Featured
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
133
19k
Unlocking the hidden potential of vector embeddings in international SEO
frankvandijk
0
170
Why Mistakes Are the Best Teachers: Turning Failure into a Pathway for Growth
auna
0
54
Sharpening the Axe: The Primacy of Toolmaking
bcantrill
46
2.7k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
150
The Cult of Friendly URLs
andyhume
79
6.8k
Ruling the World: When Life Gets Gamed
codingconduct
0
150
Measuring & Analyzing Core Web Vitals
bluesmoon
9
760
Understanding Cognitive Biases in Performance Measurement
bluesmoon
32
2.8k
Improving Core Web Vitals using Speculation Rules API
sergeychernyshev
21
1.4k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
The AI Revolution Will Not Be Monopolized: How open-source beats economies of scale, even for LLMs
inesmontani
PRO
3
3k
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]