Ejemplo n.º 1
0
 def testDistanceAVGLocalKappaAveraging(self):
     R = numpy.concatenate((numpy.linspace(5.05, 5.95, 20), numpy.linspace(5.05, 5.95, 20), numpy.linspace(5.05, 5.95, 20)))
     kappa = [ 1.  ] * 20 + [ 1. ] * 20 + [ 0. ] * 20
     weights = [ 1. ] * 60
     tm = DistanceAVGKappaTransferMatrix(20, 11, 5, self.constant5000Burstgen, 5.475, R, kappa, weights, RRange = (5, 6))
     self.assertEqual(tm.getKappaAVG()[2], 2. / 3)
     self.assertEqual(tm.RRange[0], 5)
     self.assertEqual(tm.RRange[1], 6)
     self.assertEqual(tm.getMatrix()[9][5], 1.)