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
460
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
110
My research talk for CCA promotion
dfm
1
740
Astronomical software
dfm
1
690
emcee-odi
dfm
1
600
Exoplanet population inference: a tutorial
dfm
3
420
Data-driven discovery in the astronomical time domain
dfm
6
680
TensorFlow for astronomers
dfm
6
730
How to find a transiting exoplanets
dfm
1
440
Long-period transiting exoplanets
dfm
1
290
Other Decks in Science
See All in Science
Iniciativas independentes de divulgação científica: o caso do Movimento #CiteMulheresNegras
taisso
0
240
はじめての「相関と因果とエビデンス」入門:“動機づけられた推論” に抗うために
takehikoihayashi
17
6.8k
化学におけるAI・シミュレーション活用のトレンドと 汎用原子レベルシミュレーター: Matlantisを使った素材開発
matlantis
0
260
All-in-One Bioinformatics Platform Realized with Snowflake ~ From In Silico Drug Discovery, Disease Variant Analysis, to Single-Cell RNA-seq
ktatsuya
0
230
作業領域内の障害物を回避可能なバイナリマニピュレータの設計 / Design of binary manipulator avoiding obstacles in workspace
konakalab
0
160
ベイズのはなし
techmathproject
0
290
プロダクト開発を通して学んだナレッジマネジメントの哲学
sonod
0
150
General Parasitology
uni_of_nomi
0
120
Machine Learning for Materials (Lecture 8)
aronwalsh
0
410
第61回コンピュータビジョン勉強会「BioCLIP: A Vision Foundation Model for the Tree of Life」
x_ttyszk
1
1.5k
MoveItを使った産業用ロボット向け動作作成方法の紹介 / Introduction to creating motion for industrial robots using MoveIt
ry0_ka
0
160
As We May Interact: Challenges and Opportunities for Next-Generation Human-Information Interaction
signer
PRO
0
160
Featured
See All Featured
Rebuilding a faster, lazier Slack
samanthasiow
79
8.7k
A Modern Web Designer's Workflow
chriscoyier
693
190k
The Pragmatic Product Professional
lauravandoore
31
6.3k
Build your cross-platform service in a week with App Engine
jlugia
229
18k
The Cost Of JavaScript in 2023
addyosmani
45
6.8k
Ruby is Unlike a Banana
tanoku
97
11k
Design and Strategy: How to Deal with People Who Don’t "Get" Design
morganepeng
126
18k
Making Projects Easy
brettharned
115
5.9k
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
229
52k
Templates, Plugins, & Blocks: Oh My! Creating the theme that thinks of everything
marktimemedia
26
2.1k
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
44
2.2k
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