WCSLIB  7.7
wtbarr.h
Go to the documentation of this file.
1 /*============================================================================
2  WCSLIB 7.7 - an implementation of the FITS WCS standard.
3  Copyright (C) 1995-2021, 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  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
21  http://www.atnf.csiro.au/people/Mark.Calabretta
22  $Id: wtbarr.h,v 7.7 2021/07/12 06:36:49 mcalabre Exp $
23 *=============================================================================
24 *
25 * WCSLIB 7.7 - C routines that implement the FITS World Coordinate System
26 * (WCS) standard. Refer to the README file provided with WCSLIB for an
27 * overview of the library.
28 *
29 *
30 * Summary of the wtbarr struct
31 * ----------------------------
32 * The wtbarr struct is used by wcstab() in extracting coordinate lookup tables
33 * from a binary table extension (BINTABLE) and copying them into the tabprm
34 * structs stored in wcsprm.
35 *
36 *
37 * wtbarr struct - Extraction of coordinate lookup tables from BINTABLE
38 * --------------------------------------------------------------------
39 * Function wcstab(), which is invoked automatically by wcspih(), sets up an
40 * array of wtbarr structs to assist in extracting coordinate lookup tables
41 * from a binary table extension (BINTABLE) and copying them into the tabprm
42 * structs stored in wcsprm. Refer to the usage notes for wcspih() and
43 * wcstab() in wcshdr.h, and also the prologue to tab.h.
44 *
45 * For C++ usage, because of a name space conflict with the wtbarr typedef
46 * defined in CFITSIO header fitsio.h, the wtbarr struct is renamed to wtbarr_s
47 * by preprocessor macro substitution with scope limited to wtbarr.h itself,
48 * and similarly in wcs.h.
49 *
50 * int i
51 * (Given) Image axis number.
52 *
53 * int m
54 * (Given) wcstab array axis number for index vectors.
55 *
56 * int kind
57 * (Given) Character identifying the wcstab array type:
58 * - c: coordinate array,
59 * - i: index vector.
60 *
61 * char extnam[72]
62 * (Given) EXTNAME identifying the binary table extension.
63 *
64 * int extver
65 * (Given) EXTVER identifying the binary table extension.
66 *
67 * int extlev
68 * (Given) EXTLEV identifying the binary table extension.
69 *
70 * char ttype[72]
71 * (Given) TTYPEn identifying the column of the binary table that contains
72 * the wcstab array.
73 *
74 * long row
75 * (Given) Table row number.
76 *
77 * int ndim
78 * (Given) Expected dimensionality of the wcstab array.
79 *
80 * int *dimlen
81 * (Given) Address of the first element of an array of int of length ndim
82 * into which the wcstab array axis lengths are to be written.
83 *
84 * double **arrayp
85 * (Given) Pointer to an array of double which is to be allocated by the
86 * user and into which the wcstab array is to be written.
87 *
88 *===========================================================================*/
89 
90 #ifndef WCSLIB_WTBARR
91 #define WCSLIB_WTBARR
92 
93 #ifdef __cplusplus
94 extern "C" {
95 #define wtbarr wtbarr_s // See prologue above.
96 #endif
97  // For extracting wcstab arrays. Matches
98  // the wtbarr typedef defined in CFITSIO
99  // header fitsio.h.
100 struct wtbarr {
101  int i; // Image axis number.
102  int m; // Array axis number for index vectors.
103  int kind; // wcstab array type.
104  char extnam[72]; // EXTNAME of binary table extension.
105  int extver; // EXTVER of binary table extension.
106  int extlev; // EXTLEV of binary table extension.
107  char ttype[72]; // TTYPEn of column containing the array.
108  long row; // Table row number.
109  int ndim; // Expected wcstab array dimensionality.
110  int *dimlen; // Where to write the array axis lengths.
111  double **arrayp; // Where to write the address of the array
112  // allocated to store the wcstab array.
113 };
114 
115 #ifdef __cplusplus
116 #undef wtbarr
117 }
118 #endif
119 
120 #endif // WCSLIB_WTBARR
Extraction of coordinate lookup tables from BINTABLE.
Definition: getwcstab.h:167
int extlev
Definition: getwcstab.h:173
int m
Definition: getwcstab.h:169
int extver
Definition: getwcstab.h:172
long row
Definition: getwcstab.h:175
double ** arrayp
Definition: getwcstab.h:178
char ttype[72]
Definition: getwcstab.h:174
int i
Definition: getwcstab.h:168
int * dimlen
Definition: getwcstab.h:177
char extnam[72]
Definition: getwcstab.h:171
int ndim
Definition: getwcstab.h:176
int kind
Definition: getwcstab.h:170