brandondube / prysm

physical optics: integrated modeling, phase retrieval, segmented systems, polynomials and fitting, sequential raytracing...
https://prysm.readthedocs.io/en/stable/
MIT License
267 stars 46 forks source link

Raytrace unit tests #73

Open brandondube opened 2 years ago

brandondube commented 2 years ago

Unit tests are needed for ray-tracing. A functional test suite that proves the code doesn't crash for each surface type is low-hanging fruit. Some "physics" tests, like a parabola has no ray error for an object at infinity and a sphere no ray error for an object at its focus, shoudl be added.

The lower level functions are probably unit test-able, e.g. that the angle between surface normal and entrance ray is the same as surface normal and exit ray.