Celprm#
- class astropy.wcs.Celprm#
 Bases:
objectClass that contains information required to transform celestial coordinates. It consists of certain members that must be set by the user (given) and others that are set by the WCSLIB routines (returned). Some of the latter are supplied for informational purposes and others are for internal use only.
Attributes Summary
Read-only
numpy.ndarraywith 5 elements.bool, read-only.int, read-only.booleanIs there an offset?float,None.Read-only Celestial transformation parameters.
numpy.ndarraywith 4 elements.float,None.Methods Summary
set()Sets up a
celprmstruct according to information supplied within it.Attributes Documentation
- euler#
 Read-only
numpy.ndarraywith 5 elements. Euler angles and associated intermediaries derived from the coordinate reference values. The first three values are theZ-,X-, andZ-Euler angles in degrees, and the remaining two are the cosine and sine of theX-Euler angle.
- isolat#
 bool, read-only. True if the spherical rotation preserves the magnitude of the latitude, which occurs if the axes of the native and celestial coordinates are coincident. It signals an opportunity to cache intermediate calculations common to all elements in a vector computation.
- latpreq#
 int, read-only. For informational purposes, this indicates how theLATPOLEakeyword was used:- 0: Not required, 
theta_p == delta_pwas determined uniquely by the CRVALiaandLONPOLEakeywords.
- 0: Not required, 
 1: Required to select between two valid solutions of
theta_p.2:
theta_pwas specified solely byLATPOLEa.
- offset#
 booleanIs there an offset?If
True, an offset will be applied to(x, y)to force(x, y) = (0, 0)at the fiducial point, (phi_0, theta_0). Default isFalse.
- phi0#
 float,None. The native longitude, \(\phi_0\), in degrees of the fiducial point, i.e., the point whose celestial coordinates are given in ‘’Celprm.ref[0:1]’’. IfNoneornan, the initialization routine,celset(), will set this to a projection-specific default.
- prj#
 Read-only Celestial transformation parameters. Some members of
Prjprmare read-write, i.e., can be set by the user. For more details, see documentation forPrjprm.
- ref#
 numpy.ndarraywith 4 elements. (Given) The first pair of values should be set to the celestial longitude and latitude of the fiducial point in degrees - typically right ascension and declination. These are given by theCRVALiakeywords inFITS.(Given and returned) The second pair of values are the native longitude,
phi_p(in degrees), and latitude,theta_p(in degrees), of the celestial pole (the latter is the same as the celestial latitude of the native pole,delta_p) and these are given by theFITSkeywordsLONPOLEaandLATPOLEa(or byPVi_2aandPVi_3aattached to the longitude axis which take precedence if defined).LONPOLEadefaults tophi0if the celestial latitude of the fiducial point of the projection is greater than or equal to the native latitude, otherwisephi0 + 180(degrees). (This is the condition for the celestial latitude to increase in the same direction as the native latitude at the fiducial point.)ref[2]may be set toNoneornumpy.nanor 999.0 to indicate that the correct default should be substituted.theta_p, the native latitude of the celestial pole (or equally the celestial latitude of the native pole,delta_p) is often determined uniquely byCRVALiaandLONPOLEain which caseLATPOLEais ignored. However, in some circumstances there are two valid solutions fortheta_pandLATPOLEais used to choose between them.LATPOLEais set inref[3]and the solution closest to this value is used to resetref[3]. It is therefore legitimate, for example, to setref[3]to+90.0to choose the more northerly solution - the default if theLATPOLEakeyword is omitted from theFITSheader. For the special case where the fiducial point of the projection is at native latitude zero, its celestial latitude is zero, andLONPOLEa=+/- 90.0then the celestial latitude of the native pole is not determined by the first three reference values andLATPOLEaspecifies it completely.The returned value, celprm.latpreq, specifies how
LATPOLEawas actually used.
- theta0#
 float,None. The native latitude, \(\theta_0\), in degrees of the fiducial point, i.e. the point whose celestial coordinates are given inCelprm:ref[0:1]. IfNoneornan, the initialization routine,celset(), will set this to a projection-specific default.
Methods Documentation
- set()#
 Sets up a
celprmstruct according to information supplied within it.Note that this routine need not be called directly; it will be invoked by functions that need it.
- Raises:
 MemoryErrorMemory allocation failed.
InvalidPrjParametersErrorInvalid celestial parameters.