snsim.salt_utils
¶
Contains function related to SALT model.
Module Contents¶
Functions¶
|
X1 distribution redshift dependant model from Nicolas et al. 2021. |
|
|
|
|
|
Convert x0,x1,c covariance into mB,x1,c covariance. |
|
Compute fit error on flux from sncosmo fit covariance x0,x1,c. |
- snsim.salt_utils.n21_x1_model(z, seed=None)[source]¶
X1 distribution redshift dependant model from Nicolas et al. 2021.
- snsim.salt_utils.compute_salt_fit_error(fit_model, cov, band, time_th, zp, magsys='ab')[source]¶
Compute fit error on flux from sncosmo fit covariance x0,x1,c.
- Parameters:
fit_model (sncosmo.Model) – The model used to fit the sn lightcurve.
cov (numpy.ndarray(float, size=(3,3))) – sncosmo x0,x1,c covariance matrix from SALT fit.
band (str) – The band in which the error is computed.
time_th (numpy.ndarray(float)) – Time for which compute the flux error.
zp (float) – zeropoint to scale the error.
magsys (str) – Magnitude system to use.
- Returns:
Flux error for each input time.
- Return type:
Notes
Compute theorical fluxerr from fit \(err = \sqrt{COV}\) where \(COV = J^T COV(x0,x1,c) J\) with \(J = (dF/dx0, dF/dx1, dF/dc)\) the jacobian.
\[F_{norm} = \frac{x_0}{1+z} \int_\lambda \left(M_0(\lambda_s, p) + x_1 M_1(\lambda_s, p)\right)\ 10^{-0.4cCL(\lambda_s)}T_b(\lambda) \frac{\lambda}{hc} d\lambda \times \text{NF}\]where the Norm Factor is \(\text{NF} = 10^{0.4(ZP_{norm} -ZP_{magsys})}\).
We found :
\[\frac{dF}{dx_0} = \frac{F}{x_0}\]\[\frac{dF}{dx_1} = \frac{x_0}{1+z} \int_\lambda M_1(\lambda_s, p) * 10^{-0.4cCL(\lambda_s)}\ T_b(\lambda)\frac{\lambda}{hc} d\lambda \times \text{NF}\]\[\frac{dF}{dc} = -\frac{\ln(10)}{2.5}\frac{x_0}{1+z} \int_\lambda \left(M_0(\lambda_s, p) + x_1 M_1(\lambda_s, p)\right)\ CL(\lambda_s)10^{-0.4 c CL(\lambda_s)}T_b(\lambda) \frac{\lambda}{hc} d\lambda \times \text{NF}\]