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 Jul 23

[submitted] ELISA: Efficient Library for Spectral Analysis in High-Energy Astrophysics

ELISA is a Python library designed for efficient spectral modeling and robust statistical inference. With user-friendly interface, ELISA streamlines the spectral analysis workflow.

The modeling framework of ELISA is flexible, allowing users to construct complex models by combining models of ELISA and XSPEC, as well as custom models. Parameters across different model components can also be linked. The models can be fitted to the spectral datasets using either Bayesian or maximum likelihood approaches. For Bayesian fitting, ELISA incorporates advanced Markov Chain Monte Carlo (MCMC) algorithms, including the No-U-Turn Sampler (NUTS), nested sampling, and affine-invariant ensemble sampling, to tackle the posterior sampling problem. For maximum likelihood estimation (MLE), ELISA includes two robust algorithms: the Levenberg-Marquardt algorithm and the Migrad algorithm from Minuit. The computation backend is based on Google's JAX, a high-performance numerical computing library, which can reduce the runtime for fitting procedures like MCMC, thereby enhancing the efficiency of analysis.

After fitting, goodness-of-fit assessment can be done with a single function call, which automatically conducts posterior predictive checks and leave-one-out cross-validation for Bayesian models, or parametric bootstrap for MLE. These methods offer greater accuracy and reliability than traditional fit-statistic/dof measures, and thus better model discovery capability. For comparing multiple candidate models, ELISA provides robust Bayesian tools such as the Widely Applicable Information Criterion (WAIC) and the Leave-One-Out Information Criterion (LOOIC), which are more reliable than AIC or BIC. Thanks to the object-oriented design, collecting the analysis results should be simple. ELISA also provide visualization tools to generate ready-for-publication figures.

ELISA is an open-source project and community contributions are welcome and greatly appreciated.

2024 Jul 19

[ascl:2407.016] Heimdall: GPU accelerated transient detection pipeline for radio astronomy

Heimdall uses direct, tree, and sub-band dedispersion algorithms on massively parallel computing architectures (GPUs) to speed up real-time detection of radio pulsar and other transient events.

[submitted] photGalIMF

The photGalIMF code calculates the evolution of stellar mass and luminosity for a galaxy model, based on the PARSEC stellar evolution model. It requires input lists specifying the age, mass, metallicity, and initial mass function (IMF) of single stellar populations. These input parameters can be provided by the companion galaxy chemical simulation code GalIMF, which generates realistic sets of inputs.

2024 Jul 17

[submitted] Flash-X: A Performance Portable, Multiphysics Simulation Software Instrument

Flash-X simulates physical phenomena in several scientific domains, primarily those involving compressible or incompressible reactive flows, using Eulerian adaptive mesh and particle techniques. It derives some of its solvers from and is a descendant of FLASH (ascl:1010.082). Flash-X has a new framework that relies on abstractions and asynchronous communications for performance portability across a range of heterogeneous hardware platforms, including exascale machines. It also includes new physics capabilities, such as the Spark general relativistic magnetohydrodynamics (GRMHD) solver, and supports interoperation with the AMReX mesh framework, the HYPRE linear solver package, and the Thornado neutrino radiation hydrodynamics package, among others.

2024 Jul 16

[submitted] Supervised star, galaxy and QSO classification with sharpened dimensionality reduction

