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
590
2
Share
Open Software for Astrophysics, AAS241
Slides for my plenary talk at the 241st American Astronomical Society meeting.
Dan Foreman-Mackey
January 12, 2023
More Decks by Dan Foreman-Mackey
See All by Dan Foreman-Mackey
Open software for Astronomical Data Analysis
dfm
0
200
My research talk for CCA promotion
dfm
1
810
Astronomical software
dfm
1
770
emcee-odi
dfm
1
730
Exoplanet population inference: a tutorial
dfm
3
510
Data-driven discovery in the astronomical time domain
dfm
6
750
TensorFlow for astronomers
dfm
6
870
How to find a transiting exoplanets
dfm
1
520
Long-period transiting exoplanets
dfm
1
350
Other Decks in Science
See All in Science
会社でMLモデルを作るとは @電気通信大学 データアントレプレナーフェロープログラム
yuto16
1
670
Bリーグのショットデータを活用した得点期待値モデルの構築 / Construction of expected points model using shot data of B.LEAGUE
konakalab
0
120
Fairfax County’s Tree Canopy: Examining the Effects of Land Development Regulations on Tree Canopy Conservation
pwiseman
1
110
機械学習 - DBSCAN
trycycle
PRO
0
1.7k
次代のデータサイエンティストへ~スキルチェックリスト、タスクリスト更新~
datascientistsociety
PRO
3
40k
機械学習 - K-means & 階層的クラスタリング
trycycle
PRO
0
1.5k
主成分分析に基づく教師なし特徴抽出法を用いたコラーゲン-グリコサミノグリカンメッシュの遺伝子発現への影響
tagtag
PRO
0
250
20260220 OpenIDファウンデーション・ジャパン ご紹介 / 20260220 OpenID Foundation Japan Intro
oidfj
0
320
20251212_LT忘年会_データサイエンス枠_新川.pdf
shinpsan
0
280
機械学習 - 授業概要
trycycle
PRO
0
480
【RSJ2025】PAMIQ Core: リアルタイム継続学習のための⾮同期推論・学習フレームワーク
gesonanko
0
840
先端因果推論特別研究チームの研究構想と 人間とAIが協働する自律因果探索の展望
sshimizu2006
3
900
Featured
See All Featured
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.5k
Balancing Empowerment & Direction
lara
6
1.1k
The Language of Interfaces
destraynor
162
26k
We Have a Design System, Now What?
morganepeng
55
8.1k
Practical Orchestrator
shlominoach
191
11k
Impact Scores and Hybrid Strategies: The future of link building
tamaranovitovic
0
270
Utilizing Notion as your number one productivity tool
mfonobong
4
300
What the history of the web can teach us about the future of AI
inesmontani
PRO
1
560
Product Roadmaps are Hard
iamctodd
PRO
55
12k
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
120
Rails Girls Zürich Keynote
gr2m
96
14k
How to Ace a Technical Interview
jacobian
281
24k
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