Graduate student's BADASS code has astronomical benefits

December 16, 2020

RIVERSIDE, Calif. -- An astro-statistics course University of California, Riverside, graduate student Remington O. Sexton took three years ago taught him techniques that led him to develop free, open-source code benefiting astronomers everywhere.

Called BADASS, which stands for Bayesian AGN Decomposition Analysis for SDSS Spectra, the code in its current form fits astronomical spectra of active galactic nuclei, or AGNs, from the Sloan Digital Sky Survey, or SDSS, using advanced statistical methods.

"The code is unique in that it finally provides a way for astronomers to fit the stellar motions of stars simultaneously with many other components, is written in the popular programming language Python, and is versatile enough to fit not just AGNs, but normal galaxies as well," said Sexton, who earned his doctoral degree in physics and astronomy in September 2020.

Sexton's breakthrough work is published in the January 2021 issue of the Monthly Notices of the Royal Astronomical Society.

AGN is the general term used to describe a supermassive black hole in the center of a galaxy that is actively accreting material, usually in the form of interstellar gas, using its strong gravitational influence. AGNs are common; but not all galaxies have them at their centers. Each galaxy's center is believed, however, to have a supermassive black hole. Normal galaxies, such as the Milky Way, lack actively accreting black holes.

Different celestial objects produce different types of spectra. An object's spectrum helps astronomers identify what type of object it is. Light from a celestial body with no intervening matter produces a spectrum that appears as a continuum. A challenge in astronomy has been separating the contribution of stellar light and the contribution of AGN light from each other in the galaxy's main spectral continuum.

"The challenge is separating the two from each other, that is, isolating the stellar component from the AGN light contribution," Sexton said. "Aside from being versatile enough to fit many kinds of astronomical objects, which many codes aren't designed for, BADASS simultaneously fits stellar kinematics simultaneously with all other components in the spectra. Codes in the past used a two-step process of fitting stellar kinematics and other components independently. But this could introduce biases or uncertainties. The best way to perform spectral decomposition is to fit all components simultaneously. This is what BADASS does."

Sexton designed BADASS also to detect and fit ionized gas outflows typically seen in optical emission line features and is the first to incorporate a set of specific criteria for their detection. Ionized gas outflow refers to the bulk motion of interstellar gas capable of escaping the gravitational influence of its host galaxy and the blackhole.

"Ionized gas outflows have become a hot topic in the past decade and could explain how supermassive black holes and galaxies co-evolve with each other over cosmic time," said coauthor Gabriela Canalizo, a professor of physics and astronomy at UC Riverside and Sexton's doctoral advisor.

Currently, BADASS is only being used to fit AGN objects. Sexton emphasized, however, that the code is versatile, easy to use, and can fit other objects such as normal galaxies.

"BADASS can be used for fitting normal non-AGN host galaxies, and even individual stars," he said. "Currently, its usage is strictly for astronomical spectra, but the statistical framework BADASS is built on can be generalized for any kind of spectroscopy. That makes it extraordinarily versatile and useful."

One motivation Sexton had to develop BADASS was to phase out the need for proprietary software -- IDL programming language -- and replace it with a free open-source language such as Python.

"Now anyone can download BADASS for free and use it," he said. "It is ready to be run as long as you can install Python and all the packages it requires. Because this code can also detect and fit ionized gas outflows in optical spectra, it could greatly assist in the heightened interest in astronomy now in studying ionized gas outflows by creating larger samples for analysis."
Sexton and Canalizo were joined in the research by William Matzko of George Mason University in Virginia; Nicholas Darden of UCR; and Varoujan Gorjian of the Jet Propulsion Laboratory in California.

The research was supported partially by the National Science Foundation and the NASA MIRO program through the Fellowships and Internships for Extremely Large Data Sets (FIELDS) in the form of a graduate student fellowship.

The research paper is titled, "Bayesian AGN Decomposition Analysis for SDSS spectra: a correlation analysis of [O III] λ5007 outflow kinematics with AGN and host galaxy properties."

The University of California, Riverside ( is a doctoral research university, a living laboratory for groundbreaking exploration of issues critical to Inland Southern California, the state and communities around the world. Reflecting California's diverse culture, UCR's enrollment is more than 25,000 students. The campus opened a medical school in 2013 and has reached the heart of the Coachella Valley by way of the UCR Palm Desert Center. The campus has an annual statewide economic impact of almost $2 billion. To learn more, email">

University of California - Riverside

Related Astronomers Articles from Brightsurf:

Astronomers are bulging with data
For the first time, over 250 million stars in our galaxy's bulge have been surveyed in near-ultraviolet, optical, and near-infrared light, opening the door for astronomers to reexamine key questions about the Milky Way's formation and history.

Astronomers capture a pulsar 'powering up'
A Monash-University-led collaboration has, for the first time, observed the full, 12-day process of material spiralling into a distant neutron star, triggering an X-ray outburst thousands of times brighter than our Sun.

Astronomers discover new class of cosmic explosions
Analysis of two cosmic explosions indicates to astronomers that the pair, along with a puzzling blast from 2018, constitute a new type of event, with similarities to some supernovae and gamma-ray bursts, but also with significant differences.

Astronomers discover planet that never was
What was thought to be an exoplanet in a nearby star system likely never existed in the first place, according to University of Arizona astronomers.

Canadian astronomers determine Earth's fingerprint
Two McGill University astronomers have assembled a 'fingerprint' for Earth, which could be used to identify a planet beyond our Solar System capable of supporting life.

Astronomers help wage war on cancer
Techniques developed by astronomers could help in the fight against breast and skin cancer.

Astronomers make history in a split second
In a world first, an Australian-led international team of astronomers has determined the precise location of a powerful one-off burst of cosmic radio waves.

Astronomers witness galaxy megamerger
Using the Atacama Large Millimeter/submillimeter Array (ALMA), an international team of scientists has uncovered a startlingly dense concentration of 14 galaxies that are poised to merge, forming the core of what will eventually become a colossal galaxy cluster.

Astronomers discover a star that would not die
An international team of astronomers has made a bizarre discovery; a star that refuses to stop shining.

Astronomers spun up by galaxy-shape finding
For the first time astronomers have measured how a galaxy's spin affects its shape -- something scientists have tried to do for 90 years -- using a sample of 845 galaxies.

Read More: Astronomers News and Astronomers Current Events is a participant in the Amazon Services LLC Associates Program, an affiliate advertising program designed to provide a means for sites to earn advertising fees by advertising and linking to