Beispiel #1
0
	def test_process_positive_edge(self):
		# outer = 148, right half (second half of data though!)
		xds, yds = self.getInnerAndDetDatasetForGivenOuterValue(148.0)
		x = dnp.asarray(xds.data[(len(xds) / 2):])
		y = dnp.asarray(yds.data[(len(yds) / 2):])
		expected = -3.944682,  0.006067,  0.000000,  0.000000,  1.683015,  0.006067
		check(TwoGaussianEdges()._process(x, y), expected, TwoGaussianEdges().labelList)
Beispiel #2
0
	def test_process_negative_edge(self):
		# outer = 148, left half (first half of data though!)
		xds, yds = self.getInnerAndDetDatasetForGivenOuterValue(148.0)
		x = dnp.asarray(xds.data[:(len(xds) / 2)])
		y = dnp.asarray(yds.data[:(len(yds) / 2)])
		expected = 0.000000,  0.000000, -3.896408,  0.006343,  1.699449,  0.006343
		check(TwoGaussianEdges()._process(x, y), expected, TwoGaussianEdges().labelList)
Beispiel #3
0
	def test_with_failing_negative_edge_2014(self):
		loadedFile = dnp.io.load(WIRESCANFILE_FAILING_NEGATIVE_STEP)
		kbwireYDataset = getDatasetFromLoadedFile(loadedFile, 'kbwireY')
		ai2Dataset = getDatasetFromLoadedFile(loadedFile, 'ai2')

		result = TwoGaussianEdges()._process(kbwireYDataset, ai2Dataset)

		expected = 0.000000,  0.000000, -3.878564,  0.777419,  1.535403,  0.777419
		check(result, expected, TwoGaussianEdges().labelList)
Beispiel #4
0
	def setUp(self):
		Test.setUp(self)

		loadedFile = dnp.io.load(WIRESCANFILE)
		self.outer = getDatasetFromLoadedFile(loadedFile, 'tbdiagZcoarse')
		self.inner = getDatasetFromLoadedFile(loadedFile, 'tbdiagY')
		self.det = getDatasetFromLoadedFile(loadedFile, 'pips2')
		self.labels = TwoGaussianEdges().labelList
Beispiel #5
0
	def test_process_negative_pulse(self):
		# outer = 148, y --> -1
		x, y = self.getInnerAndDetDatasetForGivenOuterValue(148.0)
		y = y * -1
		expected = -3.896408,  0.006343, -3.944682,  0.006067,  1.691232,  0.006205
		check(TwoGaussianEdges()._process(x, y), expected, TwoGaussianEdges().labelList)
Beispiel #6
0
	def test_process_positive_pulse_185(self):
		x, y = self.getInnerAndDetDatasetForGivenOuterValue(185.0)
		expected = -3.946507,  0.011813, -3.898099,  0.011800,  1.715308,  0.011806
		check(TwoGaussianEdges()._process(x, y), expected, TwoGaussianEdges().labelList)
Beispiel #7
0
	def test_process_positive_pulse_158(self):
		x, y = self.getInnerAndDetDatasetForGivenOuterValue(158.0)
		expected = -3.944114,  0.002347, -3.895760,  0.002611,  1.637478,  0.002479
		check(TwoGaussianEdges()._process(x, y), expected, TwoGaussianEdges().labelList)
Beispiel #8
0
	def test_process_positive_pulse_148(self):
		x, y = self.getInnerAndDetDatasetForGivenOuterValue(148.0)
		expected = -3.944682,  0.006067, -3.896408,  0.006343,  1.691232,  0.006205
		check(TwoGaussianEdges()._process(x, y), expected, TwoGaussianEdges().labelList)