Skip to content

Commit

Permalink
Rename TestImagePsf
Browse files Browse the repository at this point in the history
  • Loading branch information
jmeyers314 committed Nov 10, 2020
1 parent f2faf26 commit 0030af2
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions tests/test_imagePsf_trampoline.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,19 +32,19 @@
from lsst.meas.algorithms import ImagePsf


class DummyImagePsf(ImagePsf):
_factory = StorableHelperFactory(__name__, "DummyImagePsf")
class TestImagePsf(ImagePsf):
_factory = StorableHelperFactory(__name__, "TestImagePsf")

def __init__(self, image):
ImagePsf.__init__(self)
self.image = image

# "public" virtual overrides
def __deepcopy__(self, meta=None):
return DummyImagePsf(self.image)
return TestImagePsf(self.image)

def resized(self, width, height):
raise NotImplementedError("resized not implemented for DummyImagePsf")
raise NotImplementedError("resized not implemented for TestImagePsf")

def isPersistable(self):
return True
Expand All @@ -57,7 +57,7 @@ def _doComputeBBox(self, position=None, color=None):
return self.image.getBBox()

def _getPersistenceName(self):
return "DummyImagePsf"
return "TestImagePsf"

def _getPythonModule(self):
return __name__
Expand All @@ -67,10 +67,10 @@ def _write(self):

@staticmethod
def _read(pkl):
return DummyImagePsf(pickle.loads(pkl))
return TestImagePsf(pickle.loads(pkl))

def __eq__(self, rhs):
if isinstance(rhs, DummyImagePsf):
if isinstance(rhs, TestImagePsf):
return np.array_equal(self.image.array, rhs.image.array)
return False

Expand All @@ -85,7 +85,7 @@ def setUp(self):
# Some arbitrary circular double Gaussian
self.img.array[:] = np.exp(-0.5*rsqr**2) + np.exp(-0.5*rsqr**2/4)
self.img.array /= np.sum(self.img.array)
self.psf = DummyImagePsf(self.img)
self.psf = TestImagePsf(self.img)

def testImage(self):
self.assertImagesEqual(
Expand Down

0 comments on commit 0030af2

Please sign in to comment.