Skip to content
Roman-Supernova-PITPublic

About

STRIDER inference for Roman supernova spectra: classification, redshift, and evidence maps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

STRIDER

STRIDER identifies transients from their Roman prism spectra. For each transient it gives the probability of each class, the redshift with its range, and how clearly the best match beats the others.

STRIDER is in active development: its models and outputs may change between versions.

How STRIDER works: the spectra are compared with each class as a combined spectrum and as brightness in four bands over time; the two comparisons are added, then weighted by how common each class is.

STRIDER compares the visits' combined spectrum with each class at every redshift, and each visit's brightness in four bands with each class's light curves. It adds the two, then weights the result by how common each class is.

In and out

  • In: each visit's date (MJD), wavelengths (Å), flux and its error, as a CSV or Parquet file, an astropy or pandas table, or Roman SMDC files. Optionally, a host redshift, a redshift range or the classes to allow.
  • Out: the probability of each of 15 classes, the redshift with its 68% range, how strong the match is and any warnings, as a printed report, a Parquet, CSV or JSON file, and a figure.

Install

git clone https://github.com/Roman-Supernova-PIT/strider.git && cd strider
pip install torch --index-url https://download.pytorch.org/whl/cpu
pip install .

Example

import strider

model = strider.load_model()  # downloads the model the first time
result = model.classify(strider.load_example())
print(result)
result.plot("example.png")
STRIDER: transient
Class     Ia 100%
Redshift  0.869 (100% within 0.1), 68% range 0.864–0.873
Match     high
Data      11 visits over 100 days, S/N 4.8

The example is a simulated SN Ia at redshift 0.868. Its figure:

The example's figure: the class, redshift, match and data in a box at the top; below, its spectra, the best match's model spectrum, its brightness in four bands, every class at every redshift, and the class and redshift probabilities.

For your own transient, make a CSV file with one row per pixel and the columns mjd, wavelength, flux and error, then run:

strider classify my_transient.csv

Many transients

Put them in a parquet table with one row per visit, then run:

strider classify spectra.parquet -o results.parquet --workers 8

It saves as it goes, so a run that stops carries on with --resume, and --job K/N splits a run into jobs. strider info results.parquet shows how a run was made.

Documentation | How it works | Tutorial | Issues | Cite Dixon et al. (in prep.) | BSD 3-Clause licence | By the Roman Supernova Project Infrastructure Team

About

STRIDER inference for Roman supernova spectra: classification, redshift, and evidence maps.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages