yaw.core.coordinates.DistSky#

class yaw.core.coordinates.DistSky(distance: ArrayLike)[source]#

Bases: Distance

Implements a vector of angular distances in radian.

Constructs a new vector of distances.

Parameters:

distance (float, NDArray) – Distance values.

Note

The coordinate vector has a length, supports numpy-style indexing and iteration over the elements (always returning new coordinate vector instances).

Additionally, distances implement element-wise addition and subtraction, as well as the comparison operators.

Methods

__init__(distance)

Constructs a new vector of distances.

from_dists(dists)

Concatenate a sequence of distances into a new vector of distances.

max()

Compute the maximum value and return it as new Distance instance.

min()

Compute the minimum value and return it as new Distance instance.

to_3d()

Convert the distance to the Euclidean distance.

to_sky()

Convert the distance to an angular separation in radian.

Attributes

values

The distances cast into a numpy array with shape (N,) or a scalar if there is only a single distance.

classmethod from_dists(dists: Sequence[_Tdist]) _Tdist#

Concatenate a sequence of distances into a new vector of distances.

max() _Tdist#

Compute the maximum value and return it as new Distance instance.

min() _Tdist#

Compute the minimum value and return it as new Distance instance.

to_3d() Dist3D[source]#

Convert the distance to the Euclidean distance.

to_sky() DistSky[source]#

Convert the distance to an angular separation in radian.

property values: NDArray[np.float64] | float#

The distances cast into a numpy array with shape (N,) or a scalar if there is only a single distance.