Posts
-
Fitting a sine wave with a grid search, or how to get probability density from goodness of fit
This is a stupid way to fit a sinusoid to data.
-
Strategically timing observations to avoid frequency aliases
In time domain research, it is well understood that the pattern of observations in time manifests itself in the frequency domain as a set of aliases that can confuse your identification of intrinsic frequencies. Conversely, if you want to avoid confusion in your frequency measurements, you should time your observations strategically.
-
Flagging multiple conditions in Matplotlib scatter plots
Always seeking more complicated plots (i.e., to encode more information into simple, interpretable visual representations), I have written a script to make scatter plots that indicate the settings of multiple point-by-point binary flags: scatterflags.py. While I’m somewhat dubious about including such figures in refereed publications, I find them very helpful for data exploration (especially in interactive matplotlib windows that I base off the data_browser example).
-
Spherical harmonic animations with matplotlib and cartopy
This post demonstrates three Python tricks: computing spherical harmonics, plotting map projections with Cartopy, and saving animations in matplotlib. I bring these together to generate animated gifs of spherical harmonics like the one below. These are useful for visualizing stellar pulsation geometries, and I often display these in talks or lectures. If you want to skip right ahead to using the script I wrote to generate these animations, you can find it here.
-
Generating citable paper names with a recurrent neural network
Disappointed that mine are not among the most cited papers in the area of stellar astrophysics, I thought I might use machine learning to identify more promising topics for future works that would be of greater value to the field. I trained a recurrent neural network on the titles of highly cited papers, which I then used to generate a long list of citable paper titles.
- Three statistical tests for average spacing among numbers
- Confidence intervals for 2D Gaussian mixture models with contours
- What's the expected average value of a noisy amplitude spectrum?
- High-fidelity plot image representations for machine learning classification
- Fitting features in a power spectrum with least squares and MLE