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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
Dan Foreman-Mackey
January 12, 2023
Science
600
2
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
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
220
My research talk for CCA promotion
dfm
1
810
Astronomical software
dfm
1
770
emcee-odi
dfm
1
740
Exoplanet population inference: a tutorial
dfm
3
520
Data-driven discovery in the astronomical time domain
dfm
6
760
TensorFlow for astronomers
dfm
6
880
How to find a transiting exoplanets
dfm
1
530
Long-period transiting exoplanets
dfm
1
360
Other Decks in Science
See All in Science
AkarengaLT vol.40
hashimoto_kei
0
110
チュートリアル:世界モデル
hf149
0
1.8k
JSAI2026企画セッションKS-14 インタビュー集『⼈⼯知能と哲学と四つの問い』が提起する⼈⼯知能のこれからの課題 趣旨説明 / JSAI2026 Special Session: A Collection of Interviews, “Artificial Intelligence, Philosophy, and Four Questions”
ykiyota
0
290
プロジェクト「Azayaka」のSARの数式とジオメトリ
syuchimu
0
350
明治薬科大学講義_ビッグデータ解析を支えるデータベース技術とクラウドコンピューティング
ktatsuya
1
110
生成AIと司法書士の未来.pdf
tagtag
PRO
0
130
SHINOMIYA Nariyoshi
genomethica
0
150
20260410_SystemsThinking
takusamar
1
110
白金鉱業Vol.21【初学者向け発表枠】身近な例から学ぶ数理最適化の基礎 / Learning the Basics of Mathematical Optimization Through Everyday Examples
brainpadpr
1
750
AIを用いた PID制御で部屋 の温度制御をしてみた
nearme_tech
PRO
0
150
Kritische evaluatie van GenAI-output voor literatuuronderzoek
voginip
0
180
データベース01: データベースを使わない世界
trycycle
PRO
1
1.3k
Featured
See All Featured
Highjacked: Video Game Concept Design
rkendrick25
PRO
1
400
How STYLIGHT went responsive
nonsquared
100
6.2k
WCS-LA-2024
lcolladotor
0
650
Neural Spatial Audio Processing for Sound Field Analysis and Control
skoyamalab
0
340
I Don’t Have Time: Getting Over the Fear to Launch Your Podcast
jcasabona
34
2.8k
sira's awesome portfolio website redesign presentation
elsirapls
0
280
Technical Leadership for Architectural Decision Making
baasie
3
420
ピンチをチャンスに:未来をつくるプロダクトロードマップ #pmconf2020
aki_iinuma
128
56k
Building AI with AI
inesmontani
PRO
1
1.1k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
31
2.8k
4 Signs Your Business is Dying
shpigford
187
22k
The MySQL Ecosystem @ GitHub 2015
samlambert
251
13k
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