simpeg / geoana

Interactive geoscience (mostly) analytic functions.
MIT License
22 stars 11 forks source link

Bug with edge case in `spatial` rotation tools #72

Open thibaut-kobold opened 3 weeks ago

thibaut-kobold commented 3 weeks ago

Example: for CircularLoopWholeSpace, you get the same responses whether orientation is [0,0,1] or [0,0,-1] (when they should be mirrored). Interestingly, if you use just a slightly offset orientation (ex: [0,0.01,-np.sqrt(1-.01*.01)])), you get the right answer for the pointing down orientation case.

I narrowed it down to this line of code, an issue with the in-house spatial.rotate_points_from_normals

I think the best course of action would be to replace the existing custom, in-house tooling, with scipy rotations

image