WCSLIB  7.3.1
tab.h
Go to the documentation of this file.
1 /*============================================================================
2  WCSLIB 7.3 - an implementation of the FITS WCS standard.
3  Copyright (C) 1995-2020, Mark Calabretta
4 
5  This file is part of WCSLIB.
6 
7  WCSLIB is free software: you can redistribute it and/or modify it under the
8  terms of the GNU Lesser General Public License as published by the Free
9  Software Foundation, either version 3 of the License, or (at your option)
10  any later version.
11 
12  WCSLIB is distributed in the hope that it will be useful, but WITHOUT ANY
13  WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
14  FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for
15  more details.
16 
17  You should have received a copy of the GNU Lesser General Public License
18  along with WCSLIB. If not, see http://www.gnu.org/licenses.
19 
20  Direct correspondence concerning WCSLIB to mark@calabretta.id.au
21 
22  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
23  http://www.atnf.csiro.au/people/Mark.Calabretta
24  $Id: tab.h,v 7.3.1.2 2020/08/17 11:19:09 mcalabre Exp mcalabre $
25 *=============================================================================
26 *
27 * WCSLIB 7.3 - C routines that implement the FITS World Coordinate System
28 * (WCS) standard. Refer to the README file provided with WCSLIB for an
29 * overview of the library.
30 *
31 *
32 * Summary of the tab routines
33 * ---------------------------
34 * Routines in this suite implement the part of the FITS World Coordinate
35 * System (WCS) standard that deals with tabular coordinates, i.e. coordinates
36 * that are defined via a lookup table, as described in
37 *
38 = "Representations of world coordinates in FITS",
39 = Greisen, E.W., & Calabretta, M.R. 2002, A&A, 395, 1061 (WCS Paper I)
40 =
41 = "Representations of spectral coordinates in FITS",
42 = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L.
43 = 2006, A&A, 446, 747 (WCS Paper III)
44 *
45 * These routines define methods to be used for computing tabular world
46 * coordinates from intermediate world coordinates (a linear transformation
47 * of image pixel coordinates), and vice versa. They are based on the tabprm
48 * struct which contains all information needed for the computations. The
49 * struct contains some members that must be set by the user, and others that
50 * are maintained by these routines, somewhat like a C++ class but with no
51 * encapsulation.
52 *
53 * tabini(), tabmem(), tabcpy(), and tabfree() are provided to manage the
54 * tabprm struct, and another, tabprt(), to print its contents.
55 *
56 * tabperr() prints the error message(s) (if any) stored in a tabprm struct.
57 *
58 * A setup routine, tabset(), computes intermediate values in the tabprm struct
59 * from parameters in it that were supplied by the user. The struct always
60 * needs to be set up by tabset() but it need not be called explicitly - refer
61 * to the explanation of tabprm::flag.
62 *
63 * tabx2s() and tabs2x() implement the WCS tabular coordinate transformations.
64 *
65 * Accuracy:
66 * ---------
67 * No warranty is given for the accuracy of these routines (refer to the
68 * copyright notice); intending users must satisfy for themselves their
69 * adequacy for the intended purpose. However, closure effectively to within
70 * double precision rounding error was demonstrated by test routine ttab.c
71 * which accompanies this software.
72 *
73 *
74 * tabini() - Default constructor for the tabprm struct
75 * ----------------------------------------------------
76 * tabini() allocates memory for arrays in a tabprm struct and sets all members
77 * of the struct to default values.
78 *
79 * PLEASE NOTE: every tabprm struct should be initialized by tabini(), possibly
80 * repeatedly. On the first invokation, and only the first invokation, the
81 * flag member of the tabprm struct must be set to -1 to initialize memory
82 * management, regardless of whether tabini() will actually be used to allocate
83 * memory.
84 *
85 * Given:
86 * alloc int If true, allocate memory unconditionally for arrays in
87 * the tabprm struct.
88 *
89 * If false, it is assumed that pointers to these arrays
90 * have been set by the user except if they are null
91 * pointers in which case memory will be allocated for
92 * them regardless. (In other words, setting alloc true
93 * saves having to initalize these pointers to zero.)
94 *
95 * M int The number of tabular coordinate axes.
96 *
97 * K const int[]
98 * Vector of length M whose elements (K_1, K_2,... K_M)
99 * record the lengths of the axes of the coordinate array
100 * and of each indexing vector. M and K[] are used to
101 * determine the length of the various tabprm arrays and
102 * therefore the amount of memory to allocate for them.
103 * Their values are copied into the tabprm struct.
104 *
105 * It is permissible to set K (i.e. the address of the
106 * array) to zero which has the same effect as setting
107 * each element of K[] to zero. In this case no memory
108 * will be allocated for the index vectors or coordinate
109 * array in the tabprm struct. These together with the
110 * K vector must be set separately before calling
111 * tabset().
112 *
113 * Given and returned:
114 * tab struct tabprm*
115 * Tabular transformation parameters. Note that, in
116 * order to initialize memory management tabprm::flag
117 * should be set to -1 when tab is initialized for the
118 * first time (memory leaks may result if it had already
119 * been initialized).
120 *
121 * Function return value:
122 * int Status return value:
123 * 0: Success.
124 * 1: Null tabprm pointer passed.
125 * 2: Memory allocation failed.
126 * 3: Invalid tabular parameters.
127 *
128 * For returns > 1, a detailed error message is set in
129 * tabprm::err if enabled, see wcserr_enable().
130 *
131 *
132 * tabmem() - Acquire tabular memory
133 * ---------------------------------
134 * tabmem() takes control of memory allocated by the user for arrays in the
135 * tabprm struct.
136 *
137 * Given and returned:
138 * tab struct tabprm*
139 * Tabular transformation parameters.
140 *
141 * Function return value:
142 * int Status return value:
143 * 0: Success.
144 * 1: Null tabprm pointer passed.
145 * 2: Memory allocation failed.
146 *
147 * For returns > 1, a detailed error message is set in
148 * tabprm::err if enabled, see wcserr_enable().
149 *
150 *
151 * tabcpy() - Copy routine for the tabprm struct
152 * ---------------------------------------------
153 * tabcpy() does a deep copy of one tabprm struct to another, using tabini() to
154 * allocate memory for its arrays if required. Only the "information to be
155 * provided" part of the struct is copied; a call to tabset() is required to
156 * set up the remainder.
157 *
158 * Given:
159 * alloc int If true, allocate memory unconditionally for arrays in
160 * the tabprm struct.
161 *
162 * If false, it is assumed that pointers to these arrays
163 * have been set by the user except if they are null
164 * pointers in which case memory will be allocated for
165 * them regardless. (In other words, setting alloc true
166 * saves having to initalize these pointers to zero.)
167 *
168 * tabsrc const struct tabprm*
169 * Struct to copy from.
170 *
171 * Given and returned:
172 * tabdst struct tabprm*
173 * Struct to copy to. tabprm::flag should be set to -1
174 * if tabdst was not previously initialized (memory leaks
175 * may result if it was previously initialized).
176 *
177 * Function return value:
178 * int Status return value:
179 * 0: Success.
180 * 1: Null tabprm pointer passed.
181 * 2: Memory allocation failed.
182 *
183 * For returns > 1, a detailed error message is set in
184 * tabprm::err (associated with tabdst) if enabled, see
185 * wcserr_enable().
186 *
187 *
188 * tabcmp() - Compare two tabprm structs for equality
189 * --------------------------------------------------
190 * tabcmp() compares two tabprm structs for equality.
191 *
192 * Given:
193 * cmp int A bit field controlling the strictness of the
194 * comparison. At present, this value must always be 0,
195 * indicating a strict comparison. In the future, other
196 * options may be added.
197 *
198 * tol double Tolerance for comparison of floating-point values.
199 * For example, for tol == 1e-6, all floating-point
200 * values in the structs must be equal to the first 6
201 * decimal places. A value of 0 implies exact equality.
202 *
203 * tab1 const struct tabprm*
204 * The first tabprm struct to compare.
205 *
206 * tab2 const struct tabprm*
207 * The second tabprm struct to compare.
208 *
209 * Returned:
210 * equal int* Non-zero when the given structs are equal.
211 *
212 * Function return value:
213 * int Status return value:
214 * 0: Success.
215 * 1: Null pointer passed.
216 *
217 *
218 * tabfree() - Destructor for the tabprm struct
219 * --------------------------------------------
220 * tabfree() frees memory allocated for the tabprm arrays by tabini().
221 * tabini() records the memory it allocates and tabfree() will only attempt to
222 * free this.
223 *
224 * PLEASE NOTE: tabfree() must not be invoked on a tabprm struct that was not
225 * initialized by tabini().
226 *
227 * Returned:
228 * tab struct tabprm*
229 * Coordinate transformation parameters.
230 *
231 * Function return value:
232 * int Status return value:
233 * 0: Success.
234 * 1: Null tabprm pointer passed.
235 *
236 *
237 * tabprt() - Print routine for the tabprm struct
238 * ----------------------------------------------
239 * tabprt() prints the contents of a tabprm struct using wcsprintf(). Mainly
240 * intended for diagnostic purposes.
241 *
242 * Given:
243 * tab const struct tabprm*
244 * Tabular transformation parameters.
245 *
246 * Function return value:
247 * int Status return value:
248 * 0: Success.
249 * 1: Null tabprm pointer passed.
250 *
251 *
252 * tabperr() - Print error messages from a tabprm struct
253 * -----------------------------------------------------
254 * tabperr() prints the error message(s) (if any) stored in a tabprm struct.
255 * If there are no errors then nothing is printed. It uses wcserr_prt(), q.v.
256 *
257 * Given:
258 * tab const struct tabprm*
259 * Tabular transformation parameters.
260 *
261 * prefix const char *
262 * If non-NULL, each output line will be prefixed with
263 * this string.
264 *
265 * Function return value:
266 * int Status return value:
267 * 0: Success.
268 * 1: Null tabprm pointer passed.
269 *
270 *
271 * tabset() - Setup routine for the tabprm struct
272 * -----------------------------------------------
273 * tabset() allocates memory for work arrays in the tabprm struct and sets up
274 * the struct according to information supplied within it.
275 *
276 * Note that this routine need not be called directly; it will be invoked by
277 * tabx2s() and tabs2x() if tabprm::flag is anything other than a predefined
278 * magic value.
279 *
280 * Given and returned:
281 * tab struct tabprm*
282 * Tabular transformation parameters.
283 *
284 * Function return value:
285 * int Status return value:
286 * 0: Success.
287 * 1: Null tabprm pointer passed.
288 * 3: Invalid tabular parameters.
289 *
290 * For returns > 1, a detailed error message is set in
291 * tabprm::err if enabled, see wcserr_enable().
292 *
293 *
294 * tabx2s() - Pixel-to-world transformation
295 * ----------------------------------------
296 * tabx2s() transforms intermediate world coordinates to world coordinates
297 * using coordinate lookup.
298 *
299 * Given and returned:
300 * tab struct tabprm*
301 * Tabular transformation parameters.
302 *
303 * Given:
304 * ncoord,
305 * nelem int The number of coordinates, each of vector length
306 * nelem.
307 *
308 * x const double[ncoord][nelem]
309 * Array of intermediate world coordinates, SI units.
310 *
311 * Returned:
312 * world double[ncoord][nelem]
313 * Array of world coordinates, in SI units.
314 *
315 * stat int[ncoord]
316 * Status return value status for each coordinate:
317 * 0: Success.
318 * 1: Invalid intermediate world coordinate.
319 *
320 * Function return value:
321 * int Status return value:
322 * 0: Success.
323 * 1: Null tabprm pointer passed.
324 * 3: Invalid tabular parameters.
325 * 4: One or more of the x coordinates were invalid,
326 * as indicated by the stat vector.
327 *
328 * For returns > 1, a detailed error message is set in
329 * tabprm::err if enabled, see wcserr_enable().
330 *
331 *
332 * tabs2x() - World-to-pixel transformation
333 * ----------------------------------------
334 * tabs2x() transforms world coordinates to intermediate world coordinates.
335 *
336 * Given and returned:
337 * tab struct tabprm*
338 * Tabular transformation parameters.
339 *
340 * Given:
341 * ncoord,
342 * nelem int The number of coordinates, each of vector length
343 * nelem.
344 * world const double[ncoord][nelem]
345 * Array of world coordinates, in SI units.
346 *
347 * Returned:
348 * x double[ncoord][nelem]
349 * Array of intermediate world coordinates, SI units.
350 * stat int[ncoord]
351 * Status return value status for each vector element:
352 * 0: Success.
353 * 1: Invalid world coordinate.
354 *
355 * Function return value:
356 * int Status return value:
357 * 0: Success.
358 * 1: Null tabprm pointer passed.
359 * 3: Invalid tabular parameters.
360 * 5: One or more of the world coordinates were
361 * invalid, as indicated by the stat vector.
362 *
363 * For returns > 1, a detailed error message is set in
364 * tabprm::err if enabled, see wcserr_enable().
365 *
366 *
367 * tabprm struct - Tabular transformation parameters
368 * -------------------------------------------------
369 * The tabprm struct contains information required to transform tabular
370 * coordinates. It consists of certain members that must be set by the user
371 * ("given") and others that are set by the WCSLIB routines ("returned"). Some
372 * of the latter are supplied for informational purposes while others are for
373 * internal use only.
374 *
375 * int flag
376 * (Given and returned) This flag must be set to zero whenever any of the
377 * following tabprm structure members are set or changed:
378 *
379 * - tabprm::M (q.v., not normally set by the user),
380 * - tabprm::K (q.v., not normally set by the user),
381 * - tabprm::map,
382 * - tabprm::crval,
383 * - tabprm::index,
384 * - tabprm::coord.
385 *
386 * This signals the initialization routine, tabset(), to recompute the
387 * returned members of the tabprm struct. tabset() will reset flag to
388 * indicate that this has been done.
389 *
390 * PLEASE NOTE: flag should be set to -1 when tabini() is called for the
391 * first time for a particular tabprm struct in order to initialize memory
392 * management. It must ONLY be used on the first initialization otherwise
393 * memory leaks may result.
394 *
395 * int M
396 * (Given or returned) Number of tabular coordinate axes.
397 *
398 * If tabini() is used to initialize the tabprm struct (as would normally
399 * be the case) then it will set M from the value passed to it as a
400 * function argument. The user should not subsequently modify it.
401 *
402 * int *K
403 * (Given or returned) Pointer to the first element of a vector of length
404 * tabprm::M whose elements (K_1, K_2,... K_M) record the lengths of the
405 * axes of the coordinate array and of each indexing vector.
406 *
407 * If tabini() is used to initialize the tabprm struct (as would normally
408 * be the case) then it will set K from the array passed to it as a
409 * function argument. The user should not subsequently modify it.
410 *
411 * int *map
412 * (Given) Pointer to the first element of a vector of length tabprm::M
413 * that defines the association between axis m in the M-dimensional
414 * coordinate array (1 <= m <= M) and the indices of the intermediate world
415 * coordinate and world coordinate arrays, x[] and world[], in the argument
416 * lists for tabx2s() and tabs2x().
417 *
418 * When x[] and world[] contain the full complement of coordinate elements
419 * in image-order, as will usually be the case, then map[m-1] == i-1 for
420 * axis i in the N-dimensional image (1 <= i <= N). In terms of the FITS
421 * keywords
422 *
423 * map[PVi_3a - 1] == i - 1.
424 *
425 * However, a different association may result if x[], for example, only
426 * contains a (relevant) subset of intermediate world coordinate elements.
427 * For example, if M == 1 for an image with N > 1, it is possible to fill
428 * x[] with the relevant coordinate element with nelem set to 1. In this
429 * case map[0] = 0 regardless of the value of i.
430 *
431 * double *crval
432 * (Given) Pointer to the first element of a vector of length tabprm::M
433 * whose elements contain the index value for the reference pixel for each
434 * of the tabular coordinate axes.
435 *
436 * double **index
437 * (Given) Pointer to the first element of a vector of length tabprm::M of
438 * pointers to vectors of lengths (K_1, K_2,... K_M) of 0-relative indexes
439 * (see tabprm::K).
440 *
441 * The address of any or all of these index vectors may be set to zero,
442 * i.e.
443 *
444 = index[m] == 0;
445 *
446 * this is interpreted as default indexing, i.e.
447 *
448 = index[m][k] = k;
449 *
450 * double *coord
451 * (Given) Pointer to the first element of the tabular coordinate array,
452 * treated as though it were defined as
453 *
454 = double coord[K_M]...[K_2][K_1][M];
455 *
456 * (see tabprm::K) i.e. with the M dimension varying fastest so that the
457 * M elements of a coordinate vector are stored contiguously in memory.
458 *
459 * int nc
460 * (Returned) Total number of coordinate vectors in the coordinate array
461 * being the product K_1 * K_2 * ... * K_M (see tabprm::K).
462 *
463 * int padding
464 * (An unused variable inserted for alignment purposes only.)
465 *
466 * int *sense
467 * (Returned) Pointer to the first element of a vector of length tabprm::M
468 * whose elements indicate whether the corresponding indexing vector is
469 * monotonic increasing (+1), or decreasing (-1).
470 *
471 * int *p0
472 * (Returned) Pointer to the first element of a vector of length tabprm::M
473 * of interpolated indices into the coordinate array such that Upsilon_m,
474 * as defined in Paper III, is equal to (p0[m] + 1) + tabprm::delta[m].
475 *
476 * double *delta
477 * (Returned) Pointer to the first element of a vector of length tabprm::M
478 * of interpolated indices into the coordinate array such that Upsilon_m,
479 * as defined in Paper III, is equal to (tabprm::p0[m] + 1) + delta[m].
480 *
481 * double *extrema
482 * (Returned) Pointer to the first element of an array that records the
483 * minimum and maximum value of each element of the coordinate vector in
484 * each row of the coordinate array, treated as though it were defined as
485 *
486 = double extrema[K_M]...[K_2][2][M]
487 *
488 * (see tabprm::K). The minimum is recorded in the first element of the
489 * compressed K_1 dimension, then the maximum. This array is used by the
490 * inverse table lookup function, tabs2x(), to speed up table searches.
491 *
492 * struct wcserr *err
493 * (Returned) If enabled, when an error status is returned, this struct
494 * contains detailed information about the error, see wcserr_enable().
495 *
496 * int m_flag
497 * (For internal use only.)
498 * int m_M
499 * (For internal use only.)
500 * int m_N
501 * (For internal use only.)
502 * int set_M
503 * (For internal use only.)
504 * int m_K
505 * (For internal use only.)
506 * int m_map
507 * (For internal use only.)
508 * int m_crval
509 * (For internal use only.)
510 * int m_index
511 * (For internal use only.)
512 * int m_indxs
513 * (For internal use only.)
514 * int m_coord
515 * (For internal use only.)
516 *
517 *
518 * Global variable: const char *tab_errmsg[] - Status return messages
519 * ------------------------------------------------------------------
520 * Error messages to match the status value returned from each function.
521 *
522 *===========================================================================*/
523 
524 #ifndef WCSLIB_TAB
525 #define WCSLIB_TAB
526 
527 #ifdef __cplusplus
528 extern "C" {
529 #endif
530 
531 
532 extern const char *tab_errmsg[];
533 
535  TABERR_SUCCESS = 0, // Success.
536  TABERR_NULL_POINTER = 1, // Null tabprm pointer passed.
537  TABERR_MEMORY = 2, // Memory allocation failed.
538  TABERR_BAD_PARAMS = 3, // Invalid tabular parameters.
539  TABERR_BAD_X = 4, // One or more of the x coordinates were
540  // invalid.
541  TABERR_BAD_WORLD = 5 // One or more of the world coordinates were
542  // invalid.
543 };
544 
545 struct tabprm {
546  // Initialization flag (see the prologue above).
547  //--------------------------------------------------------------------------
548  int flag; // Set to zero to force initialization.
549 
550  // Parameters to be provided (see the prologue above).
551  //--------------------------------------------------------------------------
552  int M; // Number of tabular coordinate axes.
553  int *K; // Vector of length M whose elements
554  // (K_1, K_2,... K_M) record the lengths of
555  // the axes of the coordinate array and of
556  // each indexing vector.
557  int *map; // Vector of length M usually such that
558  // map[m-1] == i-1 for coordinate array
559  // axis m and image axis i (see above).
560  double *crval; // Vector of length M containing the index
561  // value for the reference pixel for each
562  // of the tabular coordinate axes.
563  double **index; // Vector of pointers to M indexing vectors
564  // of lengths (K_1, K_2,... K_M).
565  double *coord; // (1+M)-dimensional tabular coordinate
566  // array (see above).
567 
568  // Information derived from the parameters supplied.
569  //--------------------------------------------------------------------------
570  int nc; // Number of coordinate vectors (of length
571  // M) in the coordinate array.
572  int padding; // (Dummy inserted for alignment purposes.)
573  int *sense; // Vector of M flags that indicate whether
574  // the Mth indexing vector is monotonic
575  // increasing, or else decreasing.
576  int *p0; // Vector of M indices.
577  double *delta; // Vector of M increments.
578  double *extrema; // (1+M)-dimensional array of coordinate
579  // extrema.
580 
581  // Error handling
582  //--------------------------------------------------------------------------
583  struct wcserr *err;
584 
585  // Private - the remainder are for memory management.
586  //--------------------------------------------------------------------------
587  int m_flag, m_M, m_N;
588  int set_M;
589  int *m_K, *m_map;
590  double *m_crval, **m_index, **m_indxs, *m_coord;
591 };
592 
593 // Size of the tabprm struct in int units, used by the Fortran wrappers.
594 #define TABLEN (sizeof(struct tabprm)/sizeof(int))
595 
596 
597 int tabini(int alloc, int M, const int K[], struct tabprm *tab);
598 
599 int tabmem(struct tabprm *tab);
600 
601 int tabcpy(int alloc, const struct tabprm *tabsrc, struct tabprm *tabdst);
602 
603 int tabcmp(int cmp, double tol, const struct tabprm *tab1,
604  const struct tabprm *tab2, int *equal);
605 
606 int tabfree(struct tabprm *tab);
607 
608 int tabprt(const struct tabprm *tab);
609 
610 int tabperr(const struct tabprm *tab, const char *prefix);
611 
612 int tabset(struct tabprm *tab);
613 
614 int tabx2s(struct tabprm *tab, int ncoord, int nelem, const double x[],
615  double world[], int stat[]);
616 
617 int tabs2x(struct tabprm *tab, int ncoord, int nelem, const double world[],
618  double x[], int stat[]);
619 
620 
621 // Deprecated.
622 #define tabini_errmsg tab_errmsg
623 #define tabcpy_errmsg tab_errmsg
624 #define tabfree_errmsg tab_errmsg
625 #define tabprt_errmsg tab_errmsg
626 #define tabset_errmsg tab_errmsg
627 #define tabx2s_errmsg tab_errmsg
628 #define tabs2x_errmsg tab_errmsg
629 
630 #ifdef __cplusplus
631 }
632 #endif
633 
634 #endif // WCSLIB_TAB
int tabfree(struct tabprm *tab)
Destructor for the tabprm struct.
Definition: tab.h:541
int set_M
Definition: tab.h:588
int tabini(int alloc, int M, const int K[], struct tabprm *tab)
Default constructor for the tabprm struct.
int tabset(struct tabprm *tab)
Setup routine for the tabprm struct.
Definition: tab.h:538
Error message handling.
Definition: wcserr.h:222
int m_flag
Definition: tab.h:587
double * m_crval
Definition: tab.h:590
int * map
Definition: tab.h:557
double * coord
Definition: tab.h:565
int tabcpy(int alloc, const struct tabprm *tabsrc, struct tabprm *tabdst)
Copy routine for the tabprm struct.
int * m_K
Definition: tab.h:589
int flag
Definition: tab.h:548
Definition: tab.h:535
const char * tab_errmsg[]
Status return messages.
double * delta
Definition: tab.h:577
Definition: tab.h:536
tab_errmsg_enum
Definition: tab.h:534
double ** m_index
Definition: tab.h:590
int tabprt(const struct tabprm *tab)
Print routine for the tabprm struct.
Definition: tab.h:537
int m_N
Definition: tab.h:587
int * m_map
Definition: tab.h:589
Definition: tab.h:539
double ** index
Definition: tab.h:563
int tabperr(const struct tabprm *tab, const char *prefix)
Print error messages from a tabprm struct.
double ** m_indxs
Definition: tab.h:590
int tabx2s(struct tabprm *tab, int ncoord, int nelem, const double x[], double world[], int stat[])
Pixel-to-world transformation.
int * sense
Definition: tab.h:573
int tabmem(struct tabprm *tab)
Acquire tabular memory.
Tabular transformation parameters.
Definition: tab.h:545
double * m_coord
Definition: tab.h:590
double * extrema
Definition: tab.h:578
int * K
Definition: tab.h:553
int padding
Definition: tab.h:572
struct wcserr * err
Definition: tab.h:583
int M
Definition: tab.h:552
double * crval
Definition: tab.h:560
int tabs2x(struct tabprm *tab, int ncoord, int nelem, const double world[], double x[], int stat[])
World-to-pixel transformation.
int * p0
Definition: tab.h:576
int tabcmp(int cmp, double tol, const struct tabprm *tab1, const struct tabprm *tab2, int *equal)
Compare two tabprm structs for equality.
int m_M
Definition: tab.h:587
int nc
Definition: tab.h:570