build_exptime_estimator

build_exptime_estimator#

build_exptime_estimator(snr, per_resolution=True, redshift_range=[0.01, 1.5], ntrails=20, **kwargs)[source]#

Build an interpolator of the SN Ia exposure time as a function of redshift.

A reference Sample of SNe Ia (x1=0, c=0, see Sample.from_sneia) evenly spread over redshift_range is set up to reach snr, and a smoothing spline is fitted to the resulting exposure times.

Parameters:
  • snr (float) – Target signal-to-noise ratio.

  • per_resolution (bool, optional) – If True, snr is given per spectral resolution element, otherwise per wavelength bin. Default is True.

  • redshift_range (list of float, optional) – Redshift range [z_min, z_max] of the reference sample. Default is [0.01, 1.5].

  • ntrails (int, optional) – Number of redshifts sampled in redshift_range. Default is 20.

  • **kwargs – Goes to Sample.setup_to_snr (e.g. lbda_range, frame).

Returns:

scipy.interpolate.BSpline – Smoothing spline giving the exposure time in seconds as a function of redshift.

Examples

>>> estimator = build_exptime_estimator(10, ntrails=5)
>>> exptime = estimator(0.8)  # in seconds