Skip to content

Commit

Permalink
Change function names to underscore.
Browse files Browse the repository at this point in the history
  • Loading branch information
morriscb committed Nov 30, 2020
1 parent b862999 commit ea17837
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
12 changes: 6 additions & 6 deletions python/lsst/ap/pipe/matchApFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,12 +122,12 @@ def run(self, fakeCat, diffIm, associatedDiaSources):
- ``matchedDiaSources`` : Fakes matched to input diaSources. Has
length of ``fakeCat``. (`pandas.DataFrame`)
"""
trimmedFakes = self.trimFakeCat(fakeCat, diffIm)
trimmedFakes = self._trimFakeCat(fakeCat, diffIm)
nPossibleFakes = len(trimmedFakes)

fakeVects = self.getVectors(trimmedFakes[self.config.raColName],
trimmedFakes[self.config.decColName])
diaSrcVects = self.getVectors(
fakeVects = self._getVectors(trimmedFakes[self.config.raColName],
trimmedFakes[self.config.decColName])
diaSrcVects = self._getVectors(
np.radians(associatedDiaSources.loc[:, "ra"]),
np.radians(associatedDiaSources.loc[:, "decl"]))

Expand All @@ -146,7 +146,7 @@ def run(self, fakeCat, diffIm, associatedDiaSources):
associatedDiaSources.reset_index(drop=True), on="diaSourceId", how="left")
)

def trimFakeCat(self, fakeCat, image):
def _trimFakeCat(self, fakeCat, image):
"""Trim the fake cat to about the size of the input image.
Parameters
Expand Down Expand Up @@ -175,7 +175,7 @@ def trim(row):

return fakeCat[fakeCat.apply(trim, axis=1)]

def getVectors(self, ras, decs):
def _getVectors(self, ras, decs):
"""Convert ra dec to unit vectors on the sphere.
Parameters
Expand Down
2 changes: 1 addition & 1 deletion tests/test_matchApFakes.py
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ def testTrimCat(self):
"""Test that the correct number of sources are in the ccd area.
"""
matchTask = MatchApFakesTask()
result = matchTask.trimFakeCat(self.fakeCat, self.exposure)
result = matchTask._trimFakeCat(self.fakeCat, self.exposure)
self.assertEqual(len(result), self.inExp.sum())


Expand Down

0 comments on commit ea17837

Please sign in to comment.