chord_to_cartesian

halotools.utils.chord_to_cartesian(theta, radians=True)[source] [edit on github]

Calculate chord distance on a unit sphere given an angular distance between two points.

Parameters:

theta : array

angular distance

radians : bool, optional

If True, input is interpreted as radians. If False, input in degrees. Default is True.

Returns:

C : array

chord distance

Examples

>>> theta = np.linspace(0, 1, 100)
>>> chord_distance = chord_to_cartesian(theta)