plot_pulse_profile_3PC#
- gammapy.visualization.plot_pulse_profile_3PC(source, n_period=2, add_radio_profile=True, add_best_fit_profile=True, add_error=True)[source]#
Plot pulse profiles from the Fermi-LAT 3PC catalog.
This function generates a multi-panel figure showing the phase-resolved pulse profiles of a pulsar as provided in the
SourceCatalog3PC. The first panel displays the integrated profile above 100 MeV, optionally overlaid with radio and best-fit profiles. The remaining panels show pulse profiles in different gamma-ray energy bands.- Parameters:
- source
SourceCatalogObject3PC Source object containing pulse profile data from the 3PC catalog.
- n_period{1, 2}, optional
Number of pulsar periods to display on the phase axis. Default is 2.
- add_radio_profilebool, optional
Whether to overlay the radio pulse profile in the top panel. If no radio profile is available, it is skipped automatically. Default is True.
- add_best_fit_profilebool, optional
Whether to overlay the best-fit pulse profile in the top panel. If no best-fit profile is available, it is skipped automatically. Default is True.
- add_errorbool, optional
Whether to display uncertainties as error bars for all profiles. Default is True.
- source
- Returns:
Examples
This example shows how to plot the pulse profile:
from gammapy.catalog import SourceCatalog3PC from gammapy.visualization.catalogs import plot_pulse_profile_3PC catalog = SourceCatalog3PC() source = catalog["J0534+2200"] axes = plot_pulse_profile_3PC(source, n_period=2)