API reference#

Objects are grouped by what they do, from the highest to the lowest level. Everything listed under Top-level API is importable directly from slicersim (e.g. slicersim.LazuliSupernova). The Module index page lists every module with all its content.

Top-level API#

Exposure time calculators#

lazuli_etc

Compute the exposure time needed to reach a given SNR on any spectrum.

lazuli_sn_etc

Compute the exposure time needed to reach a given SNR on a SN Ia.

Lazuli fields#

The "narrow" and "wide" fields are defined in slicersim.lazuli.SPECTROGRAPH_FIELD. The current field sets the throughput curve used by the spectrograph.

spectroconfig_to_fieldname

Get the Lazuli field name matching a spectrograph spaxel configuration.

Lazuli targets#

LazuliSupernova

A Type Ia supernova observed with Lazuli.

LazuliKilonova

A kilonova observed with Lazuli.

LazuliCalSpec

An HST CalSpec spectrophotometric standard star observed with Lazuli.

LazuliBlackBody

A black body point source observed with Lazuli.

LazuliPowerLaw

A power-law point source observed with Lazuli.

LazuliTarget

Any spectrum observed with Lazuli, as a point source.

Simulation and configuration#

Simulation

Main class to simulate an observation.

get_config

Read the scene and instrument configuration files.

Populations and calibrations#

Sample

A collection of targets handled together.

Lazuli3DFlat

Lazuli 3D flat-field calibration target.

Instrument-agnostic targets#

Base classes of the Lazuli* targets, to use with another instrument configuration.

VirtualTarget

Base class of all targets (see child classes).

Target

Point source target with an arbitrary input spectrum.

Supernova

Type Ia supernova point source target.

Kilonova

Kilonova point source target.

CalSpec

HST CalSpec spectrophotometric standard star target.

BlackBody

Black body point source target.

PowerLaw

Power-law point source target.

VirtualLazuliTarget

Mixin adding the Lazuli instrument and its two fields to a target.

Scene#

get_scene

Get a scene configuration.

Scene

Scene description.

SceneElement

Base class for scene elements.

PointSource

An unresolved scene element with a position.

Background

Spatially flat background scene element (e.g. zodiacal light).

Host

Structured background representing the host galaxy of the observed target.

Source models (slicersim.scene.sources):

get_snia_pointsource

Get a generic configuration for a SN Ia point source.

get_kilonova_pointsource

Get a generic configuration for a kilonova point source.

get_calspec_pointsource

Get the point source configuration of a CalSpec standard star.

get_blackbody_flux

Get the flux of a blackbody source.

get_powerlaw_flux

Get the flux of a power-law source.

CalSpecSource

Access to the HST CalSpec spectrophotometric standard stars.

Instrument#

Telescope

Telescope: collecting area, mirror thermal emission and Airy PSF.

SlicerSpectrograph

Image-slicer spectrograph, with anamorphosis.

MLASpectrograph

Micro-lens array (MLA) spectrograph.

OpticsThroughput

Throughput of the optical elements.

Detector

Near-infrared detector read out in MACC (up-the-ramp) mode.

ThermalOptics

Thermal emission of a set of optical elements.

ThermalRadiation

Black body thermal radiation of telescope and instrument components.

SlicerMapper

Map between detector pixel coordinates and IFS slicer coordinates.

Configuration files#

read_config

Read a single configuration file.

read_calspec

Read a CalSpec reference flux FITS file.