Skip to content

Commit

Permalink
Redefine error as TypeError
Browse files Browse the repository at this point in the history
  • Loading branch information
plazas committed Apr 6, 2020
1 parent a9ba753 commit 4b43ef8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions python/lsst/ip/isr/crosstalk.py
Original file line number Diff line number Diff line change
Expand Up @@ -166,7 +166,9 @@ def run(self, exposure, crosstalkSources=None, isTrimmed=False):
------
RuntimeError
Raised if called for a detector that does not have a
crosstalk correction. Also, if crosstalkSources is not None
crosstalk correction.
TypeError
Raised if crosstalkSources is not None
and not a numpy array or a dictionary.
"""
if crosstalkSources is not None:
Expand All @@ -189,7 +191,7 @@ def run(self, exposure, crosstalkSources=None, isTrimmed=False):
coeffs.append(tempList)
coeffs = np.array(coeffs)
else:
raise RuntimeError("crosstalkSources not of the correct type: `np.array` or `dict`")
raise TypeError("crosstalkSources not of the correct type: `np.array` or `dict`")
else:
detector = exposure.getDetector()
if not self.config.hasCrosstalk(detector=detector):
Expand Down

0 comments on commit 4b43ef8

Please sign in to comment.