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
680
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
2017 - Gabrielle Simard-Moore - Calculating the Epicenter of an Earthquake with Python
PyBay
August 13, 2017
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
730
2017 - Bringing Python 3 to LinkedIn
pybay
1
610
2017 - Python Debugging with PUDB
pybay
0
800
2017 - Opening up to Open Source
pybay
0
300
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
240
2017 - Performant Asynchronous Programming at Quora
pybay
1
420
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
590
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
740
Other Decks in Programming
See All in Programming
AIとRubyの静的型付け
ukin0k0
0
560
キャリア迷子上等 ─ "ない道"は自分で作ればいい
16bitidol
3
1.9k
作って学ぶ、 JSX (TSX) ランタイムの基本
syumai
7
1.6k
LLM Plugin for Node-REDの利用方法と開発について
404background
0
170
Java × distroless で 軽量なコンテナイメージを / Java on Distroless
contour_gara
0
520
並列実装の現場、2ヶ月間実務でAIを使い倒したAIもPCも私も限界が近い
ming_ayami
0
120
軽量Java基盤の設計 DIコンテナに頼らない、長期保守と1秒起動の実現 JJUG CCC 2026 Spring
macha64
0
490
肥大化するレガシーコードに立ち向かうためのインターフェース分離と依存の逆転 / JJUG CCC 2026 Spring
hirokunimaeta
0
530
New "Type" system on PicoRuby
pocke
1
780
jQueryをバージョンアップする前に使いたいjQuery Migrate
matsuo_atsushi
0
200
TAKTでAI駆動開発の品質を設計する
j5ik2o
6
1.1k
Spec Driven Development | AI Summit Lisbon
danielsogl
PRO
0
170
Featured
See All Featured
GraphQLの誤解/rethinking-graphql
sonatard
75
12k
What Being in a Rock Band Can Teach Us About Real World SEO
427marketing
0
250
Paper Plane
katiecoart
PRO
1
51k
What's in a price? How to price your products and services
michaelherold
247
13k
A Modern Web Designer's Workflow
chriscoyier
698
190k
Faster Mobile Websites
deanohume
310
31k
Ruling the World: When Life Gets Gamed
codingconduct
0
250
Exploring anti-patterns in Rails
aemeredith
3
400
The Invisible Side of Design
smashingmag
302
52k
How to build an LLM SEO readiness audit: a practical framework
nmsamuel
1
770
So, you think you're a good person
axbom
PRO
2
2.1k
Designing Powerful Visuals for Engaging Learning
tmiket
1
410
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]