Source code for synphot.exceptions
# Licensed under a 3-clause BSD style license - see LICENSE.rst
"""Exceptions specific to synthetic photometry."""
__all__ = ['SynphotError', 'TableFormatError', 'DuplicateWavelength',
'ZeroWavelength', 'UnsortedWavelength', 'OverlapError',
'PartialOverlap', 'DisjointError', 'UndefinedBinset',
'IncompatibleSources', 'InterpolationNotAllowed',
'ExtrapolationNotAllowed']
[docs]
class SynphotError(Exception):
"""Base class for synphot exceptions."""
pass
[docs]
class DuplicateWavelength(TableFormatError):
"""Duplicate wavelengths are not allowed in table."""
pass
[docs]
class ZeroWavelength(TableFormatError):
"""Zero wavelengths are not allowed in table."""
pass
[docs]
class UnsortedWavelength(TableFormatError):
"""Unsorted wavelengths are not allowed in table."""
pass
[docs]
class OverlapError(SynphotError):
"""Exceptions to do with overlap checking."""
pass
[docs]
class PartialOverlap(OverlapError):
"""Partial overlap is not allowed."""
pass
[docs]
class DisjointError(OverlapError):
"""Disjoint data is not allowed."""
pass
[docs]
class UndefinedBinset(SynphotError):
"""Exceptions for undefined bin set."""
pass
[docs]
class IncompatibleSources(SynphotError):
"""Two sources in composite spectrum are not compatible."""
pass
[docs]
class InterpolationNotAllowed(SynphotError):
"""Exceptions for interpolation."""
pass