-
Notifications
You must be signed in to change notification settings - Fork 1
/
index.xml
158 lines (128 loc) · 13 KB
/
index.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom">
<channel>
<title>apw</title>
<link>https://adrian.pw/</link>
<description>Recent content on apw</description>
<generator>Hugo -- gohugo.io</generator>
<language>en-us</language>
<lastBuildDate>Fri, 23 Sep 2022 00:00:00 +0000</lastBuildDate><atom:link href="https://adrian.pw/index.xml" rel="self" type="application/rss+xml" />
<item>
<title>Hierarchical Models 2: Mixture Models</title>
<link>https://adrian.pw/blog/hierarchical-models-2/</link>
<pubDate>Fri, 23 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/hierarchical-models-2/</guid>
<description>import pathlib import astropy.coordinates as coord import astropy.units as u import astropy.table as at import matplotlib as mpl import matplotlib.pyplot as plt %matplotlib inline import numpy as np import daft import arviz as az import pymc as pm import aesara.tensor as tt In the examples in the Hierarchical Models 1 notebook, our models have assumed that all of the objects we observe are true members of the population we want to model (e.</description>
</item>
<item>
<title>Hierarchical Models 1: Introduction</title>
<link>https://adrian.pw/blog/hierarchical-models-1/</link>
<pubDate>Thu, 22 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/hierarchical-models-1/</guid>
<description>Note: I found a small bug in pymc (with TruncatedNormal) while writing this notebook, so you will need to install the latest version 4.2.0 or higher in order for the examples to complete successfully. You can install this with pip:
pip install pymc&gt;=4.2.0 import pathlib import astropy.coordinates as coord import astropy.units as u import astropy.table as at import matplotlib as mpl import matplotlib.pyplot as plt %matplotlib inline import numpy as np import daft from pyia import GaiaData import arviz as az import pymc as pm Hierarchical Models 1 Most of the probabilistic models we have discussed so far have been one-level models: In these cases, the data are generated by some functional model that has parameters, and those parameters are random variables assumed to be drawn from fixed prior probability distributions.</description>
</item>
<item>
<title>Probabilistic Graphical Models</title>
<link>https://adrian.pw/blog/probabilistic-graphical-models/</link>
<pubDate>Wed, 21 Sep 2022 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/probabilistic-graphical-models/</guid>
<description>import matplotlib as mpl import matplotlib.pyplot as plt %matplotlib inline import numpy as np import daft Note: This notebook has accompanying slides here
Graphical models are a useful tool for constructing probabilistic models. In one sentence, probabilistic graphical models (PGMs) use concepts from graph theory to help represent and conceptualize the complex relationships between random variables in probabilistic models. When visualized as graph diagrams, PGMs are useful for understanding models, for debugging, and for thinking about extensions or generalizations of models.</description>
</item>
<item>
<title>Flexible (stellar spatial) density models with Jax</title>
<link>https://adrian.pw/blog/flexible-density-model-jax/</link>
<pubDate>Wed, 31 Aug 2022 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/flexible-density-model-jax/</guid>
<description>A problem I have frequently run into in astronomical data analysis is the need to infer parameters of a density model in which some aspects of the model are allowed to be flexible and other components are held more rigid (i.e. with a parametrized model). In these contexts, we are sometimes also interested in learning a flexible representation of the expected number or number density of objects along with a probability density function.</description>
</item>
<item>
<title>Rasterize all lines below a layer with Matplotlib</title>
<link>https://adrian.pw/blog/matplotlib-rasterize/</link>
<pubDate>Fri, 24 Jan 2020 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/matplotlib-rasterize/</guid>
<description>I often generate matplotlib plots that contain thousands of lines, or millions of points. Depending on how these are drawn, this can make for huge (&gt;10MB) PDF files. If a given plot is meant to be included as a figure in a paper, this can then make for even huger manuscript PDF sizes. This post is meant to be a short tip or note about how to slim down plot file sizes when you want to preserve vector graphics for some plot elements and just want to rasterize a large set of, e.</description>
</item>
<item>
<title>Historical weather in NYC: Is fall always this warm?</title>
<link>https://adrian.pw/blog/nyc-weather/</link>
<pubDate>Sat, 28 Sep 2019 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/nyc-weather/</guid>
<description>It&rsquo;s that time of the year in NYC: When the angle of the sunlight suggests that it should be autumn, but the foul, oozing, trash juice on your street curb enshrouding your entire block in oppressive swamp gas says otherwise. It&rsquo;s late September, and it&rsquo;s still effing hot in NYC.
Every year around this time I get frustrated with the weather because I&rsquo;m ready for pants, boots, and hot beverages, but summer always seems to hold on for a bit too long (this week, during the autumnal equinox, it reached &gt;90º F).</description>
</item>
<item>
<title>Fitting a straight line to data</title>
<link>https://adrian.pw/blog/fitting-a-line/</link>
<pubDate>Fri, 15 Jun 2018 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/fitting-a-line/</guid>
<description>Fitting a straight line to data This notebook is a ~1 hour tutorial on fitting models to data, starting with a linear model and progressing to a linear model with an extra nonlinear parameter (an unknown extra variance to account for unknown error bars or intrinsic scatter).
This notebook is heavily inspired by Hogg et al. 2010, @jakevdp&rsquo;s notes, and parts of the emcee documentation.
Python imports we&rsquo;ll need later&hellip;</description>
</item>
<item>
<title> Programming language mentions in the astronomical literature</title>
<link>https://adrian.pw/blog/python-literature/</link>
<pubDate>Tue, 20 Mar 2018 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/python-literature/</guid>
<description>import datetime import itertools from os import path import time import ads import matplotlib.pyplot as plt %matplotlib inline import numpy as np import pandas as pd from tqdm import tqdm I&rsquo;m interested in how the popuarity of various programming languages and packages change with time, as measured by mentions in the astronomical literature. To answer this, I&rsquo;m going to use the ads package to query the &ldquo;astronomy&rdquo; database API at the ADS to search for full-text mentions of the words:</description>
</item>
<item>
<title>When is sunset?</title>
<link>https://adrian.pw/blog/sunset-times/</link>
<pubDate>Sat, 27 Jan 2018 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/sunset-times/</guid>
<description>tl;dr I visualized the local time of sunset today (2018-01-27) at every county in the continental US to see how sunset time depends on latitude and location within timezone.
I&rsquo;m currently traveling through the pacific northwest (PNW) and have been surprised that sunset occurs at about the same (local) time as it does out in Princeton, NJ (where I currently live), despite the ~5 degree difference in latitude. It occurred to me that the local time of sunset probably depends a lot on your relative position within a timezone (at least within the continental US), so I wanted to make some visualizations related to this.</description>
</item>
<item>
<title>Visualizing the 2017 solar eclipse with Astropy</title>
<link>https://adrian.pw/blog/astropy-eclipse/</link>
<pubDate>Sun, 20 Aug 2017 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/astropy-eclipse/</guid>
<description>from datetime import datetime import astropy.coordinates as coord from astropy.time import Time import astropy.units as u import numpy as np import pytz from IPython.display import HTML import matplotlib.pyplot as plt %matplotlib inline from matplotlib.dates import HourLocator, MinuteLocator, DateFormatter import matplotlib.animation as animation import matplotlib as mpl # Set timezone here: mpl.rcParams[&quot;timezone&quot;] = &quot;US/Eastern&quot; # Enter address here: address = &quot;4 Ivy Lane, Princeton, NJ&quot; Set up an array of times to get the sun and moon position during:</description>
</item>
<item>
<title>Yearly sun graphs in Python with Astropy</title>
<link>https://adrian.pw/blog/yearly-sun-graph/</link>
<pubDate>Fri, 08 Jul 2016 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/yearly-sun-graph/</guid>
<description>Molly Peeples (@astronomolly) recently tweeted some really cool plots from timeanddate.com that visualize local solar properties over a year from a location (e.g., twilights, solar noon, etc.), e.g.:
My first thought was: can we make those plots with Astropy? This post shows one way to make figures like this in Python using Astropy and Matplotlib.
from datetime import datetime # Third-party import astropy.coordinates as coord import astropy.units as u import astropy.</description>
</item>
<item>
<title>Making a Matplotlib animation with a transparent background</title>
<link>https://adrian.pw/blog/matplotlib-transparent-animation/</link>
<pubDate>Fri, 03 Jun 2016 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/blog/matplotlib-transparent-animation/</guid>
<description>I recently needed to overlay a Matplotlib animation on an image in a keynote presentation. This requires creating an animation with a transparent background so that only the plot elements are shown. It turns out that this is possible using the Matplotlib animation objects (note: I&rsquo;ve only tried this on Mac). The key elements to doing this are to (1) make the Matplotlib figure background invisible, (2) save the video using a png codec (yes, the image format), and (3) to pass keyword arguments through the animation object to the individual Matplotlib savefig calls.</description>
</item>
<item>
<title>About</title>
<link>https://adrian.pw/about/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/about/</guid>
<description>Short Bio I am currently an Associate Research Scientist and leader of the Galactic Dynamics group at the Center for Computational Astrophysics (CCA) at the Flatiron Institute in New York City.
I am also the Assistant Director of Scientific Software at the Simons Foundation.
I received my PhD in 2016 with advisor Kathryn V. Johnston in the Department of Astronomy at Columbia University. I was then a Lyman Spitzer, Jr. Postdoctoral Fellow in the Department of Astrophysical Sciences at Princeton University.</description>
</item>
<item>
<title>Research</title>
<link>https://adrian.pw/research/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/research/</guid>
<description>My research ranges from mapping dark matter in the Milky Way, to the formation and evolution of our Galaxy, to characterizing stellar and binary star populations. I have spent a lot of time thinking about surveys of Milky Way stars and how to use these data to infer its structure and dynamical history. I am particularly excited about the Gaia mission and am a co-organizer of the Gaia sprints.
My full publication list is available here.</description>
</item>
<item>
<title>Visualizations</title>
<link>https://adrian.pw/viz/</link>
<pubDate>Mon, 01 Jan 0001 00:00:00 +0000</pubDate>
<guid>https://adrian.pw/viz/</guid>
<description>The following visualizations and movies are free to use and available via the Creative Commons CC-BY-SA license. In short, if you use these, please (1) acknowledge &ldquo;A. Price-Whelan&rdquo;, and (2) if you re-distribute any of this material, you must carry along this license. All of these visualizations were generated with Python code hosted in this GitHub repository.
Stellar Streams Interactive: Stellar streams around the Milky Way Globular cluster streams simulated in the Via Lactea 2 simulation Stellar stream maker Movies: This set of movies shows the tidal disruption of a star cluster as it orbits in a (very simple) model for our galaxy, the Milky Way.</description>
</item>
</channel>
</rss>