spherical_pole_transform¶
- sofia_redux.scan.coordinate_systems.coordinate_systems_numba_functions.spherical_pole_transform(x, px, cos_lat, sin_lat, p_cos_lat, p_sin_lat, phi0, reverse=False)[source]¶
Transform spherical coordinates to a new pole.
The transformation occurs according to:
xt = arcsin((sin(py) * sin(y)) + (cos(py) * cos(y) * cos(dl))) yt = o + arctan2((-sin(y) * cos(py)) + (cos(y) * sin(py) * cos(dl)), (-cos(y) * sin(dl)))
For when
reverse=False
:dl = x - px o = pi/2 - phi0
and when
reverse=True
:dl = x + phi0 o = x + pi/2
Here, (x, px) refer respectively to the coordinate and pole longitudes, while (y, py) refer to latitudes.
- Parameters:
- xnumpy.ndarray (float)
The coordinate LON values in radians of shape (1,) or (n,).
- pxnumpy.ndarray (float)
The new pole longitude position in radians of shape (1,) or (n,).
- cos_latnumpy.ndarray (float)
The cosine(latitude) values of shape (1,) or (n,).
- sin_latnumpy.ndarray (float)
The sine(latitude) values of shape (1,) or (n,).
- p_cos_latnumpy.ndarray (float)
The cosine(latitude) values of the pole of shape (1,) or (n,).
- p_sin_latnumpy.ndarray (float)
The sine(latitude) values of the pole od shape (1,) or (n,).
- phi0float
The phi0 angle in radians.
- reversebool, optional
If
True
, perform the inverse transform (transform from pole rather than to).
- Returns:
- transformed_coordinatesnumpy.ndarray (float)
The transformed coordinates in radians of shape (2, n or 1).