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
610
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
880
2017 - Building Bridges: Stopping Python 2 without damages
pybay
0
620
2017 - Bringing Python 3 to LinkedIn
pybay
1
540
2017 - Python Debugging with PUDB
pybay
0
660
2017 - Opening up to Open Source
pybay
0
240
2017 - A Gentle Introduction to Text Classification with Deep Learning
pybay
2
170
2017 - Performant Asynchronous Programming at Quora
pybay
1
360
2017 - latus - a Personal Cloud Storage App written in Python
pybay
2
490
2017 - Everything You Ever Wanted to Know About Web Authentication in Python
pybay
3
580
Other Decks in Programming
See All in Programming
データベースのオペレーターであるCloudNativePGがStatefulSetを使わない理由に迫る
nnaka2992
0
250
Domain-Driven Design (Tutorial)
hschwentner
13
22k
Jakarta EE meets AI
ivargrimstad
0
650
AWS Step Functions は CDK で書こう!
konokenj
5
870
15分で学ぶDuckDBの可愛い使い方 DuckDBの最近の更新
notrogue
3
830
PHPのバージョンアップ時にも役立ったAST
matsuo_atsushi
0
230
Go 1.24でジェネリックになった型エイリアスの紹介
syumai
2
300
Rubyと自由とAIと
yotii23
6
1.9k
Swift Testingのモチベを上げたい
stoticdev
2
200
仕様変更に耐えるための"今の"DRY原則を考える
mkmk884
9
3.3k
メンテが命: PHPフレームワークのコンテナ化とアップグレード戦略
shunta27
0
320
Kotlinの開発でも AIをいい感じに使いたい / Making the Most of AI in Kotlin Development
kohii00
5
1.9k
Featured
See All Featured
Imperfection Machines: The Place of Print at Facebook
scottboms
267
13k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
The Cult of Friendly URLs
andyhume
78
6.2k
The Cost Of JavaScript in 2023
addyosmani
47
7.4k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
How STYLIGHT went responsive
nonsquared
99
5.4k
Dealing with People You Can't Stand - Big Design 2015
cassininazir
366
25k
How To Stay Up To Date on Web Technology
chriscoyier
790
250k
A Modern Web Designer's Workflow
chriscoyier
693
190k
Facilitating Awesome Meetings
lara
53
6.3k
Optimising Largest Contentful Paint
csswizardry
34
3.1k
Adopting Sorbet at Scale
ufuk
75
9.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 gsimardmoore@gmail.com