Astrophysics Source Code Library

Making codes discoverable since 1999

ASCL Code Record

[submitted] Xsmurf - Measuring multifractal properties with the continuous wavelet transform modulus maxima (WTMM) method

Xsmurf is a software package written in C/Tcl/Tk that implements the continuous wavelet transform modulus maxima method, an image processing tool for measuring fractal and multifractal properties in experimental and simulation data.
Multifractal analysis is described in the following page:

Xsmurf has been used in multiple applications in astrophysics, e.g. :
- analysis of solar magnetograms for characterizing complexity of evolving regions
- fractal/multifractal nature and anisotropic structure of Galactic atomic hydrogen (H I)
- analysis of simulation data (velocity field, ...) of turbulent flow

Code site:

Views: 4136

[submitted] taktent: A Python framework for agent-based simulations of SETI observations

This Python package allows the user to setup and run an agent-based simulation of a SETI survey. The package allows the creation of a population of observing and transmitting civilisations. Each transmitter and observer conducts their activities according to an input strategy. The success of observers and transmitters can then be recorded, and multiple simulations can be run for Monte Carlo Realisation.

This package is therefore a flexible framework in which to simulate and test different SETI strategies, both as an Observer and as a Transmitter. It is primarily designed with radio SETI in mind, but is sufficiently flexible to simulate all forms of electromagnetic SETI, and potentially neutrino and gravitational wave SETI.

Code site:

Views: 1145

[submitted] pyreaclib

A python interface to the JINA reaclib nuclear reaction database

Code site:

Views: 1793

[submitted] millennium-tap-query: A Python Tool to Query the Millennium Simulation UWS/TAP client

millennium-tap-query is a simple wrapper for the Python package requests to deal with connections to the Millennium TAP Web Client. With this tool you can perform basic or advanced queries to the Millennium Simulation database and download the data products. millennium-tap-query is similar to the TAP query tool in the German Astrophysical Virtual Observatory (GAVO) VOtables package.

Code site:
Preferred citation method:

Views: 1846

[submitted] ExoPlanet

ExoPlanet provides a graphical interface for the construction, evaluation and application of a machine learning model in predictive analysis. With the back-end built using the numpy and scikit-learn libraries, ExoPlanet couples fast and well tested algorithms, a UI designed over the PyQt framework, and graphs rendered using Matplotlib. This serves to provide the user with a rich interface, rapid analytics and interactive visuals.

ExoPlanet is designed to have a minimal learning curve to allow researchers to focus more on the applicative aspect of machine learning algorithms rather than their implementation details and supports both methods of learning, providing algorithms for unsupervised and supervised training, which may be done with continuous or discrete labels. The parameters of each algorithms can be adjusted to ensure the best fit for the data. Training data is read from a CSV file, and after training is complete, ExoPlanet automates the building of the visual representations for the trained model. Once training and evaluation yield satisfactory results, the model may be used to make data based predictions on a new data set.

Code site:

Views: 2498

[submitted] Fast Template Periodogram

The Fast Template Periodogram extends the Generalised Lomb Scargle periodogram (Zechmeister and Kurster 2009) for arbitrary (periodic) signal shapes. A template is first approximated by a truncated Fourier series of length H. The Nonequispaced Fast Fourier Transform NFFT is used to efficiently compute frequency-dependent sums. Template fitting can now be done in NlogN time, improving existing algorithms by an order of magnitude for even small datasets. The FTP can be used in conjunction with gradient descent to accelerate a non-linear model fit, or be used in place of the multi-harmonic periodogram for non-sinusoidal signals with a priori known shapes.

Code site:
Preferred citation method:

(bibcode for ASCL)

Views: 2333

[submitted] HHTpywrapper: Python Wrapper for Hilbert–Huang Transform MATLAB Package

HHTpywrapper is a python interface to call the Hilbert–Huang Transform (HHT) MATLAB package. HHT is a time-frequency analysis method to adaptively decompose a signal, that could be generated by non-stationary and/or nonlinear processes, into basis components at different timescales, and then Hilbert transform these components into instantaneous phases, frequencies and amplitudes as functions of time. HHT has been successfully applied to analyzing X-ray quasi-periodic oscillations (QPOs) from the active galactic nucleus RE J1034+396 (Hu et al. 2014) and two black hole X-ray binaries, XTE J1550–564 (Su et al. 2015) and GX 339-4 (Su et al. 2017). HHTpywrapper provides examples of reproducing HHT analysis results in Su et al. (2015) and Su et al. (2017). This project is originated from the Astro Hack Week 2015.

Code site:

Views: 2424

[submitted] Kliko - The Scientific Compute Container Format

We present Kliko, a Docker based container specification for running one or multiple related compute jobs. The key concepts of Kliko is the encapsulation of data processing software into a container and the formalisation of the input, output and task parameters. Formalisation is realised by bundling a container with a Kliko file, which describes the IO and task parameters. This Kliko container can then be opened and run by a Kliko runner. The Kliko runner will parse the Kliko definition and gather the values for these parameters, for example by requesting user input or pre defined values in a script. Parameters can be various primitive types, for example float, int or the path to a file. This paper will also discuss the implementation of a support library named Kliko which can be used to create Kliko containers, parse Kliko definitions, chain Kliko containers in workflows using, for example, Luigi a workflow manager. The Kliko library can be used inside the container interact with the Kliko runner. Finally this paper will discuss two reference implementations based on Kliko: RODRIGUES, a web based Kliko container schedular and output visualiser specifically for astronomical data, and VerMeerKAT, a multi container workflow data reduction pipeline which is being used as a prototype pipeline for the commisioning of the MeerKAT radio telescope.

Code site:

Views: 1762

[submitted] KERN

KERN is a bi-annually released set of radio astronomical software packages. It should contain most of the standard tools that a radio astronomer needs to work with radio telescope data. The goal of KERN to is to save time and frustration in setting up of scientific pipelines, and to assist in achieving scientific reproducibility.

Code site:

Views: 1884

[submitted] loci: Smooth Cubic Multivariate Local Interpolations

loci is a shared library for interpolations in up to 4 dimensions. It is written in C and can be used with C/C++, Python and others. In order to calculate the coefficients of the cubic polynom, only local values are used: The data itself and all combinations of first-order derivatives, i.e. in 2D f_x, f_y and f_xy. This is in contrast to splines, where the coefficients are not calculated using derivatives, but non-local data, which can lead to over-smoothing the result.

Code site:

Views: 1461

[submitted] A Neural Network for the Identification of Dangerous Planetesimals (Including scripts for data generation)

Two neural networks were designed to identify hazardous planetesimals that were trained on object trajectories calculated in a cloud computing environment. The first neural network was fully-connected and was trained on the orbital elements (OEs) of real/simulated planetesimals, while the second was a 1-dimensional convolutional neural network that was trained on the position Cartesian coordinates of real/simulated planetesimals. Ultimately, the network trained on OEs had a better performance by identifying one-third of known potentially hazardous objects including the 3 asteroids with the highest chance of impact with Earth (2009 FD, 1999 RQ36, 1950 DA) as established by NASA's Monte Carlo based Sentry system.

Code site:

Views: 2261

[submitted] Opik Collision Probability

The Opik method gives the mean probability of collision of a small body with a given planet. It is a statistical value valid for an orbit with given (a,e,i) and undefined argument of perihelion. In some cases, the planet can eject the small body from the solar system; in these cases, the program estimates the mean time for the ejection. The Opik method does not take into account other perturbers than the planet considered, so it only provides an idea of the timescales involved.

Code site:

Views: 1426

[submitted] pydftools: Distribution function fitting in Python

pydftools is a pure-python port of the dftools R package (ascl:1805.002), which finds the most likely P parameters of a D-dimensional distribution function (DF) generating N objects, where each object is specified by D observables with measurement uncertainties. For instance, if the objects are galaxies, it can fit a MF (P=1), a mass-size distribution (P=2) or the mass-spin-morphology distribution (P=3). Unlike most common fitting approaches, this method accurately accounts for measurement in uncertainties and complex selection functions. Though this package imitates the dftools package quite closely while being as Pythonic as possible, it has not implemented 2D+ nor non-parametric.

Code site:

Views: 1302

[submitted] 3D texturized model of MARS (MOLA) regions

The Matlab Tool generates a 3D model (WRL, texturized in height false color map) of a defined region of the Mars surface. It defines the region of interest of the Mars surface (by Lat Long), a resolution of the MOLA DTMs to be considered (with a minimum px onground of 468 m), a scale factor to be multiplied to the height of the surface to improve features visibility for bumping or shadowing effect.

Code site:

Views: 1902

[submitted] stsynphot: synphot for HST and JWST

An extension to synphot (ascl:1811.001), stsynphot implements synthetic photometry package for HST and JWST support. The software constructs spectra from various grids of model atmosphere spectra, parameterized spectrum models, and atlases of stellar spectrophotometry. It also simulates observations specific to HST and JWST, computes photometric calibration parameters for any supported instrument mode, and plots instrument-specific sensitivity curves and calibration target spectra.

Code site:

Views: 1169

[submitted] stginga: Ginga for STScI

stginga customizes Ginga to aid data analysis for the data supported by STScI (e.g., HST or JWST). For instance, it provides plugins and configuration files that understand HST and JWST data products.

Code site:

Views: 1213

[submitted] cuvarbase: fast period finding utilities for GPU's (Python)

cuvarbase provides a Python (2.7+) library for performing period finding (Lomb-Scargle, Phase Dispersion Minimization, Conditional Entropy, Box-least squares) on astronomical time-series datasets. Speedups over CPU implementations depend on the algorithm, dataset, and GPU capabilities but are typically ~1-2 orders of magnitude and are especially high for BLS and Lomb-Scargle. Unit tested and available via pip or from source at GitHub.

Code site:

Views: 1216

[submitted] UMIST

Astrochemistry database of chemical species.

Code site:
Described in:
Preferred citation method:

The UMIST Database for Astrochemistry.

Views: 1125

[submitted] BELLAMY: A cross-matching package for the cynical astronomer

BELLAMY is a cross-matching algorithm designed primarily for radio images, that aims to match all sources in the supplied target catalogue to sources in a reference catalogue by calculating the probability of a match. BELLAMY utilises not only the position of a source on the sky, but also the flux data to calculate this probability, determining the most probable match in the reference catalog to the target source. Additionally, BELLAMY attempts to undo any spatial distortion that may be affecting the target catalogue, by creating a model of the offsets of matched sources which is then applied to unmatched sources. This combines to produce an iterative cross-matching algorithm that provides the user with an obvious measure of how confident they should be with the results of a cross-match.

Code site:

Views: 1096

[submitted] SimCADO - An observations simulator for infrared telescopes and instruments

SimCADO is a python package which allows the user to simulate observations with any NIR/Vis imaging system. The package was originally designed to simulate images for the European extremely large telescope (ELT) and MICADO, however with the proper input it is capable of simulating observations from many different Telescope + Instrument configurations.

The documentation can be found here:

Code site:

Views: 922

[submitted] MiraPy: Python package for Deep Learning in Astronomy

MiraPy is a Python package for problem-solving in astronomy using Deep Learning for astrophysicist, researchers and students. Current applications of MiraPy are X-Ray Binary classification, ATLAS variable star feature classification, OGLE variable star light-curve classification, HTRU1 dataset classification and Astronomical image reconstruction using encoder-decoder network. It also contains modules for loading various datasets, curve-fitting, visualization and other utilities. It is built using Keras for developing ML models to run on CPU and GPU seamlessly.

Code site:

Views: 934

[submitted] Sacc: Save All Correlations and Covariances

SACC (Save All Correlations and Covariances) is a format and reference library for general storage
of summary statistic measurements for the Dark Energy Science Collaboration (DESC) within and from the Large Synoptic Survey Telescope (LSST) project's Dark Energy Science Collaboration.

Code site:

Views: 908

[submitted] Magnetizer: computing magnetic fields of evolving galaxies

Computes time and radial dependent magnetic fields for a sample of galaxies in the output of a semi-analytic model of galaxy formation. The magnetic field is obtained by numerically solving the galactic dynamo equations throughout history of each galaxy. Stokes parameters and Faraday rotation measure can also be computed along a random line-of-sight for each galaxy.

Code site:
Used in:

Views: 970

[submitted] Network Flux Transport Demonstration

We have developed a method to efficiently simulate the dynamics of the magnetic flux in the solar network. We call this method Network Flux Transport (NFT). Implemented using a Spherical Centroidal Voronoi Tessellation (SCVT) based network model, magnetic flux is advected by photospheric plasma velocity fields according to the geometry of the SCVT model. We test NFT by simulating the magnetism of the Solar poles. The poles of the sun above 55 deg latitude are free from flux emergence from active regions or ephemeral regions. As such, they are ideal targets for a simplified simulation that relies on the strengths of the NFT model. This simulation method reproduces the magnetic and spatial distributions for the solar poles over two full solar cycles.

Code site:

Views: 641

[submitted] PyFOSC: a pipeline toolbox for BFOSC/YFOSC long-slit spectroscopy data reduction

PyFOSC is a pipeline toolbox for long-slit spectroscopy data reduction written in Python. It can be used for FOSC (Faint Object Spectrograph and Camera) data from Xinglong/Lijiang 2-meter telescopes in China. This pipeline privodes a neat way for data pre-processing, including updating missing header fileds for BFOSC data, reducing fits file extension for YFOSC data, etc. And it makes the data reduction procedure efficient by using previously identified lamp spectra as re-identification references during wavelength calibration, and applying multiprocessing in some modules. PyFOSC also enables customization for any other long-slit spectroscopy data.

