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
600
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
860
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
610
2017 - Bringing Python 3 to LinkedIn
pybay
1
530
2017 - Python Debugging with PUDB
pybay
0
610
2017 - Opening up to Open Source
pybay
0
230
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
170
2017 - Performant Asynchronous Programming at Quora
pybay
1
350
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
480
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
550
Other Decks in Programming
See All in Programming
HTML/CSS超絶浅い説明
yuki0329
0
200
PHPとAPI Platformで作る本格的なWeb APIアプリケーション(入門編) / phpcon 2024 Intro to API Platform
ttskch
0
410
Compose でデザインと実装の差異を減らすための取り組み
oidy
1
230
最近のVS Codeで気になるニュース 2025/01
74th
1
230
traP の部内 ISUCON とそれを支えるポータル / PISCON Portal
ikura_hamu
0
230
ペアーズでの、Langfuseを中心とした評価ドリブンなリリースサイクルのご紹介
fukubaka0825
1
170
振り返れば奴(Cline)がいる
keiyagi
0
110
[JAWS-UG横浜 #80] うわっ…今年のServerless アップデート、少なすぎ…?
maroon1st
0
140
DevFest - Serverless 101 with Google Cloud Functions
tunmise
0
140
AWSのLambdaで PHPを動かす選択肢
rinchoku
2
410
Spring gRPC について / About Spring gRPC
mackey0225
0
130
AWS re:Invent 2024個人的まとめ
satoshi256kbyte
0
140
Featured
See All Featured
Code Reviewing Like a Champion
maltzj
521
39k
Testing 201, or: Great Expectations
jmmastey
41
7.2k
Building Applications with DynamoDB
mza
93
6.2k
The World Runs on Bad Software
bkeepers
PRO
66
11k
Chrome DevTools: State of the Union 2024 - Debugging React & Beyond
addyosmani
3
260
Writing Fast Ruby
sferik
628
61k
Designing Experiences People Love
moore
139
23k
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
30
2.1k
Building a Scalable Design System with Sketch
lauravandoore
460
33k
Raft: Consensus for Rubyists
vanstee
137
6.7k
Adopting Sorbet at Scale
ufuk
74
9.2k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
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]