Celprm¶

class
astropy.wcs.
Celprm
¶ Bases:
object
Class 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
Readonly
numpy.ndarray
with 5 elements.bool
, readonly.int
, readonly.boolean
Is there an offset?Readonly Celestial transformation parameters.
numpy.ndarray
with 4 elements.Methods Summary
set
()Sets up a
celprm
struct according to information supplied within it.Attributes Documentation

euler
¶ Readonly
numpy.ndarray
with 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
, readonly. 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
, readonly. For informational purposes, this indicates how theLATPOLEa
keyword was used: 0: Not required,
theta_p == delta_p
was determined uniquely by the CRVALia
andLONPOLEa
keywords.
 0: Not required,
1: Required to select between two valid solutions of
theta_p
.2:
theta_p
was specified solely byLATPOLEa
.

offset
¶ boolean
Is 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]’’. IfNone
ornan
, the initialization routine,celset()
, will set this to a projectionspecific default.

prj
¶ Readonly Celestial transformation parameters. Some members of
Prjprm
are readwrite, i.e., can be set by the user. For more details, see documentation forPrjprm
.

ref
¶ numpy.ndarray
with 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 theCRVALia
keywords 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 theFITS
keywordsLONPOLEa
andLATPOLEa
(or byPVi_2a
andPVi_3a
attached to the longitude axis which take precedence if defined).LONPOLEa
defaults tophi0
if 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 toNone
ornumpy.nan
or 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 byCRVALia
andLONPOLEa
in which caseLATPOLEa
is ignored. However, in some circumstances there are two valid solutions fortheta_p
andLATPOLEa
is used to choose between them.LATPOLEa
is 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.0
to choose the more northerly solution  the default if theLATPOLEa
keyword is omitted from theFITS
header. For the special case where the fiducial point of the projection is at native latitude zero, its celestial latitude is zero, andLONPOLEa
=+/ 90.0
then the celestial latitude of the native pole is not determined by the first three reference values andLATPOLEa
specifies it completely.The returned value, celprm.latpreq, specifies how
LATPOLEa
was 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]
. IfNone
ornan
, the initialization routine,celset()
, will set this to a projectionspecific default.
Methods Documentation

set
()¶ Sets up a
celprm
struct 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
MemoryError
Memory allocation failed.
InvalidPrjParametersError
Invalid celestial parameters.
