ASCL.net

Astrophysics Source Code Library

Making codes discoverable since 1999

Browsing Codes

Order
Title Date
 
Mode
Abstract Compact
Per Page
50100250All
[ascl:1505.024] PyTransit: Transit light curve modeling

PyTransit implements optimized versions of the Giménez and Mandel & Agol transit models for exoplanet transit light-curves. The two models are implemented natively in Fortran with OpenMP parallelization, and are accessed by an object-oriented python interface. PyTransit facilitates the analysis of photometric time series of exoplanet transits consisting of hundreds of thousands of data points, and of multipassband transit light curves from spectrophotometric observations. It offers efficient model evaluation for multicolour observations and transmission spectroscopy, built-in supersampling to account for extended exposure times, and routines to calculate the projected planet-to-star distance for circular and eccentric orbits, transit durations, and more.

[ascl:2105.015] PyTorchDIA: Difference Image Analysis tool

PyTorchDIA is a Difference Image Analysis tool. It is built around the PyTorch machine learning framework and uses automatic differentiation and (optional) GPU support to perform fast optimizations of image models. The code offers quick results and is scalable and flexible.

[ascl:1501.010] PythonPhot: Simple DAOPHOT-type photometry in Python

PythonPhot is a simple Python translation of DAOPHOT-type (ascl:1104.011) photometry procedures from the IDL AstroLib (Landsman 1993), including aperture and PSF-fitting algorithms, with a few modest additions to increase functionality and ease of use. These codes allow fast, easy, and reliable photometric measurements and are currently used in the Pan-STARRS supernova pipeline and the HST CLASH/CANDELS supernova analysis.

[ascl:1501.003] python-qucs: Python package for automating QUCS simulations

Characterization of the frequency response of coherent radiometric receivers is a key element in estimating the flux of astrophysical emissions, since the measured signal depends on the convolution of the source spectral emission with the instrument band shape. Python-qucs automates the process of preparing input data, running simulations and exporting results of QUCS (Quasi Universal Circuit Simulator) simulations.

[ascl:1612.001] Python-CPL: Python interface for the ESO Common Pipeline Library

Python-CPL is a framework to configure and execute pipeline recipes written with the Common Pipeline Library (CPL) (ascl:1402.010) with Python2 or Python3. The input, calibration and output data can be specified as FITS files or as astropy.io.fits objects in memory. The package is used to implement the MUSE pipeline in the AstroWISE data management system.

[submitted] Python “sgp4” module that offers official SGP4 C++ library

The “sgp4” module is a Python wrapper around the C++ version of the standard SGP4 algorithm for propagating Earth satellite positions from the element sets published by organizations like SpaceTrak and Celestrak. The code is the most recent version, including all of the corrections and bug fixes described in the paper _Revisiting Spacetrack Report #3_ (AIAA 2006-6753) by Vallado, Crawford, Hujsak, and Kelso. The test suite verifies that the Python wrapper returns exactly the coordinates specified in the C++ test cases.

[ascl:2212.014] pyTANSPEC: Python tool for extracting 1D TANSPEC spectra from 2D images

pyTANSPEC extracts XD-mode spectra automatically from data collected by the TIFR-ARIES Near Infrared Spectrometer (TANSPEC) on India's ground-based 3.6-m Devasthal Optical Telescope at Nainital, India. The TANSPEC offers three modes of observations, imaging with various filters, spectroscopy in the low-resolution prism mode with derived R~ 100-400 and the high-resolution cross-dispersed mode (XD-mode) with derived median R~ 2750 for a slit of width 0.5 arcsec. In the XD-mode, ten cross-dispersed orders are packed in the 2048 x 2048 pixels detector to cover the full wavelength regime. The XD-mode is most utilized; pyTANSPEC provides a dedicated pipeline for consistent data reduction for all orders and to reduces data reduction time. The code requires nominal human intervention only for the quality assurance of the reduced data. Two customized configuration files are used to guide the data reduction. The pipeline creates a log file for all the fits files in a given data directory from its header, identifies correct frames (science, continuum and calibration lamps) based on the user input, and offers an option to the user for eyeballing and accepting/removing of the frames, does the cleaning of raw science frames and yields final wavelength calibrated spectra of all orders simultaneously.

