uvex_transients.transients.LFBOTs.LuminousFastBlueOpticalTransient.luminosity_function#
- LuminousFastBlueOpticalTransient.luminosity_function(bandpass: SpectralElement, n: int, *, quantity: str = 'luminosity', bins: int | ArrayLike | Quantity = 30, t: Quantity | None = None, t_min: Quantity | None = None, t_max: Quantity | None = None, n_time: int | None = None, spacing: str = 'log', confidence: float = 0.6827, rng: Generator | int | None = None) QTable#
Estimate the luminosity function of this transient class in a band, by drawing events from its SED priors.
nevents are drawn, the peak of each one’s rest-frame band light curve is measured (see ~uvex_transients.models.core.base.SpectralModel.sample_peak_luminosities), and the peaks are binned. The result is the normalized distribution of peak luminosity, not a volumetric rate density: multiply thepdfby ExtragalacticTransient.rate (orrate * rate_shape(z)) for events per volume, time and luminosity. Whethernis enough is for the caller to judge from the intervals of the bins.- Parameters:
bandpass (
SpectralElement) – The band, for examplemission.detector.bandpasses["FUV"].n (
int) – Number of events to draw.quantity (
{"luminosity", "magnitude"}, optional) – What the function is of."luminosity"is the peak band luminosity \(L\) in erg/s, andpdfis \(\mathrm{d}N/\mathrm{d}L\) per event, in 1/(erg/s)."magnitude"is the absolute AB magnitude \(M\) of that peak, brightest first, andpdfis \(\mathrm{d}N/\mathrm{d}M\) per event, in 1/mag. \(M\) is the magnitude at 10 pc of a spectrum flat in \(L_\nu\) with that band luminosity (see ~uvex_transients.utils.phot_utils.luminosity_to_absolute_magnitude), so it is a monotonic conversion of \(L\), not the photon-weighted band magnitude of the SED.bins (
intorarray-likeorQuantity, optional) – Either the number of bins, which span the sample (equally spaced in \(\log L\) for luminosities, so that the bins are not all empty but one, and equally spaced in \(M\) for magnitudes), or the bin edges, increasing, in erg/s or magnitudes. The density is per unit \(L\) or \(M\) either way.t (
Quantity, optional) – Rest-frame times since explosion at which the light curves are evaluated, shape(T,). If given, the four arguments below are ignored. See ~uvex_transients.models.core.base.SpectralModel.sample_peak_luminosities.t_min (
Quantity, optional) – Start of the grid of times. If None (the default), usesconfig["phase_space.overlay.t_min"]days.t_max (
Quantity, optional) – End of the grid of times. If None (the default), usesconfig["phase_space.overlay.t_max_factor"]times DEFAULT_DURATION.n_time (
int, optional) – Number of points of the grid. If None (the default), usesconfig["phase_space.overlay.n_time"].spacing (
{"log", "linear"}, optional) – How the grid is spaced between t_min and t_max.confidence (
float, optional) – Confidence level of the intervals, 68.27% (one sigma) by default.rng (
numpy.random.Generator,int, orNone, optional) – Random-number source for the draws.
- Returns:
One row per bin: its edges
loandhi;count, the number of thenevents in it, with the intervalcount_loandcount_hion the count thatnevents give; andpdf, the normalized density withpdf_loandpdf_hi. Events with no peak, or a peak of no light, are dropped before binning.metaholds the class name,quantity,n(as asked),n_validandconfidence; the density is normalized ton_valid.- Return type:
- Raises:
ValueError – If quantity is not recognised, bins is invalid, or no event has a measurable peak.