Chandra-MARX / marxs

Multi-Architecture-Raytrace-Xraymission-Simulator
http://marxs.readthedocs.io/en/latest/
GNU General Public License v3.0
6 stars 9 forks source link

Sometimes directions are not normalized #170

Open hamogu opened 6 years ago

hamogu commented 6 years ago

While the code does not really required normalized direction vectors, it would be good for consistency to enforce that. The way forward is probably to add this to optical element testing to identify optical elements that distort the normalization and then see if that's OK (and just re-normalize after passing through that element) or indicative of a bug.

hamogu commented 6 years ago

With the "propagate" function that I'm considering now, code will actually require that (or I would normalize at every point where it's required). I think a better strategy would be to identify where it's not normalized and fix those and then add a test for test_all_optical_elements.