Skip to article frontmatterSkip to article content
Site not loading correctly?

This may be due to an incorrect BASE_URL configuration. See the MyST Documentation for reference.

IRSA Tutorials

TDE Light Curve

Learning Goals

By the end of this tutorial, you will be able to :

Introduction

The OpenUniverse2024 simulation suite delivers ~70 deg² of matched optical/infrared imagery designed for both the LSST Wide‑Fast‑Deep (WFD) and the Nancy Grace Roman Space Telescope high-latitude survey, enabling joint survey planning and multi-wavelength systematics studies. It incorporates the updated “Diffsky” extragalactic model, extended transient modeling across optical/IR wavelengths, and realistic telescope/instrument effects, producing roughly 400 TB of publicly available synthetic imaging and catalogs. The goal of this project is to enable cross-collaboration and maximize science return from next-generation cosmological surveys by providing a consistent simulated sky observed by multiple observatories.

Tidal Disruption Events (TDEs) occur when a star passes close enough to a supermassive black hole to be torn apart by tidal forces, producing a luminous flare that can outshine the host galaxy for weeks to months. Identifying and characterizing TDE host galaxies is key to understanding the demographics of supermassive black holes and the galactic environments that produce these rare events. This notebook demonstrates how to locate a simulated TDE from the OpenUniverse2024 transient input catalog, identify its host galaxy, and extract optical and infrared photometry from Roman images to construct a multi-epoch light curve. The OpenUniverse2024 dataset also provides matched Rubin optical coverage over the same sky. With a few simple changes in Sections 3 and 4, this workflow can be extended to other Roman and Rubin bands to build a true multi-wavelength light curve.

Instructions

This notebook is designed to be run sequentially from top to bottom. All code is self-contained and relies on publicly accessible data.

Input

Output

Imports

/home/runner/work/irsa-tutorials/irsa-tutorials/.tox/py312-buildhtml/lib/python3.12/site-packages/tqdm/auto.py:21: TqdmWarning: IProgress not found. Please update jupyter and ipywidgets. See https://ipywidgets.readthedocs.io/en/stable/user_install.html
  from .autonotebook import tqdm as notebook_tqdm

1. Explore the OpenUniverse2024 data directories

This section of the tutorial demonstrates how to explore the OpenUniverse2024 data directories directly on S3 and inspect simulated Roman and Rubin images without downloading large datasets locally. It establishes a connection to the public NASA IRSA simulations bucket using s3fs, defines key directory paths for the full Roman and Rubin simulations, and illustrates how to browse image files for a selected band and pointing. The accompanying functions — summarize_fits_files() and show_gallery() — provide tools for quickly summarizing FITS file metadata (e.g., number of extensions, pointing information, pixel scale) and for visualizing a small gallery of example images from the chosen directory.

In the prefix you will see that we choose “simple_model” simulations and not “truth” simulations because the simple_model images are the ones with noise and real effects, while “Truth” are noise free, perfect images.

The prefix also selects the full simulation, which covers the entire survey footprint, for both Roman and Rubin. The OpenUniverse2024 paper describes how the simulation was produced.

['nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_1.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_10.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_11.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_12.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_13.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_14.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_15.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_16.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_17.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_18.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_2.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_3.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_4.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_5.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_6.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_7.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_8.fits.gz', 'nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_9.fits.gz']
Found 18 files
File: s3://nasa-irsa-simulations/openuniverse2024/roman/full/RomanTDS/images/simple_model/J129/10190/Roman_TDS_simple_model_J129_10190_1.fits.gz
Number of extensions: 4

Filename: <class 's3fs.core.S3File'>
No.    Name      Ver    Type      Cards   Dimensions   Format
  0  PRIMARY       1 PrimaryHDU      63   ()      
  1  SCI           1 ImageHDU        68   (4088, 4088)   float64   
  2  ERR           1 ImageHDU        68   (4088, 4088)   float32   
  3  DQ            1 ImageHDU        70   (4088, 4088)   int32 (rescales to uint32)   

This output lists the structure and contents of one example Roman TDS FITS image from the OpenUniverse2024 dataset. It shows that 18 image files were found in the selected directory, and the examined file contains four extensions: a primary header (no data) followed by three 4088×4088 pixel image planes labeled SCI, ERR, and DQ, which store the science image, per-pixel uncertainty, and data quality mask, respectively. For each extension, the output reports its type, data dimensions, and the first few header keywords to give you a sense of what is in the file.

