WCSLIB: tab.h Source File

WCSLIB 5.19.1

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