threeML.config package
Submodules
threeML.config.catalog_structure module
- class threeML.config.catalog_structure.CatalogServer(url: str = '???')[source]
Bases:
object
- url: str = '???'
- class threeML.config.catalog_structure.Catalogs(Fermi: threeML.config.catalog_structure.InstrumentCatalog = <factory>, Swift: threeML.config.catalog_structure.InstrumentCatalog = <factory>)[source]
Bases:
object
- Fermi: InstrumentCatalog
- Swift: InstrumentCatalog
- class threeML.config.catalog_structure.InstrumentCatalog(catalogs: Dict[str, threeML.config.catalog_structure.CatalogServer] = '???')[source]
Bases:
object
- catalogs: Dict[str, CatalogServer] = '???'
threeML.config.config module
threeML.config.config_structure module
- class threeML.config.config_structure.Config(logging: threeML.config.config_structure.Logging = <factory>, parallel: threeML.config.config_structure.Parallel = <factory>, interface: threeML.config.config_structure.Interface = <factory>, plugins: threeML.config.plugin_structure.Plugins = <factory>, time_series: threeML.config.plugin_structure.TimeSeries = <factory>, mle: threeML.config.fitting_structure.MLEDefault = <factory>, bayesian: threeML.config.fitting_structure.BayesianDefault = <factory>, plotting: threeML.config.plotting_structure.GenericPlotting = <factory>, model_plot: threeML.config.plotting_structure.ModelPlotting = <factory>, point_source: threeML.config.point_source_structure.PointSourceDefaults = <factory>, LAT: threeML.config.catalog_structure.PublicDataServer = <factory>, GBM: threeML.config.catalog_structure.PublicDataServer = <factory>, catalogs: threeML.config.catalog_structure.Catalogs = <factory>)[source]
Bases:
object
- GBM: PublicDataServer
- LAT: PublicDataServer
- bayesian: BayesianDefault
- mle: MLEDefault
- model_plot: ModelPlotting
- plotting: GenericPlotting
- point_source: PointSourceDefaults
- time_series: TimeSeries
- class threeML.config.config_structure.Interface(progress_bars: bool = 'on', multi_progress_color: bool = 'on', multi_progress_cmap: str = 'viridis', progress_bar_color: str = '#9C04FF')[source]
Bases:
object
- multi_progress_cmap: str = 'viridis'
- multi_progress_color: bool = 'on'
- progress_bar_color: str = '#9C04FF'
- progress_bars: bool = 'on'
- class threeML.config.config_structure.Logging(path: str = '~/.threeml/log', developer: bool = 'off', usr: bool = 'on', console: bool = 'on', level: threeML.config.config_structure.LoggingLevel = <LoggingLevel.INFO: 20>, startup_warnings: bool = 'on')[source]
Bases:
object
- console: bool = 'on'
- developer: bool = 'off'
- level: LoggingLevel = 20
- path: str = '~/.threeml/log'
- startup_warnings: bool = 'on'
- usr: bool = 'on'
threeML.config.config_utils module
- threeML.config.config_utils.get_current_configuration_copy(file_name: str = 'threeML_config.yml', overwrite: bool = False)[source]
write a copy of the CURRENT configuration to the config directory
- threeML.config.config_utils.get_value(name, user_value, par_type, config_value)[source]
Get the value for a parameter. If value is None returns the config value. :param name: Name of parameter :param user_value: user value (can be None if no value given) :param par_type: Type of the paramter :param config_value: value in config :returns: parameter value
- threeML.config.config_utils.get_value_kwargs(name, par_type, config_value, **kwargs)[source]
Read the value of a parameter from the kwargs or the config if it does not exist in the kwargs. :param name: Name of parameter in kwargs :param par_type: Type of the parameter :param config_value: Value in the config :param kwargs: :returns: value of parameter, rest of kwargs
threeML.config.fitting_structure module
- class threeML.config.fitting_structure.BayesianDefault(use_median_fit: bool = False, default_sampler: threeML.config.fitting_structure.Sampler = <Sampler.emcee: 'emcee'>, emcee_setup: Optional[Dict[str, Any]] = <factory>, multinest_setup: Optional[Dict[str, Any]] = <factory>, ultranest_setup: Optional[Dict[str, Any]] = <factory>, zeus_setup: Optional[Dict[str, Any]] = <factory>, dynesty_nested_setup: Optional[Dict[str, Any]] = <factory>, dynesty_dynmaic_setup: Optional[Dict[str, Any]] = <factory>, corner_style: threeML.config.plotting_structure.CornerStyle = <factory>)[source]
Bases:
object
- corner_style: CornerStyle
- dynesty_dynmaic_setup: Dict[str, Any] | None
- dynesty_nested_setup: Dict[str, Any] | None
- emcee_setup: Dict[str, Any] | None
- multinest_setup: Dict[str, Any] | None
- ultranest_setup: Dict[str, Any] | None
- use_median_fit: bool = False
- zeus_setup: Dict[str, Any] | None
- class threeML.config.fitting_structure.MLEDefault(default_minimizer: threeML.config.fitting_structure.Optimizer = <Optimizer.minuit: 'minuit'>, default_minimizer_algorithm: Optional[str] = None, default_minimizer_callback: Optional[str] = None, contour_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Pastel1: 'Pastel1'>, contour_background: str = 'white', contour_level_1: str = '#ffa372', contour_level_2: str = '#ed6663', contour_level_3: str = '#0f4c81', profile_color: str = 'k', profile_level_1: str = '#ffa372', profile_level_2: str = '#ed6663', profile_level_3: str = '#0f4c81')[source]
Bases:
object
- contour_background: str = 'white'
- contour_level_1: str = '#ffa372'
- contour_level_2: str = '#ed6663'
- contour_level_3: str = '#0f4c81'
- default_minimizer_algorithm: str | None = None
- default_minimizer_callback: str | None = None
- profile_color: str = 'k'
- profile_level_1: str = '#ffa372'
- profile_level_2: str = '#ed6663'
- profile_level_3: str = '#0f4c81'
threeML.config.plotting_structure module
- class threeML.config.plotting_structure.BinnedSpectrumPlot(data_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, model_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, background_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, n_colors: int = 5, step: bool = False, show_legend: bool = True, show_residuals: bool = True, data_color: Optional[str] = None, model_color: Optional[str] = None, background_color: Optional[str] = None, show_background: bool = False, data_mpl_kwargs: Optional[Dict[str, Any]] = None, model_mpl_kwargs: Optional[Dict[str, Any]] = None, background_mpl_kwargs: Optional[Dict[str, Any]] = None)[source]
Bases:
object
- background_color: str | None = None
- background_mpl_kwargs: Dict[str, Any] | None = None
- data_color: str | None = None
- data_mpl_kwargs: Dict[str, Any] | None = None
- model_color: str | None = None
- model_mpl_kwargs: Dict[str, Any] | None = None
- n_colors: int = 5
- show_background: bool = False
- show_legend: bool = True
- show_residuals: bool = True
- step: bool = False
- class threeML.config.plotting_structure.ContourStyle(alpha: float = 0.4)[source]
Bases:
object
- alpha: float = 0.4
- class threeML.config.plotting_structure.CornerStyle(show_titles: bool = True, smooth: float = 0.9, title_fmt: str = '.2g', bins: int = 25, quantiles: List[float] = <factory>, fill_contours: bool = True, cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.viridis: 'viridis'>, extremes: str = 'white', contourf_kwargs: Dict[str, Any] = <factory>, levels: List[float] = <factory>)[source]
Bases:
object
- bins: int = 25
- contourf_kwargs: Dict[str, Any]
- extremes: str = 'white'
- fill_contours: bool = True
- levels: List[float]
- quantiles: List[float]
- show_titles: bool = True
- smooth: float = 0.9
- title_fmt: str = '.2g'
- class threeML.config.plotting_structure.DataHistPlot(counts_color: str = '#500472', background_color: str = '#79cbb8', warn_channels_color: str = '#C79BFE', bad_channels_color: str = '#FE3131', masked_channels_color: str = '#566573')[source]
Bases:
object
- background_color: str = '#79cbb8'
- bad_channels_color: str = '#FE3131'
- counts_color: str = '#500472'
- masked_channels_color: str = '#566573'
- warn_channels_color: str = '#C79BFE'
- class threeML.config.plotting_structure.FermiSpectrumPlot(total_model_color: str = 'k', show_background_sources: bool = True, shade_fixed_sources: bool = True, shade_secondary_sources: bool = False, fixed_sources_color: str = 'grey', secondary_sources_color: str = 'k', data_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, model_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, background_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, step: bool = False, show_legend: bool = True, show_residuals: bool = True, data_color: Optional[str] = None, model_color: Optional[str] = None, background_color: Optional[str] = None, data_mpl_kwargs: Optional[Dict[str, Any]] = None, model_mpl_kwargs: Optional[Dict[str, Any]] = None, background_mpl_kwargs: Optional[Dict[str, Any]] = None)[source]
Bases:
object
- background_color: str | None = None
- background_mpl_kwargs: Dict[str, Any] | None = None
- data_color: str | None = None
- data_mpl_kwargs: Dict[str, Any] | None = None
- fixed_sources_color: str = 'grey'
- model_color: str | None = None
- model_mpl_kwargs: Dict[str, Any] | None = None
- secondary_sources_color: str = 'k'
- shade_fixed_sources: bool = True
- shade_secondary_sources: bool = False
- show_background_sources: bool = True
- show_legend: bool = True
- show_residuals: bool = True
- step: bool = False
- total_model_color: str = 'k'
- class threeML.config.plotting_structure.GenericPlotting(use_threeml_style: bool = True, mplstyle: str = 'threeml.mplstyle', residual_plot: threeML.config.plotting_structure.ResidualPlot = <factory>)[source]
Bases:
object
- mplstyle: str = 'threeml.mplstyle'
- residual_plot: ResidualPlot
- use_threeml_style: bool = True
- class threeML.config.plotting_structure.LegendStyle(loc: str = 'best', fancybox: bool = True, shadow: bool = True)[source]
Bases:
object
- fancybox: bool = True
- loc: str = 'best'
- shadow: bool = True
- class threeML.config.plotting_structure.MPLCmap(value)
Bases:
Enum
An enumeration.
- Accent = 'Accent'
- Accent_r = 'Accent_r'
- Blues = 'Blues'
- Blues_r = 'Blues_r'
- BrBG = 'BrBG'
- BrBG_r = 'BrBG_r'
- BuGn = 'BuGn'
- BuGn_r = 'BuGn_r'
- BuPu = 'BuPu'
- BuPu_r = 'BuPu_r'
- CMRmap = 'CMRmap'
- CMRmap_r = 'CMRmap_r'
- Dark2 = 'Dark2'
- Dark2_r = 'Dark2_r'
- GnBu = 'GnBu'
- GnBu_r = 'GnBu_r'
- Grays = 'Grays'
- Greens = 'Greens'
- Greens_r = 'Greens_r'
- Greys = 'Greys'
- Greys_r = 'Greys_r'
- OrRd = 'OrRd'
- OrRd_r = 'OrRd_r'
- Oranges = 'Oranges'
- Oranges_r = 'Oranges_r'
- PRGn = 'PRGn'
- PRGn_r = 'PRGn_r'
- Paired = 'Paired'
- Paired_r = 'Paired_r'
- Pastel1 = 'Pastel1'
- Pastel1_r = 'Pastel1_r'
- Pastel2 = 'Pastel2'
- Pastel2_r = 'Pastel2_r'
- PiYG = 'PiYG'
- PiYG_r = 'PiYG_r'
- PuBu = 'PuBu'
- PuBuGn = 'PuBuGn'
- PuBuGn_r = 'PuBuGn_r'
- PuBu_r = 'PuBu_r'
- PuOr = 'PuOr'
- PuOr_r = 'PuOr_r'
- PuRd = 'PuRd'
- PuRd_r = 'PuRd_r'
- Purples = 'Purples'
- Purples_r = 'Purples_r'
- RdBu = 'RdBu'
- RdBu_r = 'RdBu_r'
- RdGy = 'RdGy'
- RdGy_r = 'RdGy_r'
- RdPu = 'RdPu'
- RdPu_r = 'RdPu_r'
- RdYlBu = 'RdYlBu'
- RdYlBu_r = 'RdYlBu_r'
- RdYlGn = 'RdYlGn'
- RdYlGn_r = 'RdYlGn_r'
- Reds = 'Reds'
- Reds_r = 'Reds_r'
- Set1 = 'Set1'
- Set1_r = 'Set1_r'
- Set2 = 'Set2'
- Set2_r = 'Set2_r'
- Set3 = 'Set3'
- Set3_r = 'Set3_r'
- Spectral = 'Spectral'
- Spectral_r = 'Spectral_r'
- Wistia = 'Wistia'
- Wistia_r = 'Wistia_r'
- YlGn = 'YlGn'
- YlGnBu = 'YlGnBu'
- YlGnBu_r = 'YlGnBu_r'
- YlGn_r = 'YlGn_r'
- YlOrBr = 'YlOrBr'
- YlOrBr_r = 'YlOrBr_r'
- YlOrRd = 'YlOrRd'
- YlOrRd_r = 'YlOrRd_r'
- afmhot = 'afmhot'
- afmhot_r = 'afmhot_r'
- autumn = 'autumn'
- autumn_r = 'autumn_r'
- binary = 'binary'
- binary_r = 'binary_r'
- bone = 'bone'
- bone_r = 'bone_r'
- brg = 'brg'
- brg_r = 'brg_r'
- bwr = 'bwr'
- bwr_r = 'bwr_r'
- cividis = 'cividis'
- cividis_r = 'cividis_r'
- cool = 'cool'
- cool_r = 'cool_r'
- coolwarm = 'coolwarm'
- coolwarm_r = 'coolwarm_r'
- copper = 'copper'
- copper_r = 'copper_r'
- cubehelix = 'cubehelix'
- cubehelix_r = 'cubehelix_r'
- flag = 'flag'
- flag_r = 'flag_r'
- gist_earth = 'gist_earth'
- gist_earth_r = 'gist_earth_r'
- gist_gray = 'gist_gray'
- gist_gray_r = 'gist_gray_r'
- gist_grey = 'gist_grey'
- gist_heat = 'gist_heat'
- gist_heat_r = 'gist_heat_r'
- gist_ncar = 'gist_ncar'
- gist_ncar_r = 'gist_ncar_r'
- gist_rainbow = 'gist_rainbow'
- gist_rainbow_r = 'gist_rainbow_r'
- gist_stern = 'gist_stern'
- gist_stern_r = 'gist_stern_r'
- gist_yarg = 'gist_yarg'
- gist_yarg_r = 'gist_yarg_r'
- gist_yerg = 'gist_yerg'
- gnuplot = 'gnuplot'
- gnuplot2 = 'gnuplot2'
- gnuplot2_r = 'gnuplot2_r'
- gnuplot_r = 'gnuplot_r'
- gray = 'gray'
- gray_r = 'gray_r'
- grey = 'grey'
- hot = 'hot'
- hot_r = 'hot_r'
- hsv = 'hsv'
- hsv_r = 'hsv_r'
- inferno = 'inferno'
- inferno_r = 'inferno_r'
- jet = 'jet'
- jet_r = 'jet_r'
- magma = 'magma'
- magma_r = 'magma_r'
- nipy_spectral = 'nipy_spectral'
- nipy_spectral_r = 'nipy_spectral_r'
- ocean = 'ocean'
- ocean_r = 'ocean_r'
- pink = 'pink'
- pink_r = 'pink_r'
- plasma = 'plasma'
- plasma_r = 'plasma_r'
- prism = 'prism'
- prism_r = 'prism_r'
- rainbow = 'rainbow'
- rainbow_r = 'rainbow_r'
- seismic = 'seismic'
- seismic_r = 'seismic_r'
- spring = 'spring'
- spring_r = 'spring_r'
- summer = 'summer'
- summer_r = 'summer_r'
- tab10 = 'tab10'
- tab10_r = 'tab10_r'
- tab20 = 'tab20'
- tab20_r = 'tab20_r'
- tab20b = 'tab20b'
- tab20b_r = 'tab20b_r'
- tab20c = 'tab20c'
- tab20c_r = 'tab20c_r'
- terrain = 'terrain'
- terrain_r = 'terrain_r'
- turbo = 'turbo'
- turbo_r = 'turbo_r'
- twilight = 'twilight'
- twilight_r = 'twilight_r'
- twilight_shifted = 'twilight_shifted'
- twilight_shifted_r = 'twilight_shifted_r'
- viridis = 'viridis'
- viridis_r = 'viridis_r'
- winter = 'winter'
- winter_r = 'winter_r'
- class threeML.config.plotting_structure.ModelPlotting(point_source_plot: threeML.config.plotting_structure.PointSourcePlot = <factory>)[source]
Bases:
object
- point_source_plot: PointSourcePlot
- class threeML.config.plotting_structure.PlotStyle(linestyle: str | None = '-', linewidth: float | None = 1.7)[source]
Bases:
object
- linestyle: str | None = '-'
- linewidth: float | None = 1.7
- class threeML.config.plotting_structure.PointSourcePlot(fit_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, contour_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, bayes_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.Set1: 'Set1'>, plot_style: threeML.config.plotting_structure.PlotStyle = <factory>, contour_style: threeML.config.plotting_structure.ContourStyle = <factory>, show_legend: bool = True, legend_style: threeML.config.plotting_structure.LegendStyle = <factory>, flux_unit: str = '1/(keV s cm2)', emin: float = 10.0, emax: float = 10000.0, num_ene: int = 100, ene_unit: str = 'keV')[source]
Bases:
object
- contour_style: ContourStyle
- emax: float = 10000.0
- emin: float = 10.0
- ene_unit: str = 'keV'
- flux_unit: str = '1/(keV s cm2)'
- legend_style: LegendStyle
- num_ene: int = 100
- show_legend: bool = True
threeML.config.plugin_structure module
- class threeML.config.plugin_structure.Fermipy(fit_plot: threeML.config.plotting_structure.FermiSpectrumPlot = <factory>)[source]
Bases:
object
- fit_plot: FermiSpectrumPlot
- class threeML.config.plugin_structure.OGIP(fit_plot: threeML.config.plotting_structure.BinnedSpectrumPlot = <factory>, data_plot: threeML.config.plotting_structure.DataHistPlot = <factory>, response_cmap: threeML.config.plotting_structure.MPLCmap = <MPLCmap.viridis: 'viridis'>, response_zero_color: str = 'k')[source]
Bases:
object
- data_plot: DataHistPlot
- fit_plot: BinnedSpectrumPlot
- response_zero_color: str = 'k'
- class threeML.config.plugin_structure.Photo(fit_plot: threeML.config.plotting_structure.BinnedSpectrumPlot = <factory>)[source]
Bases:
object
- fit_plot: BinnedSpectrumPlot
- class threeML.config.plugin_structure.Plugins(ogip: threeML.config.plugin_structure.OGIP = <factory>, photo: threeML.config.plugin_structure.Photo = <factory>, fermipy: threeML.config.plugin_structure.Fermipy = <factory>)[source]
Bases:
object
- class threeML.config.plugin_structure.TimeSeries(light_curve_color: str = '#05716c', selection_color: str = '#1fbfb8', background_color: str = '#C0392B', background_selection_color: str = '#E74C3C', fit: threeML.config.plugin_structure.TimeSeriesFit = <factory>)[source]
Bases:
object
- background_color: str = '#C0392B'
- background_selection_color: str = '#E74C3C'
- fit: TimeSeriesFit
- light_curve_color: str = '#05716c'
- selection_color: str = '#1fbfb8'
threeML.config.point_source_structure module
- class threeML.config.point_source_structure.IntegrateMethod(value)[source]
Bases:
IntEnum
An enumeration.
- quad = 1
- trapz = 0
- class threeML.config.point_source_structure.PointSourceDefaults(integrate_flux_method: threeML.config.point_source_structure.IntegrateMethod = <IntegrateMethod.trapz: 0>, max_number_samples: int = 5000)[source]
Bases:
object
- integrate_flux_method: IntegrateMethod = 0
- max_number_samples: int = 5000