Let’s take a look at a few images to see what we are dealing with.

Notebook Cell
<Figure size 1200x800 with 6 Axes>

2. Find a TDE target from the transient catalog

We use the OpenUniverse2024 transient input catalog — the same SNANA parquet files described in the SED Fitting tutorial — to find a TDE. The catalog stores one parquet file per HEALPix region, and TDEs are rare, so not every region will contain one. The catalog is split into three types of parquet files, each indexed by HEALPix region:

  1. snana_{region}.parquet — the transient source catalog, with one row per simulated event (supernovae, TDEs, etc.), including fields such as the event type (model_name) and the ID of the host galaxy (host_id)

  2. galaxy_{region}.parquet — the host galaxy catalog, with sky positions and physical properties for each galaxy

  3. galaxy_flux_{region}.parquet — multi-band photometry for each galaxy (used in the SED Fitting tutorial but not needed here)

TDEs are rare, so not every region will contain one. We use the known center of the Roman Time-Domain Survey to target the right region directly. We then cross-match the TDE’s host_id into the galaxy file to retrieve the host’s sky coordinates for the image search that follows.

First, we connect to S3 and list all available SNANA parquet files in the catalog.

Found 33 snana parquet files

Since our goal is to make a light curve for a TDE, we need to pick a SNANA parquet file that is covered by the Roman Time-Domain Survey (TDS).

'nasa-irsa-simulations/openuniverse2024/roman/full/roman_rubin_cats_v1.1.2_faint/snana_10307.parquet'

Next, we scan this file and find a row with model_name == "NON1ASED.TDE-BBFIT" that represents a TDE.

Found a TDE in region 10307 with the following info:
id                                110000037
ra                                11.026759
dec                              -43.406039
host_id                      10307000012568
gentype                                  42
model_name               NON1ASED.TDE-BBFIT
start_mjd                           62228.0
end_mjd                             62432.0
z_CMB                                0.2397
mw_EBV                                  0.0
mw_extinction_applied                 False
AV                                     -9.0
RV                                     -9.0
v_pec                                   0.0
host_ra                            11.02676
host_dec                         -43.406045
host_mag_g                           22.708
host_mag_i                            22.01
host_mag_F                           21.459
host_sn_sep                        0.021294
peak_mjd                          62240.375
peak_mag_g                        22.402536
peak_mag_i                        22.951426
peak_mag_F                        24.470018
lens_dmu                                0.0
lens_dmu_applied                      False
model_param_names          [template_index]
model_param_values                    [1.0]
MW_av                               0.02339
MW_rv                                   3.1
Name: 62959, dtype: object

Once we have the TDE, we load the corresponding galaxy info parquet file for that region. Then we identify its host galaxy(s) by matching the host ID in the TDE info with the galaxy IDs in the galaxy info.

Loading...

3. Image Access

Now we have the host galaxy’s position and ID in host_galaxy, ready for image queries. With those coordinates in hand, we then query the Roman image files that overlap this region, retrieving only the files needed for subsequent photometry and light-curve analysis.

Loading...
Notebook Cell

First, we find the filenames of the images in the Roman TDS survey which include the TDE host galaxy.

Notebook Cell
Accessing images in band=J129 for galaxy_id=10307000012568 at RA=11.027, Dec=-43.406 ...
done. Found 173 images.
Accessing images in band=H158 for galaxy_id=10307000012568 at RA=11.027, Dec=-43.406 ...
done. Found 166 images.

Since there are > 100 TDS images per band, we will:

  1. restrict to images taken during the TDE event window (start_mjd to end_mjd from the transient catalog) so the light curve focuses on the TDE itself rather than the full survey duration.

  2. filter out images where the host galaxy is close to the edge so that photometry is more reliable and partial cutouts can be avoided.

  3. select only an evenly time-sampled subset of images so that photometry is quicker to run.

Notebook Cell
Band J129, Galaxy 10307000012568: Downsampled 173 images to 9 images.
Band H158, Galaxy 10307000012568: Downsampled 166 images to 9 images.
Loading...

4. Make a Light Curve