[ascl:1303.023] pysynphot: Synthetic photometry software package

pysynphot is a synthetic photometry software package suitable for either library or interactive use. Intended as a modern-language successor to the IRAF/STSDAS synphot package, it provides improved algorithms that address known shortcomings in synphot, and its object-oriented design is more easily extensible than synphot's task-oriented approach. It runs under PyRAF (ascl:1207.011), and a backwards compatibility mode is provided that recognizes all spectral and throughput tables, obsmodes, and spectral expressions used by synphot, to facilitate the transition for legacy code.

[ascl:2111.017] pySYD: Measuring global asteroseismic parameters

pySYD detects solar-like oscillations and measures global asteroseismic parameters. The code is a python-based implementation of the IDL-based SYD pipeline by Huber et al. (2009), which was extensively used to measure asteroseismic parameters for Kepler stars, and adapts the well-tested methodology from SYD and also improves these existing analyses. It also provides additional capabilities, including an automated best-fit background model selection, parallel processing, the ability to samples for further analyses, and an accessible and command-line friendly interface. PySYD provides best-fit values and uncertainties for the granulation background, frequency of maximum power, large frequency separation, and mean oscillation amplitudes.

[ascl:2206.004] pystortion: Distortion measurement support

pystortion provides support for distortion measurements in astronomical imagers. It includes classes to support fitting of bivariate polynomials of arbitrary degree and helper functions for crossmatching catalogs. The crossmatching uses an iterative approach in which a two-dimensional distortion model is fit at every iteration and used to continuously refine the position of extracted sources.

[ascl:2009.014] pySpectrum: Power spectrum and bispectrum calculator

pySpectrum calculates the power spectrum and bispectrum for galaxies, halos, and dark matter.

[ascl:1109.001] PySpecKit: Python Spectroscopic Toolkit

PySpecKit is a Python spectroscopic analysis and reduction toolkit meant to be generally applicable to optical, infrared, and radio spectra. It is capable of reading FITS-standard and many non-standard file types including CLASS spectra. It contains procedures for line fitting including gaussian and voigt profile fitters, and baseline-subtraction routines. It is capable of more advanced line fitting using arbitrary model grids. Fitting can be done both in batch mode and interactively. PySpecKit also produces publication-quality plots with TeX axis labels and annotations. It is designed to be extensible, allowing user-written reader, writer, and fitting routines to be "plugged in." It is actively under development and currently in the 'alpha' phase, with plans for a beta release.

[ascl:1411.002] pysovo: A library for implementing alerts triggered by VOEvents

pysovo contains basic tools to work with VOEvents. Though written for specific needs, others interested in VOEvents may find it useful to examine.

[ascl:1503.008] pYSOVAR: Lightcurves analysis

The pYSOVAR code calculates properties for a stack of lightcurves, including simple descriptive statistics (mean, max, min, ...), timing (e.g. Lomb-Scargle periodograms), variability indixes (e.g. Stetson), and color properties (e.g. slope in the color-magnitude diagram). The code is written in python and is closely integrated with astropy tables. Initially, pYSOVAR was written specifically for the analysis of two clusters in the YSOVAR project, using the (not publicly released) YSOVAR database as an input. Additional functionality has been added and the code has become more general; it is now useful for other clusters in the YSOVAR dataset or for other projects that have similar data (lightcurves in one or more bands with a few hundred points for a few thousand objects), though may not work out-of-the-box for different datasets.

[ascl:2003.012] PYSOLATOR: Remove orbital modulation from a binary pulsar and/or its companion

