threeML.plugins.FermipyLike module
- class threeML.plugins.FermipyLike.FermipyLike(*args, **kwargs)[source]
Bases:
PluginPrototype
Plugin for the data of the Fermi Large Area Telescope, based on fermipy (http://fermipy.readthedocs.io/)
- property configuration
Returns the loaded configuration
- Returns:
a dictionary containing the active configuration
- display_model(data_color: str = 'k', model_cmap: str = 'Set1', model_color: str | None = None, total_model_color: str = 'k', background_color: str = 'b', show_data: bool = True, primary_sources: str | List[str] | None = None, show_background_sources: bool = True, shade_fixed_sources: bool = True, shade_secondary_source: bool = False, fixed_sources_color: str = 'grey', secondary_sources_color: str = 'k', show_residuals: bool = True, ratio_residuals: bool = False, show_legend: bool = True, model_label: str | None = None, model_kwargs: Dict[str, Any] | None = None, data_kwargs: Dict[str, Any] | None = None, background_kwargs: Dict[str, Any] | None = None, **kwargs) ResidualPlot [source]
Plot the current model with or without the data and the residuals. Multiple models can be plotted by supplying a previous axis to ‘model_subplot’.
Example usage:
fig = data.display_model()
fig2 = data2.display_model(model_subplot=fig.axes)
- Parameters:
data_color – the color of the data
model_color – the color of the model
show_data – (bool) show_the data with the model
show_residuals – (bool) shoe the residuals
ratio_residuals – (bool) use model ratio instead of residuals
show_legend – (bool) show legend
model_label – (optional) the label to use for the model default is plugin name
model_kwargs – plotting kwargs affecting the plotting of the model
data_kwargs – plotting kwargs affecting the plotting of the data and residuls
background_kwargs – plotting kwargs affecting the plotting of the background
- Returns:
- static get_basic_config(evfile, scfile, ra, dec, emin=100.0, emax=100000.0, zmax=100.0, evclass=128, evtype=3, filter='DATA_QUAL>0 && LAT_CONFIG==1', fermipy_verbosity=2, fermitools_chatter=2)[source]
- get_log_like()[source]
Return the value of the log-likelihood with the current values for the parameters stored in the ModelManager instance
- get_number_of_data_points()[source]
Return the number of spatial/energy bins
- Returns:
number of bins
- property gta
- inner_fit()[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_inner_minimization(flag: bool) None [source]
Turn on the minimization of the internal Fermi parameters
- Parameters:
flag (bool) – turing on and off the minimization of the Fermipy internal parameters
- Returns: