Astrophysics Source Code Library

Making codes discoverable since 1999

Welcome to the ASCL

The Astrophysics Source Code Library (ASCL) is a free online registry and repository for source codes of interest to astronomers and astrophysicists, including solar system astronomers, 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 Web of Science 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

2024 Apr 17

[submitted] A fast photometric image alignment algorithm with row and column means

This paper introduces an astronomical image alignment algorithm. This algorithm uses the means of the rows and columns of the original image for alignment, and finds the optimal offset corresponding to the maximum similarity by comparing different offsets between images. The similarity is evaluated by the standard deviation of the quotient divided by the means. This paper also discusses the theoretical feasibility of this algorithm. Through practical testing, it has been confirmed that the algorithm is fast and robust.

2024 Apr 08

[submitted] PIPE: Extracting PSF photometry from CHEOPS data

PIPE (PSF Imagette Photometric Extraction) extracts PSF (point-spread function) photometry from data acquired by the space telescope CHEOPS (CHaracterisation of ExOPlanetS). Advantages of PSF photometry over standard aperture photometry include reduced sensitivity to contaminants such as background stars, cosmic ray hits, and hot/bad pixels. For CHEOPS, an additional advantage is that photometry can be extracted from an imagette, a small window around the target that is downlinked at a shorter cadence than the larger-sized subarray used for aperture photometry. These advantages make PIPE particularly well suited for targets brighter or fainter than the nominal G = 7-11 mag range of CHEOPS, i.e. where short-cadence imagettes are available (bright end) or when contamination becomes a problem (faint end). Within the nominal range, PIPE usually offers no advantage over the standard aperture photometry.

2024 Apr 04

[submitted] pysymlog - Symmetric (signed) logarithm scale for your python plots

This package provides some utilities for binning, normalizing colors, wrangling tick marks, and more, in symmetric logarithm space. That is, for numbers spanning positive and negative values, working in log scale with a transition through zero, down to some threshold. This can be quite useful for representing data that span many scales like standard log-space, but that include values of zero (that might be returned by physical measurement) or even negative values (for example offsets from some reference, or things like temperatures). This package provides convenient functions for creating 1D and 2D histograms and symmetric log bins, generating logspace-like arrays through zero and managing matplotlib major and minor ticks in symlog space, as well as bringing symmetric log scaling functionality to plotly.

[submitted] obsplanning - a set of python utilities to aid in planning astronomical observations

Obsplanning is a suite of tools to help plan astronomical observations from ground-based observatories, for traditional single-site as well as multi-station (VLBI) observing. Conveniently determine observability of objects in the sky from your observatory, and produce plots to help you prepare for your observations over the course of a session. Celestial source coordinates (including solar system objects) can be queried or created, and transformed. Calibrator or reference sources can be selected by proximity, and slew order can be optimized to save valuable telescope time. Plots and visualizations can be easily made to chart source elevation and transits, source proximity to the Sun and Moon, concurrent 'up time' of sources at multiple sites (for VLBI or tandem observations), 'dark time' at a telescope site for a given year, finder plots made from real images (with options to query online databases), and more.

2024 Mar 31

[ascl:2403.016] DensityFieldTools: Manipulating density fields and measuring power spectra and bispectra

The DensityFieldTools toolset manipulates density fields and measures power spectra and bispectra using a very simple interface. After loading a density field, it computes the power spectrum and the bispectrum for a desired binning. The bispectrum estimator also automatically computes the power spectrum for the chosen binning, to facilitate, for example, shot-noise subtraction. DensityFieldTools also provides a quick way to measure (cross-)power spectra directly from density fields.

[ascl:2403.015] CLASS-PT: Nonlinear perturbation theory extension of the Boltzmann code CLASS

CLASS-PT modifies the CLASS (ascl:1106.020) code to compute the non-linear power spectra of dark matter and biased tracers in one-loop cosmological perturbation theory, for both Gaussian and non-Gaussian initial conditions. CLASS-PT can be interfaced with the MCMC sampler MontePython (ascl:1805.027) using the (new and improved) custom-built likelihoods found here.

[ascl:2403.014] OneLoopBispectrum: Computation of the one-loop bispectrum of galaxies in redshift space

OneLoopBispectrum computes the one-loop bispectrum of galaxies in redshift space. It computes and simplifies the bispectrum kernels using Mathematica; this is cosmology-independent. The code also computes the full and flattened bispectrum templates, given the pre-computed integration kernels. OneLoopBispectrum uses Mathematica to read in and combine the bispectrum templates, and Python to interpolate and extract the one-loop bispectrum.

[ascl:2403.013] URecon: Reconstruct initial conditions of N-Body simulations

URecon reconstructs the initial conditions of N-body simulations from late time (e.g., z=0) density fields. This simple UNET architecture is implemented in TensorFlow and requires Pylians3 (ascl:2403.012) for measuring power spectrum of density fields. The package includes weights trained on Quijote fiducial cosmology simulations.

[ascl:2403.012] Pylians3: Libraries to analyze numerical simulations in Python 3

Pylians3 (Python3 libraries for the analysis of numerical simulations) provides a Python 3 version of Pylians (ascl:1811.008), which analyzes numerical simulations (both N-body and hydrodynamic); parts of the codebase are also written in cython and C. It computes density fields, power spectra, bispectra, and correlation functions, identifies voids, and populates halos with galaxies using an HOD. Pylians3 also applies HI+H2 corrections to the output of hydrodynamic simulations, make 21cm maps, computes DLAs column density distribution functions, and can plot density fields and make movies.

[ascl:2403.011] LtU-ILI: Robust machine learning in astro

LtU-ILI (Learning the Universe Implicit Likelihood Inference) performs machine learning parameter inference. Given labeled training data or a stochastic simulator, the LtU-ILI piepline automatically trains state-of-the-art neural networks to learn the data-parameter relationship and produces robust, well-calibrated posterior inference. The package comes with a wide range of customizable complexity, including posterior-, likelihood-, and ratio-estimation methods for ILI, including sequential learning analogs, and various neural density estimators, including mixture density networks, conditional normalizing flows, and ResNet-like ratio classifiers. It offers fully-customizable, exotic embedding networks, including CNNs and Graph Neural Networks, and a unified interface for multiple ILI backends such as sbi, pydelfi, and lampe. LtU-ILI also handles multiple marginal and multivariate posterior coverage metrics, and offers Jupyter and command-line interfaces and a parallelizable configuration framework for efficient hyperparameter tuning and production runs.