Library of functions to estimate luminosity functions¶
This class is dedicated to estimating the luminosity functions of emission lines
The class LineLuminosityFunction is dedicated to measuring the line luminosity functions. The class ModelLuminosityFunction is dedicated to fitting models to the LFs.
-
class
LineLuminosityFunction.
LineLuminosityFunction
(lineWavelength=3727.4228417998916, lineName='O2_3728', cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[ 0. 0. 0.06] eV, Ob0=0.0486), surveyName='DEEP2', redshift_catalog='zcat.deep2.dr4.v2.LFcatalog.fits', SNlimit=5.0, luminosityBins=array([ 1.00000000e+38, 1.38949549e+38, 1.93069773e+38, 2.68269580e+38, 3.72759372e+38, 5.17947468e+38, 7.19685673e+38, 1.00000000e+39, 1.38949549e+39, 1.93069773e+39, 2.68269580e+39, 3.72759372e+39, 5.17947468e+39, 7.19685673e+39, 1.00000000e+40, 1.38949549e+40, 1.93069773e+40, 2.68269580e+40, 3.72759372e+40, 5.17947468e+40, 7.19685673e+40, 1.00000000e+41, 1.38949549e+41, 1.93069773e+41, 2.68269580e+41, 3.72759372e+41, 5.17947468e+41, 7.19685673e+41, 1.00000000e+42, 1.38949549e+42, 1.93069773e+42, 2.68269580e+42, 3.72759372e+42, 5.17947468e+42, 7.19685673e+42, 1.00000000e+43, 1.38949549e+43, 1.93069773e+43, 2.68269580e+43, 3.72759372e+43, 5.17947468e+43, 7.19685673e+43, 1.00000000e+44, 1.38949549e+44, 1.93069773e+44, 2.68269580e+44, 3.72759372e+44, 5.17947468e+44, 7.19685673e+44, 1.00000000e+45]), Nstack=400, Nclustering=400, outputFolder='emissionLineLuminosityFunctions/', zmin=0.6, zmax=0.8)[source] The line luminosity function class :param lineWavelength: restframe wavelength in the air :param lineName: name of the line used in the catalogs. :param cosmology: cosmology used (astropy class) Default H0=70,Omega matter=0.3 :param surveyName: Name of the survey used (needs to be the one given in the database) :param redshift_catalog: name of the redshift catalog :param SNlimit: signal to noise ratio limit. For a line measurement to be included SN of the line must be greater than SNlimit. :param luminosityBins: bins in luminosity equally spaced in log space. :param Nstack: number of spectra per stack :param Nclustering: number of spectra per clustering sample from the brightest to the faintest :param outputFolder: folder where the results will be written :param zmin: minimum redshift included :param zmax: maximum redshift included
-
computeHistogramLF
(sel)[source]¶ Computes the weighted and unweighted histogram to get the number density and Poisson errors. :param sel: array selecting the galaxies of interest in the catalog (Boolean). Returns Weighted density, Error on the weighted density, Number of galaxies used in eacah bin, the luminosity bins. It stores the values in self.LF, self.LFerr_poisson, self.ngals. It also evaluates the mean luminosity in each luminosity bin self.xL and dlogL to obtain the LF
-
computeHistogramVariance
(sel, jk=0.1)[source]¶ Computes the variance of the histogram using N subsamples. :param sel: array selecting the galaxies of interest in the catalog (Boolean). :param jk: percentage of the data set removed in each realization. Stores the values in self.LFerr_jackknife
-
correctVolumeEffect
(mCorr, error)[source]¶ corrects from the volume effect on the measurement and the error estimation
-
get_completness_limit
(sel)[source]¶ Estimates the completeness. It maps the maximum of the EW distribution to a Luminosity limit.
-
setRedshiftArray
(redshiftColumn='ZBEST')[source]¶ sets the redshift array :param redshiftColumn: column of the catalog corresponding to the redshift. Stores it in self.redshift.
-
setRedshiftSelection
(redshiftQualityColumn='ZQUALITY', upperBound=0.9, lowerBound=7.0)[source]¶ sets the redshift selection :param redshiftQualityColumn: column of the catalog corresponding to the quality of the redshifts. :param lowerBound : lower bound to redshift quality : zquality > lowerBound :param upperBound : upper bound to the redshift quality : zquality < upperBound Stores it in self.redshiftSelection.
-
-
class
LineLuminosityFunction.
ModelLuminosityFunction
(lineWavelength=3727.4228417998916, lineName='O2_3728', cosmology=FlatLambdaCDM(name="Planck15", H0=67.7 km / (Mpc s), Om0=0.307, Tcmb0=2.725 K, Neff=3.05, m_nu=[ 0. 0. 0.06] eV, Ob0=0.0486), LF_file_list=[], model='Saunders', p0=[1.0], outputDirectory='', fileName='', fixedSigma=0.5, fixedAlpha=-1.5)[source] The model luminosity function class :param lineWavelength: restframe wavelength in the air :param lineName: name of the line used in the catalogs. :param cosmology: cosmology used (astropy class) Default H0=70,Omega matter=0.3 :param LF_file_list: list of LF_files. Each entry is a list of 2 files, the fits file (data used to derivee the LF) and the txt file (LF). :param model: Model to be fitted : Saunders, Saunders3P, or Schechter, DoublePL :param p0: Initial guess of the parameters :param outputDirectory: where to output the fits :param fileName: file name where things are saved.