Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions python/lsst/pipe/tasks/diffractionSpikeMask.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,7 @@ def run(self, exposure):

Returns
-------
spikeCat : `lsst.afw.table.SourceCatalog`
spikeCat : `lsst.afw.table.SimpleCatalog`
The entries from the reference catalog selected as stars with
diffraction spikes.
"""
Expand Down Expand Up @@ -215,7 +215,7 @@ def run(self, exposure):
mask)
else:
self.log.info("No bright stars found in the reference catalog; not masking diffraction spikes.")
return afwTable.SourceCatalog(refCat.schema)
return afwTable.SimpleCatalog(refCat.schema)

return refCat[bright][spikeCandidates].copy(deep=True)

Expand Down Expand Up @@ -355,7 +355,7 @@ def extractMagnitudes(self, refCat, filterLabel):

Parameters
----------
refCat : `lsst.afw.table.SourceCatalog`
refCat : `lsst.afw.table.SimpleCatalog`
The input reference catalog.
filterLabel : `str`
Label of filter being calibrated.
Expand Down
18 changes: 14 additions & 4 deletions tests/test_diffractionSpikeMask.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@

import os
import glob
import unittest

import numpy as np

Expand Down Expand Up @@ -48,10 +49,6 @@
})


def setup_module(module):
lsst.utils.tests.init()


class DiffractionSpikeMaskTest(lsst.utils.tests.TestCase):

def setUp(self):
Expand Down Expand Up @@ -212,3 +209,16 @@ def test_maskSources(self):
self.assertGreater(nClass2, 0)
self.assertGreater(nClass3, 0)
self.assertGreater(nClass4, 0)


class MemoryTestCase(lsst.utils.tests.MemoryTestCase):
pass


def setup_module(module):
lsst.utils.tests.init()


if __name__ == "__main__":
lsst.utils.tests.init()
unittest.main()