WCSLIB  7.3
wcsfix.h
Go to the documentation of this file.
1 /*============================================================================
2 
3  WCSLIB 7.3 - an implementation of the FITS WCS standard.
4  Copyright (C) 1995-2020, 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: wcsfix.h,v 7.3 2020/06/03 03:37:02 mcalabre Exp $
26 *=============================================================================
27 *
28 * WCSLIB 7.3 - 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 wcsfix routines
34 * ------------------------------
35 * Routines in this suite identify and translate various forms of construct
36 * known to occur in FITS headers that violate the FITS World Coordinate System
37 * (WCS) standard 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 celestial coordinates in FITS",
43 = Calabretta, M.R., & Greisen, E.W. 2002, A&A, 395, 1077 (WCS Paper II)
44 =
45 = "Representations of spectral coordinates in FITS",
46 = Greisen, E.W., Calabretta, M.R., Valdes, F.G., & Allen, S.L.
47 = 2006, A&A, 446, 747 (WCS Paper III)
48 =
49 = "Representations of time coordinates in FITS -
50 = Time and relative dimension in space",
51 = Rots, A.H., Bunclark, P.S., Calabretta, M.R., Allen, S.L.,
52 = Manchester, R.N., & Thompson, W.T. 2015, A&A, 574, A36 (WCS Paper VII)
53 *
54 * Repairs effected by these routines range from the translation of
55 * non-standard values for standard WCS keywords, to the repair of malformed
56 * coordinate representations. Some routines are also provided to check the
57 * consistency of pairs of keyvalues that define the same measure in two
58 * different ways, for example, as a date and an MJD.
59 *
60 * Non-standard keyvalues:
61 * -----------------------
62 * AIPS-convention celestial projection types, NCP and GLS, and spectral
63 * types, 'FREQ-LSR', 'FELO-HEL', etc., set in CTYPEia are translated
64 * on-the-fly by wcsset() but without modifying the relevant ctype[], pv[] or
65 * specsys members of the wcsprm struct. That is, only the information
66 * extracted from ctype[] is translated when wcsset() fills in wcsprm::cel
67 * (celprm struct) or wcsprm::spc (spcprm struct).
68 *
69 * On the other hand, these routines do change the values of wcsprm::ctype[],
70 * wcsprm::pv[], wcsprm::specsys and other wcsprm struct members as
71 * appropriate to produce the same result as if the FITS header itself had
72 * been translated.
73 *
74 * Auxiliary WCS header information not used directly by WCSLIB may also be
75 * translated. For example, the older DATE-OBS date format (wcsprm::dateobs)
76 * is recast to year-2000 standard form, and MJD-OBS (wcsprm::mjdobs) will be
77 * deduced from it if not already set.
78 *
79 * Certain combinations of keyvalues that result in malformed coordinate
80 * systems, as described in Sect. 7.3.4 of Paper I, may also be repaired.
81 * These are handled by cylfix().
82 *
83 * Non-standard keywords:
84 * ----------------------
85 * The AIPS-convention CROTAn keywords are recognized as quasi-standard
86 * and as such are accomodated by wcsprm::crota[] and translated to
87 * wcsprm::pc[][] by wcsset(). These are not dealt with here, nor are any
88 * other non-standard keywords since these routines work only on the contents
89 * of a wcsprm struct and do not deal with FITS headers per se. In
90 * particular, they do not identify or translate CD00i00j, PC00i00j, PROJPn,
91 * EPOCH, VELREF or VSOURCEa keywords; this may be done by the FITS WCS
92 * header parser supplied with WCSLIB, refer to wcshdr.h.
93 *
94 * wcsfix() and wcsfixi() apply all of the corrections handled by the following
95 * specific functions which may also be invoked separately:
96 *
97 * - cdfix(): Sets the diagonal element of the CDi_ja matrix to 1.0 if all
98 * CDi_ja keywords associated with a particular axis are omitted.
99 *
100 * - datfix(): recast an older DATE-OBS date format in dateobs to year-2000
101 * standard form.
102 *
103 * Derive dateref from mjdref if not already set. Alternatively, if
104 * dateref is set and mjdref isn't, then derive mjdref from it. If both
105 * are set, then check consistency. Likewise for dateobs and mjdobs;
106 * datebeg and mjdbeg; dateavg and mjdavg; and dateend and mjdend.
107 *
108 * - obsfix(): if only one half of obsgeo[] is set, then derive the other
109 * half from it. If both halves are set, then check consistency.
110 *
111 * - unitfix(): translate some commonly used but non-standard unit strings in
112 * the CUNITia keyvalues, e.g. 'DEG' -> 'deg'.
113 *
114 * - spcfix(): translate AIPS-convention spectral types, 'FREQ-LSR',
115 * 'FELO-HEL', etc., in ctype[] as set from CTYPEia.
116 *
117 * - celfix(): translate AIPS-convention celestial projection types, NCP and
118 * GLS, in ctype[] as set from CTYPEia.
119 *
120 * - cylfix(): fixes WCS keyvalues for malformed cylindrical projections that
121 * suffer from the problem described in Sect. 7.3.4 of Paper I.
122 *
123 *
124 * wcsfix() - Translate a non-standard WCS struct
125 * ----------------------------------------------
126 * wcsfix() is identical to wcsfixi(), but lacks the info argument.
127 *
128 *
129 * wcsfixi() - Translate a non-standard WCS struct
130 * -----------------------------------------------
131 * wcsfixi() applies all of the corrections handled separately by cdfix(),
132 * datfix(), obsfix(), unitfix(), spcfix(), celfix(), and cylfix().
133 *
134 * Given:
135 * ctrl int Do potentially unsafe translations of non-standard
136 * unit strings as described in the usage notes to
137 * wcsutrn().
138 *
139 * naxis const int []
140 * Image axis lengths. If this array pointer is set to
141 * zero then cylfix() will not be invoked.
142 *
143 * Given and returned:
144 * wcs struct wcsprm*
145 * Coordinate transformation parameters.
146 *
147 * Returned:
148 * stat int [NWCSFIX]
149 * Status returns from each of the functions. Use the
150 * preprocessor macros NWCSFIX to dimension this vector
151 * and CDFIX, DATFIX, OBSFIX, UNITFIX, SPCFIX, CELFIX,
152 * and CYLFIX to access its elements. A status value
153 * of -2 is set for functions that were not invoked.
154 *
155 * info struct wcserr [NWCSFIX]
156 * Status messages from each of the functions. Use the
157 * preprocessor macros NWCSFIX to dimension this vector
158 * and CDFIX, DATFIX, OBSFIX, UNITFIX, SPCFIX, CELFIX,
159 * and CYLFIX to access its elements.
160 *
161 * Note that the memory allocated by wcsfixi() for the
162 * message in each wcserr struct (wcserr::msg, if
163 * non-zero) must be freed by the user. See
164 * wcsdealloc().
165 *
166 * Function return value:
167 * int Status return value:
168 * 0: Success.
169 * 1: One or more of the translation functions
170 * returned an error.
171 *
172 *
173 * cdfix() - Fix erroneously omitted CDi_ja keywords
174 * -------------------------------------------------
175 * cdfix() sets the diagonal element of the CDi_ja matrix to unity if all
176 * CDi_ja keywords associated with a given axis were omitted. According to
177 * Paper I, if any CDi_ja keywords at all are given in a FITS header then those
178 * not given default to zero. This results in a singular matrix with an
179 * intersecting row and column of zeros.
180 *
181 * Given and returned:
182 * wcs struct wcsprm*
183 * Coordinate transformation parameters.
184 *
185 * Function return value:
186 * int Status return value:
187 * -1: No change required (not an error).
188 * 0: Success.
189 * 1: Null wcsprm pointer passed.
190 *
191 *
192 * datfix() - Translate DATE-OBS and derive MJD-OBS or vice versa
193 * --------------------------------------------------------------
194 * datfix() translates the old DATE-OBS date format set in wcsprm::dateobs to
195 * year-2000 standard form (yyyy-mm-ddThh:mm:ss).
196 *
197 * datfix() derives wcsprm::dateref from wcsprm::mjdref if not already set.
198 * Alternatively, if dateref is set and mjdref isn't, then it derives mjdref
199 * from it. If both are set but disagree by more than 0.001 day (86.4 seconds)
200 * then status 5 is returned. Likewise for wcsprm::dateobs and wcsprm::mjdobs;
201 * wcsprm::datebeg and wcsprm::mjdbeg; wcsprm::dateavg and wcsprm::mjdavg; and
202 * wcsprm::dateend and wcsprm::mjdend.
203 *
204 * If neither dateobs nor mjdobs are set, but wcsprm::jepoch (primarily) or
205 * wcsprm::bepoch is, then both are derived from it. If jepoch and/or bepoch
206 * are set but disagree with dateobs or mjdobs by more than 0.000002 year
207 * (63.2 seconds), an informative message is produced.
208 *
209 * Given and returned:
210 * wcs struct wcsprm*
211 * Coordinate transformation parameters.
212 * wcsprm::dateref and/or wcsprm::mjdref may be changed.
213 * wcsprm::dateobs and/or wcsprm::mjdobs may be changed.
214 * wcsprm::datebeg and/or wcsprm::mjdbeg may be changed.
215 * wcsprm::dateavg and/or wcsprm::mjdavg may be changed.
216 * wcsprm::dateend and/or wcsprm::mjdend may be changed.
217 *
218 * Function return value:
219 * int Status return value:
220 * -1: No change required (not an error).
221 * 0: Success.
222 * 1: Null wcsprm pointer passed.
223 * 5: Invalid parameter value.
224 *
225 * For returns > 1, a detailed error message is set in
226 * wcsprm::err if enabled, see wcserr_enable().
227 *
228 * Notes:
229 * The MJD algorithms used by datfix() are from D.A. Hatcher, 1984, QJRAS,
230 * 25, 53-55, as modified by P.T. Wallace for use in SLALIB subroutines CLDJ
231 * and DJCL.
232 *
233 *
234 * obsfix() - complete the OBSGEO-[XYZLBH] vector of observatory coordinates
235 * -------------------------------------------------------------------------
236 * obsfix() completes the wcsprm::obsgeo vector of observatory coordinates.
237 * That is, if only the (x,y,z) Cartesian coordinate triplet or the (l,b,h)
238 * geodetic coordinate triplet are set, then it derives the other triplet from
239 * it. If both triplets are set, then it checks for consistency at the level
240 * of 1 metre.
241 *
242 * Given:
243 * ctrl int Flag that controls behaviour if one triplet is
244 * defined and the other is only partially defined:
245 * 0: Reset only the undefined elements of an
246 * incomplete coordinate triplet.
247 * 1: Reset all elements of an incomplete triplet.
248 * 2: Don't make any changes, check for consistency
249 * only. Returns an error if either of the two
250 * triplets is incomplete.
251 *
252 * Given and returned:
253 * wcs struct wcsprm*
254 * Coordinate transformation parameters.
255 * wcsprm::obsgeo may be changed.
256 *
257 * Function return value:
258 * int Status return value:
259 * -1: No change required (not an error).
260 * 0: Success.
261 * 1: Null wcsprm pointer passed.
262 * 5: Invalid parameter value.
263 *
264 * For returns > 1, a detailed error message is set in
265 * wcsprm::err if enabled, see wcserr_enable().
266 *
267 * Notes:
268 * 1: While the International Terrestrial Reference System (ITRS) is based
269 * solely on Cartesian coordinates, it recommends the use of the GRS80
270 * ellipsoid in converting to geodetic coordinates. However, while WCS
271 * Paper III recommends ITRS Cartesian coordinates, Paper VII prescribes
272 * the use of the IAU(1976) ellipsoid for geodetic coordinates, and
273 * consequently that is what is used here.
274 *
275 * 2: For reference, parameters of commonly used global reference ellipsoids:
276 *
277 = a (m) 1/f Standard
278 = --------- ------------- --------------------------------
279 = 6378140 298.2577 IAU(1976)
280 = 6378137 298.257222101 GRS80
281 = 6378137 298.257223563 WGS84
282 = 6378136 298.257 IERS(1989)
283 = 6378136.6 298.25642 IERS(2003,2010), IAU(2009/2012)
284 *
285 * where f = (a - b) / a is the flattening, and a and b are the semi-major
286 * and semi-minor radii in metres.
287 *
288 * 3: The transformation from geodetic (lng,lat,hgt) to Cartesian (x,y,z) is
289 *
290 = x = (n + hgt)*coslng*coslat,
291 = y = (n + hgt)*sinlng*coslat,
292 = z = (n*(1.0 - e^2) + hgt)*sinlat,
293 *
294 * where the "prime vertical radius", n, is a function of latitude
295 *
296 = n = a / sqrt(1 - (e*sinlat)^2),
297 *
298 * and a, the equatorial radius, and e^2 = (2 - f)*f, the (first)
299 * eccentricity of the ellipsoid, are constants. obsfix() inverts these
300 * iteratively by writing
301 *
302 = x = rho*coslng*coslat,
303 = y = rho*sinlng*coslat,
304 = zeta = rho*sinlat,
305 *
306 * where
307 *
308 = rho = n + hgt,
309 = = sqrt(x^2 + y^2 + zeta^2),
310 = zeta = z / (1 - n*e^2/rho),
311 *
312 * and iterating over the value of zeta. Since e is small, a good first
313 * approximation is given by zeta = z.
314 *
315 *
316 * unitfix() - Correct aberrant CUNITia keyvalues
317 * ----------------------------------------------
318 * unitfix() applies wcsutrn() to translate non-standard CUNITia keyvalues,
319 * e.g. 'DEG' -> 'deg', also stripping off unnecessary whitespace.
320 *
321 * Given:
322 * ctrl int Do potentially unsafe translations described in the
323 * usage notes to wcsutrn().
324 *
325 * Given and returned:
326 * wcs struct wcsprm*
327 * Coordinate transformation parameters.
328 *
329 * Function return value:
330 * int Status return value:
331 * -1: No change required (not an error).
332 * 0: Success (an alias was applied).
333 * 1: Null wcsprm pointer passed.
334 *
335 * When units are translated (i.e. status 0), status -2
336 * is set in the wcserr struct to allow an informative
337 * message to be returned.
338 *
339 *
340 * spcfix() - Translate AIPS-convention spectral types
341 * ---------------------------------------------------
342 * spcfix() translates AIPS-convention spectral coordinate types,
343 * '{FREQ,FELO,VELO}-{LSR,HEL,OBS}' (e.g. 'FREQ-OBS', 'FELO-HEL', 'VELO-LSR')
344 * set in wcsprm::ctype[], subject to VELREF set in wcsprm::velref.
345 *
346 * Note that if wcs::specsys is already set then it will not be overridden.
347 *
348 * Given and returned:
349 * wcs struct wcsprm*
350 * Coordinate transformation parameters. wcsprm::ctype[]
351 * and/or wcsprm::specsys may be changed.
352 *
353 * Function return value:
354 * int Status return value:
355 * -1: No change required (not an error).
356 * 0: Success.
357 * 1: Null wcsprm pointer passed.
358 * 2: Memory allocation failed.
359 * 3: Linear transformation matrix is singular.
360 * 4: Inconsistent or unrecognized coordinate axis
361 * types.
362 * 5: Invalid parameter value.
363 * 6: Invalid coordinate transformation parameters.
364 * 7: Ill-conditioned coordinate transformation
365 * parameters.
366 *
367 * For returns > 1, a detailed error message is set in
368 * wcsprm::err if enabled, see wcserr_enable().
369 *
370 *
371 * celfix() - Translate AIPS-convention celestial projection types
372 * ---------------------------------------------------------------
373 * celfix() translates AIPS-convention celestial projection types, NCP and
374 * GLS, set in the ctype[] member of the wcsprm struct.
375 *
376 * Two additional pv[] keyvalues are created when translating NCP, and three
377 * are created when translating GLS with non-zero reference point. If the pv[]
378 * array was initially allocated by wcsini() then the array will be expanded if
379 * necessary. Otherwise, error 2 will be returned if sufficient empty slots
380 * are not already available for use.
381 *
382 * Given and returned:
383 * wcs struct wcsprm*
384 * Coordinate transformation parameters. wcsprm::ctype[]
385 * and/or wcsprm::pv[] may be changed.
386 *
387 * Function return value:
388 * int Status return value:
389 * -1: No change required (not an error).
390 * 0: Success.
391 * 1: Null wcsprm pointer passed.
392 * 2: Memory allocation failed.
393 * 3: Linear transformation matrix is singular.
394 * 4: Inconsistent or unrecognized coordinate axis
395 * types.
396 * 5: Invalid parameter value.
397 * 6: Invalid coordinate transformation parameters.
398 * 7: Ill-conditioned coordinate transformation
399 * parameters.
400 *
401 * For returns > 1, a detailed error message is set in
402 * wcsprm::err if enabled, see wcserr_enable().
403 *
404 *
405 * cylfix() - Fix malformed cylindrical projections
406 * ------------------------------------------------
407 * cylfix() fixes WCS keyvalues for malformed cylindrical projections that
408 * suffer from the problem described in Sect. 7.3.4 of Paper I.
409 *
410 * Given:
411 * naxis const int []
412 * Image axis lengths.
413 *
414 * Given and returned:
415 * wcs struct wcsprm*
416 * Coordinate transformation parameters.
417 *
418 * Function return value:
419 * int Status return value:
420 * -1: No change required (not an error).
421 * 0: Success.
422 * 1: Null wcsprm pointer passed.
423 * 2: Memory allocation failed.
424 * 3: Linear transformation matrix is singular.
425 * 4: Inconsistent or unrecognized coordinate axis
426 * types.
427 * 5: Invalid parameter value.
428 * 6: Invalid coordinate transformation parameters.
429 * 7: Ill-conditioned coordinate transformation
430 * parameters.
431 * 8: All of the corner pixel coordinates are invalid.
432 * 9: Could not determine reference pixel coordinate.
433 * 10: Could not determine reference pixel value.
434 *
435 * For returns > 1, a detailed error message is set in
436 * wcsprm::err if enabled, see wcserr_enable().
437 *
438 *
439 * Global variable: const char *wcsfix_errmsg[] - Status return messages
440 * ---------------------------------------------------------------------
441 * Error messages to match the status value returned from each function.
442 *
443 *===========================================================================*/
444 
445 #ifndef WCSLIB_WCSFIX
446 #define WCSLIB_WCSFIX
447 
448 #include "wcs.h"
449 #include "wcserr.h"
450 
451 #ifdef __cplusplus
452 extern "C" {
453 #endif
454 
455 #define CDFIX 0
456 #define DATFIX 1
457 #define OBSFIX 2
458 #define UNITFIX 3
459 #define SPCFIX 4
460 #define CELFIX 5
461 #define CYLFIX 6
462 #define NWCSFIX 7
463 
464 extern const char *wcsfix_errmsg[];
465 #define cylfix_errmsg wcsfix_errmsg
466 
468  FIXERR_OBSGEO_FIX = -5, /* Observatory coordinates amended. */
469  FIXERR_DATE_FIX = -4, /* Date string reformatted. */
470  FIXERR_SPC_UPDATE = -3, /* Spectral axis type modified. */
471  FIXERR_UNITS_ALIAS = -2, /* Units alias translation. */
472  FIXERR_NO_CHANGE = -1, /* No change. */
473  FIXERR_SUCCESS = 0, /* Success. */
474  FIXERR_NULL_POINTER = 1, /* Null wcsprm pointer passed. */
475  FIXERR_MEMORY = 2, /* Memory allocation failed. */
476  FIXERR_SINGULAR_MTX = 3, /* Linear transformation matrix is
477  singular. */
478  FIXERR_BAD_CTYPE = 4, /* Inconsistent or unrecognized coordinate
479  axis types. */
480  FIXERR_BAD_PARAM = 5, /* Invalid parameter value. */
481  FIXERR_BAD_COORD_TRANS = 6, /* Invalid coordinate transformation
482  parameters. */
483  FIXERR_ILL_COORD_TRANS = 7, /* Ill-conditioned coordinate transformation
484  parameters. */
485  FIXERR_BAD_CORNER_PIX = 8, /* All of the corner pixel coordinates are
486  invalid. */
487  FIXERR_NO_REF_PIX_COORD = 9, /* Could not determine reference pixel
488  coordinate. */
489  FIXERR_NO_REF_PIX_VAL = 10 /* Could not determine reference pixel
490  value. */
491 };
492 
493 int wcsfix(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[]);
494 
495 int wcsfixi(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[],
496  struct wcserr info[]);
497 
498 int cdfix(struct wcsprm *wcs);
499 
500 int datfix(struct wcsprm *wcs);
501 
502 int obsfix(int ctrl, struct wcsprm *wcs);
503 
504 int unitfix(int ctrl, struct wcsprm *wcs);
505 
506 int spcfix(struct wcsprm *wcs);
507 
508 int celfix(struct wcsprm *wcs);
509 
510 int cylfix(const int naxis[], struct wcsprm *wcs);
511 
512 
513 #ifdef __cplusplus
514 }
515 #endif
516 
517 #endif /* WCSLIB_WCSFIX */
FIXERR_OBSGEO_FIX
@ FIXERR_OBSGEO_FIX
Definition: wcsfix.h:468
datfix
int datfix(struct wcsprm *wcs)
Translate DATE-OBS and derive MJD-OBS or vice versa.
FIXERR_BAD_PARAM
@ FIXERR_BAD_PARAM
Definition: wcsfix.h:480
obsfix
int obsfix(int ctrl, struct wcsprm *wcs)
complete the OBSGEO-[XYZLBH] vector of observatory coordinates.
FIXERR_DATE_FIX
@ FIXERR_DATE_FIX
Definition: wcsfix.h:469
FIXERR_BAD_COORD_TRANS
@ FIXERR_BAD_COORD_TRANS
Definition: wcsfix.h:481
FIXERR_UNITS_ALIAS
@ FIXERR_UNITS_ALIAS
Definition: wcsfix.h:471
FIXERR_SINGULAR_MTX
@ FIXERR_SINGULAR_MTX
Definition: wcsfix.h:476
FIXERR_NO_REF_PIX_COORD
@ FIXERR_NO_REF_PIX_COORD
Definition: wcsfix.h:487
wcsprm
Coordinate transformation parameters.
Definition: wcs.h:1810
FIXERR_MEMORY
@ FIXERR_MEMORY
Definition: wcsfix.h:475
FIXERR_BAD_CORNER_PIX
@ FIXERR_BAD_CORNER_PIX
Definition: wcsfix.h:485
wcsfix_errmsg_enum
wcsfix_errmsg_enum
Definition: wcsfix.h:467
wcsfix_errmsg
const char * wcsfix_errmsg[]
Status return messages.
FIXERR_SUCCESS
@ FIXERR_SUCCESS
Definition: wcsfix.h:473
cdfix
int cdfix(struct wcsprm *wcs)
Fix erroneously omitted CDi_ja keywords.
FIXERR_NULL_POINTER
@ FIXERR_NULL_POINTER
Definition: wcsfix.h:474
wcs.h
FIXERR_NO_CHANGE
@ FIXERR_NO_CHANGE
Definition: wcsfix.h:472
FIXERR_BAD_CTYPE
@ FIXERR_BAD_CTYPE
Definition: wcsfix.h:478
wcsfixi
int wcsfixi(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[], struct wcserr info[])
Translate a non-standard WCS struct.
FIXERR_SPC_UPDATE
@ FIXERR_SPC_UPDATE
Definition: wcsfix.h:470
wcserr
Error message handling.
Definition: wcserr.h:223
unitfix
int unitfix(int ctrl, struct wcsprm *wcs)
Correct aberrant CUNITia keyvalues.
wcsfix
int wcsfix(int ctrl, const int naxis[], struct wcsprm *wcs, int stat[])
Translate a non-standard WCS struct.
FIXERR_NO_REF_PIX_VAL
@ FIXERR_NO_REF_PIX_VAL
Definition: wcsfix.h:489
FIXERR_ILL_COORD_TRANS
@ FIXERR_ILL_COORD_TRANS
Definition: wcsfix.h:483
spcfix
int spcfix(struct wcsprm *wcs)
Translate AIPS-convention spectral types.
celfix
int celfix(struct wcsprm *wcs)
Translate AIPS-convention celestial projection types.
cylfix
int cylfix(const int naxis[], struct wcsprm *wcs)
Fix malformed cylindrical projections.
wcserr.h