PYSOLATOR removes the orbital modulation from a binary pulsar and/or its companion. In essence, it subtracts the predicted Roemer delay for the given orbit and then resamples the time series so as to make the signal appear as if it were emitted from the barycenter of the binary system, making the search for pulses easier and faster.

[ascl:2210.017] PySME: Spectroscopy Made Easy reimplemented with Python

PySME is a partial reimplementation of Spectroscopy Made Easy (SME, ascl:1202.013), which fits an observed spectrum of a star with a model spectrum. The IDL routines of SME used to call a dynamically linked library of compiled C++ and Fortran programs have been rewritten in Python. In addition, an object oriented paradigm and continuous integration practices, including build automation, self-testing, and frequent builds, have been added.

[ascl:1704.007] PySM: Python Sky Model

PySM generates full-sky simulations of Galactic foregrounds in intensity and polarization relevant for CMB experiments. The components simulated are thermal dust, synchrotron, AME, free-free, and CMB at a given Nside, with an option to integrate over a top hat bandpass, to add white instrument noise, and to smooth with a given beam. PySM is based on the large-scale Galactic part of Planck Sky Model code and uses some of its inputs.

[ascl:2204.016] pySIDES: Simulated Infrared Dusty Extragalactic Sky in Python

pySIDES generates mock catalogs of galaxies in the (sub-)millimeter domain and associates spectral cubes (e.g., for intensity mapping experiments). It produces both continuum and CO, [CII], and [CI] line emissions. pySIDES is the Python version of the Simulated Infrared Dusty Extragalactic Sky (SIDES).

[ascl:2106.006] Pyshellspec: Binary systems with circumstellar matter

Pyshellspec models binary systems with circumstellar matter (e.g. accretion disk, jet, shell), computes the interferometric observables |V2|, arg T3, |T3|, |dV|, and arg dV, and performs comparisons of light curves, spectro-interferometry, spectra, and SED with observations, and both global and local optimization of system parameters. The code solves the inverse problem of finding the stellar and orbital parameters of the stars and circumstellar medium. Pyshellspec is based on the long-characteristic LTE radiation transfer code Shellspec (ascl:1108.017).

[ascl:1805.026] PySE: Python Source Extractor for radio astronomical images

PySE finds and measures sources in radio telescope images. It is run with several options, such as the detection threshold (a multiple of the local noise), grid size, and the forced clean beam fit, followed by a list of input image files in standard FITS or CASA format. From these, PySe provides a list of found sources; information such as the calculated background image, source list in different formats (e.g. text, region files importable in DS9), and other data may be saved. PySe can be integrated into a pipeline; it was originally written as part of the LOFAR Transient Detection Pipeline (TraP, ascl:1412.011).

[ascl:1908.024] PYSAT: Python Satellite Data Analysis Toolkit

The Python Satellite Data Analysis Toolkit (pysat) provides a simple and flexible interface for downloading, loading, cleaning, managing, processing, and analyzing space science data. The toolkit supports in situ satellite observations and many different types of ground- and space-based measurements. Its analysis routines are independent of instrument and data source.

[ascl:2008.005] PySAP: Python Sparse data Analysis Package

PySAP (Python Sparse data Analysis Package) provides a common API for astronomical and neuroimaging datasets and access to iSAP's (ascl:1303.029) Sparse2D executables with both wrappers and bindings. It also offers a graphical user interface for exploring the provided functions and access to application specific plugins.

[ascl:1207.010] PySALT: SALT science pipeline

The PySALT user package contains the primary reduction and analysis software tools for the SALT telescope. Currently, these tools include basic data reductions for RSS and SALTICAM in both imaging, spectroscopic, and slot modes. Basic analysis software for slot mode data is also provided. These tools are primarily written in python/PyRAF with some additional IRAF code.

[ascl:1904.026] pyRSD: Accurate predictions for the clustering of galaxies in redshift-space in Python

