swspy package

Subpackages

Submodules

swspy.testing module

swspy.testing.assert_angle_allclose(actual, desired, **kwargs)

Raises an AssertionError if two objects are not equal accounting for angle

This wraps numpy.testing.assert_allclose but values such as 0.0, 360.0 and 180.0 are all treated as being the same. Keyword arguments are passed on.

swspy.testing.clamp_angle(angle_in)

Assuming 180 degree periodicity, represent an angle between -90 and +90 degrees

angle is a numpy array.

swspy.testing.periodic_angular_difference(a_angle, b_angle)

Angular difference assuming 180 degree periodicity

a_angle and b_angle are numpy arrays of angle, retuns a numpy array of differences such that 0.0 and 360.0 and 180.0 are all the same.

Module contents