Skip to content

Commit

Permalink
Fix conflicts with DM-10803
Browse files Browse the repository at this point in the history
  • Loading branch information
djreiss committed Jun 16, 2017
1 parent 75ebcaf commit 4c14711
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions tests/testImageMapReduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -341,7 +341,7 @@ def testMean(self):
firstPixel = testExposure.getMaskedImage().getImage().getArray()[0, 0]
self.assertFloatsAlmostEqual(np.array(subMeans), firstPixel)

def testGridCentroids(self):
def testCellCentroids(self):
"""Test sample grid task which is provided a set of `cellCentroids` and
returns the mean of the subimages surrounding those centroids using 'none'
for `reduceOperation`.
Expand All @@ -361,7 +361,7 @@ def testGridCentroids(self):
firstPixel = testExposure.getMaskedImage().getImage().getArray()[0, 0]
self.assertFloatsAlmostEqual(np.array(subMeans), firstPixel)

def testGridCentroidsWrongLength(self):
def testCellCentroidsWrongLength(self):
"""Test sample grid task which is provided a set of `cellCentroids` and
returns the mean of the subimages surrounding those centroids using 'none'
for `reduceOperation`. In this case, we ensure that len(task.boxes0) !=
Expand All @@ -379,13 +379,13 @@ def testGridCentroidsWrongLength(self):

def testMasks(self):
"""Test the mask for an exposure produced by a sample grid task
where we provide a set of `gridCentroids` and thus should have
where we provide a set of `cellCentroids` and thus should have
many invalid pixels.
"""
config = AddAmountImageMapReduceConfig()
config.gridStepX = config.gridStepY = 8.
config.gridCentroidsX = [i for i in np.linspace(0, 128, 50)]
config.gridCentroidsY = config.gridCentroidsX
config.cellCentroidsX = [i for i in np.linspace(0, 128, 50)]
config.cellCentroidsY = config.cellCentroidsX
config.reducerSubtask.reduceOperation = 'average'
task = ImageMapReduceTask(config)
config.mapperSubtask.addAmount = 5.
Expand Down

0 comments on commit 4c14711

Please sign in to comment.