Luminosity functions (simqso.lumfun)


simqso.lumfun.interp_dVdzdO(zrange, cosmo)[source]

Interpolate the differential comoving solid volume element \((dV/dz){d\Omega}\) over zrange = \((z_1,z_2)\). Much faster than full calculation without significant loss in accuracy.

zrange : tuple

Redshift range for interpolation.

cosmo : astropy.cosmology.Cosmology
simqso.lumfun.doublePL_Lintegral(x, a, b)[source]

Indefinite integral of a double power law function \(f(x,a,b) = (x^a + x^b)^{-1}\).

simqso.lumfun.integrateDPL(Mrange, logPhiStar, MStar, alpha, beta)[source]

Integrate a double power law luminosity function of the form

\[\Phi(M,z){dM}{dz} = \frac{\Phi^*{dM}{dz}}{10^{0.4(\alpha+1)(M-M^*)} + 10^{0.4(\beta+1)(M-M^*)}}\]

over the range Mrange = \((M_\mathrm{min}, M_\mathrm{max})\).

class simqso.lumfun.QlfEvolParam(par, fixed=False, z0=0.0)[source]

Bases: object

A redshift-evolving parameter in a luminosity function.

par : sequence

initial values

fixed : bool or sequence

False means none, True means all, otherwise same shape as x

z0 : float

evaluate at z-z0; i.e., z0=-1 means (1+z), z0=6 means (z-6.0)

set(val, i=None)[source]
eval_at_z(z, par=None)[source]
class simqso.lumfun.PolyEvolParam(par, fixed=False, z0=0.0)[source]

Bases: simqso.lumfun.QlfEvolParam

A luminosity function parameter that evolves with redshift according to a polynomial function.

eval_at_z(z, par=None)[source]
class simqso.lumfun.LuminosityFunction(cosmo=None)[source]

Bases: object

eval_par_at_z(z, par=None)[source]
logPhi(M, z, *args)[source]
Phi(M, z, *args)[source]
set_param_bounds(paramName, paramBounds)[source]
class simqso.lumfun.DoublePowerLawLF(logPhiStar=None, MStar=None, alpha=None, beta=None, **kwargs)[source]

Bases: simqso.lumfun.LuminosityFunction

logPhi(M, z, par=None)[source]
sample_from_fluxrange(mrange, zrange, kcorr, p=None, **kwargs)[source]
sample_from_Lrange(Mrange, zrange, p=None, **kwargs)[source]
sample_at_flux_intervals(mrange, zbins, Nintervals, nPerBin, kcorr, p=None)[source]
integrate(mrange, zrange, kcorr, p=None)[source]
ionizing_emissivity(z, Mrange, p=None, **kwargs)[source]
class simqso.lumfun.SinglePowerLawLF(logPhiStar=None, alpha=None, **kwargs)[source]

Bases: simqso.lumfun.LuminosityFunction

logPhi(M, z, par=None)[source]
class simqso.lumfun.SchechterLF(logPhiStar=None, MStar=None, alpha=None, **kwargs)[source]

Bases: simqso.lumfun.LuminosityFunction

logPhi(M, z, par=None)[source]
simqso.lumfun.arr_between(a, b)[source]
class simqso.lumfun.QuasarSurvey(m, z, m_lim, skyArea, m2M)[source]

Bases: object

A collection of quasars formed with uniform selection criteria.

m : apparent magnitudes of objects
z : redshifts
m_lim : limiting apparent magnitude of survey
skyArea : area of survey in deg^2
m2M : f(m,z,inverse=False)

function taking apparent mag and redshift as arguments, along with a keyword “inverse”, and returning the conversion from apparent mag to absolute mag, or the reverse if inverse=True. Must include both cosmological and k-corrections, i.e., \(M = m - \mathrm{m2M}(m,z) = m - DM(z) - K(m,z)\) and \(m = M + \mathrm{m2M}(M,z,\mathrm{inverse=True})\) Allows for luminosity-dependent k-corrections.

static init_lf_table(Mbins, zbins)[source]
getinbounds(Medges, zedges)[source]
calcBinnedLF(Medges, zedges, **kwargs)[source]

Calculate binned luminosity function from the stored survey data.

Medges : array defining bin edges in absolute mag
zedges : array defining bin edges in redshift
class simqso.lumfun.QLFIntegrator(Mrange, zrange, dVdzdO)[source]

Bases: object

class simqso.lumfun.FullQLFIntegrator(Mrange, zrange, dVdzdO, **kwargs)[source]

Bases: simqso.lumfun.QLFIntegrator

class simqso.lumfun.FastQLFIntegrator(Mrange, zrange, dVdzdO, **kwargs)[source]

Bases: simqso.lumfun.QLFIntegrator

class simqso.lumfun.FasterQLFIntegrator(Mrange, zrange, dVdzdO, **kwargs)[source]

Bases: simqso.lumfun.QLFIntegrator

simqso.lumfun.joint_qlf_likelihood_fun(par, surveys, lfintegrator, Phi_Mz, verbose)[source]
class simqso.lumfun.FitMethod[source]

Bases: object

class simqso.lumfun.NelderMeadFit(verbose=False)[source]

Bases: simqso.lumfun.FitMethod

class simqso.lumfun.JointQLFFitter(Mrange, zrange, cosmo, qlfModel, **kwargs)[source]

Bases: object

set_integrate_mode(mode, integrate_kwargs={})[source]
fit(surveys, qlfModel=None, initVals=None)[source]
getS(surveys, qlfModel=None, par=None)[source]
varyFitParam(paramName, surveys, ntry=None, logRange=None)[source]
sampleModels(sigParam, surveys, n=100)[source]
simqso.lumfun.deltaPhi(z, cosmo2, cosmo1)[source]

n/V’ = (n/V)*(V/V’)

simqso.lumfun.deltaLogPhi(n/V') = log[(n/V)*(V/V')] = log(n/V) + log(V/V')[source]
simqso.lumfun.deltaM(z, cosmo2, cosmo1)[source]

m = M + DM = M’ + DM’ –> M’ = M + (DM - DM’)

Inheritance diagram of simqso.lumfun