Code Documentation¶
IO module¶
-
delight.io.
getDataFromFile
(params, firstLine, lastLine, prefix='', ftype='catalog', getXY=True, CV=False)[source]¶ Returns an iterator to parse an input catalog file. Returns the fluxes, redshifts, etc, and also GP inputs if getXY=True.
-
delight.io.
parseParamFile
(fileName, verbose=True, catFilesNeeded=True)[source]¶ Parser for configuration inputtype parameter files, see examples for details. A bunch of them ar parsed.
-
delight.io.
readBandCoefficients
(params)[source]¶ Read band/filter information, in particular the Gaussian Mixture coefs.
Photo-z GP module¶
Photo-z kernels module¶
Utils module¶
-
delight.utils.
CIlevel
(redshiftGrid, PDF, fraction, numlevels=200)[source]¶ Computes confidence interval from PDF.
-
class
delight.utils.
approx_DL
[source]¶ Approximate luminosity_distance relation, agrees with astropy.FlatLambdaCDM(H0=70, Om0=0.3, Ob0=None) better than 1%
-
delight.utils.
approx_flux_likelihood
(f_obs, f_obs_var, f_mod, ell_hat=0, ell_var=0, f_mod_covar=None, marginalizeEll=True, normalized=False, renormalize=True, returnChi2=False, returnEllML=False)[source]¶ Approximate flux likelihood, with scaling of both the mean and variance. This approximates the true likelihood with an iterative scheme.
-
delight.utils.
computeMetrics
(ztrue, redshiftGrid, PDF, confIntervals)[source]¶ Compute various metrics on the PDF
-
delight.utils.
random_X_bzl
(size, numBands=5, redshiftMax=3.0)[source]¶ Create random (but reasonable) input space for photo-z GP
-
delight.utils.
random_filtercoefs
(numBands, numCoefs)[source]¶ Create random (but reasonable) coefficients describing numBands photometric filters as sum of gaussians
-
delight.utils.
random_hyperparams
()[source]¶ Create random (but reasonable) hyperparameters for photo-z GP