Exemplo n.º 1
0
 def create_test_simulation_output(self):
     np.random.seed(1)
     cluster = clusters.SimpleCluster()
     simulation = BaseLdfSimulation(cluster, self.data, '/sim', R=100, N=100)
     self.redirect_stdout_stderr_to_devnull()
     simulation.run()
     self.restore_stdout_stderr()
    def create_test_simulation_output(self):
        np.random.seed(1)
        self.sim = 'E_100TeV/zenith_0'
        cluster = clusters.SimpleCluster(size=50)
        simulation = GroundParticlesSimulation(cluster, self.data,
                                               os.path.join('/showers', self.sim, 'leptons'),
#                                               os.path.join('/simulations', self.sim), force=True,
                                               os.path.join('/test_output', self.sim),
                                               R=10, N=20)
        self.redirect_stdout_stderr_to_devnull()
        simulation.run()
        self.restore_stdout_stderr()
Exemplo n.º 3
0
 def test_get_coordinates_after_init(self):
     cluster = clusters.SimpleCluster()
     coordinates = cluster.get_xyalpha_coordinates()
     self.assertEqual(coordinates, (0., 0., 0.))
Exemplo n.º 4
0
 def test_init_calls_super_init(self):
     with patch.object(clusters.BaseCluster, '__init__',
                       mocksignature=True) as mock_base_init:
         clusters.SimpleCluster()
         self.assertTrue(mock_base_init.called)
Exemplo n.º 5
0
 def test_cluster_stations(self):
     cluster = clusters.SimpleCluster()
     stations = cluster.stations
     self.assertEqual(len(stations), 4)
Exemplo n.º 6
0
 def setUp(self):
     self.cluster = clusters.SimpleCluster(size=100)