graph.set_xlabel(r"Pulse integral [\si{\volt\nano\second}]")
        graph.set_ylabel("Count")
        graph.set_title(
            r"$\SI{%.1f}{\per\square\meter} \leq \rho_\mathrm{charged}$ < $\SI{%.1f}{\per\square\meter}$"
            % (low, high))
        graph.set_xlimits(0, 30)
        graph.set_ylimits(1e0, 1e4)
        artist.utils.save_graph(graph, suffix, dirname='plots')

    p_detection = np.vectorize(lambda x: 1 - np.exp(-.5 * x) if x >= 0 else 0.)

    def conv_p_detection(self, x, sigma):
        x_step = x[-1] - x[-2]
        x2 = np.arange(-2 * max(x), 2 * max(x) + x_step / 2, x_step)
        g = stats.norm(scale=sigma).pdf
        y2 = landau.discrete_convolution(self.p_detection, g, x2)
        y = np.interp(x, x2, y2)
        return y


if __name__ == '__main__':
    np.seterr(invalid='ignore', divide='ignore')

    if 'data' not in globals():
        data = tables.open_file('kascade.h5', 'r')

    utils.set_prefix('EFF-')
    artist.utils.set_prefix('EFF-')
    efficiency = ReconstructionEfficiency(data)
    efficiency.main()
Exemplo n.º 2
0
    graph.plot(x, rad2deg(f_y2), mark=None)
    graph.plot(x, rad2deg(l_y2), mark=None, linestyle='dashed')
    graph.set_xlabel(r"Shower zenith angle [\si{\degree}]")
    graph.set_ylabel(r"Angle reconstruction uncertainty [\si{\degree}]")
    artist.utils.save_graph(graph, dirname='plots')


if __name__ == '__main__':
    # invalid values in arcsin will be ignored (nan handles the situation
    # quite well)
    np.seterr(invalid='ignore', divide='ignore')

    try:
        data
    except NameError:
        data = tables.open_file('kascade.h5', 'r')

    artist.utils.set_prefix("KAS-")
    utils.set_prefix("KAS-")
    do_reconstruction_plots(data, data.root.reconstructions)
    do_lint_comparison(data)
    artist.utils.set_prefix("KAS-LINT-")
    utils.set_prefix("KAS-LINT-")
    do_reconstruction_plots(data, data.root.lint_reconstructions)
    artist.utils.set_prefix("KAS-OFFSETS-")
    utils.set_prefix("KAS-OFFSETS-")
    do_reconstruction_plots(data, data.root.reconstructions_offsets)
    artist.utils.set_prefix("KAS-LINT-OFFSETS-")
    utils.set_prefix("KAS-LINT-OFFSETS-")
    do_reconstruction_plots(data, data.root.lint_reconstructions_offsets)
Exemplo n.º 3
0
    graph1.set_xlabel(r'Shower azimuthal angle [\si{\degree}]')
    graph1.set_ylabel('Count')
    artist.utils.save_graph(graph1, suffix='phi', dirname='plots')

    graph2.set_ylimits_for_all(None, 0, 2000)
    graph2.set_xlimits_for_all(None, 0, 45)
    graph2.show_yticklabels(0, 0)
    graph2.show_xticklabels_for_all()
    graph2.set_xticklabels_position(0, 1, 'right')
    graph2.set_xlabel(r'Shower zenith angle [\si{\degree}]')
    graph2.set_ylabel('Count')
    artist.utils.save_graph(graph2, suffix='theta', dirname='plots')


if __name__ == '__main__':
    if 'data' not in globals():
        # For single station plots
        #data = tables.open_file('month-single.h5')
        # For station / cluster plots
        #data = tables.open_file('new.h5')
        #data = tables.open_file('newlarge.h5')
        data = tables.open_file('master.h5')
        # For N vs R plot
        #data = tables.open_file('master-large.h5')
        # No data
        #data = None

    artist.utils.set_prefix("SP-DIR-")
    utils.set_prefix("SP-DIR-")
    main(data)
    graph1.set_xlabel(r'Shower azimuthal angle [\si{\degree}]')
    graph1.set_ylabel('Count')
    artist.utils.save_graph(graph1, suffix='phi', dirname='plots')

    graph2.set_ylimits_for_all(None, 0, 2000)
    graph2.set_xlimits_for_all(None, 0, 45)
    graph2.show_yticklabels(0, 0)
    graph2.show_xticklabels_for_all()
    graph2.set_xticklabels_position(0, 1, 'right')
    graph2.set_xlabel(r'Shower zenith angle [\si{\degree}]')
    graph2.set_ylabel('Count')
    artist.utils.save_graph(graph2, suffix='theta', dirname='plots')


