Ejemplo n.º 1
0
    def setUp(self):
        self.simulation = DetectorBoundarySimulation.__new__(DetectorBoundarySimulation)

        corsika_data_path = os.path.join(self_path, 'test_data/corsika.h5')
        self.corsika_data = tables.open_file(corsika_data_path, 'r')
        self.simulation.corsikafile = self.corsika_data

        self.simulation.cluster = SingleDiamondStation()
        self.detectors = self.simulation.cluster.stations[0].detectors
Ejemplo n.º 2
0
def do_simulations(data, seeds):
    cluster = SingleDiamondStation()
    distances = around(logspace(1.3, 2.7, 10))
    for distance in distances:
        sim = ModSim(corsikafile_path=CORSIKA_DATA % seeds,
                     max_core_distance=distance,
                     cluster=cluster,
                     data=data,
                     N=5000,
                     progress=False,
                     output_path=make_sim_path(seeds, distance))
        sim.run()
Ejemplo n.º 3
0
    # plotd.set_title('Distance between reconstructed angles for station and cluster')
    plotd.set_xlabel('Angle between reconstructions [\si{\degree}]')
    plotd.set_ylabel('Counts')
    plotd.set_xlimits(min=0, max=90)
    plotd.set_ylimits(min=0)
    plotd.save_as_pdf('angle_between_Zenith_discrete')

    plotd = Plot()
    distances = []
    for t, p in angles:
        distances.extend(angle_between(t, p, np.array(theta), np.array(phi)))
    counts, bins = np.histogram(distances, bins=np.linspace(0, np.pi, 361))
    plotd.histogram(counts, np.degrees(bins))
    # plotd.set_title('Distance between reconstructed angles for station and cluster')
    plotd.set_xlabel('Angle between reconstructions [\si{\degree}]')
    plotd.set_ylabel('Counts')
    plotd.set_xlimits(min=0, max=90)
    plotd.set_ylimits(min=0)
    plotd.save_as_pdf('angle_between_Zenith_discrete_all')


if __name__ == '__main__':

    dirrec = DirectAlgorithmCartesian2D()

    station = SingleDiamondStation().stations[0]

    angles = reconstruct_for_detectors([0, 1, 2])
    plot_discrete(angles)
    angles_between_discrete(angles)
Ejemplo n.º 4
0
    def __init__(self):
        super(SingleDiamondEnergySensitivity, self).__init__()

        # Detectors
        self.cluster = SingleDiamondStation()