diff --git a/optika/systems.py b/optika/systems.py index 4fd729a..7e7b7ee 100644 --- a/optika/systems.py +++ b/optika/systems.py @@ -407,7 +407,7 @@ def _calc_rayfunction_stops( if obj.transformation is not None: rays = obj.transformation.inverse(rays) - where = rays.direction @ obj.sag.normal(rays.position) != -1 + where = rays.direction @ obj.sag.normal(rays.position) > 0 result.outputs.direction[where] = -result.outputs.direction[where] if self.transformation is not None: