elisa.infer.results#
Subsequent analysis of maximum likelihood or Bayesian fit.
- class FitResult(helper: Helper)[source]#
Bases:
ABCFit result.
Attributes
Methods
load(path[, decompress])Load a previously saved fit result.
save(path[, compress])Save the fit result to a file.
summary([file])Print the summary of fit result.
eiso
flux
lumin
- summary(file=None) None[source]#
Print the summary of fit result.
- Parameters:
- file: file-like
An object with a
write(string)method. This is passed toprint().
- save(path: str, compress: Literal['gzip', 'bz2', 'lzma'] = 'gzip', **kwargs: dict) None[source]#
Save the fit result to a file.
- Parameters:
- path
str The file path to save fit result.
- compress{‘gzip’, ‘bz2’, ‘lzma’}
The compression algorithm to use.
- **kwargs
dict Extra parameters passed to
gzip.open(),bz2.open(), orlzma.open().
- path
- class MLEResult(minuit: Minuit, helper: Helper)[source]#
Bases:
FitResultResult of maximum likelihood fit.
Attributes
Akaike information criterion with sample size correction.
Bayesian information criterion.
Deviance of the model at MLE.
dofDegree of freedom.
Goodness of fit p-value.
MLE and error of parameters.
ndataData points number.
Result plotter.
Fit status of Minuit.
Methods
boot([n, seed, parallel, n_parallel, ...])Preform parametric bootstrap.
ci([cl, params, fn, method, rtol, parallel])Calculate confidence intervals.
covar([params, fn, method, parallel])Calculate covariance matrix.
eiso(emin_rest, emax_rest, z, duration, cl, ...)Calculate the isotropic emission energy of model.
flux(emin, emax[, energy, cl, method, ...])Calculate the flux of model.
load(path[, decompress])Load a previously saved fit result.
lumin(emin_rest, emax_rest, z, cl, method, ...)Calculate the luminosity of model.
save(path[, compress])Save the fit result to a file.
summary([file])Print the summary of fit result.
- property plot: MLEResultPlotter#
Result plotter.
- boot(n: int = 10000, seed: int | None = None, parallel: bool = True, n_parallel: int | None = None, progress: bool = True, update_rate: int = 50)[source]#
Preform parametric bootstrap.
- Parameters:
- n
int, optional Number of parametric bootstraps based on the MLE. The default is 10000.
- seed
int, optional The seed of random number generator used in parametric bootstrap.
- parallelbool, optional
Whether to run simulation fit in parallel. The default is True.
- n_parallel
int, optional Number of parallel processes to use when parallel is
True. Defaults tojax.local_device_count().- progressbool, optional
Whether to display progress bar. The default is True.
- update_rate
int, optional The update rate of progress bar. The default is 50.
- n
- covar(params: str | Sequence[str] | None = None, fn: dict[str, Callable] | None = None, method: Literal['hess', 'boot'] = 'hess', parallel: bool = True) ParamsCovar[source]#
Calculate covariance matrix.
- Parameters:
- params
stror sequenceofstr, optional Parameters to calculate covariance matrix. If not specified, calculate for parameters of interest.
- fn
dict A dict containing functions to calculate the covariance matrix. The keys are the names of the function results, and the values are the functions whose input is a dict of model parameters.
- method{‘hess’, ‘boot’}, optional
Method used to calculate covariance. Available options are:
'hess': inverse of Hessian matrix from Minuit'boot': calculate covariance based on bootstrap samples,MLEResult.boot()must be called before using this method.
The default is
'hess'.- parallelbool, optional
Whether to evaluate fn in parallel when method is
'boot'. The default is True.
- params
- Returns:
ParamsCovarThe covariance matrix.
- ci(cl: float | int = 1, params: str | Iterable[str] | None = None, fn: dict[str, Callable] | None = None, method: Literal['profile', 'boot'] = 'profile', rtol: float | dict[str, float] = 1e-06, parallel: bool = True) ConfidenceInterval[source]#
Calculate confidence intervals.
- Parameters:
- cl
floatorint, optional Confidence level for the confidence interval. If 0 < cl < 1, the value is interpreted as the confidence level. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% confidence interval. The default is 1.- params
stror sequenceofstr, optional Parameters to calculate confidence intervals. If not specified, calculate for parameters of interest.
- fn
dict, optional A dict containing functions to calculate the confidence intervals. The keys are the names of the function results, and the values are the functions whose input is a dict of model parameters.
- method{‘profile’, ‘boot’}, optional
Method for calculating confidence intervals. Available options are:
'profile': use Minos algorithm of Minuit to find the confidence intervals based on the profile likelihood'boot': use parametric bootstrap method to calculate the confidence intervals.MLEResult.boot()must be called before using this method.
The default is
'profile'.- rtol
float, ordictoffloat, optional The relative tolerance in determining the value of composite parameters and fn when method is
'profile'. The default is 1e-6.- parallelbool, optional
Whether to evaluate fn in parallel when method is
'boot'. The default is True.
- cl
- Returns:
ConfidenceIntervalThe confidence intervals.
- flux(emin: float | int, emax: float | int, energy: bool = True, cl: float | int = 1, method: Literal['profile', 'boot'] = 'profile', ngrid: int = 1000, comps: bool = False, log: bool = True, params: dict[str, float | int] | None = None) MLEFlux[source]#
Calculate the flux of model.
Warning
The flux is calculated by trapezoidal rule, and is accurate only if enough numbers of energy grids are used.
- Parameters:
- emin
floatorint Minimum value of energy range, in units of keV.
- emax
floatorint Maximum value of energy range, in units of keV.
- energybool, optional
When True, calculate energy flux in units of erg cm⁻² s⁻¹; otherwise calculate photon flux in units of ph cm⁻² s⁻¹. The default is True.
- cl
floatorint, optional Confidence level for the confidence interval. If 0 < cl < 1, the value is interpreted as the confidence level. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% confidence interval. The default is 1.- method{‘profile’, ‘boot’}, optional
Method for calculating confidence intervals. Available options are:
'profile': use Minos algorithm of Minuit to find the confidence intervals based on the profile likelihood'boot': use parametric bootstrap method to calculate the confidence intervals.MLEResult.boot()must be called before using this method.
The default is
'profile'.- ngrid
int, optional The energy grid number to use in integration. The default is 1000.
- emin
- Returns:
MLEFluxThe flux of the model.
- Other Parameters:
- lumin(emin_rest: float | int, emax_rest: float | int, z: float | int, cl: float | int = 1, method: Literal['profile', 'boot']='profile', ngrid: int = 1000, comps: bool = False, log: bool = True, params: dict[str, float | int] | None=None, cosmo: LambdaCDM = FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897)) MLELumin[source]#
Calculate the luminosity of model.
Warning
The luminosity is calculated by trapezoidal rule, and is accurate only if enough numbers of energy grids are used.
- Parameters:
- emin_rest
floatorint Minimum value of rest-frame energy range, in units of keV.
- emax_rest
floatorint Maximum value of rest-frame energy range, in units of keV.
- z
floatorint Redshift of the source.
- cl
floatorint, optional Confidence level for the confidence interval. If 0 < cl < 1, the value is interpreted as the confidence level. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% confidence interval. The default is 1.- method{‘profile’, ‘boot’}, optional
Method for calculating confidence intervals. Available options are:
'profile': use Minos algorithm of Minuit to find the confidence intervals based on the profile likelihood'boot': use parametric bootstrap method to calculate the confidence intervals.MLEResult.boot()must be called before using this method.
The default is
'profile'.- ngrid
int, optional The energy grid number to use in integration. The default is 1000.
- emin_rest
- Returns:
MLELuminThe luminosity of the model.
- Other Parameters:
- compsbool, optional
Whether to return the result of each component. The default is False.
- logbool, optional
Whether to use logarithmically regular energy grid. The default is True.
- params
dict, optional Parameters dict to overwrite the fitted parameters.
- cosmo
LambdaCDM, optional Cosmology model used to calculate luminosity. The default is Planck18.
- eiso(emin_rest: float | int, emax_rest: float | int, z: float | int, duration: float | int, cl: float | int = 1, method: Literal['profile', 'boot']='profile', ngrid: int = 1000, comps: bool = False, log: bool = True, params: dict[str, float | int] | None=None, cosmo: LambdaCDM = FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897)) MLEEiso[source]#
Calculate the isotropic emission energy of model.
Warning
The \(E_\mathrm{iso}\) is calculated by trapezoidal rule, and is accurate only if enough numbers of energy grids are used.
- Parameters:
- emin_rest
floatorint Minimum value of rest-frame energy range, in units of keV.
- emax_rest
floatorint Maximum value of rest-frame energy range, in units of keV.
- z
floatorint Redshift of the source.
- duration
floatorint Observed duration of the source, in units of seconds.
- cl
floatorint, optional Confidence level for the confidence interval. If 0 < cl < 1, the value is interpreted as the confidence level. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% confidence interval. The default is 1.- method{‘profile’, ‘boot’}, optional
Method for calculating confidence intervals. Available options are:
'profile': use Minos algorithm of Minuit to find the confidence intervals based on the profile likelihood'boot': use parametric bootstrap method to calculate the confidence intervals.MLEResult.boot()must be called before using this method
The default is
'profile'.- ngrid
int, optional The energy grid number to use in integration. The default is 1000.
- emin_rest
- Returns:
MLEEisoThe isotropic emission energy of the model.
- Other Parameters:
- compsbool, optional
Whether to return the result of each component. The default is False.
- logbool, optional
Whether to use logarithmically regular energy grid. The default is True.
- params
dict, optional Parameters dict to overwrite the fitted parameters.
- cosmo
LambdaCDM, optional Cosmology model used to calculate luminosity. The default is Planck18.
- property status: FMin#
Fit status of Minuit.
- class PosteriorResult(helper: Helper, idata: InferenceData, ml_optimize: Callable, sampler_state: Any = None)[source]#
Bases:
FitResultResult obtained from Bayesian fit.
Attributes
Mean and median of model deviance.
Number of divergent samples.
dofDegree of freedom.
Effective MCMC sample size.
Goodness of fit p-value.
ArviZ InferenceData.
Log model evidence and error.
Pareto-smoothed importance sampling leave-one-out cross-validation (PSIS-LOO-CV).
Mean of parameter samples.
Median of parameter samples.
MLE parameters.
ndataData points number.
Result plotter.
Relative MCMC efficiency.
Computes split R-hat over MCMC chains.
The sampler state at the end of the sampling phase.
Standard deviation of parameter samples.
The widely applicable information criterion (WAIC).
Methods
ci([cl, params, fn, hdi, parallel])Calculate credible intervals.
covar([params, fn, parallel])Calculate the covariance matrix.
eiso(emin_rest, emax_rest, z, duration, cl, ...)Calculate the isotropic emission energy of model.
flux(emin, emax[, cl, energy, ngrid, hdi, ...])Calculate the flux of model.
load(path[, decompress])Load a previously saved fit result.
lumin(emin_rest, emax_rest, z, cl, ngrid, ...)Calculate the luminosity of model.
ppc([n, seed, parallel, n_parallel, ...])Perform posterior predictive check.
save(path[, compress])Save the fit result to a file.
summary([file])Print the summary of fit result.
- property plot: PosteriorResultPlotter#
Result plotter.
- covar(params: str | Iterable[str] | None = None, fn: dict[str, Callable] | None = None, parallel: bool = True) ParamsCovar[source]#
Calculate the covariance matrix.
- Parameters:
- params
stror sequenceofstr, optional Parameters to calculate covariance matrix. If not specified, calculate for all parameters.
- fn
dict, optional A dict containing functions to calculate the covariance matrix. The keys are the names of the function results, and the values are the functions whose input is a dict of model parameters.
- parallelbool, optional
Whether to use parallel computation for fn. The default is True.
- params
- Returns:
ParamsCovarThe covariance matrix.
- ci(cl: float | int = 1, params: str | Iterable[str] | None = None, fn: dict[str, Callable] | None = None, hdi: bool = False, parallel: bool = True) CredibleInterval[source]#
Calculate credible intervals.
- Parameters:
- cl
floatorint, optional The credible level of samples within the credible interval. If 0 < cl < 1, the value is interpreted as the probability mass. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% credible interval. The default is 1.- params
stror sequenceofstr, optional Parameters to calculate confidence intervals. If not specified, calculate for parameters of interest.
- fn
dict, optional A dict containing functions to calculate the confidence intervals. The keys are the names of the function results, and the values are the functions whose input is a dict of model parameters.
- hdibool, optional
Whether to return the highest density interval. The default is False, which means an equal tailed interval is returned.
- parallelbool, optional
Whether to use parallel computation for fn. The default is True.
- cl
- Returns:
CredibleIntervalThe credible interval.
- flux(emin: float | int, emax: float | int, cl: float | int = 1, energy: bool = True, ngrid: int = 1000, hdi: bool = False, comps: bool = False, log: bool = True, params: dict[str, float | int] | None = None) PosteriorFlux[source]#
Calculate the flux of model.
Warning
The flux is calculated by trapezoidal rule, and is accurate only if enough numbers of energy grids are used.
- Parameters:
- emin
floatorint Minimum value of energy range, in units of keV.
- emax
floatorint Maximum value of energy range, in units of keV.
- cl
floatorint, optional The credible level of samples within the credible interval. If 0 < cl < 1, the value is interpreted as the probability mass. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% credible interval. The default is 1.- energybool, optional
When True, calculate energy flux in units of erg cm⁻² s⁻¹; otherwise calculate photon flux in units of ph cm⁻² s⁻¹. The default is True.
- ngrid
int, optional The energy grid number to use in integration. The default is 1000.
- emin
- Returns:
PosteriorFluxThe flux of the model.
- Other Parameters:
- hdibool, optional
Whether to return the highest density interval. The default is False, which means an equal tailed interval is returned.
- compsbool, optional
Whether to return the result of each component. The default is False.
- logbool, optional
Whether to use logarithmically regular energy grid. The default is True.
- params
dict, optional Parameters dict to overwrite the fitted parameters. Ignored when method is
'profile'.
- lumin(emin_rest: float | int, emax_rest: float | int, z: float | int, cl: float | int = 1, ngrid: int = 1000, hdi: bool = False, comps: bool = False, log: bool = True, params: dict[str, float | int] | None=None, cosmo: LambdaCDM = FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897)) PosteriorLumin[source]#
Calculate the luminosity of model.
Warning
The luminosity is calculated by trapezoidal rule, and is accurate only if enough numbers of energy grids are used.
- Parameters:
- emin_rest
floatorint Minimum value of rest-frame energy range, in units of keV.
- emax_rest
floatorint Maximum value of rest-frame energy range, in units of keV.
- z
floatorint Redshift of the source.
- cl
floatorint, optional The credible level of samples within the credible interval. If 0 < cl < 1, the value is interpreted as the probability mass. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% credible interval. The default is 1.- ngrid
int, optional The energy grid number to use in integration. The default is 1000.
- emin_rest
- Returns:
PosteriorLuminThe luminosity of the model.
- Other Parameters:
- hdibool, optional
Whether to return the highest density interval. The default is False, which means an equal tailed interval is returned.
- compsbool, optional
Whether to return the result of each component. The default is False.
- logbool, optional
Whether to use logarithmically regular energy grid. The default is True.
- params
dict, optional Parameters dict to overwrite the fitted parameters. Ignored when method is
'profile'.- cosmo
LambdaCDM, optional Cosmology model used to calculate luminosity. The default is Planck18.
- eiso(emin_rest: float | int, emax_rest: float | int, z: float | int, duration: float | int, cl: float | int = 1, ngrid: int = 1000, hdi: bool = False, comps: bool = False, log: bool = True, params: dict[str, float | int] | None=None, cosmo: LambdaCDM = FlatLambdaCDM(name='Planck18', H0=<Quantity 67.66 km / (Mpc s)>, Om0=0.30966, Tcmb0=<Quantity 2.7255 K>, Neff=3.046, m_nu=<Quantity [0., 0., 0.06] eV>, Ob0=0.04897)) PosteriorEiso[source]#
Calculate the isotropic emission energy of model.
Warning
The \(E_\mathrm{iso}\) is calculated by trapezoidal rule, and is accurate only if enough numbers of energy grids are used.
- Parameters:
- emin_rest
floatorint Minimum value of rest-frame energy range, in units of keV.
- emax_rest
floatorint Maximum value of rest-frame energy range, in units of keV.
- z
floatorint Redshift of the source.
- duration
floatorint Observed duration of the source, in units of seconds.
- cl
floatorint, optional The credible level of samples within the credible interval. If 0 < cl < 1, the value is interpreted as the probability mass. If cl >= 1, it is interpreted as the number of standard deviations. For example,
cl=1produces a 1-sigma or 68.3% credible interval. The default is 1.- ngrid
int, optional The energy grid number to use in integration. The default is 1000.
- emin_rest
- Returns:
PosteriorEisoThe isotropic emission energy of the model.
- Other Parameters:
- hdibool, optional
Whether to return the highest density interval. The default is False, which means an equal tailed interval is returned.
- compsbool, optional
Whether to return the result of each component. The default is False.
- logbool, optional
Whether to use logarithmically regular energy grid. The default is True.
- params
dict, optional Parameters dict to overwrite the fitted parameters. Ignored when method is
'profile'.- cosmo
LambdaCDM, optional Cosmology model used to calculate luminosity. The default is Planck18.
- ppc(n: int = 10000, seed: int | None = None, parallel: bool = True, n_parallel: int | None = None, progress: bool = True, update_rate: int = 50)[source]#
Perform posterior predictive check.
- Parameters:
- n
int, optional The number of posterior predictions. The default is 10000.
- seed
int, optional The seed of random number generator used in posterior predictions.
- parallelbool, optional
Whether to run simulation fit in parallel. The default is True.
- n_parallel
int, optional Number of parallel processes to use when parallel is
True. Defaults tojax.local_device_count().- progressbool, optional
Whether to display progress bar. The default is True.
- update_rate
int, optional The update rate of progress bar. The default is 50.
- n
- property idata: InferenceData#
ArviZ InferenceData.
- property rhat: dict[str, float]#
Computes split R-hat over MCMC chains.
In general, only fully trust the sample if R-hat is less than 1.01. In the early workflow, R-hat below 1.1 is often sufficient. See [1] for more information.
References
- property waic: ELPDData#
The widely applicable information criterion (WAIC).
Estimates the expected log point-wise predictive density (elpd) using WAIC. Also calculates the WAIC’s standard error and the effective number of parameters. See [1] and [2] for more information.
References
- property loo: ELPDData#
Pareto-smoothed importance sampling leave-one-out cross-validation (PSIS-LOO-CV).
Estimates the expected log point-wise predictive density (elpd) using PSIS-LOO-CV. Also calculates LOO’s standard error and the effective number of parameters. For more information, see [1], [2] and [3].
References
- class ParamsCovar(names: tuple[str, ...], matrix: CovarMatrix)[source]#
Bases:
NamedTupleCovariance matrix of the model parameters.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- matrix: Matrix#
Covariance matrix.
- class ConfidenceInterval(mle: dict[str, float], se: dict[str, float], intervals: dict[str, tuple[float, float]], errors: dict[str, tuple[float, float]], cl: float, method: str, status: dict)[source]#
Bases:
NamedTupleConfidence interval result.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- class MLEFlux(emin: float, emax: float, energy: bool, mle: dict[str, Q] | dict[str, dict[str, Q]], se: dict[str, Q] | dict[str, dict[str, Q]], intervals: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], errors: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], cl: float, method: str, status: dict)[source]#
Bases:
NamedTupleThe flux of the MLE model.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- mle: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The maximum likelihood estimation of flux.
- se: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The standard errors of MLE, calculated from Hessian matrix.
- intervals: dict[str, tuple[Quantity, Quantity]] | dict[str, dict[str, tuple[Quantity, Quantity]]]#
The confidence intervals of the model flux.
- class MLELumin(emin_rest: float, emax_rest: float, z: float, cosmo: LambdaCDM, mle: dict[str, Q] | dict[str, dict[str, Q]], se: dict[str, Q] | dict[str, dict[str, Q]], intervals: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], errors: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], cl: float, method: str, status: str)[source]#
Bases:
NamedTupleThe luminosity of the MLE model.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- cosmo: LambdaCDM#
Cosmology model used to calculate luminosity.
- mle: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The maximum likelihood estimation of luminosity.
- se: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The standard errors of MLE, calculated from Hessian matrix.
- intervals: dict[str, tuple[Quantity, Quantity]] | dict[str, dict[str, tuple[Quantity, Quantity]]]#
The confidence intervals of the model luminosity.
- class MLEEiso(emin_rest: float, emax_rest: float, z: float, duration: float, cosmo: LambdaCDM, mle: dict[str, Q] | dict[str, dict[str, Q]], se: dict[str, Q] | dict[str, dict[str, Q]], intervals: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], errors: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], cl: float, method: str, status: str)[source]#
Bases:
NamedTupleThe isotropic emission energy of the MLE model.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- cosmo: LambdaCDM#
Cosmology model used to calculate Eiso.
- mle: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The maximum likelihood estimation of Eiso.
- se: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The standard errors of MLE, calculated from Hessian matrix.
- intervals: dict[str, tuple[Quantity, Quantity]] | dict[str, dict[str, tuple[Quantity, Quantity]]]#
The confidence intervals of the model Eiso.
- class BootstrapResult(mle: dict, data: dict, models: dict, params: dict, deviance: dict, p_value: dict, n: int, n_valid: int, seed: int)[source]#
Bases:
NamedTupleParametric bootstrap result.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- class CredibleInterval(median: dict[str, float], intervals: dict[str, tuple[float, float]], errors: dict[str, tuple[float, float]], cl: float, method: str, dist: dict[str, JAXArray])[source]#
Bases:
NamedTupleCredible interval result.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- class PosteriorFlux(emin: float, emax: float, energy: bool, mean: dict[str, Q] | dict[str, dict[str, Q]], std: dict[str, Q] | dict[str, dict[str, Q]], median: dict[str, Q] | dict[str, dict[str, Q]], intervals: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], errors: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], cl: float, method: str, dist: dict[str, Q] | dict[str, dict[str, Q]])[source]#
Bases:
NamedTuplePosterior flux.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- std: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The standard deviation of posterior distribution of flux.
- intervals: dict[str, tuple[Quantity, Quantity]] | dict[str, dict[str, tuple[Quantity, Quantity]]]#
The credible intervals of the flux.
- class PosteriorLumin(emin_rest: float, emax_rest: float, z: float, cosmo: LambdaCDM, mean: dict[str, Q] | dict[str, dict[str, Q]], std: dict[str, Q] | dict[str, dict[str, Q]], median: dict[str, Q] | dict[str, dict[str, Q]], intervals: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], errors: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], cl: float, method: str, dist: dict[str, Q] | dict[str, dict[str, Q]])[source]#
Bases:
NamedTuplePosterior luminosity.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- cosmo: LambdaCDM#
Cosmology model used to calculate luminosity.
- std: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The posterior standard deviation of the luminosity.
- median: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The posterior median of the luminosity.
- intervals: dict[str, tuple[Quantity, Quantity]] | dict[str, dict[str, tuple[Quantity, Quantity]]]#
The credible intervals of the luminosity.
- class PosteriorEiso(emin_rest: float, emax_rest: float, z: float, duration: float, cosmo: LambdaCDM, mean: dict[str, Q] | dict[str, dict[str, Q]], std: dict[str, Q] | dict[str, dict[str, Q]], median: dict[str, Q] | dict[str, dict[str, Q]], intervals: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], errors: dict[str, tuple[Q, Q]] | dict[str, dict[str, tuple[Q, Q]]], cl: float, method: str, dist: dict[str, Q] | dict[str, dict[str, Q]])[source]#
Bases:
NamedTuplePosterior isotropic emission energy.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.
- cosmo: LambdaCDM#
Cosmology model used to calculate Eiso.
- std: dict[str, Quantity] | dict[str, dict[str, Quantity]]#
The posterior standard deviation of the Eiso.
- intervals: dict[str, tuple[Quantity, Quantity]] | dict[str, dict[str, tuple[Quantity, Quantity]]]#
The credible intervals of the Eiso.
- class PPCResult(params_rep: dict, models_rep: dict, data: dict, params_fit: dict, deviance: dict, models_fit: dict, p_value: dict, n: int, n_valid: int, seed: int)[source]#
Bases:
NamedTuplePosterior predictive check result.
Methods
count(value, /)Return number of occurrences of value.
index(value[, start, stop])Return first index of value.