Skip to content

Commit 9f890a5

Browse files
committed
Update DIA unit test data tables
1 parent 38cd144 commit 9f890a5

6 files changed

+6198
-1256
lines changed

Diff for: tests/assocDiaSrc_test.ecsv

-654
This file was deleted.

Diff for: tests/data/assocDiaSrc_test.ecsv

+3,095
Large diffs are not rendered by default.

Diff for: tests/data/diaSourceTable_tract_test.ecsv

+3,095
Large diffs are not rendered by default.

Diff for: tests/diaSourceTable_tract_test.ecsv

-594
This file was deleted.

Diff for: tests/test_diaSourceMetrics.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -30,17 +30,17 @@ class DiaSourceTest(lsst.utils.tests.TestCase):
3030
and a plot is generated without falling over."""
3131

3232
def setUp(self):
33-
testFile = "tests/assocDiaSrc_test.ecsv"
33+
testFile = "tests/data/assocDiaSrc_test.ecsv"
3434
self.data = Table.read(testFile)
3535

3636
def test_metrics(self):
3737
"""Test that metrics have the expected values from the test data."""
3838
NumDiaSources = diaAtool.NumGoodDiaSourcesMetrics()
3939
NumDiaSources.finalize()
4040
DiaSourceCount = NumDiaSources(self.data)
41-
self.assertEqual(DiaSourceCount["numAllDiaSources"].quantity.value, 558)
42-
self.assertEqual(DiaSourceCount["numGoodDiaSources"].quantity.value, 547)
43-
self.assertEqual(DiaSourceCount["ratioGoodToAllDiaSources"].quantity.value, 547 / 558)
41+
self.assertEqual(DiaSourceCount["numAllDiaSources"].quantity.value, 2994)
42+
self.assertEqual(DiaSourceCount["numGoodDiaSources"].quantity.value, 2938)
43+
self.assertEqual(DiaSourceCount["ratioGoodToAllDiaSources"].quantity.value, 2938 / 2994)
4444

4545

4646
if __name__ == "__main__":

Diff for: tests/test_diaSourceTableTractMetrics.py

+4-4
Original file line numberDiff line numberDiff line change
@@ -31,25 +31,25 @@ class DiaSourceTableTractTest(lsst.utils.tests.TestCase):
3131
and a plot is generated without falling over."""
3232

3333
def setUp(self):
34-
testFile = "tests/diaSourceTable_tract_test.ecsv"
34+
testFile = "tests/data/diaSourceTable_tract_test.ecsv"
3535
self.data = Table.read(testFile)
3636

3737
def test_metrics(self):
3838
"""Test that metrics have the expected values from the test data."""
3939
NumDiaSources = diaAtool.NumDiaSourcesMetric()
4040
NumDiaSources.finalize()
4141
goodDiaSourceCount = NumDiaSources(self.data)
42-
self.assertEqual(goodDiaSourceCount["numDiaSources"].quantity.value, 344)
42+
self.assertEqual(goodDiaSourceCount["numDiaSources"].quantity.value, 2938)
4343

4444
NumStreakDiaSources = diaAtool.NumStreakDiaSourcesMetric()
4545
NumStreakDiaSources.finalize()
4646
streakDiaSourceCount = NumStreakDiaSources(self.data)
47-
self.assertEqual(streakDiaSourceCount["numStreakDiaSources"].quantity.value, 3)
47+
self.assertEqual(streakDiaSourceCount["numStreakDiaSources"].quantity.value, 8)
4848

4949
NumStreakCenterDiaSources = diaAtool.NumStreakCenterDiaSourcesMetric()
5050
NumStreakCenterDiaSources.finalize()
5151
streakCenterDiaSourceCount = NumStreakCenterDiaSources(self.data)
52-
self.assertEqual(streakCenterDiaSourceCount["numStreakCenterDiaSources"].quantity.value, 1)
52+
self.assertEqual(streakCenterDiaSourceCount["numStreakCenterDiaSources"].quantity.value, 7)
5353

5454
def test_plot(self):
5555
"""Test that a plot is created from the test data."""

0 commit comments

Comments
 (0)