Developing Astrophysical “Apps” for LSST

Feb 16, 2023

by Bryné Hadnott

The distance from Palo Alto to San Francisco might seem obvious when you’re looking for directions on Google Maps, but for the deep-field images of the Universe captured by enormous telescopes like the James Webb Space Telescope (JWST) and the upcoming Vera C. Rubin Observatory Legacy Survey of Space and Time (LSST), two points of light can appear close together when they’re actually separated by billions of lightyears. KIPAC scientist, Eli Rykoff, toes the line between astrophysics and software engineering to develop algorithms that can accurately determine the distance between Earth and a far-away galaxy. 

Earlier this year, Rykoff was named a Rubin calibration scientist, designing algorithms to turn raw data from the observatory’s soon-to-be-installed 3.2 gigapixel camera into meaningful, physical units (for example, distance) that will be used to measure the fundamental cosmological parameters shaping our Universe. His work will play a key part in the LSST Dark Energy Science Collaboration (DESC), an international group of scientists preparing to carry out the world’s most accurate analysis of dark energy using five cosmological probes: large-scale structure, strong and weak gravitational lensing, supernovae, and the largest structures in the Universe, galaxy clusters

“The number density and statistics from galaxy clusters can be combined with additional cosmological probes to measure the expansion of the Universe as a function of cosmological time,” says Rykoff. “But the only way to understand what any of those numbers mean is by comparing them to large-scale cosmological simulations. This is where [KIPAC Director] Risa Wechsler's work on adding realistic galaxies to cosmological simulations comes in.”

“Just six months of LSST will produce more data than all six years of the Dark Energy Survey [DES],” adds Rykoff. “The hope is, especially when you bring in massive objects like galaxy clusters, that we’ll be able to answer the question: is the expansion of the Universe caused by dark energy or do we need to modify Einstein’s theory of general relativity?”

Software Extraordinaire

While he’s now recognized as an expert in galaxy cluster cosmology, Rykoff began his career studying cosmic objects that evolve on much faster, and sometimes inconvenient, timescales. 

“I started out studying gamma-ray bursts in graduate school at the University of Michigan. It was a lot of fun traveling all over the world, but these events would happen at random times. They interrupted my first date with my now wife,” laughs Rykoff. “I stayed on as a postdoc and one of my advisors, Tim McKay, asked me to start doing some X-ray observations of galaxy clusters. It was a nice change not to be woken up at inconvenient hours.” 

He ended up sharing an office with gravitational lensing expert and current KIPAC Senior Scientist, Phil Marshall. Together, they developed an app for Apple devices called GravLens3 (featured in symmetry magazine in 2014) that allows users to simulate the effects of strong lensing with any photo or even live video.

Screenshot of GravLens3 from the Apple App Store, showing what would happen if there were a massive object such a black hole in front of a Discovery Day at Oracle Park.
Screenshot of GravLens3 from the Apple App Store, showing what would happen if there were a massive object such a black hole in front of a Discovery Day at Oracle Park. (Credit: Eli Rykoff.) 


“When I was early in my career, developing apps with an ‘Eli Rykoff’-branding made me much more visible in the field than I otherwise would have been,” says Rykoff. “I think one of the reasons I ended up getting a postdoc with Saul Perlmutter at Lawrence Berkeley Lab was because he liked another app I developed called CosmoCalc, a utility for cosmologists to calculate astronomical distances. When he interviewed me, he asked about a feature that was missing, so I made sure I added it and then I got the job.”

Rykoff’s talent for software development was noticed again in 2012, when he joined KIPAC as a staff scientist developing algorithms to detect galaxy clusters in images from DES. 

Turning Red

Galaxy clusters, which can span millions of light years across and contain up to a thousand galaxies, are notoriously difficult to find. Luckily for astronomers, elliptical galaxies within the largest galaxy clusters all have the same reddish color. Over time, all of the brightest, bluest, fast-burning stars within a galaxy run out of fuel, leaving only smaller, slow-burning, red-colored stars behind. Astronomers then calculate the average color of the remaining stars in order to determine the galaxy’s 'average' expected color. As the light from the galaxy travels through our expanding Universe, it gets stretched into longer wavelengths, or “reddened,” before reaching a distant telescope.

Hubble image showing the galaxy cluster RXC J0142.9+4438.
Hubble image showing the galaxy cluster RXC J0142.9+4438 (and a few faint strongly lensed Einstein arcs). (Credit: NASA/ESA /Hubble/RELICS.)


Using a technique called the red-sequence method, scientists can compare the galaxy’s expected color to its slightly redder, observed color; the difference between the two colors, or redshift, is a measure of the galaxy’s distance away from curious observers on Earth. If several of the observed galaxies have similar colors and redshifts, then they are likely members of a galaxy cluster.

“I would run my red-sequence cluster finder algorithm (redMaPPer) on images from DES and one of the problems I ran into was that the colors of the galaxies weren’t properly measured,” says Rykoff. “The next thing I know, I'm working with Dave Burke [then KIPAC professor; now professor emeritus] on photometric calibration [accurately measuring an object's brightness]: the fundamental issue is making sure that every photometric measurement is repeatable and uniform over the footprint of the survey.” 

Together, Rykoff and Burke developed a model using data from DES to account for water vapor in the atmosphere, which can greatly affect the color measured by highly sensitive astronomical instruments. They were then able to apply the model to incoming images and improve the accuracy of observed galaxy colors in the visible and near infrared wavelengths, allowing for better estimates of redshifts with the red-sequence method. 

“Once you detect these old, red galaxies, you can just count how many there are in the cluster and get a pretty good estimate of the cluster’s visible mass,” says Rykoff. “After weighing the clusters, we can count the number and distribution of clusters as a function of redshift to determine how the matter content of the Universe has evolved over time.”

Looking Forward to LSST

Rykoff has ported redMaPPer into LSST DESC’s software database and has been rigorously testing its capabilities using images from past surveys and simulated LSST data. As a calibration scientist, he is one of the people in charge of the entire data processing pipeline, from the photon counts measured by the camera to data integration and the hardest task of all, ultra-accurate photometry.

LSST DESC simulated image data from the "DC2" simulations (Figure from LSST DESC and Marina Ricci).  Locations of clusters are marked to show examples of correctly centered clusters, mis-centered clusters, and mis-matched clusters.
LSST DESC simulated image data from the "DC2" simulations (Figure from LSST DESC and Marina Ricci). Locations of clusters are marked to show examples of correctly centered clusters, mis-centered clusters, and mis-matched clusters. (Credit: Marina Ricci, IN2P3, France.)


“One of the scariest things on my side is that we have to get the photometric calibration understood to 0.1% over the 10 years of the survey,” says Rykoff. “You have to get the photometry right or else you might think the Universe is doing something that it's not.”

Once the camera is delivered from the clean room at SLAC National Accelerator Laboratory to the mountaintop observatory in Chile, LSST will take thousands of snapshots of the Southern sky every night for a decade. The snapshots will be used to create a stop motion movie of tens of millions of galaxies and thousands of galaxy clusters from the early ages of the Universe to the present. The wealth of data combined with the precise photometry will allow for an unprecedented view into the workings of our Universe. 

“With the precision of LSST, we'll really be able to pin down the dark energy versus modified gravity debate and determine if general relativity is correct over all scales,” says Rykoff.


Cosmological Constraints Using Multi-Wavelength Observations of Galaxy Clusters