calculate_celestial_pole¶
- sofia_redux.scan.coordinate_systems.projection.projection_numba_functions.calculate_celestial_pole(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 a celestial pole based on a reference and native reference.
The determination of a celestial pole may involve a few steps. The first is to determine the reference position about the native pole wrt the native reference. The next step involves finding the positions of the northern and southern poles.
A number of solutions are available at this point, and may be selected via the
select_solution
parameter value:- -1Always select the southern pole.
1 : Always select the northern pole. 0 : Select the pole closest to the native pole.
If only one pole is found, it will always be chosen regardless of the selection method. If no pole is found, NaN values for the celestial pole coordinates will be returned.
- Parameters:
- native_reference_xfloat
The longitude of the native reference position in radians.
- native_reference_cos_latfloat
The cosine of the native reference latitude.
- native_reference_sin_latfloat
The sine of the native reference latitude.
- reference_xfloat
The reference position longitude in radians.
- reference_yfloat
The reference position latitude in radians.
- reference_cos_latfloat
The cosine of the reference latitude.
- reference_sin_latfloat
The sine of the reference latitude.
- native_pole_xfloat
The native pole longitude in radians.
- native_pole_yfloat
The native pole latitude in radians.
- select_solutionint
The method by which to choose the orientation of the celestial pole. -1 = “southern”, 1 = “northern”, 0 = “nearest”.
- Returns:
- celestial_pole_longitude, celestial_pole_latitudefloat, float
The celestial pole longitude and latitude in radians.