Astrophysics Source Code Library

Making codes discoverable since 1999

Welcome to the ASCL

The Astrophysics Source Code Library (ASCL) is a free online registry for source codes of interest to astronomers and astrophysicists and lists codes that have been used in research that has appeared in, or been submitted to, peer-reviewed publications. The ASCL is indexed by the SAO/NASA Astrophysics Data System (ADS) and is citable by using the unique ascl ID assigned to each code. The ascl ID can be used to link to the code entry by prefacing the number with (i.e.,

Most Recently Added Codes

2016 Apr 29

[ascl:1604.010] BEAMS: Bayesian Estimation of Multiple Species

Observed data are often contaminated by undiscovered interlopers, leading to biased parameter estimation. BEAMS (Bayesian Estimation Applied to Multiple Species) significantly improves on the standard maximum likelihood approach in the case where the probability for each data point being “pure” is known. It requires emcee (ascl:1303.002) along with standard Python libraries.

[ascl:1604.009] CCSNMultivar: Core-Collapse Supernova Gravitational Waves

CCSNMultivar aids the analysis of core-collapse supernova gravitational waves. It includes multivariate regression of Fourier transformed or time domain waveforms, hypothesis testing for measuring the influence of physical parameters, and the Abdikamalov et. al. catalog for example use. CCSNMultivar can optionally incorporate additional uncertainty due to detector noise and approximate waveforms from anywhere within the parameter space.

[ascl:1604.008] The Tractor: Probabilistic astronomical source detection and measurement

The Tractor optimizes or samples from models of astronomical objects. The approach is generative: given astronomical sources and a description of the image properties, the code produces pixel-space estimates or predictions of what will be observed in the images. This estimate can be used to produce a likelihood for the observed data given the model: assuming the model space actually includes the truth (it doesn’t, in detail), then if we had the optimal model parameters, the predicted image would differ from the actually observed image only by noise. Given a noise model of the instrument and assuming pixelwise independent noise, the log-likelihood is the negative chi-squared difference: (image - model) / noise.

2016 Apr 28

[submitted] cluster-lensing

The cluster-lensing package contains tools for calculating properties and weak lensing profiles of galaxy clusters. It includes cluster mass-richness and mass-concentration scaling relations, and NFW halo profiles for weak lensing shear, the differential surface mass density ΔΣ(r), and for magnification, Σ(r). Optionally the calculation will include the effects of cluster miscentering offsets. This package is implemented in Python. Full documentation at

2016 Apr 27

[ascl:1604.007] DNest3: Diffusive Nested Sampling

DNest3 is a C++ implementation of Diffusive Nested Sampling (ascl:1010.029), a Markov Chain Monte Carlo (MCMC) algorithm for Bayesian Inference and Statistical Mechanics. Relative to older DNest versions, DNest3 has improved performance (in terms of the sampling overhead, likelihood evaluations still dominate in general) and is cleaner code: implementing new models should be easier than it was before. In addition, DNest3 is multi-threaded, so one can run multiple MCMC walkers at the same time, and the results will be combined together.

2016 Apr 23

[ascl:1604.006] 2-DUST: Dust radiative transfer code

2-DUST is a general-purpose dust radiative transfer code for an axisymmetric system that reveals the global energetics of dust grains in the shell and the 2-D projected morphologies of the shell that are strongly dependent on the mixed effects of the axisymmetric dust distribution and inclination angle. It can be used to model a variety of axisymmetric astronomical dust systems.

[ascl:1604.005] Halotools: Galaxy-Halo connection models

Halotools builds and tests models of the galaxy-halo connection and analyzes catalogs of dark matter halos. The core functions of the package include fast generation of synthetic galaxy populations using HODs, abundance matching, and related methods; efficient algorithms for calculating galaxy clustering, lensing, z-space distortions, and other astronomical statistics; a modular, object-oriented framework for designing galaxy evolution models; and end-to-end support for reducing halo catalogs and caching them as hdf5 files.

[ascl:1604.004] magicaxis: Pretty scientific plotting with minor-tick and log minor-tick support

The R suite magicaxis makes useful and pretty plots for scientific plotting and includes functions for base plotting, with particular emphasis on pretty axis labelling in a number of circumstances that are often used in scientific plotting. It also includes functions for generating images and contours that reflect the 2D quantile levels of the data designed particularly for output of MCMC posteriors where visualizing the location of the 68% and 95% 2D quantiles for covariant parameters is a necessary part of the post MCMC analysis, can generate low and high error bars, and allows clipping of values, rejection of bad values, and log stretching.

[ascl:1604.003] LAMBDAR: Lambda Adaptive Multi-Band Deblending Algorithm in R

LAMBDAR measures galaxy fluxes from an arbitrary FITS image, covering an arbitrary photometric wave-band, when provided all parameters needed to construct galactic apertures at the required locations for multi-band matched aperture galactic photometry. Through sophisticated matched aperture photometry, the package develops robust Spectral Energy Distributions (SEDs) and accurately establishes the physical properties of galactic objects. LAMBDAR was based on a package detailed in Bourne et al. (2012) that determined galactic fluxes in low resolution Herschel images.

2016 Apr 21

[ascl:1604.002] libpolycomp: Compression/decompression library

Libpolycomp compresses and decompresses one-dimensional streams of numbers by means of several algorithms. It is well-suited for time-ordered data acquired by astronomical instruments or simulations. One of the algorithms, called "polynomial compression", combines two widely-used ideas (namely, polynomial approximation and filtering of Fourier series) to achieve substantial compression ratios for datasets characterized by smoothness and lack of noise. Notable examples are the ephemerides of astronomical objects and the pointing information of astronomical telescopes. Other algorithms implemented in this C library are well known and already widely used, e.g., RLE, quantization, deflate (via libz) and Burrows-Wheeler transform (via libbzip2). Libpolycomp can compress the timelines acquired by the Planck/LFI instrument with an overall compression ratio of ~9, while other widely known programs (gzip, bzip2) reach compression ratios less than 1.5.