convert_xyz_to_spherical

pywwt.windows.utils.convert_xyz_to_spherical(x, y, z, is_astro=True, ra_units='degrees')[source]

Convert rectangular coordinates (x,y,z) to spherical coordinates (Lat, Lon, Alt) or (RA, Dec, Alt).

Parameters:
xnumpy.ndarray

The x-coordinates of the data.

ynumpy.ndarray

The y-coordinates of the data.

znumpy.ndarray

The z-coordinates of the data.

is_astrobool, optional

Whether the coordinate system is astronomical (RA, Dec) or geographical (Lat, Lon)?

ra_units{‘degrees’, ‘hours’}, optional

The unit of the RA/Lon coordinate.

Returns:
sphericaldict

A dict of NumPy arrays corresponding to the positions in spherical coordinates.