Aims. We explore the use of broadband colors to classify stars, galaxies and QSOs. Specifically, we apply sharpened dimensionality reduction (SDR)-aided classification to this problem, with the aim of enhancing cluster separation in the projections of high-dimensional data clusters to allow for better classification performance and more informative projections.
Methods. The main objective of this work is to apply SDR to large sets of broadband colors derived from the CPz catalog first introduced by Fotopoulou & Paltani (2018) to obtain projections with clusters of star, galaxy and QSO data that exhibit a high degree of separation. The SDR method achieves this by combining density-based clustering with conventional dimensionality-reduction techniques. To make SDR scalable and have out-of-sample ability, we use a deep neural network trained to reproduce the SDR projections. Subsequently classification is done by applying a k-nearest neighbors (k-NN) classifier to the sharpened projections.
Results. Based on a qualitative and quantitative analysis of the embeddings produced by SDR, we find that SDR consistently produces accurate projections with a high degree of cluster separation. A number of projection performance metrics are used to evaluate this separation, including the trustworthiness, continuity, Shepard goodness, and distribution consistency metrics. Using the k-NN classifier and consolidating the results of various data sets we obtain precisions of 99.7%, 98.9%, and 98.5% for classifying stars, galaxies, and QSOs, respectively. Furthermore, we achieve completenesses of 97.8%, 99.3%, and 86.8%, respectively. In addition to classification we explore the structure of the embeddings produced by SDR by cross-matching with data from Gaia DR3, Galaxy Zoo 1 and a catalog of specific star formation rates, stellar masses and dust luminosities. We discover that the embeddings reveal astrophysical information, which allows one to understand the structure of the high-dimensional broadband color data in greater detail.
Conclusions. We find that SDR-aided star, galaxy, and QSO classification performs comparably to another unsupervised learning method using hierarchical density-based spatial clustering of applications with noise (HDBSCAN) but offers advantages in terms of scalability and interpretability. Furthermore, it outperforms traditional color selection methods in terms of QSO classification performance. Overall, we demonstrate the potential of SDR-aided classification to provide an accurate and physically insightful classification of astronomical objects based on their broadband colors.

2024 Jul 14

[ascl:2407.015] AstroCLIP: Multimodal contrastive pretraining for astronomical data

AstroCLIP performs contrastive pre-training between two different kinds of astronomical data modalities (multi-band imaging and optical spectra) to yield a meaningful embedding space which captures physical information about galaxies and is shared between both modalities. The embeddings can be used as the basis for competitive zero- and few-shot learning on a variety of downstream tasks, including similarity search, redshift estimation, galaxy property prediction, and morphology classification.

[ascl:2407.014] PFFT: Parallel fast Fourier transforms

PFFT computes massively parallel, fast Fourier transformations on distributed memory architectures. PFFT can be understood as a generalization of FFTW-MPI (ascl:1201.015) to multidimensional data decomposition; in fact, using PFFT is very similar to FFTW. The library is written in C and MPI; a Fortran interface is also available.

[ascl:2407.013] cola_halo: Parallel cosmological N-body simulator

cola_halo generates hundreds of realizations on the fly. This parallel cosmological N-body simulation code generates random Gaussian initial condition using 2LPTIC (ascl:1201.005), time evolves N-body particles with colacode (ascl:1602.021), and finds dark-matter halos with the Friends-of-Friends code (ascl:2407.012).

[ascl:2407.012] Fof: Friends-of-friends code to find groups

Fof uses the friends-of-friends method to find groups. A particle belongs to a friends-of-friends group if it is within some linking length of any other particle in the group. After all such groups are found, those with less than a specified minimum number of group members are rejected. The program takes input files in the TIPSY (ascl:1111.015) binary format and produces a single ASCII output file called fof.grp. This output file is in the TIPSY array format and contains the group number to which each particle belongs. A group number of zero means that the particle does not belong to a group. The fof.grp file can be read in by TIPSY and used to color each particle by group number to visualize the groups. Simulations with periodic boundary conditions can also be handled by fof by specifying the period in each dimension on the command line.

[ascl:2407.011] bigfile: A reproducible massively parallel IO library for hierarchical data

bigfile stores data from cosmology simulations from HPC systems and beyond. It provides a hierarchical structure of data columns via File, Dataset and Column. A Column stores a two dimensional table. Numerical typed columns are supported; attributes can be attached to a Column and both numerical attributes and string attributes are supported. Type casting is performed on-the-fly if read/write operations request a different data type than the file has stored.