calculate_celestial_pole_array

sofia_redux.scan.coordinate_systems.projection.projection_numba_functions.calculate_celestial_pole_array(native_reference_x, native_reference_cos_lat, native_reference_sin_lat, reference_x, reference_y, reference_cos_lat, reference_sin_lat, native_pole_x, native_pole_y, select_solution)[source]

Calculate the celestial pole when one or more of the inputs are arrays.

This is a wrapper around calculate_celestial_pole() for use when processing array values.

Parameters:
native_reference_xfloat or numpy.ndarray

The native reference longitude in radians. If an array is provided, it should be of shape (n,).

native_reference_cos_latfloat or numpy.ndarray

The cosine of the native reference latitude. Must be the same input shape as native_reference_x.

native_reference_sin_latfloat or numpy.ndarray

The sine of the native reference latitude. Must be the same input shape as native_reference_x.

reference_xfloat or numpy.ndarray

The reference longitude in radians. If an array is provided, it should be of shape (n,).

reference_yfloat or numpy.ndarray

The reference latitude in radians. If an array is provided, it should be of shape (n,).

reference_cos_latfloat or numpy.ndarray

The cosine of the reference latitude. Must be the same input shape as reference_y.

reference_sin_latfloat or numpy.ndarray

The sine of the reference latitude. Must be the same input shape as reference_y.

native_pole_xfloat or numpy.ndarray

The native pole longitude in radians. If an array is provided, it should be of shape (n,).

native_pole_yfloat or numpy.ndarray

The native pole latitude in radians. If an array is provided, it should be of shape (n,).

select_solutionint

The celestial pole to choose. 1 for “northern”, 2 for “southern”, or 0 for “nearest”.

Returns:
celestial_pole_longitude, celestial_pole_latitudenp.ndarray, np.ndarray

The celestial pole longitude and latitude in radians of shape (1,) or (n,) depending on whether any array-like values were passed in.