threeML.plugins.UnbinnedPoissonLike module

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

Bases: object

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

Bases: PluginPrototype

get_log_like() float[source]

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


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: Model) None[source]

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