This section demonstrates how to extract and visualize a light curve for a Tidal Disruption Event using simulated Roman images in two bands (J129 and H158). The first function, run_aperture_photometry(), performs simple circular aperture photometry on a set of FITS images from S3 using the astropy photutils package. The two plotting functions then compile these measurements into time-ordered plots showing how the observed flux evolves across multiple visits, providing a first look at temporal variability that could signal transient activity or host-galaxy changes.

Notebook Cell
Performing photometry in J129 for 9 sampled images for host galaxy at RA=11.027, Dec=-43.406 ...
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-04-04 21:20:09.600000' to '2029-04-04T21:20:09.600000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-05-09 18:57:36' to '2029-05-09T18:57:36''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-05-29 17:49:55.200000' to '2029-05-29T17:49:55.200000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-06-28 19:16:19.200000' to '2029-06-28T19:16:19.200000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-07-18 21:44:38.400000' to '2029-07-18T21:44:38.400000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-08-02 22:59:31.200000' to '2029-08-02T22:59:31.200000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-09-01 22:48:00' to '2029-09-01T22:48:00''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-10-01 21:20:09.600000' to '2029-10-01T21:20:09.600000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-10-21 20:06:43.200000' to '2029-10-21T20:06:43.200000''. [astropy.wcs.wcs]
done.
Performing photometry in H158 for 9 sampled images for host galaxy at RA=11.027, Dec=-43.406 ...
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-04-05 06:01:26.400000' to '2029-04-05T06:01:26.400000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-04-25 04:10:33.600000' to '2029-04-25T04:10:33.600000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-05-30 02:31:12' to '2029-05-30T02:31:12''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-06-24 03:20:09.600000' to '2029-06-24T03:20:09.600000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-07-09 04:35:02.400000' to '2029-07-09T04:35:02.400000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-08-03 07:03:21.600000' to '2029-08-03T07:03:21.600000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-08-28 08:05:16.800000' to '2029-08-28T08:05:16.800000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-09-22 06:44:38.400000' to '2029-09-22T06:44:38.400000''. [astropy.wcs.wcs]
done.
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-10-22 04:10:33.600000' to '2029-10-22T04:10:33.600000''. [astropy.wcs.wcs]
Loading...
Notebook Cell
Notebook Cell
<Figure size 600x400 with 1 Axes>
<Figure size 700x500 with 1 Axes>

5. Make Cutouts

We follow the example in this tutorial to display cutouts of the potential host galaxies as a function of time with the time listed in the cutout title.

Notebook Cell
Notebook Cell
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-04-04 21:20:09.600000' to '2029-04-04T21:20:09.600000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-05-09 18:57:36' to '2029-05-09T18:57:36''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-05-29 17:49:55.200000' to '2029-05-29T17:49:55.200000''. [astropy.wcs.wcs]
WARNING: FITSFixedWarning: 'datfix' made the change 'Changed DATE-OBS from '2029-06-28 19:16:19.200000' to '2029-06-28T19:16:19.200000''. [astropy.wcs.wcs]
<Figure size 900x600 with 6 Axes>

Each cutout is extracted from the larger detector image and then rotated to place North up. The blank regions in the corners are areas outside the original square cutout that become empty after rotation.

Acknowledgements

About this notebook

Authors: Jessica Krick, Jaladh Singhal, Brigitta Sipőcz

Updated: 2026-04-02

Contact: IRSA Helpdesk with questions or problems.

Runtime: As of the date above, this notebook takes about 250s to run to completion on a machine with 8GB RAM and 4 CPU.

AI Acknowledgement:

This tutorial was developed with the assistance of AI tools

References:

References
  1. Alarcon, A., Aldoroty, L., Beltz-Mohrmann, G., Bera, A., Blazek, J., Bogart, J., Braeunlich, G., Broughton, A., Cao, K., Chiang, J., Chisari, N. E., Desai, V., Fang, Y., Galbany, L., Hearin, A., Heitmann, K., Hirata, C., Hounsell, R., Jain, B., … Zhang, T. (2025). OpenUniverse2024: a shared, simulated view of the sky for the next generation of cosmological surveys. Monthly Notices of the Royal Astronomical Society, 544(4), 3799–3823. 10.1093/mnras/staf1833