template_lsq¶
- eazy.photoz.template_lsq(fnu_i, efnu_i, A, TEFz, zp, ndraws, fitter)[source]¶
This is the main least-squares function for fitting templates to photometry at a given redshift
- Parameters:
- fnu_iarray (NFILT)
Flux densities, including extinction and zeropoint corrections
- efnu_iarray (NFILT)
Uncertainties, including extinction and zeropoint corrections
- Aarray (NTEMP, NFILT)
Design matrix of templates integrated through filter bandpasses at a particular redshift, z (not specified but implicit)
- TEFzarray (NFILT)
TemplateError
evaluated at same redshift asA
.- zparray (NFILT)
Multiplicative zeropoint corrections needed to back out from
efnu_i
and test for valid data- ndrawsint
If > 0, take
ndraws
random coefficient draws from fit covariance matrix- fitterstr
Template fitting method. The only stable option so far is ‘nnls’ for non-negative least squares with
scipy.optimize.nnls
, other options under development (e.g, ‘bounded’, ‘regularized’).
- Returns:
- chi2_ifloat
Chi-squared of the fit
- coeffsarray (NTEMP)
Template coefficients
- fmodelarray (NFILT)
Flux densities of the best-fit model
- coeffs_drawarray (
ndraws
, NTEMP) Random draws from covariance matrix, if
ndraws
> 0