pyRSD computes the theoretical predictions of the redshift-space power spectrum of galaxies. It also includes functionality for fitting data measurements and finding the optimal model parameters, using both MCMC and nonlinear optimization techniques.

[ascl:2107.012] PyROA: Modeling quasar light curves

PyROA models quasar light curves where the variability is described using a running optimal average (ROA), and parameters are sampled using Markov Chain Monte Carlo (MCMC) techniques using emcee (ascl:1303.002). Using a Bayesian approach, priors can be used on the sampled parameters. Currently it has three main uses: 1.) Determining the time delay between lightcurves at different wavelengths; 2.) Intercalibrating light curves from multiple telescopes, merging them into a single lightcurve; and 3.) Determining the time delay between images of lensed quasars, where the microlensing effects are also modeled. PyROA also includes a noise model, where there is a parameter for each light curve that adds extra variance to the flux measurments, to account for underestimated errors; this can be turned off if required. Example jupyter notebooks that demonstrate each of the three main uses of the code are provided.

[ascl:1507.018] pyro: Python-based tutorial for computational methods for hydrodynamics

pyro is a simple python-based tutorial on computational methods for hydrodynamics. It includes 2-d solvers for advection, compressible, incompressible, and low Mach number hydrodynamics, diffusion, and multigrid. It is written with ease of understanding in mind. An extensive set of notes that is part of the Open Astrophysics Bookshelf project provides details of the algorithms.

[ascl:2110.016] pyro: Deep universal probabilistic programming with Python and PyTorch

Pyro is a flexible, scalable deep probabilistic programming library built on PyTorch. It can represent any computable probability distribution and scales to large data sets with little overhead compared to hand-written code. The library is implemented with a small core of powerful, composable abstractions. Its high-level abstractions express generative and inference models, but also allows experts to customize inference.

[ascl:2207.007] Pyriod: Period detection and fitting routines

Pyriod provides basic period detection and fitting routines for astronomical time series. Written in Python and designed to be run interactively in a Jupyter notebook, it displays and allows the user to interact with time series data, fit frequency solutions, and save figures from the toolbar. It can display original or residuals time series, fold the time series on some frequency, add selected peaks from the periodogram to the model, and refine the fit by computing a least-squared fit of the model using Lmfit (ascl:1606.014).

[submitted] pyreaclib

A python interface to the JINA reaclib nuclear reaction database

[ascl:2312.021] PyRaTE: Non-LTE spectral lines simulations

PyRaTE (Python Radiative Transfer Emission) post-processes astrochemical simulations. This multilevel radiative transfer code uses the escape probablity method to calculate the population densities of the species under consideration. The code can handle all projection angles and geometries and can also be used to produce mock observations of the Goldreich-Kylafis effect. PyRaTE is written in Python; it uses a parallel strategy and relies on the YT analysis toolkit (ascl:1011.022), mpi4py and numba.

[ascl:2105.017] Pyrat Bay: Python Radiative Transfer in a Bayesian framework

Pyrat Bay computes radiative-transfer spectra and fits exoplanet atmospheric properties, and is an efficient, user-friendly Python tool. The package offers transmission or emission spectra of exoplanet transit or eclipses respectively and forward-model or retrieval calculations. The radiative-transfer includes opacity sources from line-by-line molecular absorption, collision-induced absorption, Rayleigh scattering absorption, and more, including Gray aerosol opacities. Pyrat Bay's Bayesian (MCMC) posterior sampling of atmospheric parameters includes molecular abundances, temperature profile, pressure-radius, and Rayleigh and cloud properties.

[ascl:1207.011] PyRAF: Python alternative for IRAF

PyRAF is a command language for running IRAF tasks that is based on the Python scripting language. It gives users the ability to run IRAF tasks in an environment that has all the power and flexibility of Python. PyRAF can be installed along with an existing IRAF installation; users can then choose to run either PyRAF or the IRAF CL.

