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
Sampleof SNe Ia (x1=0,c=0, seeSample.from_sneia) evenly spread overredshift_rangeis set up to reachsnr, 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,snris given per spectral resolution element, otherwise per wavelength bin. Default is True.redshift_range (
listoffloat, optional) – Redshift range[z_min, z_max]of the reference sample. Default is[0.01, 1.5].ntrails (
int, optional) – Number of redshifts sampled inredshift_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