Skip to content

Commit

Permalink
Fixed a bug in optika.systems.SequentialSystem.rayfunction_stops wh…
Browse files Browse the repository at this point in the history
…ere rays weren't being flipped properly.
  • Loading branch information
byrdie committed Oct 19, 2024
1 parent 56dba2d commit 890f144
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion optika/systems.py
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 890f144

Please sign in to comment.