raysect / source

The main source repository for the Raysect project.
http://www.raysect.org
BSD 3-Clause "New" or "Revised" License
86 stars 23 forks source link

Allow Ray.extinction_min_depth to be equal to 1 #406

Closed vsnever closed 2 years ago

vsnever commented 2 years ago

There is a check in ray.extinction_min_depth.setter that prevents setting it to 1: https://github.com/raysect/source/blob/3c1f2f2f1cce9c2a2d5ca2952a70af3287d53dbf/raysect/optical/ray.pyx#L276-L279

Because of this, ray.max_depth cannot be set to 1 either: https://github.com/raysect/source/blob/3c1f2f2f1cce9c2a2d5ca2952a70af3287d53dbf/raysect/optical/ray.pyx#L291-L294

However, setting both values to 1 will be the easiest way to run the simulation without reflections. For now, the only alternative to this is to replace all reflective materials with AbsorbingSurface().

Is there a reason why ray.extinction_min_depth or ray.max_depth cannot be equal to 1?

CnlPepper commented 2 years ago

The extinction_min_depth equality looks like a typo as it is inconsistent with the exception and I can't think of any reason why it can't be 1. I'll run an experiment and check.

CnlPepper commented 2 years ago

Fixed in development. Will be in v0.8.1.