pwem.convert.trigonometry module
- class pwem.convert.trigonometry.FibonacciSphere(half_points=2500)[source]
Bases:
object
- static fibonacci_sphere(num_points: int = 5000)[source]
1000 OK small graph 5000 OK large graph more than 10000 does not make sense
Computes a set of x,y,z equidistant points on the surface of a sphere of radius 1 using the fibonacci method
- Parameters
num_points – number of points to compute.
:returns x,y,z as lists
- class pwem.convert.trigonometry.TrigonometricMemoization(factor=100)[source]
Bases:
object
Stores sines of 0 to 90 degrees in a list. These are used as the basis for calculating and returning sines, cosines and tangents of any angle.
With the default, errors are in the 4th decimal point
Calculates sines of 0 to 90 degrees and appends them to a list.
- Parameters
factor – default(100). List size = 90 * factor. The higher the factor the higher the precision.