Tabprm¶

class
astropy.wcs.
Tabprm
¶ Bases:
object
A class to store the information related to tabular coordinates, i.e., coordinates that are defined via a lookup table.
This class can not be constructed directly from Python, but instead is returned from
tab
.Attributes Summary
int array[M]
(readonly) The lengths of the axes of the coordinate array.int
(readonly) Number of tabular coordinate axes.double array[K_M]...[K_2][K_1][M]
The tabular coordinate array.double array[M]
Index values for the reference pixel for each of the tabular coord axes.double array[M]
(readonly) Interpolated indices into the coord array.double array[K_M]...[K_2][2][M]
(readonly)int array[M]
Association between axes.int
(readonly) Total number of coord vectors in the coord array.int array[M]
Interpolated indices into the coordinate array.int array[M]
+1 if monotonically increasing, 1 if decreasing.Methods Summary
Print the contents of the
Tabprm
object to stdout.set
()Allocates memory for work arrays.
Attributes Documentation

K
¶ int array[M]
(readonly) The lengths of the axes of the coordinate array.An array of length
M
whose elements record the lengths of the axes of the coordinate array and of each indexing vector.

M
¶ int
(readonly) Number of tabular coordinate axes.

coord
¶ double array[K_M]...[K_2][K_1][M]
The tabular coordinate array.Has the dimensions:
(K_M, ... K_2, K_1, M)
(see
K
) i.e. with theM
dimension varying fastest so that theM
elements of a coordinate vector are stored contiguously in memory.

crval
¶ double array[M]
Index values for the reference pixel for each of the tabular coord axes.

delta
¶ double array[M]
(readonly) Interpolated indices into the coord array.Array of interpolated indices into the coordinate array such that Upsilon_m, as defined in Paper III, is equal to (
p0
[m] + 1) + delta[m].

extrema
¶ double array[K_M]...[K_2][2][M]
(readonly)An array recording the minimum and maximum value of each element of the coordinate vector in each row of the coordinate array, with the dimensions:
(K_M, ... K_2, 2, M)
(see
K
). The minimum is recorded in the first element of the compressed K_1 dimension, then the maximum. This array is used by the inverse table lookup function to speed up table searches.

map
¶ int array[M]
Association between axes.A vector of length
M
that defines the association between axis m in the Mdimensional coordinate array (1 <= m <= M) and the indices of the intermediate world coordinate and world coordinate arrays.When the intermediate and world coordinate arrays contain the full complement of coordinate elements in imageorder, as will usually be the case, then
map[m1] == i1
for axis i in the Ndimensional image (1 <= i <= N). In terms of the FITS keywords:map[PVi_3a  1] == i  1.
However, a different association may result if the intermediate coordinates, for example, only contains a (relevant) subset of intermediate world coordinate elements. For example, if M == 1 for an image with N > 1, it is possible to fill the intermediate coordinates with the relevant coordinate element with
nelem
set to 1. In this casemap[0] = 0
regardless of the value of i.

nc
¶ int
(readonly) Total number of coord vectors in the coord array.Total number of coordinate vectors in the coordinate array being the product K_1 * K_2 * … * K_M.

p0
¶ int array[M]
Interpolated indices into the coordinate array.Vector of length
M
of interpolated indices into the coordinate array such that Upsilon_m, as defined in Paper III, is equal to(p0[m] + 1) + delta[m]
.

sense
¶ int array[M]
+1 if monotonically increasing, 1 if decreasing.A vector of length
M
whose elements indicate whether the corresponding indexing vector is monotonically increasing (+1), or decreasing (1).
Methods Documentation

print_contents
()¶ Print the contents of the
Tabprm
object to stdout. Probably only useful for debugging purposes, and may be removed in the future.To get a string of the contents, use
repr
.

set
()¶ Allocates memory for work arrays.
Also sets up the class 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.
InvalidTabularParametersError
Invalid tabular parameters.