Code site:

Views: 746

[submitted] Exo-MerCat: a merged exoplanet catalog with Virtual Observatory connection

The heterogeneity of papers dealing with the discovery and characterization of exoplanets makes every attempt to maintain a uniform exoplanet catalog almost impossible. Four sources currently available online (NASA Exoplanet Archive, Exoplanet Orbit Database, Exoplanet Encyclopaedia, and Open Exoplanet Catalogue) are commonly used by the community, but they can hardly be compared, due to discrepancies in notations and selection criteria.
Exo-MerCat is a Python code that collects and selects the most precise measurement for all interesting planetary and orbital parameters contained in the four databases, accounting for the presence of multiple aliases for the same target. It can download information about the host star as well by the use of Virtual Observatory ConeSearch connections to the major archives such as SIMBAD and those available in VizieR. A Graphical User Interface is provided to filter data based on the user's constraints and generate automatic plots that are commonly used in the exoplanetary community.
With Exo-MerCat, we retrieved a unique catalog that merges information from the four main databases, standardizing the output and handling notation differences issues. Exo-MerCat can correct as many issues that prevent a direct correspondence between multiple items in the four databases as possible, with the available data. The catalog is available as a VO resource for everyone to use and it is periodically updated, according to the update rates of the source catalogs.

Code site:
Described in:

Views: 673

[submitted] K2CE: Kepler-K2 Cadence Events

Since early 2018, the Kepler/K2 project has been performing a uniform global reprocessing of data from K2 Campaigns 0 through 14. Subsequent K2 campaigns (C15-C19) are being processed using the same processing pipeline. One of the major benefits of the reprocessing effort is that, for the first time, short-cadence (1-min) light curves are produced in addition to the standard long-cadence (30-min) light curves. Users have been cautioned that the Kepler pipeline detrending module (PDC), developed for use on original Kepler data, has not been tailored for use on short-cadence K2 observations. Systematics due to events on fast timescales, such as thruster firings, are sometimes poorly corrected for many short-cadence targets. A Python data visualization and manipulation tool, called Kepler-K2 Cadence Events, has been developed that identifies and removes cadences associated with problematic thruster events, thus producing better light curves. Kepler-K2 Cadence Events can be used to visualize and manipulate light curve files and target pixel files from the Kepler, K2, and TESS missions. This software is available at the following NASA GitHub repository .

Code site:

Views: 603

[submitted] SDSS Dual Active Nuclei Galaxy Detection Pipeline

Dual Active Nuclei Galaxies (DAGNs) are rare occurrences in the sky. Until now, most AGNs have been described to be found serendipitously, or by manual observation. In recent years, there has been an increasing interest in such dual AGNs and their astrophysical properties. Their study is important to the understanding of galaxy formation, star formation and these objects are the precursors to Gravitational Wave Sources.

Hence, we have devised a pipeline, that along with systematic data collection, can detect such dual AGN candidates. A novel algorithm 'Graph-Boosted Gradient Ascent' has been devised to detect whether an R-band image of a galaxy is a potential candidate for a DAGN or not. The pipeline can be cloned to a user's machine, and by joining the AstrIRG_DAGN group on SciServer, astronomers can collectively contribute to the mining of DAGNs.

Code site:

Views: 666

[submitted] JetSeT: numerical modeling and SED fitting tool for relativistic jets

JetSeT is an open source C/Python framework to reproduce radiative and accelerative processes acting in relativistic jets, allowing to fit the numerical models to observed data. The main features of this framework are:

- Handling observed data: re-binning, definition of data sets, bindings to astropy tables and quantities
definition of complex numerical radiative scenarios: Synchrotron Self-Compton (SSC), external Compton
(EC) and EC against the CMB

- Constraining of the model in the pre-fitting stage, based on accurate and already published
phenomenological trends. In particular, starting from phenomenological parameters, such as spectral indices,
peak fluxes and frequencies, and spectral curvatures, that the code evaluates automatically, the pre-fitting
algorithm is able to provide a good starting model, following the phenomenological trends that I have
implemented. fitting of multiwavelength SEDs using both frequentist approach (iminuit) and bayesian MCMC
sampling (emcee)

- Self-consistent temporal evolution of the plasma under the effect of radiative and accelerative processes,
both first order and second order (stochastic acceleration) processes.

Code site:

Views: 679

[submitted] Time-domain astronomy sandbox

Time-domain astronomy sandbox consists in a series of classes to simulate and process time-domain astronomy data products in Python. The code was originally developed to model Fast Radio Burst (FRB) and Radio Frequency Interference (RFI), and evaluate different RFI mitigation methods and their effect on FRB search.

