Skip to content

Commit

Permalink
Merge pull request #14 from lsst/tickets/DM-35355
Browse files Browse the repository at this point in the history
DM-35355: Add more docs for _validateGalsimInterpolant
  • Loading branch information
rmjarvis committed Jun 29, 2022
2 parents 78e1f6c + da1a624 commit 4b93dc0
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions python/lsst/meas/extensions/piff/piffPsfDeterminer.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,23 @@
class PiffPsfDeterminerConfig(BasePsfDeterminerTask.ConfigClass):
def _validateGalsimInterpolant(name: str) -> bool: # noqa: N805
"""A helper function to validate the GalSim interpolant at config time.
Parameters
----------
name : str
The name of the interpolant to use from GalSim. Valid options are:
Lancsos(N) where n is a positive integer
Linear
Cubic
Quintic
Delta
Nearest
SincInterpolant
Returns
-------
is_valid : bool
Whether the provided interpolant name is valid.
"""
# First, check if ``name`` is a valid Lanczos interpolant.
for pattern in (re.compile(r"Lanczos\(\d+\)"), re.compile(r"galsim.Lanczos\(\d+\)"),):
Expand Down

0 comments on commit 4b93dc0

Please sign in to comment.