if __name__ == '__main__':
    if 'data' not in globals():
        # For single station plots
        #data = tables.open_file('month-single.h5')
        # For station / cluster plots
        #data = tables.open_file('new.h5')
        #data = tables.open_file('newlarge.h5')
        data = tables.open_file('master.h5')
        # For N vs R plot
        #data = tables.open_file('master-large.h5')
        # No data
        #data = None

    artist.utils.set_prefix("SP-DIR-")
    utils.set_prefix("SP-DIR-")
    main(data)
    graph.plot(x, rad2deg(f_y2), mark=None)
    graph.plot(x, rad2deg(l_y2), mark=None, linestyle='dashed')
    graph.set_xlabel(r"Shower zenith angle [\si{\degree}]")
    graph.set_ylabel(r"Angle reconstruction uncertainty [\si{\degree}]")
    artist.utils.save_graph(graph, dirname='plots')


if __name__ == '__main__':
    # invalid values in arcsin will be ignored (nan handles the situation
    # quite well)
    np.seterr(invalid='ignore', divide='ignore')

    try:
        data
    except NameError:
        data = tables.open_file('kascade.h5', 'r')

    artist.utils.set_prefix("KAS-")
    utils.set_prefix("KAS-")
    do_reconstruction_plots(data, data.root.reconstructions)
    do_lint_comparison(data)
    artist.utils.set_prefix("KAS-LINT-")
    utils.set_prefix("KAS-LINT-")
    do_reconstruction_plots(data, data.root.lint_reconstructions)
    artist.utils.set_prefix("KAS-OFFSETS-")
    utils.set_prefix("KAS-OFFSETS-")
    do_reconstruction_plots(data, data.root.reconstructions_offsets)
    artist.utils.set_prefix("KAS-LINT-OFFSETS-")
    utils.set_prefix("KAS-LINT-OFFSETS-")
    do_reconstruction_plots(data, data.root.lint_reconstructions_offsets)
Exemplo n.º 6
0
    #ylim(0, 100)
    #legend(numpoints=1)
    utils.saveplot()
    artist.utils.save_graph(graph, dirname='plots')
    print


if __name__ == '__main__':
    # invalid values in arcsin will be ignored (nan handles the situation
    # quite well)
    np.seterr(invalid='ignore', divide='ignore')

    try:
        data
    except NameError:
        data = tables.open_file('master-ch4v2.h5', 'r')

    if '/reconstructions' not in data:
        print "Reconstructing shower direction..."
        do_full_reconstruction(data)
    else:
        print "Skipping reconstruction!"

    utils.set_prefix("DIR-")
    artist.utils.set_prefix("DIR-")
    do_reconstruction_plots(data)

    # These currently don't work
#    utils.set_prefix("WIP-")
#    do_jos_plots(data)
Exemplo n.º 7
0
    #ylim(0, 100)
    #legend(numpoints=1)
    utils.saveplot()
    artist.utils.save_graph(graph, dirname='plots')
    print


if __name__ == '__main__':
    # invalid values in arcsin will be ignored (nan handles the situation
    # quite well)
    np.seterr(invalid='ignore', divide='ignore')

    try:
        data
    except NameError:
        data = tables.open_file('master-ch4v2.h5', 'r')

    if '/reconstructions' not in data:
        print "Reconstructing shower direction..."
        do_full_reconstruction(data)
    else:
        print "Skipping reconstruction!"

    utils.set_prefix("DIR-")
    artist.utils.set_prefix("DIR-")
    do_reconstruction_plots(data)

    # These currently don't work
#    utils.set_prefix("WIP-")
#    do_jos_plots(data)