Code site:

Views: 450

[submitted] amber_meta

amber_meta integrates a few routines to launch AMBER (the “Apertif Monitor for Bursts Encountered in Real-time”, in a systematic manner. To avoid typing a string in the command line manually with all parameters required to launch AMBER, amber_meta generates the command from configuration files, and can directly launch AMBER instances.

Code site:

Views: 534

[submitted] StarburstPy: Python Wrapper for Starburst99

StarburstPy is a python wrapper for Starburst99 (ascl:1104.003). The code contains methods for setting all inputs, running Starburst99, and reading output data into python dictionaries.

Code site:

Views: 666

[submitted] pycf3 - Cosmicflows-3 Distance-Velocity Calculator client for Python

The project is a simple Python client for Cosmicflows-3 Distance-Velocity Calculator at distances less than 400 Mpc (

Compute expectation distances or velocities based on smoothed velocity field from the Wiener filter model of

Code site:

Views: 476

[submitted] MERA: Analysis Tool for Astrophysical Simulation Data in the Julia Language

MERA works with large 3D AMR/uniform-grid and N-body particle data sets from astrophysical simulations such as those produced by the hydrodynamic code RAMSES (ascl:1011.007) and is written entirely in the Julia language. The package provides essential functions for efficient and memory lightweight data loading and analysis. The core of MERA is a database framework.

Code site:
Preferred citation method:

Views: 468

[submitted] Determination of Length of (Earth) Day [LOD] in the past geologic epochs

The protocol describes the algorithm of arriving at LOD in a given past geological Epoch. First the lunar orbital radius of the given geologic epoch has to be determined. For this the velocity of recession of Moon for the accelerated phase has to be determined. The spatial integral of the reciprocal of Velocity of recession gives the the transit time of Moon from desired orbit to the present orbit.Through several iterations the transit time is made to converge on the geologic epoch. Once we determine the desired orbital radius it has to be substituted in the LOD expression to determine the LOD in the given geologic epoch.

Code site:

Views: 464

[submitted] vlt-sphere: Automatic VLT/SPHERE data reduction and analysis

The high-contrast imager SPHERE at the Very Large Telescope is a new generation instrument combining extreme adaptive optics and coronagraphy to directly image exoplanets in the near-infrared. The vlt-sphere package enables easy reduction of the data coming from IRDIS and IFS, the two near-infrared subsystems of SPHERE. The package relies on the official ESO pipeline (ascl:1402.010) which must be installed separately.

Code site:

Views: 511

[submitted] sslf: A simple spectral-line finder

sslf is designed to be a dead-simple, effective and useful spectral line finder for 1D data. It utilizes the continuous wavelet transform from scipy, which is a productive way to find even weak spectral lines.

Code site:

Views: 629

[submitted] SoFiAX

SoFiAX is a web-based platform to merge and interact with the results of parallel execution of SoFiA HI source finding software [ascl:1412.001] and other steps of processing ASKAP Wallaby HI survey data.

Code site:

Views: 232

[submitted] oxkat: Semi-automated imaging of MeerKAT observations

oxkat semi-automatically performs calibration and imaging of data from the MeerKAT radio telescope. Taking as input raw visibilities in Measurement Set format, the entire processing workflow is covered, from flagging and reference calibration, to imaging and self-calibration, and (optionally) direction-dependent calibration. The oxkat scripts use Python, and draw on numerous existing radio astronomy packages (e.g. ascl:1107.013, ascl:1408.023, ascl:1805.031, and others) that are containerised using Singularity. Submission scripts for slurm and PBS job schedulers are automatically generated where necessary, catering for HPC facilities that are commonly used for processing MeerKAT data.

Code site:

Views: 146

[submitted] ISPy3 - Integrated-light Spectroscopy for Python3

ISPy3 is a collection of Python routines that can be used to model and analyse integrated-light spectra of stars and stellar populations. The actual spectral modelling and related tasks (setting up model atmospheres, etc) is done via external codes. Currently, the Kurucz codes (ATLAS/SYNTHE) and MARCS/TurboSpectrum are supported.

Code site:

Views: 131

[submitted] Umbrella

Umbrella is a software suite for asteroid detection, validation, identification and reporting. The current core of Umbrella is an open-source modular library, called Umbrella2, that includes algorithms and interfaces for all steps of the processing pipeline, including a novel detection algorithm for faint trails. Building on the library, there is also a detection pipeline accessible as a desktop program (ViaNearby), which we have successfully used in near real-time data reduction of a few asteroid surveys on the Wide Field Camera of the Isaac Newton Telescope.

Code site:

Views: 35