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
Open Software for Astrophysics, AAS241
Search
Dan Foreman-Mackey
January 12, 2023
Science
2
440
Open Software for Astrophysics, AAS241
Slides for my plenary talk at the 241st American Astronomical Society meeting.
Dan Foreman-Mackey
January 12, 2023
Tweet
Share
More Decks by Dan Foreman-Mackey
See All by Dan Foreman-Mackey
Open software for Astronomical Data Analysis
dfm
0
100
My research talk for CCA promotion
dfm
1
730
Astronomical software
dfm
1
680
emcee-odi
dfm
1
570
Exoplanet population inference: a tutorial
dfm
3
410
Data-driven discovery in the astronomical time domain
dfm
6
670
TensorFlow for astronomers
dfm
6
690
How to find a transiting exoplanets
dfm
1
420
Long-period transiting exoplanets
dfm
1
290
Other Decks in Science
See All in Science
第4回ナレッジグラフ勉強会 Knowledge Graph Embedding
maruru0090
0
160
【論文紹介】DocTr_ Document Transformer for Structured Information Extraction in Documents / iccv2023-doctr
yuya4
3
680
大規模言語モデルの開発
chokkan
PRO
80
27k
(Forkwell Library #48)『詳解 インシデントレスポンス』で学び倒すブルーチーム技術
scientia
2
1.2k
Transformer系機械学習モデルを取り巻くライブラリや用語を整理する
bobfromjapan
2
580
Direct Preference Optimization
zchenry
0
230
BigQueryで参加するレコメンドコンペ / bq-recommend-competition-kaggle-meetup-tokyo-2023
shimacos
1
1.6k
Machine Learning for Materials (Lecture 9)
aronwalsh
0
170
BMI 研究はなぜ同じ失敗を繰り返すのか(日本BMI研究会, 2021.11.5)
ykamit
1
2.2k
構造設計のための3D生成AI-最新の取り組みと今後の展開-
kojinishiguchi
0
280
Survival Under Fire: How to Stay Whole During Adversity
arthurdoler
PRO
0
120
PRML Chapter 9
snkmr
1
130
Featured
See All Featured
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
23
1.9k
Designing with Data
zakiwarfel
96
5k
Gamification - CAS2011
davidbonilla
78
4.9k
Building Your Own Lightsaber
phodgson
101
5.9k
No one is an island. Learnings from fostering a developers community.
thoeni
17
2.8k
WebSockets: Embracing the real-time Web
robhawkes
59
7.2k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
35
6.3k
Unsuck your backbone
ammeep
666
57k
BBQ
matthewcrist
82
9k
Happy Clients
brianwarren
94
6.5k
Designing Experiences People Love
moore
136
23k
Building Flexible Design Systems
yeseniaperezcruz
323
37k
Transcript
OPEN SOFTWARE FOR ASTROPHYSICS Dan Foreman-Mackey
None
case study: Gaussian Processes
AAS 225 / 2015 / Seattle AAS 231 / 2018
/ National Harbor
°0.6 °0.3 0.0 0.3 0.6 raw [ppt] 0 5 10
15 20 25 time [days] °0.30 °0.15 0.00 de-trended [ppt] N = 1000 reference: DFM+ (2017)
°0.6 °0.3 0.0 0.3 0.6 raw [ppt] 0 5 10
15 20 25 time [days] °0.30 °0.15 0.00 de-trended [ppt] N = 1000 reference: DFM+ (2017)
reference: Aigrain & DFM (2022)
reference: Aigrain & DFM (2022)
reference: Aigrain & DFM (2022) ignoring correlated noise accounting for
correlated noise
reference: Aigrain & DFM (2022)
a Gaussian Process is a drop - in replacement for
chi - squared
more details: Aigrain & Foreman-Mackey (2023) arXiv:2209.08940
7 [1] model building [2] computational cost
k(tn , tm ; θ) “kernel” or “covariance”
None
import george import celerite import tinygp
my f i rst try: george 1
import numpy as np def log_likelihood(params, x, diag, r) :
K = build_kernel_matrix(params, x, diag) gof = r.T @ np.linalg.solve(K, r) norm = np.linalg.slogdet(K)[1] return -0.5 * (gof + norm)
import numpy as np def log_likelihood(params, x, diag, r) :
K = build_kernel_matrix(params, x, diag) gof = r.T @ np.linalg.solve(K, r) norm = np.linalg.slogdet(K)[1] return -0.5 * (gof + norm)
k(tn , tm ; θ) “kernel” or “covariance”
from george.kernels import * k1 = 1.5 * ExpSquaredKernel(2.3) k2
= 5.5 * Matern32Kernel(0.1) kernel = 0.5 * (k1 + k2)
from george import GP gp = GP(kernel) gp.compute(x, yerr) gp.log_likelihood(y)
from george import GP gp = GP(kernel) gp.compute(x, yerr) gp.log_likelihood(y)
gp.f i t(y) ???
the astronomical Python ecosystem + MANY MORE!
* API design (library vs scripts) * don’t reinvent the
wheel
None
faster: celerite* 2 * yes, that truly is how you
pronounce it…
import numpy as np def log_likelihood(params, x, diag, r) :
K = build_kernel_matrix(params, x, diag) gof = r.T @ np.linalg.solve(K, r) norm = np.linalg.slogdet(K)[1] return -0.5 * (gof + norm)
import numpy as np def log_likelihood(params, x, diag, r) :
K = build_kernel_matrix(params, x, diag) gof = r.T @ np.linalg.solve(K, r) norm = np.linalg.slogdet(K)[1] return -0.5 * (gof + norm)
None
“semi/quasi - separable” matrices
102 103 104 105 number of data points [N] 10
5 10 4 10 3 10 2 10 1 100 computational cost [seconds] 1 2 4 8 16 32 64 128 256 direct O(N) 100 101 number o reference: DFM, Agol, Ambikasaran, Angus (2017)
102 103 104 105 number of data points [N] 10
4 10 3 10 2 10 1 100 computational cost [seconds] 1 2 4 8 16 32 64 128 256 O(N) 100 101 number o reference: DFM, Agol, Ambikasaran, Angus (2017)
None
+
+ + vs
* interdisciplinary collaboration * importance of implementation
7 [1] 1 (ish) dimensional input [2] specif i c
type of kernel restrictions:
modern infrastructure: tinygp 3
what’s missing from the astronomical Python ecosystem?
7 [1] differentiable programming [2] hardware acceleration
the broader numerical computing Python ecosystem + SO MANY MORE!
jax.readthedocs.io
import numpy as np def linear_least_squares(x, y) : A =
np.vander(x, 2) return np.linalg.lstsq(A, y)[0]
import jax.numpy as jnp def linear_least_squares(x, y) : A =
jnp.vander(x, 2) return jnp.linalg.lstsq(A, y)[0]
import jax.numpy as jnp @jax.jit def linear_least_squares(x, y) : A
= jnp.vander(x, 2) return jnp.linalg.lstsq(A, y)[0]
None
tinygp.readthedocs.io
the broader numerical computing Python ecosystem + SO MANY MORE!
* I <3 JAX * don’t reinvent the wheel
the why & how of open software in astrophysics
credit: Adrian Price-Whelan / / data: SAO/NASA ADS
None
None
None
None
takeaways
open software is foundational to astrophysics research let’s consider &
discuss interface design and user interaction leverage existing infrastructure & learn when to start fresh
get in touch! dfm.io github.com/dfm
None