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
580
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
840
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
590
2017 - Bringing Python 3 to LinkedIn
pybay
1
520
2017 - Python Debugging with PUDB
pybay
0
580
2017 - Opening up to Open Source
pybay
0
220
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
160
2017 - Performant Asynchronous Programming at Quora
pybay
1
330
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
460
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
510
Other Decks in Programming
See All in Programming
Better Code Design in PHP
afilina
PRO
0
120
弊社の「意識チョット低いアーキテクチャ」10選
texmeijin
5
24k
Quine, Polyglot, 良いコード
qnighy
4
640
Why Jakarta EE Matters to Spring - and Vice Versa
ivargrimstad
0
1k
アジャイルを支えるテストアーキテクチャ設計/Test Architecting for Agile
goyoki
9
3.3k
「今のプロジェクトいろいろ大変なんですよ、app/services とかもあって……」/After Kaigi on Rails 2024 LT Night
junk0612
5
2.1k
Content Security Policy入門 セキュリティ設定と 違反レポートのはじめ方 / Introduction to Content Security Policy Getting Started with Security Configuration and Violation Reporting
uskey512
1
520
Creating a Free Video Ad Network on the Edge
mizoguchicoji
0
110
最新TCAキャッチアップ
0si43
0
140
AWS IaCの注目アップデート 2024年10月版
konokenj
3
3.3k
型付き API リクエストを実現するいくつかの手法とその選択 / Typed API Request
euxn23
8
2.2k
NSOutlineView何もわからん:( 前編 / I Don't Understand About NSOutlineView :( Pt. 1
usagimaru
0
330
Featured
See All Featured
Product Roadmaps are Hard
iamctodd
PRO
49
11k
Happy Clients
brianwarren
98
6.7k
Adopting Sorbet at Scale
ufuk
73
9.1k
How to Think Like a Performance Engineer
csswizardry
20
1.1k
Six Lessons from altMBA
skipperchong
27
3.5k
Unsuck your backbone
ammeep
668
57k
The Art of Delivering Value - GDevCon NA Keynote
reverentgeek
8
860
VelocityConf: Rendering Performance Case Studies
addyosmani
325
24k
Side Projects
sachag
452
42k
XXLCSS - How to scale CSS and keep your sanity
sugarenia
246
1.3M
Code Review Best Practice
trishagee
64
17k
Java REST API Framework Comparison - PWX 2021
mraible
PRO
28
8.2k
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]