WCSLIB  7.3.1
wtbarr.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: wtbarr.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 wtbarr struct
33 * ----------------------------
34 * The wtbarr struct is used by wcstab() in extracting coordinate lookup tables
35 * from a binary table extension (BINTABLE) and copying them into the tabprm
36 * structs stored in wcsprm.
37 *
38 *
39 * wtbarr struct - Extraction of coordinate lookup tables from BINTABLE
40 * --------------------------------------------------------------------
41 * Function wcstab(), which is invoked automatically by wcspih(), sets up an
42 * array of wtbarr structs to assist in extracting coordinate lookup tables
43 * from a binary table extension (BINTABLE) and copying them into the tabprm
44 * structs stored in wcsprm. Refer to the usage notes for wcspih() and
45 * wcstab() in wcshdr.h, and also the prologue to tab.h.
46 *
47 * For C++ usage, because of a name space conflict with the wtbarr typedef
48 * defined in CFITSIO header fitsio.h, the wtbarr struct is renamed to wtbarr_s
49 * by preprocessor macro substitution with scope limited to wtbarr.h itself,
50 * and similarly in wcs.h.
51 *
52 * int i
53 * (Given) Image axis number.
54 *
55 * int m
56 * (Given) wcstab array axis number for index vectors.
57 *
58 * int kind
59 * (Given) Character identifying the wcstab array type:
60 * - c: coordinate array,
61 * - i: index vector.
62 *
63 * char extnam[72]
64 * (Given) EXTNAME identifying the binary table extension.
65 *
66 * int extver
67 * (Given) EXTVER identifying the binary table extension.
68 *
69 * int extlev
70 * (Given) EXTLEV identifying the binary table extension.
71 *
72 * char ttype[72]
73 * (Given) TTYPEn identifying the column of the binary table that contains
74 * the wcstab array.
75 *
76 * long row
77 * (Given) Table row number.
78 *
79 * int ndim
80 * (Given) Expected dimensionality of the wcstab array.
81 *
82 * int *dimlen
83 * (Given) Address of the first element of an array of int of length ndim
84 * into which the wcstab array axis lengths are to be written.
85 *
86 * double **arrayp
87 * (Given) Pointer to an array of double which is to be allocated by the
88 * user and into which the wcstab array is to be written.
89 *
90 *===========================================================================*/
91 
92 #ifndef WCSLIB_WTBARR
93 #define WCSLIB_WTBARR
94 
95 #ifdef __cplusplus
96 extern "C" {
97 #define wtbarr wtbarr_s // See prologue above.
98 #endif
99  // For extracting wcstab arrays. Matches
100  // the wtbarr typedef defined in CFITSIO
101  // header fitsio.h.
102 struct wtbarr {
103  int i; // Image axis number.
104  int m; // Array axis number for index vectors.
105  int kind; // wcstab array type.
106  char extnam[72]; // EXTNAME of binary table extension.
107  int extver; // EXTVER of binary table extension.
108  int extlev; // EXTLEV of binary table extension.
109  char ttype[72]; // TTYPEn of column containing the array.
110  long row; // Table row number.
111  int ndim; // Expected wcstab array dimensionality.
112  int *dimlen; // Where to write the array axis lengths.
113  double **arrayp; // Where to write the address of the array
114  // allocated to store the wcstab array.
115 };
116 
117 #ifdef __cplusplus
118 #undef wtbarr
119 }
120 #endif
121 
122 #endif // WCSLIB_WTBARR
wtbarr::kind
int kind
Definition: getwcstab.h:172
wtbarr::ndim
int ndim
Definition: getwcstab.h:178
wtbarr::ttype
char ttype[72]
Definition: getwcstab.h:176
wtbarr::extlev
int extlev
Definition: getwcstab.h:175
wtbarr
Extraction of coordinate lookup tables from BINTABLE.
Definition: getwcstab.h:169
wtbarr::row
long row
Definition: getwcstab.h:177
wtbarr::extver
int extver
Definition: getwcstab.h:174
wtbarr::dimlen
int * dimlen
Definition: getwcstab.h:179
wtbarr::m
int m
Definition: getwcstab.h:171
wtbarr::i
int i
Definition: getwcstab.h:170
wtbarr::extnam
char extnam[72]
Definition: getwcstab.h:173
wtbarr::arrayp
double ** arrayp
Definition: getwcstab.h:180