slicersim#

Realistic simulations of integral field spectrograph observations.

slicersim turns a spectrum on the sky into the spectrum you would actually measure: it propagates a scene through the telescope, the spectrograph and the detector, adds every noise source, and tells you how long you need to expose to reach a given signal-to-noise.

It is the reference simulator of the Lazuli Space Observatory image slicer, but its core is generic and applies to any slicer or micro-lens array IFU.

import slicersim

sn = slicersim.LazuliSupernova(redshift=1.0, x1=0, c=0.2, phase=1.5)
sn.setup_to_snr(20)                                 # choose the detector read-out
exptime = sn.get_exposure_time()                    # [s]
lbda, flux, variance = sn.get_spectrum(unit="flambda")
Two simulated Lazuli spectra of a Type Ia supernova, at z = 0.8 and z = 1.2, with their 1-sigma uncertainties.
Exposure time calculator

One call gives the exposure time and read-out mode needed to reach a requested signal-to-noise, for any target.

Realistic spectra and cubes

Noisy spectra, 3D cubes and detector images, with photon, read-out, dark, thermal and background noise all accounted for.

Built-in astrophysical sources

Type Ia supernovae (SALT, Twins-Embedding), kilonovae (POSSIS), CalSpec standards, black bodies, power laws, or your own spectrum.

Every knob is accessible

Change the detector, the spectrograph sampling, the throughput or the scene, and see at once how each noise source contributes.

Installation#

pip install slicersim

See Installation for development installs.

Where to go next#

Getting started

A five-minute tour: build a target, reach a signal-to-noise and get a realistic spectrum.

Getting started
Tutorials

Notebooks, from first exposure time calculations to custom scenes and detector read-out modes.

Tutorials
The Lazuli instrument model

Fields, detector, throughput and noise: what the simulations assume, and how to change it.

The Lazuli instrument model
API reference

Every public class and function, grouped by what it does.

API reference

Citing slicersim#

If slicersim is useful for your work, please cite Rigault et al. (2026) (arXiv:2607.06391); the BibTeX entry can be exported from the linked page.

slicersim is developed by M. Rigault, building on the original MLAPerf simulator by Y. Copin and M. Rigault. It is open source (Apache 2.0) and hosted on GitHub: bug reports and contributions are welcome.