Skip to content

Commit

Permalink
Removed optika.surfaces.AbstractSurface.is_spectral_stop since it w…
Browse files Browse the repository at this point in the history
…as too difficult to figure out.
  • Loading branch information
byrdie committed Oct 9, 2023
1 parent dac5474 commit 2ec7924
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 13 deletions.
3 changes: 0 additions & 3 deletions optika/_tests/test_surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ def test_is_field_stop(self, a: optika.surfaces.AbstractSurface):
def test_is_aperture_stop(self, a: optika.surfaces.AbstractSurface):
assert isinstance(a.is_aperture_stop, bool)

def test_is_spectral_stop(self, a: optika.surfaces.AbstractSurface):
assert isinstance(a.is_spectral_stop, bool)

def test_is_stop(self, a: optika.surfaces.AbstractSurface):
assert isinstance(a.is_stop, bool)

Expand Down
12 changes: 2 additions & 10 deletions optika/surfaces.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,12 @@ def is_aperture_stop(self) -> bool:
for the system
"""

@property
@abc.abstractmethod
def is_spectral_stop(self) -> bool:
"""
flag controlling whether this surface should act as the surface
determining the wavelength range of the system
"""

@property
def is_stop(self) -> bool:
"""
If this surface is any type of stop, field/pupil/spectal, return :obj:`True`.
If this surface is pupil stop or the field stop, return :obj:`True`.
"""
return self.is_field_stop or self.is_aperture_stop or self.is_spectral_stop
return self.is_field_stop or self.is_aperture_stop

def propagate_rays(
self,
Expand Down

0 comments on commit 2ec7924

Please sign in to comment.