fatiando / boule

Reference ellipsoids for geodesy and geophysics
https://www.fatiando.org/boule
BSD 3-Clause "New" or "Revised" License
38 stars 17 forks source link

Add `semimedium_axis` property to sphere and ellipsoid #192

Closed MarkWieczorek closed 1 month ago

MarkWieczorek commented 7 months ago

Squash and Merge comment

Add semimedium_axis and semimajor_axis_longitude to the Sphere and Ellipsoid classes for compatibility with the TriaxialEllipsoid. Don't use mathematical symbols for the semimedium_axis. Remove the "Added for compatibility with pymap3d" comment in some of the properties.


This PR adds the property semimedium_axisand semimajor_axis_longitude to the Sphere and Ellipsoid classes. This is done for compatibility. I note that the Sphere class already had semiminor and semimajor axes set.

Furthermore, I have removed "Added for compatibility with pymap3d" from the docstring, as I encountered this compatibility problem in pyshtools... In many cases, people will treat (Sphere, Ellipsoid, TriaxialEllipsoid) as just a boule instance, and won't care which "subclass" they are dealing with.

Relevant issues/PRs: None.

MarkWieczorek commented 1 month ago

I just made some changes using what I think is the easiest and most consistent solution: For those mathematical symbols that are not used, I deleted them.

This means that the mathematical symbols a, b, and c where removed from Sphere, and the symbol for the semimedium axis was removed from Ellipsoid.

If we revisit this later, we'll probably have to change all the definitions in Ellipsoid to be consistent with TriaxialEllipsoid. That would involve changing a bunch of equations, so lets leave that to another PR if someone feels strongly about this!