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
660
0
Share
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
710
2017 - Bringing Python 3 to LinkedIn
pybay
1
600
2017 - Python Debugging with PUDB
pybay
0
790
2017 - Opening up to Open Source
pybay
0
280
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
230
2017 - Performant Asynchronous Programming at Quora
pybay
1
410
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
580
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
730
Other Decks in Programming
See All in Programming
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
420
Codex CLIのSubagentsによる並列API実装 / Parallel API Implementation with Codex CLI Subagents
takatty
2
750
コードレビューをしない選択 #でぃーぷらすトウキョウ
kajitack
3
1.2k
Cyrius ーLinux非依存にコンテナをネイティブ実行する専用OSー
n4mlz
0
260
どんと来い、データベース信頼性エンジニアリング / Introduction to DBRE
nnaka2992
1
350
RailsのValidatesをSwift Macrosで再現してみた
hokuron
0
140
20260313 - Grafana & Friends Taipei #1 - Kubernetes v1.36 的開發雜記:那些困在 Alpha 加護病房太久的 Metrics
tico88612
0
240
20260315 AWSなんもわからん🥲
chiilog
2
180
Claude Code Skill入門
mayahoney
0
460
AI時代のシステム設計:ドメインモデルで変更しやすさを守る設計戦略
masuda220
PRO
6
1.1k
生成 AI 時代のスナップショットテストってやつを見せてあげますよ(α版)
ojun9
0
320
AI 開発合宿を通して得た学び
niftycorp
PRO
0
180
Featured
See All Featured
Raft: Consensus for Rubyists
vanstee
141
7.4k
Mind Mapping
helmedeiros
PRO
1
140
Embracing the Ebb and Flow
colly
88
5k
Are puppies a ranking factor?
jonoalderson
1
3.2k
Kristin Tynski - Automating Marketing Tasks With AI
techseoconnect
PRO
0
210
Mobile First: as difficult as doing things right
swwweet
225
10k
Building the Perfect Custom Keyboard
takai
2
720
エンジニアに許された特別な時間の終わり
watany
106
240k
Making Projects Easy
brettharned
120
6.6k
Build The Right Thing And Hit Your Dates
maggiecrowley
39
3.1k
Easily Structure & Communicate Ideas using Wireframe
afnizarnur
194
17k
For a Future-Friendly Web
brad_frost
183
10k
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]