ctaplot/plots/plots.py
def plot_impact_point_heatmap(reco_x, reco_y, ax=None, outfile=None):
    """
    Plot the heatmap of the impact points on the site ground and save it under Outfile

    Parameters
    ----------
    reco_x: `numpy.ndarray`
        reconstructed x positions
    reco_y: `numpy.ndarray`
        reconstructed y positions
    ax: `matplotlib.pyplot.axes`
    outfile: string
        path to the output file. If None, the figure is not saved.
    """

    ax = plt.gca() if ax is None else ax

    ax.set_xlabel("X [m]")
    ax.set_ylabel("Y [m]")
    ax.axis('equal')

    cm = plt.cm.get_cmap('OrRd')
    h = ax.hist2d(reco_x, reco_y, bins=75, norm=LogNorm(), cmap=cm)
    cb = plt.colorbar(h[3], ax=ax)
    cb.set_label('Event count')

    if type(outfile) is str:
        plt.savefig(outfile, bbox_inches="tight", format='png', dpi=200)

    return ax

    Plot the heatmap of the impact points on the site ground and save it under Outfile

    Parameters
    ----------
    reco_x: `numpy.ndarray`
        reconstructed x positions
    reco_y: `numpy.ndarray`
        reconstructed y positions
    ax: `matplotlib.pyplot.axes`
    outfile: string
        path to the output file. If None, the figure is not saved.
    
Plot the heatmap of the impact points on the site ground and save it under Outfile
Parameters


Plot the heatmap of the impact points on the site ground and save it under Outfile Parameters
def plot_impact_point_heatmap(reco_x, reco_y, ax=None, outfile=None):
    ax = plt.gca() if ax is None else ax
    ax.set_xlabel("X [m]")
    ax.set_ylabel("Y [m]")
    ax.axis('equal')
    cm = plt.cm.get_cmap('OrRd')
    h = ax.hist2d(reco_x, reco_y, bins=75, norm=LogNorm(), cmap=cm)
    cb = plt.colorbar(h[3], ax=ax)
    cb.set_label('Event count')
    if type(outfile) is str:
        plt.savefig(outfile, bbox_inches="tight", format='png', dpi=200)
    return ax
def plot_impact_point_heatmap ( reco_x , reco_y , ax = None , outfile = None ) : ax = plt . gca ( ) if ax is None else ax ax . set_xlabel ( "X [m]" ) ax . set_ylabel ( "Y [m]" ) ax . axis ( 'equal' ) cm = plt . cm . get_cmap ( 'OrRd' ) h = ax . hist2d ( reco_x , reco_y , bins = 75 , norm = LogNorm ( ) , cmap = cm ) cb = plt . colorbar ( h [ 3 ] , ax = ax ) cb . set_label ( 'Event count' ) if type ( outfile ) is str : plt . savefig ( outfile , bbox_inches = "tight" , format = 'png' , dpi = 200 ) return ax
Plot the heatmap of the impact points on the site ground and save it under Outfile
Parameters
Plot the heatmap of the impact points on the site ground and save it under Outfile Parameters
"""
    Plot the heatmap of the impact points on the site ground and save it under Outfile

    Parameters
    ----------
    reco_x: `numpy.ndarray`
        reconstructed x positions
    reco_y: `numpy.ndarray`
        reconstructed y positions
    ax: `matplotlib.pyplot.axes`
    outfile: string
        path to the output file. If None, the figure is not saved.
    """
reco_x
reco_y
ax
outfile