[ascl:1602.002] pyraf-dbsp: Reduction pipeline for the Palomar Double Beam Spectrograph

pyraf-dbsp is a PyRAF-based (ascl:1207.011) reduction pipeline for optical spectra taken with the Palomar 200-inch Double Beam Spectrograph. The pipeline provides a simplified interface for basic reduction of single-object spectra with minimal overhead. It is suitable for quicklook classification of transients as well as moderate-precision (few km/s) radial velocity work.

[ascl:1908.009] PyRADS: Python RADiation model for planetary atmosphereS

The 1D radiation code PyRADS provides line-by-line spectral resolution. For Earth-like atmospheres, PyRADS currently uses HITRAN 2016 line lists and the MTCKD continuum model. A version for shortwave radiation (scattering) is also available.

[ascl:1807.006] pyqz: Emission line code

pyqz computes the values of log(Q) [the ionization parameter] and 12+log(O/H) [the oxygen abundance, either total or in the gas phase] for a given set of strong emission lines fluxes from HII regions. The log(Q) and 12+log(O/H) values are interpolated from a finite set of diagnostic line ratio grids computed with the MAPPINGS V code (ascl:1807.005). The grids used by pyqz are chosen to be flat, without wraps, to decouple the influence of log(Q) and 12+log(O/H) on the emission line ratios.

[ascl:1809.008] PyQSOFit: Python code to fit the spectrum of quasars

The Python QSO fitting code (PyQSOFit) measures spectral properties of quasars. Based on Shen's IDL version, this code decomposes different components in the quasar spectrum, e.g., host galaxy, power-law continuum, Fe II component, and emission lines. In addition, it can run Monto Carlo iterations using flux randomization to estimate the uncertainties.

[ascl:1706.011] PyPulse: PSRFITS handler

PyPulse handles PSRFITS files and performs subsequent analyses on pulse profiles.

[ascl:1612.005] PyProfit: Wrapper for libprofit

pyprofit is a python wrapper for libprofit (ascl:1612.003).

[ascl:2307.006] pyPplusS: Modeling exoplanets with rings

pyPplusS calculates the light curves for ringed, oblate or spherical exoplanets in both the uniform and limb darkened cases. It can constrain the oblateness of planets using photometric data only. This code can be used to model light curves of more complicated configurations, including multiple planets, oblate planets, moons, rings, and combinations of these, while properly and efficiently taking into account overlapping areas and limb darkening.

[ascl:2206.023] pyPipe3D: Spectroscopy analysis pipeline

The spectroscopy analysis pipeline pyPipe3D produces coherent and easy to distribute and compare parameters of stellar populations and ionized gas; it is suited in particular for data from the most recent optical IFS surveys. The pipeline is build using pyFIT3D, which is the main spectral fitting module included in this package.

[ascl:2103.026] PyPion: Post-processing code for PION simulation data

PyPion reads in Silo (ascl:2103.025) data files from PION (ascl:2103.024) simulations and plots the data. This library works for 1D, 2D, and 3D data files and for any amount of nested-grid levels. The scripts contained in PyPion save the options entered into the command line when the python script is run, open the silo file and save all of the important header variables, open the directory in the silo (or vtk, or fits) file and save the requested variable data (eg. density, temp, etc.), and set up the plotting function and the figure.

[ascl:1609.022] PyPHER: Python-based PSF Homogenization kERnels

PyPHER (Python-based PSF Homogenization kERnels) computes an homogenization kernel between two PSFs; the code is well-suited for PSF matching applications in both an astronomical or microscopy context. It can warp (rotation + resampling) the PSF images (if necessary), filter images in Fourier space using a regularized Wiener filter, and produce a homogenization kernel. PyPHER requires the pixel scale information to be present in the FITS files, which can if necessary be added by using the provided ADDPIXSCL method.

[ascl:2401.004] pyPETaL: A Pipeline for Estimating AGN Time Lags

pyPETAL produces cross-correlation functions, discrete correlation functions, and mean time lags from multi-band AGN time-series data, combining multiple different codes (including pyCCF (ascl:1805.032), pyZDCF, PyROA (ascl:2107.012), and JAVELIN (ascl:1010.007)) used for active galactic nuclei (AGN) reverberation mapping (RM) analysis into a unified pipeline. This pipeline also implements outlier rejection using Damped Random Walk Gaussian process fitting, and detrending through the LinMix algorithm. pyPETAL implements a weighting scheme for all lag-producing modules, mitigating aliasing in peaks of time lag distributions between light curves. pyPETAL scales to any combination of internal code modules, supporting a variety of computational workflows.

[ascl:1911.004] PypeIt: Python spectroscopic data reduction pipeline

PypeIt reduces data from echelle and low-resolution spectrometers; the code can be run in several modes of reduction that demark the level of sophistication (e.g. quick and dirty vs. MonteCarlo) and also the amount of output written to disk. It also generates numerous data products, including 1D and 2D spectra; calibration images, fits, and meta files; and quality assurance figures.

[ascl:1905.027] PyPDR: Python Photo Dissociation Regions

PyPDR calculates the chemistry, thermal balance and molecular excitation of a slab of gas under FUV irradiation in a self-consistent way. The effect of FUV irradiation on the chemistry is that molecules get photodissociated and the gas is heated up to several 1000 K, mostly by the photoelectric effect on small dust grains or UV pumping of H2 followed by collision de-excitation. The gas is cooled by molecular and atomic lines, thus indirectly the chemical composition also affects the thermal structure through the abundance of molecules and atoms. To find a self-consistent solution between heating and cooling, the code iteratively calculates the chemistry, thermal-balance and molecular/atomic excitation.

[ascl:1802.012] PyOSE: Orbital sampling effect (OSE) simulator

PyOSE is a fully numerical orbital sampling effect (OSE) simulator that can model arbitrary inclinations of the transiting moon orbit. It can be used to search for exomoons in long-term stellar light curves such as those by Kepler and the upcoming PLATO mission.

[ascl:1612.008] PyORBIT: Exoplanet orbital parameters and stellar activity

PyORBIT handles several kinds of datasets, such as radial velocity (RV), activity indexes, and photometry, to simultaneously characterize the orbital parameters of exoplanets and the noise induced by the activity of the host star. RV computation is performed using either non-interacting Kepler orbits or n-body integration. Stellar activity can be modeled either with sinusoids at the rotational period and its harmonics or Gaussian process. In addition, the code can model offsets and systematics in measurements from several instruments. The PyORBIT code is modular; new methods for stellar activity modeling or parameter estimation can easily be incorporated into the code.

[ascl:2203.012] pyobs: Python framework for autonomous astronomical observatories

pyobs enables remote and fully autonomous observation control of astronomical telescopes. It provides an abstraction layer over existing drivers and a means of communication between different devices (called modules in pyobs). The code can also act as a hardware driver for all the devices used at an observatory. In addition, pyobs offers non-hardware-related modules for automating focusing, acquisition, guiding, and other routine tasks.

[ascl:2207.002] pynucastro: Python interfaces to the nuclear reaction rate databases

pynucastro interfaces to the nuclear reaction rate databases, including the JINA Reaclib nuclear reactions database. This set of Python interfaces enables interactive exploration of rates and collection of rates (networks) in Jupyter notebooks and easy creation of the righthand side routines for reaction network integration (the ODEs) for use in simulation codes.

[ascl:1501.001] PynPoint: Exoplanet image data analysis

PynPoint uses principal component analysis to detect and estimate the flux of exoplanets in two-dimensional imaging data. It processes many, typically several thousands, of frames to remove the light from the star so as to reveal the companion planet.

The code has been significantly rewritten and expanded; please see ascl:1812.010.

Would you like to view a random code?