It took longer than I had hoped, but I finally have the R and Stan software that I use for star formation history modeling under version control and uploaded to github. There are 3 R packages, two of which are newly available:
-
- spmutils: The actual code for maximum likelihood and Bayesian modeling of star formation histories. There are also tools for reading FITS files from SDSS single fiber spectra and from MaNGA, visualization, and analysis.
- cosmo: A simple, lightweight cosmological distance calculator.
- sfdmap: A medium resolution version of the all sky dust map of Schlegel, Finkbeiner and Davis (SFD) and a pair of functions for rapid access.
So far only cosmo
is documented to minimal R standards. It’s also the most generally useful, at least if you need to calculate cosmological distances. sfdmap
has skeleton help files; spmutils
not even that. I plan to correct that, but probably not in the next several weeks.
The R packages are pure R code and can be installed directly from github using devtools:
cosmo: devtools::install_github("mlpeck/cosmo")
sfdmap: devtools::install_github("mlpeck/sfdmap")
spmutils: devtools::install_github("mlpeck/spmutils/spmutils")
The Stan files for SFH modeling that I’m currently working with are in spmutils/stan. I keep the Stan files in the directory ~/spmcode
on my local machines, and that’s the default location in the functions that call them.
This code mushroomed over a period of several years without much in the way of design, so it’s not much use without some documentation of typical workflow. I will get around to that sometime soon (I hope).