Refactor code to have a single `Ellipsoid` class
Refactor the ellipsoid code to have a single Ellipsoid class that can represent any type of ellipsoid. Ditch the specific classes for each ellipsoid type. Update the forward modelling code for gravity and magnetics. Make use of an extra rotation matrix that aligns the x, y, z local coordinate system to the ellipsoid's semiaxes in decreasing order, so a >= b >= c. Modify the analytic solutions for oblate ellipsoids in such way that they are defined by a == b > c (instead of a < b = c as Takahashi et al. and Clark et al. do). Make rotation angles and center as optional arguments for the Ellipsoid class. Fix numerical instabilities of triaxial ellipsoids when they approximate prolate or oblate ellipsoids (when two semiaxes lengths are close enough to each other). Update the tests and add a few more for the new bits of code.
Relevant issues/PRs:
Part of #594
TODO:
- [x] add tests for the ~
get_permutation_matrix~get_semiaxes_rotation_matrixfunction (fixed a bug on it) - [x] test gravity and magnetic fields of triaxial ellipsoids vs oblates and prolates (when two of the semiaxes are similar to each other).