WCSLIB: wcsfix.h Source File

WCSLIB 7.4

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