threeML.plugins.UnbinnedPoissonLike module

class threeML.plugins.UnbinnedPoissonLike.EventObservation(events: numpy.ndarray, exposure: float, start: Union[float, numpy.ndarray], stop: Union[float, numpy.ndarray])[source]

Bases: object

property events: numpy.ndarray
property exposure: float
property is_multi_interval: bool
property n_events: int
property start: Union[float, numpy.ndarray]
property stop: Union[float, numpy.ndarray]
class threeML.plugins.UnbinnedPoissonLike.UnbinnedPoissonLike(name: str, observation: threeML.plugins.UnbinnedPoissonLike.EventObservation, source_name: Optional[str] = None)[source]

Bases: threeML.plugin_prototype.PluginPrototype

get_log_like() float[source]

Return the value of the log-likelihood with the current values for the parameters

get_number_of_data_points()[source]

This returns the number of data points that are used to evaluate the likelihood. For binned measurements, this is the number of active bins used in the fit. For unbinned measurements, this would be the number of photons/particles that are evaluated on the likelihood

inner_fit() float[source]

This is used for the profile likelihood. Keeping fixed all parameters in the LikelihoodModel, this method minimize the logLike over the remaining nuisance parameters, i.e., the parameters belonging only to the model for this particular detector. If there are no nuisance parameters, simply return the logLike value.

set_model(model: astromodels.core.model.Model) None[source]

Set the model to be used in the joint minimization. Must be a LikelihoodModel instance.