[wcslib] 03/11: New upstream version 5.1 (prerelease?)

Ole Streicher olebole at moszumanska.debian.org
Wed Apr 8 09:06:39 UTC 2015


This is an automated email from the git hooks/post-receive script.

olebole pushed a commit to branch debian
in repository wcslib.

commit 872fe549a38acff08ce64f0e0facd6a6f9b21bab
Author: Ole Streicher <debian at liska.ath.cx>
Date:   Tue Apr 7 15:36:07 2015 +0200

    New upstream version 5.1 (prerelease?)
---
 C/GNUmakefile                                  |    6 +-
 C/cel.c                                        |    4 +-
 C/cel.h                                        |    6 +-
 C/dis.c                                        |  171 +++-
 C/dis.h                                        |  130 ++-
 C/fitshdr.h                                    |    4 +-
 C/fitshdr.l                                    |    4 +-
 C/flexed/fitshdr.c                             |    4 +-
 C/flexed/wcsbth.c                              |    4 +-
 C/flexed/wcspih.c                              |    4 +-
 C/flexed/wcsulex.c                             |    4 +-
 C/flexed/wcsutrn.c                             |    4 +-
 C/getwcstab.c                                  |    4 +-
 C/getwcstab.h                                  |    4 +-
 C/lin.c                                        |  268 +++++-
 C/lin.h                                        |  106 ++-
 C/log.c                                        |    4 +-
 C/log.h                                        |    6 +-
 C/prj.c                                        |    4 +-
 C/prj.h                                        |    6 +-
 C/spc.c                                        |    4 +-
 C/spc.h                                        |    6 +-
 C/sph.c                                        |    4 +-
 C/sph.h                                        |    6 +-
 C/spx.c                                        |    4 +-
 C/spx.h                                        |    6 +-
 C/tab.c                                        |    4 +-
 C/tab.h                                        |    6 +-
 C/test/TPV3.keyrec                             |    9 +-
 C/test/TPV5.keyrec                             |    9 +-
 C/test/TPV7.keyrec                             |    9 +-
 C/test/bth.keyrec                              |    4 +-
 C/test/fitshdr.keyrec                          |    4 +-
 C/test/pih.keyrec                              |    4 +-
 C/test/tbth1.c                                 |    4 +-
 C/test/tcel1.c                                 |    4 +-
 C/test/tcel2.c                                 |    4 +-
 C/test/tdis1.c                                 |  156 +++-
 C/test/tfitshdr.c                              |    4 +-
 C/test/tlin.c                                  |    4 +-
 C/test/tlog.c                                  |    4 +-
 C/test/tofits.c                                |    4 +-
 C/test/tpih1.c                                 |    4 +-
 C/test/tpih2.c                                 |    4 +-
 C/test/tprj1.c                                 |    4 +-
 C/test/tprj2.c                                 |    4 +-
 C/test/tspc.c                                  |    4 +-
 C/test/tspcaips.c                              |    4 +-
 C/test/tspcspxe.c                              |    4 +-
 C/test/tspctrne.c                              |    4 +-
 C/test/tsph.c                                  |    4 +-
 C/test/tsphdpa.c                               |    4 +-
 C/test/tspx.c                                  |    4 +-
 C/test/ttab1.c                                 |    4 +-
 C/test/ttab2.c                                 |    4 +-
 C/test/ttab3.c                                 |    4 +-
 C/test/tunits.c                                |    4 +-
 C/test/twcs.c                                  |    4 +-
 C/test/twcs_locale.c                           |    4 +-
 C/test/twcscompare.c                           |    4 +-
 C/test/twcsfix.c                               |    4 +-
 C/test/twcsfix.out                             |    8 +-
 C/test/twcshdr.c                               |    4 +-
 C/test/twcsmix.c                               |    4 +-
 C/test/twcssub.c                               |    4 +-
 C/test/twcstab.c                               |    4 +-
 C/test/wcslint.keyrec                          |    4 +-
 C/test/wcstab.keyrec                           |    4 +-
 C/wcs.c                                        |    4 +-
 C/wcs.h                                        |    6 +-
 C/wcsbth.l                                     |    4 +-
 C/wcserr.c                                     |    4 +-
 C/wcserr.h                                     |    4 +-
 C/wcsfix.c                                     |    4 +-
 C/wcsfix.h                                     |    6 +-
 C/wcshdr.c                                     |    4 +-
 C/wcshdr.h                                     |    6 +-
 C/wcslib.h                                     |    6 +-
 C/wcsmath.h                                    |    4 +-
 C/wcspih.l                                     |    4 +-
 C/wcsprintf.c                                  |    4 +-
 C/wcsprintf.h                                  |    6 +-
 C/wcstrig.c                                    |    4 +-
 C/wcstrig.h                                    |    4 +-
 C/wcsulex.l                                    |    4 +-
 C/wcsunits.c                                   |    4 +-
 C/wcsunits.h                                   |    6 +-
 C/wcsutil.c                                    |    4 +-
 C/wcsutil.h                                    |    4 +-
 C/wcsutrn.l                                    |    4 +-
 CHANGES                                        |   42 +-
 Fortran/GNUmakefile                            |   10 +-
 Fortran/cel.inc                                |    4 +-
 Fortran/cel_data.f                             |    4 +-
 Fortran/cel_f.c                                |    4 +-
 Fortran/dis.inc                                |    8 +-
 Fortran/dis_data.f                             |    4 +-
 Fortran/dis_f.c                                |   25 +-
 Fortran/fitshdr.inc                            |    4 +-
 Fortran/fitshdr_data.f                         |    4 +-
 Fortran/fitshdr_f.c                            |    4 +-
 Fortran/getwcstab.inc                          |    4 +-
 Fortran/getwcstab_f.c                          |    4 +-
 Fortran/lin.inc                                |    8 +-
 Fortran/lin_data.f                             |    4 +-
 Fortran/lin_f.c                                |   25 +-
 Fortran/log.inc                                |    4 +-
 Fortran/log_data.f                             |    4 +-
 Fortran/log_f.c                                |    4 +-
 Fortran/prj.inc                                |    4 +-
 Fortran/prj_data.f                             |    4 +-
 Fortran/prj_f.c                                |    4 +-
 Fortran/spc.inc                                |    4 +-
 Fortran/spc_data.f                             |    4 +-
 Fortran/spc_f.c                                |    4 +-
 Fortran/sph.inc                                |    4 +-
 Fortran/sph_f.c                                |    4 +-
 Fortran/spx.inc                                |    4 +-
 Fortran/spx_data.f                             |    4 +-
 Fortran/spx_f.c                                |    4 +-
 Fortran/tab.inc                                |    4 +-
 Fortran/tab_data.f                             |    4 +-
 Fortran/tab_f.c                                |    4 +-
 Fortran/test/tcel1.f                           |    4 +-
 Fortran/test/tdis1.f                           |    4 +-
 Fortran/test/tdis2.f                           |    4 +-
 Fortran/test/tdis2.out                         |    3 +
 Fortran/test/tfitshdr.f                        |    4 +-
 Fortran/test/tlin.f                            |    4 +-
 Fortran/test/tlog.f                            |    4 +-
 Fortran/test/tpih1.f                           |    4 +-
 Fortran/test/tpih2.f                           |    4 +-
 Fortran/test/tprj1.f                           |    4 +-
 Fortran/test/tprj2.f                           |    4 +-
 Fortran/test/tspc.f                            |    4 +-
 Fortran/test/tsph.f                            |    4 +-
 Fortran/test/tspx.f                            |    4 +-
 Fortran/test/ttab1.f                           |    4 +-
 Fortran/test/ttab2.f                           |    4 +-
 Fortran/test/ttab3.f                           |    4 +-
 Fortran/test/tunits.f                          |    4 +-
 Fortran/test/twcs.f                            |    4 +-
 Fortran/test/twcsfix.f                         |    4 +-
 Fortran/test/twcsfix.out                       |    8 +-
 Fortran/test/twcsmix.f                         |    4 +-
 Fortran/test/twcssub.f                         |    4 +-
 Fortran/test/twcstab.f                         |    4 +-
 Fortran/wcs.inc                                |    4 +-
 Fortran/wcs_data.f                             |    4 +-
 Fortran/wcs_f.c                                |    4 +-
 Fortran/wcserr.inc                             |    4 +-
 Fortran/wcserr_f.c                             |    4 +-
 Fortran/wcsfix.inc                             |    4 +-
 Fortran/wcsfix_data.f                          |    4 +-
 Fortran/wcsfix_f.c                             |    4 +-
 Fortran/wcshdr.inc                             |    4 +-
 Fortran/wcshdr_data.f                          |    4 +-
 Fortran/wcshdr_f.c                             |    4 +-
 Fortran/wcsmath.inc                            |    4 +-
 Fortran/wcsunits.inc                           |    4 +-
 Fortran/wcsunits_data.f                        |    4 +-
 Fortran/wcsunits_f.c                           |    4 +-
 GNUmakefile                                    |    4 +-
 INSTALL                                        |    8 +-
 README                                         |    6 +-
 THANKS                                         |    3 +-
 VALIDATION                                     |   14 +-
 configure                                      |   24 +-
 configure.ac                                   |    6 +-
 doxygen/GNUmakefile                            |    4 +-
 doxygen/README                                 |    2 +-
 doxygen/doxextr.l                              |    4 +-
 doxygen/mainpage.dox                           |    8 +-
 flavours                                       |    2 +-
 html/annotated.html                            |    2 +-
 html/cel_8h.html                               |    2 +-
 html/cel_8h_source.html                        |    8 +-
 html/classes.html                              |    2 +-
 html/deprecated.html                           |    2 +-
 html/diagnostics.html                          |    4 +-
 html/dir_af99bb3c152a306abd27951285ad1127.html |    2 +-
 html/dis_8h.html                               |  124 ++-
 html/dis_8h_source.html                        | 1185 +++++++++++++-----------
 html/files.html                                |    2 +-
 html/fitshdr_8h.html                           |    2 +-
 html/fitshdr_8h_source.html                    |    6 +-
 html/fortran.html                              |    4 +-
 html/functions.html                            |    2 +-
 html/functions_b.html                          |    2 +-
 html/functions_c.html                          |    2 +-
 html/functions_d.html                          |    2 +-
 html/functions_e.html                          |    2 +-
 html/functions_f.html                          |    2 +-
 html/functions_g.html                          |    2 +-
 html/functions_i.html                          |    2 +-
 html/functions_k.html                          |    2 +-
 html/functions_l.html                          |    2 +-
 html/functions_m.html                          |    2 +-
 html/functions_n.html                          |    5 +-
 html/functions_o.html                          |    2 +-
 html/functions_p.html                          |    3 +-
 html/functions_r.html                          |    2 +-
 html/functions_s.html                          |    2 +-
 html/functions_t.html                          |    2 +-
 html/functions_u.html                          |    2 +-
 html/functions_v.html                          |    2 +-
 html/functions_vars.html                       |    2 +-
 html/functions_vars_b.html                     |    2 +-
 html/functions_vars_c.html                     |    2 +-
 html/functions_vars_d.html                     |    2 +-
 html/functions_vars_e.html                     |    2 +-
 html/functions_vars_f.html                     |    2 +-
 html/functions_vars_g.html                     |    2 +-
 html/functions_vars_i.html                     |    2 +-
 html/functions_vars_k.html                     |    2 +-
 html/functions_vars_l.html                     |    2 +-
 html/functions_vars_m.html                     |    2 +-
 html/functions_vars_n.html                     |    5 +-
 html/functions_vars_o.html                     |    2 +-
 html/functions_vars_p.html                     |    3 +-
 html/functions_vars_r.html                     |    2 +-
 html/functions_vars_s.html                     |    2 +-
 html/functions_vars_t.html                     |    2 +-
 html/functions_vars_u.html                     |    2 +-
 html/functions_vars_v.html                     |    2 +-
 html/functions_vars_w.html                     |    2 +-
 html/functions_vars_x.html                     |    2 +-
 html/functions_vars_y.html                     |    2 +-
 html/functions_vars_z.html                     |    2 +-
 html/functions_w.html                          |    2 +-
 html/functions_x.html                          |    2 +-
 html/functions_y.html                          |    2 +-
 html/functions_z.html                          |    2 +-
 html/getwcstab_8h.html                         |    2 +-
 html/getwcstab_8h_source.html                  |    6 +-
 html/globals.html                              |    2 +-
 html/globals_b.html                            |    2 +-
 html/globals_c.html                            |    2 +-
 html/globals_d.html                            |    5 +-
 html/globals_defs.html                         |    2 +-
 html/globals_e.html                            |    2 +-
 html/globals_enum.html                         |    2 +-
 html/globals_eval.html                         |    2 +-
 html/globals_f.html                            |    2 +-
 html/globals_func.html                         |    2 +-
 html/globals_func_b.html                       |    2 +-
 html/globals_func_c.html                       |    2 +-
 html/globals_func_d.html                       |    5 +-
 html/globals_func_e.html                       |    2 +-
 html/globals_func_f.html                       |    2 +-
 html/globals_func_h.html                       |    2 +-
 html/globals_func_l.html                       |    5 +-
 html/globals_func_m.html                       |    2 +-
 html/globals_func_p.html                       |    2 +-
 html/globals_func_q.html                       |    2 +-
 html/globals_func_s.html                       |    2 +-
 html/globals_func_t.html                       |    2 +-
 html/globals_func_u.html                       |    2 +-
 html/globals_func_v.html                       |    2 +-
 html/globals_func_w.html                       |    2 +-
 html/globals_func_x.html                       |    2 +-
 html/globals_func_z.html                       |    2 +-
 html/globals_h.html                            |    2 +-
 html/globals_i.html                            |    2 +-
 html/globals_k.html                            |    2 +-
 html/globals_l.html                            |    5 +-
 html/globals_m.html                            |    2 +-
 html/globals_n.html                            |    2 +-
 html/globals_p.html                            |    2 +-
 html/globals_q.html                            |    2 +-
 html/globals_r.html                            |    2 +-
 html/globals_s.html                            |    2 +-
 html/globals_t.html                            |    2 +-
 html/globals_type.html                         |    2 +-
 html/globals_u.html                            |    2 +-
 html/globals_v.html                            |    2 +-
 html/globals_vars.html                         |    2 +-
 html/globals_w.html                            |    2 +-
 html/globals_x.html                            |    2 +-
 html/globals_z.html                            |    2 +-
 html/index.html                                |   10 +-
 html/intro.html                                |    4 +-
 html/lin_8h.html                               |  121 ++-
 html/lin_8h_source.html                        | 1168 ++++++++++++-----------
 html/log_8h.html                               |    2 +-
 html/log_8h_source.html                        |    8 +-
 html/memory.html                               |    4 +-
 html/overview.html                             |    4 +-
 html/pages.html                                |    2 +-
 html/pgsbox.html                               |    4 +-
 html/prj_8h.html                               |    2 +-
 html/prj_8h_source.html                        |    8 +-
 html/software.html                             |    4 +-
 html/spc_8h.html                               |    2 +-
 html/spc_8h_source.html                        |    8 +-
 html/sph_8h.html                               |    2 +-
 html/sph_8h_source.html                        |    8 +-
 html/spx_8h.html                               |    2 +-
 html/spx_8h_source.html                        |    8 +-
 html/structcelprm.html                         |    2 +-
 html/structdisprm.html                         |   32 +-
 html/structfitskey.html                        |    2 +-
 html/structfitskeyid.html                      |    2 +-
 html/structlinprm.html                         |    2 +-
 html/structprjprm.html                         |    2 +-
 html/structpscard.html                         |    2 +-
 html/structpvcard.html                         |    2 +-
 html/structs.html                              |    4 +-
 html/structspcprm.html                         |    2 +-
 html/structspxprm.html                         |    2 +-
 html/structtabprm.html                         |    2 +-
 html/structwcserr.html                         |    2 +-
 html/structwcsprm.html                         |    2 +-
 html/structwtbarr.html                         |    2 +-
 html/tab_8h.html                               |    2 +-
 html/tab_8h_source.html                        |    8 +-
 html/testing.html                              |    4 +-
 html/threads.html                              |    6 +-
 html/vector.html                               |    4 +-
 html/wcs_8h.html                               |    2 +-
 html/wcs_8h_source.html                        |   10 +-
 html/wcserr_8h.html                            |    2 +-
 html/wcserr_8h_source.html                     |    6 +-
 html/wcsfix_8h.html                            |    2 +-
 html/wcsfix_8h_source.html                     |    8 +-
 html/wcshdr_8h.html                            |    2 +-
 html/wcshdr_8h_source.html                     |    8 +-
 html/wcslib_8h.html                            |    2 +-
 html/wcslib_8h_source.html                     |   94 +-
 html/wcsmath_8h.html                           |    2 +-
 html/wcsmath_8h_source.html                    |    6 +-
 html/wcsprintf_8h.html                         |    2 +-
 html/wcsprintf_8h_source.html                  |    8 +-
 html/wcstrig_8h.html                           |    2 +-
 html/wcstrig_8h_source.html                    |    6 +-
 html/wcsunits_8h.html                          |    2 +-
 html/wcsunits_8h_source.html                   |    8 +-
 html/wcsutil_8h.html                           |    2 +-
 html/wcsutil_8h_source.html                    |    6 +-
 makedefs.in                                    |   10 +-
 pgsbox/GNUmakefile                             |    6 +-
 pgsbox/cpgsbox.c                               |    4 +-
 pgsbox/cpgsbox.h                               |    4 +-
 pgsbox/cpgtest.c                               |    4 +-
 pgsbox/fscan.f                                 |    4 +-
 pgsbox/lngvel.f                                |    4 +-
 pgsbox/pgcrfn.f                                |    4 +-
 pgsbox/pgcrvl.f                                |    4 +-
 pgsbox/pgsbox.f                                |    4 +-
 pgsbox/pgtest.f                                |    4 +-
 pgsbox/pgwcsl.c                                |    4 +-
 pgsbox/pgwcsl.h                                |    4 +-
 utils/GNUmakefile                              |    6 +-
 utils/HPXcvt.1                                 |    2 +-
 utils/HPXcvt.c                                 |    4 +-
 utils/fitshdr.1                                |    2 +-
 utils/fitshdr.c                                |    4 +-
 utils/wcsgrid.1                                |    2 +-
 utils/wcsgrid.c                                |    4 +-
 utils/wcsware.1                                |    2 +-
 utils/wcsware.c                                |    4 +-
 wcsconfig.h.in                                 |    7 +-
 wcsconfig_f77.h.in                             |    4 +-
 wcsconfig_tests.h.in                           |    4 +-
 wcsconfig_utils.h.in                           |    4 +-
 wcslib.pdf                                     |  Bin 1045958 -> 1055619 bytes
 366 files changed, 3152 insertions(+), 1837 deletions(-)

diff --git a/C/GNUmakefile b/C/GNUmakefile
index cb4253c..fc342f3 100644
--- a/C/GNUmakefile
+++ b/C/GNUmakefile
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# GNU makefile for building WCSLIB 5.0 and its test suite.
+# GNU makefile for building WCSLIB 5.1 and its test suite.
 #
 # Summary of the main targets
 # ---------------------------
@@ -31,7 +31,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: GNUmakefile,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+# $Id: GNUmakefile,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
@@ -353,7 +353,7 @@ $(PGSBOXLIB) :
 	   $(MAKE) -C ../pgsbox $(notdir $@)
 
 tofits : test/tofits.c
-	   $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ $<
+	   $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
 GNUmakefile : ../makedefs ;
 
diff --git a/C/cel.c b/C/cel.c
index 296eb55..840d4ad 100644
--- a/C/cel.c
+++ b/C/cel.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: cel.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: cel.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/cel.h b/C/cel.h
index 4d03b50..2cb21c2 100644
--- a/C/cel.h
+++ b/C/cel.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: cel.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: cel.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/dis.c b/C/dis.c
index 8a6c6a6..aac389d 100644
--- a/C/dis.c
+++ b/C/dis.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: dis.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: dis.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
@@ -304,6 +304,9 @@ int disini(int alloc, int naxis, struct disprm *dis)
   memset(dis->maxdis,    0, naxis*sizeof(double));
   dis->totdis = 0.0;
 
+  dis->ndis = 0;
+  dis->padding = 0;
+
   return 0;
 }
 
@@ -552,6 +555,9 @@ int disprt(const struct disprm *dis)
 
   wcsprintf("     totdis:  %#- 11.5g\n", dis->totdis);
 
+  /* Derived values. */
+  wcsprintf("       ndis: %d\n", dis->ndis);
+
   /* Error handling. */
   WCSPRINTF_PTR("        err: ", dis->err, "\n");
   if (dis->err) {
@@ -625,7 +631,7 @@ int disset(struct disprm *dis)
 {
   static const char *function = "disset";
 
-  int j, naxis, status;
+  int j, naxis, ndis, status;
   struct wcserr **err;
 
   if (dis == 0x0) return DISERR_NULL_POINTER;
@@ -634,6 +640,7 @@ int disset(struct disprm *dis)
   naxis = dis->naxis;
 
   /* Identify the distortion functions. */
+  ndis = 0;
   for (j = 0; j < naxis; j++) {
     if (strlen(dis->dtype[j]) == 0) {
       /* No distortion on this axis. */
@@ -649,8 +656,11 @@ int disset(struct disprm *dis)
       return wcserr_set(WCSERR_SET(DISERR_BAD_PARAM),
         "Unrecognized/unimplemented distortion function, %s", dis->dtype[j]);
     }
+
+    ndis++;
   }
 
+  dis->ndis = ndis;
   dis->flag = DISSET;
 
   return 0;
@@ -751,7 +761,7 @@ int disx2p(
   /* Furthermore, a is assumed to be small, and b close to unity.         */
   memcpy(rawcrd, discrd, naxis*sizeof(double));
 
-  /* Iteratively invert the (well behaved!) distortion function. */
+  /* Iteratively invert the (well-behaved!) distortion function. */
   for (iter = 0; iter < ITERMAX; iter++) {
     if ((status = disp2x(dis, rawcrd, dcrd0))) {
       return wcserr_set(DIS_ERRMSG(status));
@@ -860,6 +870,159 @@ int disx2p(
 
 /*--------------------------------------------------------------------------*/
 
+int diswarp(
+  struct disprm *dis,
+  const double pixblc[],
+  const double pixtrc[],
+  const double pixsamp[],
+  int    *nsamp,
+  double maxdis[],
+  double *maxtot,
+  double avgdis[],
+  double *avgtot,
+  double rmsdis[],
+  double *rmstot)
+
+{
+  static const char *function = "diswarp";
+
+  int carry, j, naxis, status = 0;
+  double dpix, dpx2, dssq, *pix0, *pix1, *pixend, *pixinc, pixspan, *ssqdis,
+         ssqtot, *sumdis, sumtot, totdis;
+  struct wcserr **err;
+
+
+  /* Initialize. */
+  if (dis == 0x0) return DISERR_NULL_POINTER;
+  err = &(dis->err);
+
+  naxis = dis->naxis;
+
+  if (nsamp) *nsamp = 0;
+  for (j = 0; j < naxis; j++) {
+    if (maxdis) maxdis[j] = 0.0;
+    if (avgdis) avgdis[j] = 0.0;
+    if (rmsdis) rmsdis[j] = 0.0;
+  }
+  if (maxtot) *maxtot = 0.0;
+  if (avgtot) *avgtot = 0.0;
+  if (rmstot) *rmstot = 0.0;
+
+  /* Quick return if no distortions. */
+  if (dis->ndis == 0) return 0;
+
+  /* Carve up working memory, noting that disp2x() gets to it first. */
+  pixinc = dis->tmpmem + naxis;
+  pixend = pixinc + naxis;
+  sumdis = pixend + naxis;
+  ssqdis = sumdis + naxis;
+
+  /* Work out increments on each axis. */
+  for (j = 0; j < naxis; j++) {
+    pixspan = pixtrc[j] - (pixblc ? pixblc[j] : 1.0);
+
+    if (pixsamp == 0x0) {
+      pixinc[j] = 1.0;
+    } else if (pixsamp[j] == 0.0) {
+      pixinc[j] = 1.0;
+    } else if (pixsamp[j] > 0.0) {
+      pixinc[j] = pixsamp[j];
+    } else if (pixsamp[j] > -1.5) {
+      pixinc[j] = 2.0*pixspan;
+    } else {
+      pixinc[j] = pixspan / ((int)(-pixsamp[j] - 0.5));
+    }
+  }
+
+  /* Get some more memory for coordinate vectors. */
+  if ((pix0 = calloc(2*naxis, sizeof(double))) == 0x0) {
+    return wcserr_set(DIS_ERRMSG(DISERR_MEMORY));
+  }
+
+  pix1 = pix0 + naxis;
+
+
+  /* Set up the array of pixel coordinates. */
+  for (j = 0; j < naxis; j++) {
+    pix0[j] = pixblc ? pixblc[j] : 1.0;
+    pixend[j] = pixtrc[j] + 0.5*pixinc[j];
+  }
+
+  /* Initialize accumulators. */
+  for (j = 0; j < naxis; j++) {
+    sumdis[j] = 0.0;
+    ssqdis[j] = 0.0;
+  }
+  sumtot = 0.0;
+  ssqtot = 0.0;
+
+
+  /* Loop over N dimensions. */
+  carry = 0;
+  while (carry == 0) {
+    if ((status = disp2x(dis, pix0, pix1))) {
+      wcserr_set(DIS_ERRMSG(status));
+      goto cleanup;
+    }
+
+    /* Accumulate statistics. */
+    (*nsamp)++;
+
+    dssq = 0.0;
+    for (j = 0; j < naxis; j++) {
+      dpix = pix1[j] - pix0[j];
+      dpx2 = dpix*dpix;
+
+      sumdis[j] += dpix;
+      ssqdis[j] += dpx2;
+
+      if (maxdis && (dpix = fabs(dpix)) > maxdis[j]) maxdis[j] = dpix;
+
+      dssq += dpx2;
+    }
+
+    sumtot += totdis;
+    ssqtot += totdis*totdis;
+
+    totdis = sqrt(dssq);
+    if (maxtot && *maxtot < totdis) *maxtot = totdis;
+
+    /* Next pixel. */
+    for (j = 0; j < naxis; j++) {
+      pix0[j] += pixinc[j];
+      if (pix0[j] < pixend[j]) {
+        carry = 0;
+        break;
+      }
+
+      pix0[j] = pixblc ? pixblc[j] : 1.0;
+      carry = 1;
+    }
+  }
+
+
+  /* Compute the means and RMSs. */
+  for (j = 0; j < naxis; j++) {
+    ssqdis[j] /= *nsamp;
+    sumdis[j] /= *nsamp;
+    if (avgdis) avgdis[j] = sumdis[j];
+    if (rmsdis) rmsdis[j] = sqrt(ssqdis[j] - sumdis[j]*sumdis[j]);
+  }
+
+  ssqtot /= *nsamp;
+  sumtot /= *nsamp;
+  if (avgtot) *avgtot = sumtot;
+  if (rmstot) *rmstot = sqrt(ssqtot - sumtot*sumtot);
+
+
+cleanup:
+  free(pix0);
+
+  return status;
+}
+
+/*--------------------------------------------------------------------------*/
+
 int tpvset(int j, struct disprm *dis)
 
 {
diff --git a/C/dis.h b/C/dis.h
index 5b0cf36..952252c 100644
--- a/C/dis.h
+++ b/C/dis.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: dis.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: dis.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - experimental C routines that implement proposed extensions to
+* WCSLIB 5.1 - experimental C routines that implement proposed extensions to
 * the FITS World Coordinate System (WCS) standard.  Refer to
 *
 *   "Representations of distortions in FITS world coordinate systems",
@@ -56,6 +56,9 @@
 * disp2x() and disx2p() implement the WCS distortion functions, disp2x() using
 * separate functions, such as tpv1(), to do the computation.
 *
+* An auxiliary routine, diswarp(), computes various measures of the distortion
+* over a specified range of pixels.
+*
 *
 * disini() - Default constructor for the disprm struct
 * ----------------------------------------------------
@@ -241,11 +244,12 @@
 *                       Distortion function parameters.
 *
 * Given:
-*   rawcrd    const double[]
+*   rawcrd    const double[naxis]
 *                       Array of coordinates.
 *
 * Returned:
-*   discrd    double[]  Array of coordinates to which the distortion functions
+*   discrd    double[naxis]
+*                       Array of coordinates to which the distortion functions
 *                       have been applied.
 *
 * Function return value:
@@ -283,11 +287,12 @@
 *                       Distortion function parameters.
 *
 * Given:
-*   discrd    const double[]
+*   discrd    const double[naxis]
 *                       Array of coordinates.
 *
 * Returned:
-*   rawcrd    double[]  Array of coordinates to which the inverse distortion
+*   rawcrd    double[naxis]
+*                       Array of coordinates to which the inverse distortion
 *                       functions have been applied.
 *
 * Function return value:
@@ -302,6 +307,100 @@
 *                       disprm::err if enabled, see wcserr_enable().
 *
 *
+* diswarp() - Compute measures of distortion
+* ------------------------------------------
+* diswarp() computes various measures of the distortion over the specified
+* range of coordinates.
+*
+* For prior distortions, the measures may be interpreted simply as an offset
+* in pixel coordinates.  For sequent distortions, the interpretation depends
+* on the nature of the linear transformation matrix (PCi_ja or CDi_ja).  If
+* the latter introduces a scaling, then the measures will also be scaled.
+* Note also that the image domain, which is rectangular in pixel coordinates,
+* may be rotated, skewed, and/or stretched in intermediate pixel coordinates,
+* and in general cannot be defined using pixblc[] and pixtrc[].
+*
+* PLEASE NOTE: the measures of total distortion may be essentially meaningless
+* if there are multiple sequent distortions with different scaling.
+*
+* See also linwarp().
+*
+* Given and returned:
+*   dis       struct disprm*
+*                       Distortion function parameters.
+*
+* Given:
+*   pixblc    const double[naxis]
+*                       Start of the range of pixel coordinates (for prior
+*                       distortions), or intermediate pixel coordinates (for
+*                       sequent distortions).  May be specified as a NULL
+*                       pointer which is interpreted as (1,1,...).
+*
+*   pixtrc    const double[naxis]
+*                       End of the range of pixel coordinates (prior) or
+*                       intermediate pixel coordinates (sequent).
+*
+*   pixsamp   const double[naxis]
+*                       If positive or zero, the increment on the particular
+*                       axis, starting at pixblc[].  Zero is interpreted as a
+*                       unit increment.  pixsamp may also be specified as a
+*                       NULL pointer which is interpreted as all zeroes, i.e.
+*                       unit increments on all axes.
+*
+*                       If negative, the grid size on the particular axis (the
+*                       absolute value being rounded to the nearest integer).
+*                       For example, if pixsamp is (-128.0,-128.0,...) then
+*                       each axis will be sampled at 128 points between
+*                       pixblc[] and pixtrc[] inclusive.  Use caution when
+*                       using this option on non-square images.
+*
+* Returned:
+*   nsamp     int*      The number of pixel coordinates sampled.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   maxdis    double[naxis]
+*                       For each individual distortion function, the
+*                       maximum absolute value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   maxtot    double*   For the combination of all distortion functions, the
+*                       maximum absolute value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   avgdis    double[naxis]
+*                       For each individual distortion function, the
+*                       mean value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   avgtot    double*   For the combination of all distortion functions, the
+*                       mean value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   rmsdis    double[naxis]
+*                       For each individual distortion function, the
+*                       root mean square deviation of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   rmstot    double*   For the combination of all distortion functions, the
+*                       root mean square deviation of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+* Function return value:
+*             int       Status return value:
+*                         0: Success.
+*                         1: Null disprm pointer passed.
+*                         2: Memory allocation failed.
+*                         3: Invalid parameter.
+*                         4: Distort error.
+*
+*
 * disprm struct - Distortion parameters
 * -------------------------------------
 * The disprm struct contains all of the information required to apply a set of
@@ -419,6 +518,12 @@
 *     It is not necessary to reset the disprm struct (via disset()) when
 *     disprm::totdis is changed.
 *
+*   int ndis
+*     (Returned) The number of distortion functions.
+*
+*   int padding
+*     (An unused variable inserted for alignment purposes only.)
+*
 *   struct wcserr *err
 *     (Returned) If enabled, when an error status is returned, this struct
 *     contains detailed information about the error, see wcserr_enable().
@@ -511,6 +616,11 @@ struct disprm {
   double *maxdis;		/* For each axis, the maximum distortion.   */
   double totdis;		/* The maximum combined distortion.         */
 
+  /* Information derived from the parameters supplied.                      */
+  /*------------------------------------------------------------------------*/
+  int    ndis;			/* The number of distortion functions.      */
+  int    padding;		/* (Dummy inserted for alignment purposes.) */
+
   /* Error handling, if enabled.                                            */
   /*------------------------------------------------------------------------*/
   struct wcserr *err;
@@ -554,6 +664,12 @@ int disp2x(struct disprm *dis, const double rawcrd[], double discrd[]);
 
 int disx2p(struct disprm *dis, const double discrd[], double rawcrd[]);
 
+int diswarp(struct disprm *dis, const double pixblc[], const double pixtrc[],
+            const double pixsamp[], int *nsamp,
+            double maxdis[], double *maxtot,
+            double avgdis[], double *avgtot,
+            double rmsdis[], double *rmstot);
+
 
 /* Specialist distortion functions (internal use only). */
 int tpvset(int j, struct disprm *dis);
diff --git a/C/fitshdr.h b/C/fitshdr.h
index 41c4734..660b03c 100644
--- a/C/fitshdr.h
+++ b/C/fitshdr.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: fitshdr.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: fitshdr.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * The Flexible Image Transport System (FITS), a data format widely used in
diff --git a/C/fitshdr.l b/C/fitshdr.l
index 53a059f..8fb2262 100644
--- a/C/fitshdr.l
+++ b/C/fitshdr.l
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: fitshdr.l,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: fitshdr.l,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * fitshdr.l is a Flex description file containing a lexical scanner
diff --git a/C/flexed/fitshdr.c b/C/flexed/fitshdr.c
index 6124da7..c89c6fe 100644
--- a/C/flexed/fitshdr.c
+++ b/C/flexed/fitshdr.c
@@ -10083,7 +10083,7 @@ char *fitshdrtext;
 #line 1 "fitshdr.l"
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -10105,7 +10105,7 @@ char *fitshdrtext;
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: fitshdr.c,v 5.0 2015/04/05 09:18:14 mcalabre Exp $
+  $Id: fitshdr.c,v 5.1 2015/04/07 10:56:37 mcalabre Exp $
 *=============================================================================
 *
 * fitshdr.l is a Flex description file containing a lexical scanner
diff --git a/C/flexed/wcsbth.c b/C/flexed/wcsbth.c
index 55ca12e..4e5e62a 100644
--- a/C/flexed/wcsbth.c
+++ b/C/flexed/wcsbth.c
@@ -20680,7 +20680,7 @@ char *wcsbthtext;
 #line 1 "wcsbth.l"
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -20702,7 +20702,7 @@ char *wcsbthtext;
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsbth.c,v 5.0 2015/04/05 09:18:14 mcalabre Exp $
+  $Id: wcsbth.c,v 5.1 2015/04/07 10:56:37 mcalabre Exp $
 *=============================================================================
 *
 * wcsbth.l is a Flex description file containing the definition of a lexical
diff --git a/C/flexed/wcspih.c b/C/flexed/wcspih.c
index d770c95..08aa79e 100644
--- a/C/flexed/wcspih.c
+++ b/C/flexed/wcspih.c
@@ -12236,7 +12236,7 @@ char *wcspihtext;
 #line 1 "wcspih.l"
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -12258,7 +12258,7 @@ char *wcspihtext;
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcspih.c,v 5.0 2015/04/05 09:18:14 mcalabre Exp $
+  $Id: wcspih.c,v 5.1 2015/04/07 10:56:37 mcalabre Exp $
 *=============================================================================
 *
 * wcspih.l is a Flex description file containing the definition of a lexical
diff --git a/C/flexed/wcsulex.c b/C/flexed/wcsulex.c
index 77065e9..7c9f020 100644
--- a/C/flexed/wcsulex.c
+++ b/C/flexed/wcsulex.c
@@ -6860,7 +6860,7 @@ char *wcsulextext;
 #line 1 "wcsulex.l"
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -6882,7 +6882,7 @@ char *wcsulextext;
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsulex.c,v 5.0 2015/04/05 09:18:14 mcalabre Exp $
+  $Id: wcsulex.c,v 5.1 2015/04/07 10:56:37 mcalabre Exp $
 *=============================================================================
 *
 * wcsulex.l is a Flex description file containing the definition of a
diff --git a/C/flexed/wcsutrn.c b/C/flexed/wcsutrn.c
index 5d2dfb5..a3d45d3 100644
--- a/C/flexed/wcsutrn.c
+++ b/C/flexed/wcsutrn.c
@@ -3982,7 +3982,7 @@ char *wcsutrntext;
 #line 1 "wcsutrn.l"
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -4004,7 +4004,7 @@ char *wcsutrntext;
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsutrn.c,v 5.0 2015/04/05 09:18:14 mcalabre Exp $
+  $Id: wcsutrn.c,v 5.1 2015/04/07 10:56:37 mcalabre Exp $
 *=============================================================================
 *
 * wcsutrn.l is a Flex description file containing the definition of a lexical
diff --git a/C/getwcstab.c b/C/getwcstab.c
index 5eb9f28..28a6805 100644
--- a/C/getwcstab.c
+++ b/C/getwcstab.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: getwcstab.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: getwcstab.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdlib.h>
diff --git a/C/getwcstab.h b/C/getwcstab.h
index ee5c9f7..90ee855 100644
--- a/C/getwcstab.h
+++ b/C/getwcstab.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: getwcstab.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: getwcstab.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * Summary of the getwcstab routines
diff --git a/C/lin.c b/C/lin.c
index 46dd015..8b88a69 100644
--- a/C/lin.c
+++ b/C/lin.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: lin.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: lin.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
@@ -610,6 +610,13 @@ int linset(struct linprm *lin)
     lin->imgpix  = 0x0;
     lin->i_naxis = 0;
 
+    /* Check cdelt. */
+    for (i = 0; i < n; i++) {
+      if (lin->cdelt[i] == 0.0) {
+        return wcserr_set(LIN_ERRMSG(LINERR_SINGULAR_MTX));
+      }
+    }
+
   } else {
     if (lin->flag != LINSET || lin->i_naxis < n) {
       if (lin->flag == LINSET) {
@@ -649,25 +656,25 @@ int linset(struct linprm *lin)
     if ((status = matinv(n, lin->piximg, lin->imgpix))) {
       return wcserr_set(LIN_ERRMSG(status));
     }
+  }
 
 
-    /* Set up the distortion functions. */
-    lin->affine = 1;
-    if (lin->dispre) {
-      if ((status = disset(lin->dispre))) {
-        return wcserr_set(LIN_ERRMSG(lin_diserr[status]));
-      }
-
-      lin->affine = 0;
+  /* Set up the distortion functions. */
+  lin->affine = 1;
+  if (lin->dispre) {
+    if ((status = disset(lin->dispre))) {
+      return wcserr_set(LIN_ERRMSG(lin_diserr[status]));
     }
 
-    if (lin->disseq) {
-      if ((status = disset(lin->disseq))) {
-        return wcserr_set(LIN_ERRMSG(lin_diserr[status]));
-      }
+    lin->affine = 0;
+  }
 
-      lin->affine = 0;
+  if (lin->disseq) {
+    if ((status = disset(lin->disseq))) {
+      return wcserr_set(LIN_ERRMSG(lin_diserr[status]));
     }
+
+    lin->affine = 0;
   }
 
   lin->simple = lin->unity && lin->affine;
@@ -762,7 +769,7 @@ int linp2x(
 
       if (lin->unity) {
         for (i = 0; i < n; i++) {
-          img[i] = lin->cdelt[i] * (tmp[i] - lin->crpix[i]);
+          img[i] = tmp[i] - lin->crpix[i];
         }
 
       } else {
@@ -788,6 +795,12 @@ int linp2x(
         for (i = 0; i < n; i++) {
           img[i] = lin->cdelt[i] * tmp[i];
         }
+
+      } else if (lin->unity) {
+        /* ...nor if the matrix is unity. */
+        for (i = 0; i < n; i++) {
+          img[i] *= lin->cdelt[i];
+        }
       }
 
       pix += nelem;
@@ -882,16 +895,29 @@ int linx2p(
 
         memcpy(tmp, pix, ndbl);
 
+      } else if (lin->unity) {
+        /* ...nor if the matrix is unity. */
+        for (i = 0; i < n; i++) {
+          tmp[i] = img[i] / lin->cdelt[i];
+        }
+
       } else {
+        /* cdelt will have been incorporated into imgpix. */
         memcpy(tmp, img, ndbl);
       }
 
-      imgpix = lin->imgpix;
+      if (lin->unity) {
+        for (j = 0; j < n; j++) {
+          pix[j] = tmp[j] + lin->crpix[j];
+        }
 
-      for (j = 0; j < n; j++) {
-        pix[j] = lin->crpix[j];
-        for (i = 0; i < n; i++) {
-          pix[j] += *(imgpix++) * tmp[i];
+      } else {
+        imgpix = lin->imgpix;
+        for (j = 0; j < n; j++) {
+          pix[j] = lin->crpix[j];
+          for (i = 0; i < n; i++) {
+            pix[j] += *(imgpix++) * tmp[i];
+          }
         }
       }
 
@@ -913,6 +939,206 @@ int linx2p(
 
 /*--------------------------------------------------------------------------*/
 
+int linwarp(
+  struct linprm *lin,
+  const double pixblc[],
+  const double pixtrc[],
+  const double pixsamp[],
+  int    *nsamp,
+  double maxdis[],
+  double *maxtot,
+  double avgdis[],
+  double *avgtot,
+  double rmsdis[],
+  double *rmstot)
+
+{
+  static const char *function = "linwarp";
+
+  int carry, i, j, naxis, ncoord, status = 0;
+  double dpix, dpx2, dssq, *img, *pix0, *pix0p, *pix1, *pix1p, *pixend,
+         *pixinc, pixspan, *ssqdis, ssqtot, *sumdis, sumtot, totdis;
+  struct linprm affine;
+  struct wcserr **err;
+
+
+  /* Initialize. */
+  if (lin == 0x0) return LINERR_NULL_POINTER;
+  err = &(lin->err);
+
+  naxis = lin->naxis;
+
+  if (nsamp) *nsamp = 0;
+  for (j = 0; j < naxis; j++) {
+    if (maxdis) maxdis[j] = 0.0;
+    if (avgdis) avgdis[j] = 0.0;
+    if (rmsdis) rmsdis[j] = 0.0;
+  }
+  if (maxtot) *maxtot = 0.0;
+  if (avgtot) *avgtot = 0.0;
+  if (rmstot) *rmstot = 0.0;
+
+  /* Quick return if no distortions. */
+  if (lin->affine) return 0;
+
+  /* It's easier if there are no sequent distortions! */
+  if (lin->disseq == 0x0) {
+    status = diswarp(lin->dispre, pixblc, pixtrc, pixsamp, nsamp,
+                     maxdis, maxtot, avgdis, avgtot, rmsdis, rmstot);
+    return wcserr_set(LIN_ERRMSG(lin_diserr[status]));
+  }
+
+  /* Make a reference copy of lin without distortions. */
+  affine.flag = -1;
+  if ((status = (lincpy(1, lin, &affine) ||
+                 lindis(1, &affine, 0x0) ||
+                 lindis(2, &affine, 0x0) ||
+                 linset(&affine)))) {
+    return wcserr_set(LIN_ERRMSG(status));
+  }
+
+  /* Work out increments on each axis. */
+  pixinc = lin->tmpcrd;
+  for (j = 0; j < naxis; j++) {
+    pixspan = pixtrc[j] - (pixblc ? pixblc[j] : 1.0);
+
+    if (pixsamp == 0x0) {
+      pixinc[j] = 1.0;
+    } else if (pixsamp[j] == 0.0) {
+      pixinc[j] = 1.0;
+    } else if (pixsamp[j] > 0.0) {
+      pixinc[j] = pixsamp[j];
+    } else if (pixsamp[j] > -1.5) {
+      pixinc[j] = 2.0*pixspan;
+    } else {
+      pixinc[j] = pixspan / ((int)(-pixsamp[j] - 0.5));
+    }
+
+    if (j == 0) {
+      /* Number of samples on axis 1. */
+      ncoord = 1 + (int)((pixspan/pixinc[0]) + 0.5);
+    }
+  }
+
+  /* Get memory for processing the image row by row. */
+  if ((pix0 = calloc((3*ncoord+4)*naxis, sizeof(double))) == 0x0) {
+    return wcserr_set(LIN_ERRMSG(LINERR_MEMORY));
+  }
+
+  img    = pix0 + naxis*ncoord;
+  pix1   = img  + naxis*ncoord;
+  pixinc = pix1 + naxis*ncoord;
+  pixend = pixinc + naxis;
+  sumdis = pixend + naxis;
+  ssqdis = sumdis + naxis;
+
+
+  /* Copy tmpcrd since linp2x() will overwrite it. */
+  memcpy(pixinc, lin->tmpcrd, naxis*sizeof(double));
+
+  /* Set up the array of pixel coordinates. */
+  for (j = 0; j < naxis; j++) {
+    pix0[j] = pixblc ? pixblc[j] : 1.0;
+    pixend[j] = pixtrc[j] + 0.5*pixinc[j];
+  }
+
+  pix0p = pix0 + naxis;
+  for (i = 1; i < ncoord; i++) {
+    *(pix0p++) = pix0[0] + i*pixinc[0];
+
+    for (j = 1; j < naxis; j++) {
+      *(pix0p++) = pix0[j];
+    }
+  }
+
+  /* Initialize accumulators. */
+  for (j = 0; j < naxis; j++) {
+    sumdis[j] = 0.0;
+    ssqdis[j] = 0.0;
+  }
+  sumtot = 0.0;
+  ssqtot = 0.0;
+
+
+  /* Loop over N dimensions. */
+  carry = 0;
+  while (carry == 0) {
+    if ((status = linp2x(lin, ncoord, naxis, pix0, img))) {
+      wcserr_set(LIN_ERRMSG(status));
+      goto cleanup;
+    }
+
+    if ((status = linx2p(&affine, ncoord, naxis, img, pix1))) {
+      wcserr_set(LIN_ERRMSG(status));
+      goto cleanup;
+    }
+
+    /* Accumulate statistics. */
+    pix0p = pix0;
+    pix1p = pix1;
+    for (i = 0; i < ncoord; i++) {
+      (*nsamp)++;
+
+      dssq = 0.0;
+      for (j = 0; j < naxis; j++) {
+        dpix = *(pix1p++) - *(pix0p++);
+        dpx2 = dpix*dpix;
+
+        sumdis[j] += dpix;
+        ssqdis[j] += dpx2;
+
+        if (maxdis && (dpix = fabs(dpix)) > maxdis[j]) maxdis[j] = dpix;
+
+        dssq += dpx2;
+      }
+
+      sumtot += totdis;
+      ssqtot += totdis*totdis;
+
+      totdis = sqrt(dssq);
+      if (maxtot && *maxtot < totdis) *maxtot = totdis;
+    }
+
+    /* Next array of pixel coordinates. */
+    for (j = 1; j < naxis; j++) {
+      pix0[j] += pixinc[j];
+      if ((carry = (pix0[j] > pixend[j]))) {
+        pix0[j] = pixblc ? pixblc[j] : 1.0;
+      }
+
+      pix0p = pix0 + naxis + j;
+      for (i = 1; i < ncoord; i++) {
+        *pix0p = pix0[j];
+        pix0p += naxis;
+      }
+
+      if (carry == 0) break;
+    }
+  }
+
+
+  /* Compute the means and RMSs. */
+  for (j = 0; j < naxis; j++) {
+    ssqdis[j] /= *nsamp;
+    sumdis[j] /= *nsamp;
+    if (avgdis) avgdis[j] = sumdis[j];
+    if (rmsdis) rmsdis[j] = sqrt(ssqdis[j] - sumdis[j]*sumdis[j]);
+  }
+
+  ssqtot /= *nsamp;
+  sumtot /= *nsamp;
+  if (avgtot) *avgtot = sumtot;
+  if (rmstot) *rmstot = sqrt(ssqtot - sumtot*sumtot);
+
+
+cleanup:
+  free(pix0);
+
+  return status;
+}
+
+/*--------------------------------------------------------------------------*/
+
 int matinv(int n, const double mat[], double inv[])
 
 {
diff --git a/C/lin.h b/C/lin.h
index e33aebe..58434de 100644
--- a/C/lin.h
+++ b/C/lin.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: lin.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: lin.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
@@ -56,6 +56,9 @@
 *
 * linp2x() and linx2p() implement the WCS linear transformations.
 *
+* An auxiliary routine, linwarp(), computes various measures of the distortion
+* over a specified range of pixel coordinates.
+*
 * An auxiliary matrix inversion routine, matinv(), is included.  It uses
 * LU-triangular factorization with scaled partial pivoting.
 *
@@ -311,6 +314,97 @@
 *                       linprm::err if enabled, see wcserr_enable().
 *
 *
+* linwarp() - Compute measures of distortion
+* ------------------------------------------
+* linwarp() computes various measures of the distortion over the specified
+* range of pixel coordinates.
+*
+* All distortion measures are specified as an offset in pixel coordinates,
+* as given directly by prior distortions.  The offset in intermediate pixel
+* coordinates given by sequent distortions is translated back to pixel
+* coordinates by applying the inverse of the linear transformation matrix
+* (PCi_ja or CDi_ja).  The difference may be significant if the matrix
+* introduced a scaling.
+*
+* If all distortions are prior, then linwarp() uses diswarp(), q.v.
+*
+* Given and returned:
+*   lin       struct linprm*
+*                       Linear transformation parameters plus distortions.
+*
+* Given:
+*   pixblc    const double[naxis]
+*                       Start of the range of pixel coordinates (i.e. "bottom
+*                       left-hand corner" in the conventional FITS image
+*                       display orientation).  May be specified as a NULL
+*                       pointer which is interpreted as (1,1,...).
+*
+*   pixtrc    const double[naxis]
+*                       End of the range of pixel coordinates (i.e. "top
+*                       right-hand corner" in the conventional FITS image
+*                       display orientation).
+*
+*   pixsamp   const double[naxis]
+*                       If positive or zero, the increment on the particular
+*                       axis, starting at pixblc[].  Zero is interpreted as a
+*                       unit increment.  pixsamp may also be specified as a
+*                       NULL pointer which is interpreted as all zeroes, i.e.
+*                       unit increments on all axes.
+*
+*                       If negative, the grid size on the particular axis (the
+*                       absolute value being rounded to the nearest integer).
+*                       For example, if pixsamp is (-128.0,-128.0,...) then
+*                       each axis will be sampled at 128 points between
+*                       pixblc[] and pixtrc[] inclusive.  Use caution when
+*                       using this option on non-square images.
+*
+* Returned:
+*   nsamp     int*      The number of pixel coordinates sampled.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   maxdis    double[naxis]
+*                       For each individual distortion function, the
+*                       maximum absolute value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   maxtot    double*   For the combination of all distortion functions, the
+*                       maximum absolute value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   avgdis    double[naxis]
+*                       For each individual distortion function, the
+*                       mean value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   avgtot    double*   For the combination of all distortion functions, the
+*                       mean value of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   rmsdis    double[naxis]
+*                       For each individual distortion function, the
+*                       root mean square deviation of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+*   rmstot    double*   For the combination of all distortion functions, the
+*                       root mean square deviation of the distortion.
+*
+*                       Can be specified as a NULL pointer if not required.
+*
+* Function return value:
+*             int       Status return value:
+*                         0: Success.
+*                         1: Null linprm pointer passed.
+*                         2: Memory allocation failed.
+*                         3: Invalid parameter.
+*                         4: Distort error.
+*
+*
 * linprm struct - Linear transformation parameters
 * ------------------------------------------------
 * The linprm struct contains all of the information required to perform a
@@ -562,6 +656,12 @@ int linp2x(struct linprm *lin, int ncoord, int nelem, const double pixcrd[],
 int linx2p(struct linprm *lin, int ncoord, int nelem, const double imgcrd[],
            double pixcrd[]);
 
+int linwarp(struct linprm *lin, const double pixblc[], const double pixtrc[],
+            const double pixsamp[], int *nsamp,
+            double maxdis[], double *maxtot,
+            double avgdis[], double *avgtot,
+            double rmsdis[], double *rmstot);
+
 int matinv(int n, const double mat[], double inv[]);
 
 
diff --git a/C/log.c b/C/log.c
index 31bff95..1968964 100644
--- a/C/log.c
+++ b/C/log.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: log.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: log.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/log.h b/C/log.h
index 650590c..2b8a2c1 100644
--- a/C/log.h
+++ b/C/log.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: log.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: log.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement logarithmic coordinate systems as
+* WCSLIB 5.1 - C routines that implement logarithmic coordinate systems as
 * defined by the FITS World Coordinate System (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/prj.c b/C/prj.c
index ea72517..f3e5e7b 100644
--- a/C/prj.c
+++ b/C/prj.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: prj.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: prj.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/prj.h b/C/prj.h
index 07b2796..2eda8d6 100644
--- a/C/prj.h
+++ b/C/prj.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: prj.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: prj.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the spherical map projections
+* WCSLIB 5.1 - C routines that implement the spherical map projections
 * recognized by the FITS World Coordinate System (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/spc.c b/C/spc.c
index 6d44cfe..b9f48d4 100644
--- a/C/spc.c
+++ b/C/spc.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: spc.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: spc.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/spc.h b/C/spc.h
index 6e3bba6..2c99ec0 100644
--- a/C/spc.h
+++ b/C/spc.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: spc.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: spc.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the spectral coordinate systems
+* WCSLIB 5.1 - C routines that implement the spectral coordinate systems
 * recognized by the FITS World Coordinate System (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/sph.c b/C/sph.c
index d1c57c0..573c1cf 100644
--- a/C/sph.c
+++ b/C/sph.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: sph.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: sph.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/sph.h b/C/sph.h
index 36d303d..7956e5b 100644
--- a/C/sph.h
+++ b/C/sph.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: sph.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: sph.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the spherical coordinate
+* WCSLIB 5.1 - C routines that implement the spherical coordinate
 * transformations used by the FITS World Coordinate System (WCS) standard.
 * Refer to
 *
diff --git a/C/spx.c b/C/spx.c
index ca8dea6..6cf7324 100644
--- a/C/spx.c
+++ b/C/spx.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: spx.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: spx.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/spx.h b/C/spx.h
index 410f04d..0d9f235 100644
--- a/C/spx.h
+++ b/C/spx.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: spx.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: spx.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the spectral coordinate systems
+* WCSLIB 5.1 - C routines that implement the spectral coordinate systems
 * recognized by the FITS World Coordinate System (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/tab.c b/C/tab.c
index 36986c5..9e4f675 100644
--- a/C/tab.c
+++ b/C/tab.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tab.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: tab.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/tab.h b/C/tab.h
index abcb8a2..de24dc3 100644
--- a/C/tab.h
+++ b/C/tab.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tab.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: tab.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement tabular coordinate systems as
+* WCSLIB 5.1 - C routines that implement tabular coordinate systems as
 * defined by the FITS World Coordinate System (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/test/TPV3.keyrec b/C/test/TPV3.keyrec
index 4507d1e..a21be25 100644
--- a/C/test/TPV3.keyrec
+++ b/C/test/TPV3.keyrec
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -21,7 +21,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: TPV3.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: TPV3.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # FITS header keyrecords used for testing the handling of the "TPV" projection
@@ -36,9 +36,10 @@
 #-----------------------------------------------------------------------------
 SIMPLE  =                    T / conforms to FITS standard
 BITPIX  =                  -32 / IEEE single precision floating point
-NAXIS   =                    0 / No image data
+NAXIS   =                    2 / 2-D image
+NAXIS1  =                 6576 / Length of axis 1
+NAXIS2  =                 4384 / Length of axis 2
 
-WCSAXES =                    2 / Two coordinate axes
 CRPIX1  =        3457.58912502 / Pixel coordinate of reference point
 CRPIX2  =        3919.07710596 / Pixel coordinate of reference point
 CD1_1   =   -0.000587002241853 / Linear transformation matrix element
diff --git a/C/test/TPV5.keyrec b/C/test/TPV5.keyrec
index 1025dc8..7ca8845 100644
--- a/C/test/TPV5.keyrec
+++ b/C/test/TPV5.keyrec
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -21,7 +21,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: TPV5.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: TPV5.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # FITS header keyrecords used for testing the handling of the "TPV" projection
@@ -36,9 +36,10 @@
 #-----------------------------------------------------------------------------
 SIMPLE  =                    T / Conform to FITS standard
 BITPIX  =                  -32 / IEEE single precision floating point
-NAXIS   =                    0 / No image data
+NAXIS   =                    2 / 2-D image
+NAXIS1  =                 4096 / Length of axis 1
+NAXIS2  =                 4096 / Length of axis 2
 
-WCSAXES =                    2 / Two coordinate axes
 CRPIX1  =        1761.47416875 / Pixel coordinate of reference point
 CRPIX2  =        2118.72183151 / Pixel coordinate of reference point
 CD1_1   =    -0.00283896009841 / Linear transformation matrix element
diff --git a/C/test/TPV7.keyrec b/C/test/TPV7.keyrec
index 4287f0c..a714fd7 100644
--- a/C/test/TPV7.keyrec
+++ b/C/test/TPV7.keyrec
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -21,7 +21,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: TPV7.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: TPV7.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # FITS header keyrecords used for testing the handling of the "TPV" projection
@@ -40,13 +40,8 @@ NAXIS   =                    2 / 2-D image
 NAXIS1  =                 8192 / Length of axis 1
 NAXIS2  =                 8192 / Length of axis 2
 
-WCSAXES =                    2 / Two coordinate axes
 CRPIX1  =               4096.0 / Pixel coordinate of reference point
 CRPIX2  =               4096.0 / Pixel coordinate of reference point
-PC1_1   =          0.866025404 / Linear transformation matrix element
-PC1_2   =          0.500000000 / Linear transformation matrix element
-PC2_1   =         -0.500000000 / Linear transformation matrix element
-PC2_2   =          0.866025404 / Linear transformation matrix element
 CDELT1  =                -0.01 / [deg] x-scale
 CDELT2  =                 0.01 / [deg] y-scale
 CUNIT1  = 'deg'                / Degree units are required
diff --git a/C/test/bth.keyrec b/C/test/bth.keyrec
index ff55221..6e93e72 100644
--- a/C/test/bth.keyrec
+++ b/C/test/bth.keyrec
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -21,7 +21,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: bth.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: bth.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # FITS header keyrecords used for testing by tbth1.
diff --git a/C/test/fitshdr.keyrec b/C/test/fitshdr.keyrec
index 941eec1..c6b86e9 100644
--- a/C/test/fitshdr.keyrec
+++ b/C/test/fitshdr.keyrec
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -21,7 +21,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: fitshdr.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: fitshdr.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # FITS header keyrecords used for testing by tfitshdr.
diff --git a/C/test/pih.keyrec b/C/test/pih.keyrec
index 5ef31e8..2a1a360 100644
--- a/C/test/pih.keyrec
+++ b/C/test/pih.keyrec
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -21,7 +21,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: pih.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: pih.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # FITS header keyrecords used for testing by tpih1 and tpih2.  See also
diff --git a/C/test/tbth1.c b/C/test/tbth1.c
index 172791e..22ba932 100644
--- a/C/test/tbth1.c
+++ b/C/test/tbth1.c
@@ -1,5 +1,5 @@
 /*============================================================================
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -21,7 +21,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tbth1.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tbth1.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tbth1 tests wcsbth(), the WCS FITS parser for binary table headers, and
diff --git a/C/test/tcel1.c b/C/test/tcel1.c
index c7cb977..a41f261 100644
--- a/C/test/tcel1.c
+++ b/C/test/tcel1.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tcel1.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tcel1.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tcel1 tests the spherical projection driver routines supplied with WCSLIB by
diff --git a/C/test/tcel2.c b/C/test/tcel2.c
index 62c56c8..eea25ea 100644
--- a/C/test/tcel2.c
+++ b/C/test/tcel2.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tcel2.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tcel2.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tcel2 thoroughly tests the WCSLIB celestial coordinate transformation
diff --git a/C/test/tdis1.c b/C/test/tdis1.c
index 23a0032..c812e7b 100644
--- a/C/test/tdis1.c
+++ b/C/test/tdis1.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,12 +22,12 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tdis1.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tdis1.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tdis1 tests the WCSLIB distortion functions for closure.  Input comes from
-* the* FITS file specified as an argument, or else from TPV7.fits.  The test
-* is done via linp2x() and linx2p().
+* the FITS file specified as an argument, which must contain a 2D image, or
+* else from TPV7.fits.  The test is done via linp2x() and linx2p().
 *
 *---------------------------------------------------------------------------*/
 
@@ -57,11 +57,13 @@ int main(int argc, char *argv[])
   char *infile = "TPV7.fits";
 
   char keyrec[81], header[288001];
-  int  gotend, iblock, ikeyrec, inc, j, k, n, naxis[4], naxis1, naxis2,
-       nClosure, nFail, nkeyrec, nreject, nTest, nwcs, p1, p2, status;
-  double dp1, dp2, *img, px, *px0, *px1, rel, resid, absmax, relmax;
-  FILE *fptr;
-  struct linprm *lin;
+  int  gotend, iblock, ikeyrec, inc, j, k, n, naxis[2], naxis1, naxis2,
+       nClosure, nFail, nkeyrec, nsamp, nreject, nTest, nwcs, p1, p2, status;
+  double absmax, dp1, dp2, *img, pix[8], pixblc[2], pixsamp[2], pixtrc[2], px,
+         *px0, *px1, pxi[8], rel, resid, relmax;
+  double *avgdis, *avgtot, *maxdis, *maxtot, *rmsdis, *rmstot, stats[9];
+  FILE   *fptr;
+  struct linprm *lin, affine;
   struct wcsprm *wcs;
 
 
@@ -110,7 +112,15 @@ int main(int argc, char *argv[])
       if (strncmp(keyrec, "HISTORY ", 8) == 0) continue;
 
       if (strncmp(keyrec, "NAXIS", 5) == 0) {
-        if (keyrec[5] == ' ') continue;
+        if (keyrec[5] == ' ') {
+          sscanf(keyrec+10, "%d", &n);
+          if (n != 2) {
+            wcsprintf("ERROR, expecting a 2D image.\n");
+            return 1;
+          }
+          continue;
+        }
+
         sscanf(keyrec+5, "%d = %d", &j, &n);
         if (j <= 4) naxis[j-1] = n;
         continue;
@@ -149,13 +159,129 @@ int main(int argc, char *argv[])
 
 
   /* The image size determines the test domain. */
-  if ((naxis1 = naxis[wcs->lng]) == 0) {
-    naxis1 = 2*wcs->crpix[wcs->lng] + 1;
+  if ((naxis1 = naxis[0]) == 0) {
+    naxis1 = 2*wcs->crpix[0] + 1;
+  }
+  if ((naxis2 = naxis[1]) == 0) {
+    naxis2 = 2*wcs->crpix[1] + 1;
+  }
+
+  /* Get statistics on the distortion in the inner quarter of the image. */
+  maxdis = stats;
+  maxtot = maxdis + 2;
+  avgdis = maxtot + 1;
+  avgtot = avgdis + 2;
+  rmsdis = avgtot + 1;
+  rmstot = rmsdis + 2;
+
+  pixblc[0]  =  0.25 * naxis[0];
+  pixblc[1]  =  0.25 * naxis[1];
+  pixtrc[0]  =  0.75 * naxis[0];
+  pixtrc[1]  =  0.75 * naxis[1];
+  pixsamp[0] = (pixtrc[0] - pixblc[0])/512.0;
+  pixsamp[1] = (pixtrc[1] - pixblc[1])/512.0;
+  if (linwarp(lin, pixblc, pixtrc, pixsamp, &nsamp, maxdis, maxtot, avgdis,
+              avgtot, rmsdis, rmstot)) {
+    linperr(lin, 0x0);
+    return 1;
   }
-  if ((naxis2 = naxis[wcs->lat]) == 0) {
-    naxis2 = 2*wcs->crpix[wcs->lat] + 1;
+
+  for (k = 0; k < 9; k++) {
+    if (fabs(stats[k]) < 0.0005) stats[k] = 0.0;
   }
 
+  wcsprintf("linwarp() statistics computed over %d sample points:\n"
+            "  Max distortion, axis 1: %8.3f pixels\n"
+            "                  axis 2: %8.3f pixels\n"
+            "                   total: %8.3f pixels\n"
+            " Mean distortion, axis 1: %8.3f pixels\n"
+            "                  axis 2: %8.3f pixels\n"
+            "                   total: %8.3f pixels\n"
+            "  RMS distortion, axis 1: %8.3f pixels\n"
+            "                  axis 2: %8.3f pixels\n"
+            "                   total: %8.3f pixels\n\n",
+            nsamp, maxdis[0], maxdis[1], *maxtot,
+                   avgdis[0], avgdis[1], *avgtot,
+                   rmsdis[0], rmsdis[1], *rmstot);
+
+  /* Exercise diswarp() as well. */ 
+  if (lin->disseq) {
+    /* Define a rectangle in intermediate pixel coordinates that just */
+    /* encompasses the inner quarter of the image.  For this we need  */
+    /* to switch off CDELTia scaling and all distortions.             */
+    affine.flag = -1;
+    if ((status = lincpy(1, lin, &affine))) {
+      linperr(lin, 0x0);
+      return 1;
+    }
+
+    affine.cdelt[0] = 1.0;
+    affine.cdelt[1] = 1.0;
+    if ((status = (lindis(1, &affine, 0x0) ||
+                   lindis(2, &affine, 0x0) ||
+                   linset(&affine)))) {
+      linperr(&affine, 0x0);
+      return 1;
+    }
+
+    pix[0] = pixblc[0];
+    pix[1] = pixblc[1];
+    pix[2] = pixtrc[0];
+    pix[3] = pixblc[1];
+    pix[4] = pixtrc[0];
+    pix[5] = pixtrc[1];
+    pix[6] = pixblc[0];
+    pix[7] = pixtrc[1];
+    if (linp2x(&affine, 4, 2, pix, pxi)) {
+      linperr(&affine, 0x0);
+      return 1;
+    }
+
+    linfree(&affine);
+
+    pixblc[0] = pxi[0];
+    pixblc[1] = pxi[1];
+    pixtrc[0] = pxi[0];
+    pixtrc[1] = pxi[1];
+    k = 2;
+    for (j = 1; j < 4; j++) {
+      if (pixblc[0] > pxi[k]) pixblc[0] = pxi[k];
+      if (pixtrc[0] < pxi[k]) pixtrc[0] = pxi[k];
+      k++;
+      if (pixblc[1] > pxi[k]) pixblc[1] = pxi[k];
+      if (pixtrc[1] < pxi[k]) pixtrc[1] = pxi[k];
+      k++;
+    }
+
+    pixsamp[0] = (pixtrc[0] - pixblc[0])/512.0;
+    pixsamp[1] = (pixtrc[1] - pixblc[1])/512.0;
+
+    if (diswarp(lin->disseq, pixblc, pixtrc, pixsamp, &nsamp, maxdis, maxtot,
+                avgdis, avgtot, rmsdis, rmstot)) {
+      wcserr_prt(lin->disseq->err, 0x0);
+      return 1;
+    }
+
+    for (k = 0; k < 9; k++) {
+      if (fabs(stats[k]) < 0.0005) stats[k] = 0.0;
+    }
+
+    wcsprintf("diswarp() statistics computed over %d sample points:\n"
+              "  Max distortion, axis 1: %8.3f units\n"
+              "                  axis 2: %8.3f units\n"
+              "                   total: %8.3f units\n"
+              " Mean distortion, axis 1: %8.3f units\n"
+              "                  axis 2: %8.3f units\n"
+              "                   total: %8.3f units\n"
+              "  RMS distortion, axis 1: %8.3f units\n"
+              "                  axis 2: %8.3f units\n"
+              "                   total: %8.3f units\n\n",
+              nsamp, maxdis[0], maxdis[1], *maxtot,
+                     avgdis[0], avgdis[1], *avgtot,
+                     rmsdis[0], rmsdis[1], *rmstot);
+  }
+
+
   /* Limit the number of tests. */
   inc = 1;
   while ((naxis1/inc)*(naxis2/inc) > 800000) {
@@ -163,7 +289,7 @@ int main(int argc, char *argv[])
   }
 
   n   = naxis1 / inc;
-  px0 = calloc(3*(2*n ), sizeof(double));
+  px0 = calloc(3*(2*n), sizeof(double));
   px1 = px0 + 2*n ;
   img = px1 + 2*n ;
 
diff --git a/C/test/tfitshdr.c b/C/test/tfitshdr.c
index b75f403..acdb37c 100644
--- a/C/test/tfitshdr.c
+++ b/C/test/tfitshdr.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tfitshdr.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tfitshdr.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tfitshdr tests fitshdr(), the FITS parser for image headers, by reading a
diff --git a/C/test/tlin.c b/C/test/tlin.c
index e12ec52..6767886 100644
--- a/C/test/tlin.c
+++ b/C/test/tlin.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tlin.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tlin.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 *  tlin tests the linear transformation routines supplied with WCSLIB.
diff --git a/C/test/tlog.c b/C/test/tlog.c
index 73fce82..6607a69 100644
--- a/C/test/tlog.c
+++ b/C/test/tlog.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tlog.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tlog.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 *   tlog tests the logarithmic coordinate transformation routines for closure.
diff --git a/C/test/tofits.c b/C/test/tofits.c
index 96f1381..5c0338a 100644
--- a/C/test/tofits.c
+++ b/C/test/tofits.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tofits.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tofits.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tofits turns a list of FITS header keyrecords, one per line, into a proper
diff --git a/C/test/tpih1.c b/C/test/tpih1.c
index 7794494..5e533b5 100644
--- a/C/test/tpih1.c
+++ b/C/test/tpih1.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tpih1.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tpih1.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tpih1 tests wcspih(), the WCS FITS parser for image headers, and wcsfix(),
diff --git a/C/test/tpih2.c b/C/test/tpih2.c
index c4b529f..472cd60 100644
--- a/C/test/tpih2.c
+++ b/C/test/tpih2.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tpih2.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tpih2.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tpih2 tests wcspih(), the WCS FITS parser for image headers, by reading a
diff --git a/C/test/tprj1.c b/C/test/tprj1.c
index 36320e1..e2bf02a 100644
--- a/C/test/tprj1.c
+++ b/C/test/tprj1.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tprj1.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tprj1.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tproj1 tests spherical projections for closure.
diff --git a/C/test/tprj2.c b/C/test/tprj2.c
index c40e8c6..d4a508c 100644
--- a/C/test/tprj2.c
+++ b/C/test/tprj2.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tprj2.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tprj2.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tproj2 tests projection routines by plotting test graticules using PGPLOT.
diff --git a/C/test/tspc.c b/C/test/tspc.c
index 7d6d5b9..efeebfb 100644
--- a/C/test/tspc.c
+++ b/C/test/tspc.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tspc.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tspc.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tspc tests the spectral transformation driver routines for closure.
diff --git a/C/test/tspcaips.c b/C/test/tspcaips.c
index 27a475d..f16c150 100644
--- a/C/test/tspcaips.c
+++ b/C/test/tspcaips.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tspcaips.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tspcaips.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tspcaips does a quick test of spcaips().  Not part of the official test
diff --git a/C/test/tspcspxe.c b/C/test/tspcspxe.c
index 0436331..9f8eec1 100644
--- a/C/test/tspcspxe.c
+++ b/C/test/tspcspxe.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tspcspxe.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tspcspxe.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tspcspxe tests function spcspxe() by deliberately generating an error.
diff --git a/C/test/tspctrne.c b/C/test/tspctrne.c
index 63464f9..70b5ae7 100644
--- a/C/test/tspctrne.c
+++ b/C/test/tspctrne.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tspctrne.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tspctrne.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tspctrne does a quick test of spctrne().  Not part of the official test
diff --git a/C/test/tsph.c b/C/test/tsph.c
index 06fc369..f218465 100644
--- a/C/test/tsph.c
+++ b/C/test/tsph.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tsph.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tsph.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tsph tests the spherical coordinate transformation routines for closure.
diff --git a/C/test/tsphdpa.c b/C/test/tsphdpa.c
index 296855a..1151ba9 100644
--- a/C/test/tsphdpa.c
+++ b/C/test/tsphdpa.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tsphdpa.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tsphdpa.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tsphdpa tests sphdpa().
diff --git a/C/test/tspx.c b/C/test/tspx.c
index b013654..e5defaf 100644
--- a/C/test/tspx.c
+++ b/C/test/tspx.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tspx.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tspx.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tspx tests the spectral transformation routines for closure.
diff --git a/C/test/ttab1.c b/C/test/ttab1.c
index 8ef84b5..158ba6e 100644
--- a/C/test/ttab1.c
+++ b/C/test/ttab1.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: ttab1.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: ttab1.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * ttab1 tests the -TAB routines for closure.
diff --git a/C/test/ttab2.c b/C/test/ttab2.c
index abe6522..0c9bbda 100644
--- a/C/test/ttab2.c
+++ b/C/test/ttab2.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: ttab2.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: ttab2.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * ttab2 tests the -TAB routines using PGPLOT for graphical display.  It
diff --git a/C/test/ttab3.c b/C/test/ttab3.c
index 64163a6..21eee66 100644
--- a/C/test/ttab3.c
+++ b/C/test/ttab3.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: ttab3.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: ttab3.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * ttab3 tests the -TAB routines using PGPLOT for graphical display.  It
diff --git a/C/test/tunits.c b/C/test/tunits.c
index 2bcd546..8a0525b 100644
--- a/C/test/tunits.c
+++ b/C/test/tunits.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tunits.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tunits.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * tunits tests wcsulex(), wcsutrn(), and wcsunits() the FITS units
diff --git a/C/test/twcs.c b/C/test/twcs.c
index 05bc411..fb1f0c8 100644
--- a/C/test/twcs.c
+++ b/C/test/twcs.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -23,7 +23,7 @@
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO,
      and: Michael Droetboom, Space Telescope Science Institute
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcs.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcs.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * twcs tests wcss2p() and wcsp2s() for closure on an oblique 2-D slice through
diff --git a/C/test/twcs_locale.c b/C/test/twcs_locale.c
index 8a56bb2..a9c7703 100644
--- a/C/test/twcs_locale.c
+++ b/C/test/twcs_locale.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -23,7 +23,7 @@
   Author: Michael Droetboom, Space Telescope Science Institute,
      and: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcs_locale.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcs_locale.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * twcs_locale tests wcslib's handling of locales, such as fr_FR, that use a
diff --git a/C/test/twcscompare.c b/C/test/twcscompare.c
index 0b50d47..073683a 100644
--- a/C/test/twcscompare.c
+++ b/C/test/twcscompare.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -23,7 +23,7 @@
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO,
      and: Michael Droetboom, Space Telescope Science Institute
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcscompare.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcscompare.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * Test wcscompare().
diff --git a/C/test/twcsfix.c b/C/test/twcsfix.c
index f7bf968..ebb6535 100644
--- a/C/test/twcsfix.c
+++ b/C/test/twcsfix.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcsfix.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcsfix.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * twcsfix tests the translation routines for non-standard WCS keyvalues, the
diff --git a/C/test/twcsfix.out b/C/test/twcsfix.out
index 440b581..ee8f618 100644
--- a/C/test/twcsfix.out
+++ b/C/test/twcsfix.out
@@ -131,8 +131,8 @@ Changed CTYPE3 from 'FELO-HEL' to 'VOPT-F2W'.
      imgpix: (nil)
     i_naxis: 0
       unity: 1
-     affine: 0
-     simple: 0
+     affine: 1
+     simple: 1
         err: 0x0
      tmpcrd: 0x<address>
      m_flag: 0
@@ -319,8 +319,8 @@ Changed CTYPE3 from 'FELO-HEL' to 'VOPT-F2W'.
      imgpix: (nil)
     i_naxis: 0
       unity: 1
-     affine: 0
-     simple: 0
+     affine: 1
+     simple: 1
         err: 0x0
      tmpcrd: 0x<address>
      m_flag: 0
diff --git a/C/test/twcshdr.c b/C/test/twcshdr.c
index 9b3f9b1..6ffb892 100644
--- a/C/test/twcshdr.c
+++ b/C/test/twcshdr.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcshdr.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcshdr.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * twcshdr illustrates the steps required to read WCS information (including
diff --git a/C/test/twcsmix.c b/C/test/twcsmix.c
index 4bfb3db..0eec092 100644
--- a/C/test/twcsmix.c
+++ b/C/test/twcsmix.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcsmix.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcsmix.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * twcsmix tests wcsmix() for closure on the 1 degree celestial graticule for
diff --git a/C/test/twcssub.c b/C/test/twcssub.c
index 45c2ded..f6da266 100644
--- a/C/test/twcssub.c
+++ b/C/test/twcssub.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcssub.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcssub.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * twcssub tests wcssub() which extracts the coordinate description for a
diff --git a/C/test/twcstab.c b/C/test/twcstab.c
index 918f861..dc031d3 100644
--- a/C/test/twcstab.c
+++ b/C/test/twcstab.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: twcstab.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: twcstab.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * twcstab tests wcstab() and also provides sample code for using it in
diff --git a/C/test/wcslint.keyrec b/C/test/wcslint.keyrec
index 6d185a4..a9a1ec2 100644
--- a/C/test/wcslint.keyrec
+++ b/C/test/wcslint.keyrec
@@ -1,6 +1,6 @@
 #-----------------------------------------------------------------------------
 #
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: wcslint.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: wcslint.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # List of FITS header keyrecords, mostly invalid, for testing 'wcslint' and
diff --git a/C/test/wcstab.keyrec b/C/test/wcstab.keyrec
index 6eb91d4..ed4edfd 100644
--- a/C/test/wcstab.keyrec
+++ b/C/test/wcstab.keyrec
@@ -1,6 +1,6 @@
 #-----------------------------------------------------------------------------
 #
-# WCSLIB 5.0 - an implementation of the FITS WCS standard.
+# WCSLIB 5.1 - an implementation of the FITS WCS standard.
 # Copyright (C) 1995-2015, Mark Calabretta
 #
 # This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: wcstab.keyrec,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: wcstab.keyrec,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 #
 # List of FITS header keyrecords used by 'twcstab' to construct a FITS file
diff --git a/C/wcs.c b/C/wcs.c
index 86ba9ba..4608cd7 100644
--- a/C/wcs.c
+++ b/C/wcs.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcs.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcs.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/wcs.h b/C/wcs.h
index e446d25..9784896 100644
--- a/C/wcs.h
+++ b/C/wcs.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcs.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcs.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/wcsbth.l b/C/wcsbth.l
index 157ffe5..0000b8c 100644
--- a/C/wcsbth.l
+++ b/C/wcsbth.l
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsbth.l,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsbth.l,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * wcsbth.l is a Flex description file containing the definition of a lexical
diff --git a/C/wcserr.c b/C/wcserr.c
index 837f370..1612bfb 100644
--- a/C/wcserr.c
+++ b/C/wcserr.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -23,7 +23,7 @@
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   Module author: Michael Droettboom
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcserr.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcserr.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdarg.h>
diff --git a/C/wcserr.h b/C/wcserr.h
index ed204cb..dcab2cc 100644
--- a/C/wcserr.h
+++ b/C/wcserr.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -23,7 +23,7 @@
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   Module author: Michael Droettboom
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcserr.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcserr.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * Summary of the wcserr routines
diff --git a/C/wcsfix.c b/C/wcsfix.c
index 29f0b32..673e704 100644
--- a/C/wcsfix.c
+++ b/C/wcsfix.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsfix.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsfix.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/wcsfix.h b/C/wcsfix.h
index 1983d84..237566c 100644
--- a/C/wcsfix.h
+++ b/C/wcsfix.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsfix.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsfix.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/wcshdr.c b/C/wcshdr.c
index 157560b..b0c485e 100644
--- a/C/wcshdr.c
+++ b/C/wcshdr.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcshdr.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcshdr.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <ctype.h>
diff --git a/C/wcshdr.h b/C/wcshdr.h
index 2cb712a..e6b260e 100644
--- a/C/wcshdr.h
+++ b/C/wcshdr.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcshdr.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcshdr.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/wcslib.h b/C/wcslib.h
index 1feda8d..b7c0d18 100644
--- a/C/wcslib.h
+++ b/C/wcslib.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcslib.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcslib.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.
 *
 * Summary of wcslib.h
diff --git a/C/wcsmath.h b/C/wcsmath.h
index edf678d..c27acb9 100644
--- a/C/wcsmath.h
+++ b/C/wcsmath.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsmath.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsmath.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * Summary of wcsmath.h
diff --git a/C/wcspih.l b/C/wcspih.l
index c2aac8d..ba5c146 100644
--- a/C/wcspih.l
+++ b/C/wcspih.l
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcspih.l,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcspih.l,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * wcspih.l is a Flex description file containing the definition of a lexical
diff --git a/C/wcsprintf.c b/C/wcsprintf.c
index 70939c3..d43d417 100644
--- a/C/wcsprintf.c
+++ b/C/wcsprintf.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsprintf.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsprintf.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdarg.h>
diff --git a/C/wcsprintf.h b/C/wcsprintf.h
index 484ab98..6016e71 100644
--- a/C/wcsprintf.h
+++ b/C/wcsprintf.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsprintf.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsprintf.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.
 *
 * Summary of the wcsprintf routines
diff --git a/C/wcstrig.c b/C/wcstrig.c
index b8a152e..fbd64e9 100644
--- a/C/wcstrig.c
+++ b/C/wcstrig.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcstrig.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcstrig.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/wcstrig.h b/C/wcstrig.h
index 9015891..d319b29 100644
--- a/C/wcstrig.h
+++ b/C/wcstrig.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcstrig.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcstrig.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * Summary of the wcstrig routines
diff --git a/C/wcsulex.l b/C/wcsulex.l
index a2a68f4..0e82f61 100644
--- a/C/wcsulex.l
+++ b/C/wcsulex.l
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsulex.l,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsulex.l,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * wcsulex.l is a Flex description file containing the definition of a
diff --git a/C/wcsunits.c b/C/wcsunits.c
index 09680b5..73e424a 100644
--- a/C/wcsunits.c
+++ b/C/wcsunits.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsunits.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsunits.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/C/wcsunits.h b/C/wcsunits.h
index df8b483..356dc8d 100644
--- a/C/wcsunits.h
+++ b/C/wcsunits.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,10 +22,10 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsunits.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsunits.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
-* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System
+* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System
 * (WCS) standard.  Refer to
 *
 *   "Representations of world coordinates in FITS",
diff --git a/C/wcsutil.c b/C/wcsutil.c
index 9a165dd..2bcb0e5 100644
--- a/C/wcsutil.c
+++ b/C/wcsutil.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsutil.c,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsutil.c,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *===========================================================================*/
 
 #include <ctype.h>
diff --git a/C/wcsutil.h b/C/wcsutil.h
index d74e509..ed3748c 100644
--- a/C/wcsutil.h
+++ b/C/wcsutil.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsutil.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsutil.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * Summary of the wcsutil routines
diff --git a/C/wcsutrn.l b/C/wcsutrn.l
index 4de60eb..d731688 100644
--- a/C/wcsutrn.l
+++ b/C/wcsutrn.l
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsutrn.l,v 5.0 2015/04/05 09:18:13 mcalabre Exp $
+  $Id: wcsutrn.l,v 5.1 2015/04/07 10:56:36 mcalabre Exp $
 *=============================================================================
 *
 * wcsutrn.l is a Flex description file containing the definition of a lexical
diff --git a/CHANGES b/CHANGES
index 886838c..6ae26ed 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,8 +1,26 @@
-WCSLIB version 5.0 (2015/04/05)
---------------------------------
+WCSLIB version 5.1 (2015/04/07)
+-------------------------------
 
 * C library
 
+  - Distortions-related bug fixes to linset(), linp2x(), and linx2p().
+
+  - New functions diswarp() and linwarp() compute statistics of the
+    distortion functions over a specified domain.  Changed tdis1.c to
+    test them.
+
+  - Changes to disprm (so changed ABI).
+
+* Fortran wrappers
+
+  - Wrappers for diswarp() and linwarp().
+
+
+WCSLIB version 5.0 (2015/04/05)
+-------------------------------
+
+* C library (beta release)
+
   - Implemented the framework of WCS Paper IV (the draft distortions
     proposal) based on a new struct, disprm, and suite of routines with
     header dis.h: disini(), disalloc(), discpy(), disfree(), disprt(),
@@ -12,10 +30,10 @@ WCSLIB version 5.0 (2015/04/05)
     necessitating an increment in the WCSLIB major verion number.
 
   - wcsset() now recognises the "TPV" projection proposed in an early
-    draft of WCS Paper II, and translates it into a disprm distortion.
-    Additionally, it recognises "TPU" as equivalent to "TPV" but using
-    a prior distortion (coming before the linear transformation matrix)
-    rather than sequent (coming after it).
+    draft of WCS Paper II, and translates it into a disprm distortion -
+    by request of Octavi Fors.  Additionally, it recognises "TPU" as
+    equivalent to "TPV" but using a prior distortion (coming before the
+    linear transformation matrix) rather than sequent (coming after it).
 
   - Added a "lint" function to wcsware to check a FITS header for
     conformance to the WCS standard.  New test program twcslint.
@@ -35,13 +53,13 @@ WCSLIB version 5.0 (2015/04/05)
     and celperr() report error messages from the structs they contain
     in addition to their own.
 
-  - Changed output formatting of floating point values and addresses in
-    linprt(), celprt(), prjprt(), spcprt(), tabprt(), and wcsprt().
-    Updated the test output reference files for tbth1, tpih1, twcsfix,
-    twcssub, and twcstab to suit.
+  - Changed output formatting of floating point values in linprt(),
+    celprt(), prjprt(), spcprt(), tabprt(), and wcsprt().  Updated the
+    test output reference files for tbth1, tpih1, twcsfix, twcssub, and
+    twcstab to suit.
 
   - Tidied up several of the test programs, mostly to free memory
-    explicitly before exit so that valgrind doesn't report leaks.
+    explicitly before exit so that valgrind doesn't report (non-)leaks.
 
 * Fortran wrappers
 
@@ -2244,4 +2262,4 @@ WCSLIB version 1.0 (1995/01/31)
   Initial release.
 
 ------------------------------------------------------------------------
-$Id: CHANGES,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+$Id: CHANGES,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
diff --git a/Fortran/GNUmakefile b/Fortran/GNUmakefile
index d8eb0cc..38d8c3b 100644
--- a/Fortran/GNUmakefile
+++ b/Fortran/GNUmakefile
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# GNU makefile for building the WCSLIB 5.0 FORTRAN wrappers.
+# GNU makefile for building the WCSLIB 5.1 FORTRAN wrappers.
 #
 # Summary of the main targets
 # ---------------------------
@@ -29,7 +29,7 @@
 #   1) If you need to make changes then preferably modify ../makedefs.in
 #      instead and re-run configure.
 #
-#   2) This makefile assumes that the WCSLIB 5.0 sources reside in ../C
+#   2) This makefile assumes that the WCSLIB 5.1 sources reside in ../C
 #      (as in the distribution kit).
 #
 #   3) twcstab assumes that ../C/wcstab.fits has already been generated by
@@ -37,7 +37,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: GNUmakefile,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+# $Id: GNUmakefile,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
@@ -117,7 +117,7 @@ $(WCSLIB)(%.o) : %.f
 
 $(PICLIB)(%.o) : %.c
 	-@ echo ''
-	   $(CC) $(CPPFLAGS) $(SHRFLAGS) -c $<
+	   $(CC) $(CPPFLAGS) $(CFLAGS) $(SHRFLAGS) -c $<
 	   $(AR) r $(PICLIB) $%
 	-@ $(RM) $%
 
@@ -300,7 +300,7 @@ $(PGSBOXLIB) :
 	   $(MAKE) -C ../pgsbox lib
 
 tofits : ../C/test/tofits.c
-	   $(CC) $(CFLAGS) -o $@ $<
+	   $(CC) $(CPPFLAGS) $(CFLAGS) $(LDFLAGS) -o $@ $<
 
 ../C/wcstab.fits : ;
 
diff --git a/Fortran/cel.inc b/Fortran/cel.inc
index f6b7a90..154eeaa 100644
--- a/Fortran/cel.inc
+++ b/Fortran/cel.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: cel.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: cel.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/cel_data.f b/Fortran/cel_data.f
index 8e55f31..5af721f 100644
--- a/Fortran/cel_data.f
+++ b/Fortran/cel_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: cel_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: cel_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA CEL_BLOCK_DATA
diff --git a/Fortran/cel_f.c b/Fortran/cel_f.c
index 24008bc..49cda4a 100644
--- a/Fortran/cel_f.c
+++ b/Fortran/cel_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: cel_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: cel_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/dis.inc b/Fortran/dis.inc
index 5be414c..2076e3e 100644
--- a/Fortran/dis.inc
+++ b/Fortran/dis.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: dis.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: dis.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
@@ -30,13 +30,13 @@
      :          DISPUT, DISPTC,   DISPTD, DISPTI,
      :          DISGET, DISGTC,   DISGTD, DISGTI,
      :          DISINI, DISPARMS, DISCPY, DISFREE, DISPRT, DISPERR,
-     :          DISSET, DISP2X,   DISX2P
+     :          DISSET, DISP2X,   DISX2P, DISWARP
 
       INTEGER   DISALLOC,
      :          DISPUT, DISPTC,   DISPTD, DISPTI,
      :          DISGET, DISGTC,   DISGTD, DISGTI,
      :          DISINI, DISPARMS, DISCPY, DISFREE, DISPRT, DISPERR,
-     :          DISSET, DISP2X,   DISX2P
+     :          DISSET, DISP2X,   DISX2P, DISWARP
 
 *     Length of the DISPRM data structure (INTEGER array) on 64-bit
 *     machines.  Only needs to be 28 on 32-bit machines.
diff --git a/Fortran/dis_data.f b/Fortran/dis_data.f
index 8f1664e..3a6d19a 100644
--- a/Fortran/dis_data.f
+++ b/Fortran/dis_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: dis_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: dis_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA DIS_BLOCK_DATA
diff --git a/Fortran/dis_f.c b/Fortran/dis_f.c
index fa172ea..23b6d81 100644
--- a/Fortran/dis_f.c
+++ b/Fortran/dis_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: dis_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: dis_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=============================================================================
 *
 * In these wrappers, if
@@ -65,6 +65,7 @@
 #define disset_   F77_FUNC(disset,   DISSET)
 #define disp2x_   F77_FUNC(disp2x,   DISP2X)
 #define disx2p_   F77_FUNC(disx2p,   DISX2P)
+#define diswarp_  F77_FUNC(diswarp,  DISWARP)
 
 #define DIS_FLAG   100
 #define DIS_NAXIS  101
@@ -485,3 +486,23 @@ int disx2p_(
 
   return disx2p(disp, discrd, rawcrd);
 }
+
+/*--------------------------------------------------------------------------*/
+
+int diswarp_(
+  int *dis,
+  const double pixblc[],
+  const double pixtrc[],
+  const double pixsamp[],
+  int    *nsamp,
+  double maxdis[],
+  double *maxtot,
+  double avgdis[],
+  double *avgtot,
+  double rmsdis[],
+  double *rmstot)
+
+{
+  return diswarp((struct disprm *)dis, pixblc, pixtrc, pixsamp, nsamp,
+                 maxdis, maxtot, avgdis, avgtot, rmsdis, rmstot);
+}
diff --git a/Fortran/fitshdr.inc b/Fortran/fitshdr.inc
index 996ed8a..a915428 100644
--- a/Fortran/fitshdr.inc
+++ b/Fortran/fitshdr.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: fitshdr.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: fitshdr.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/fitshdr_data.f b/Fortran/fitshdr_data.f
index 55a77c8..f04e5dc 100644
--- a/Fortran/fitshdr_data.f
+++ b/Fortran/fitshdr_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: fitshdr_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: fitshdr_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA FITSHDR_BLOCK_DATA
diff --git a/Fortran/fitshdr_f.c b/Fortran/fitshdr_f.c
index 3f93f26..91efab5 100644
--- a/Fortran/fitshdr_f.c
+++ b/Fortran/fitshdr_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: fitshdr_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: fitshdr_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/getwcstab.inc b/Fortran/getwcstab.inc
index 9399d9c..545339b 100644
--- a/Fortran/getwcstab.inc
+++ b/Fortran/getwcstab.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: getwcstab.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: getwcstab.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/getwcstab_f.c b/Fortran/getwcstab_f.c
index b7d1d97..7542da6 100644
--- a/Fortran/getwcstab_f.c
+++ b/Fortran/getwcstab_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: getwcstab_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: getwcstab_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <getwcstab.h>
diff --git a/Fortran/lin.inc b/Fortran/lin.inc
index 09a4d03..e4d7433 100644
--- a/Fortran/lin.inc
+++ b/Fortran/lin.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,17 +22,17 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: lin.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: lin.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
       EXTERNAL  LINPUT, LINPTD, LINPTI, LINGET, LINGTD, LINGTI,
      :          LININI, LINDIS, LINCPY, LINFREE, LINPRT, LINPERR,
-     :          LINSET, LINP2X, LINX2P
+     :          LINSET, LINP2X, LINX2P, LINWARP
 
       INTEGER   LINPUT, LINPTD, LINPTI, LINGET, LINGTD, LINGTI,
      :          LININI, LINDIS, LINCPY, LINFREE, LINPRT, LINPERR,
-     :          LINSET, LINP2X, LINX2P
+     :          LINSET, LINP2X, LINX2P, LINWARP
 
 *     Length of the LINPRM data structure (INTEGER array) on 64-bit
 *     machines.  Only needs to be 22 on 32-bit machines.
diff --git a/Fortran/lin_data.f b/Fortran/lin_data.f
index 5a17d85..45c9c9a 100644
--- a/Fortran/lin_data.f
+++ b/Fortran/lin_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: lin_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: lin_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA LIN_BLOCK_DATA
diff --git a/Fortran/lin_f.c b/Fortran/lin_f.c
index dbb86f1..5539dc7 100644
--- a/Fortran/lin_f.c
+++ b/Fortran/lin_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: lin_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: lin_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
@@ -50,6 +50,7 @@
 #define linset_  F77_FUNC(linset,  LINSET)
 #define linp2x_  F77_FUNC(linp2x,  LINP2X)
 #define linx2p_  F77_FUNC(linx2p,  LINX2P)
+#define linwarp_ F77_FUNC(linwarp, LINWARP)
 
 #define LIN_FLAG   100
 #define LIN_NAXIS  101
@@ -363,3 +364,23 @@ int linx2p_(
 {
   return linx2p((struct linprm *)lin, *ncoord, *nelem, imgcrd, pixcrd);
 }
+
+/*--------------------------------------------------------------------------*/
+
+int linwarp_(
+  int *lin,
+  const double pixblc[],
+  const double pixtrc[],
+  const double pixsamp[],
+  int    *nsamp,
+  double maxdis[],
+  double *maxtot,
+  double avgdis[],
+  double *avgtot,
+  double rmsdis[],
+  double *rmstot)
+
+{
+  return linwarp((struct linprm *)lin, pixblc, pixtrc, pixsamp, nsamp,
+                 maxdis, maxtot, avgdis, avgtot, rmsdis, rmstot);
+}
diff --git a/Fortran/log.inc b/Fortran/log.inc
index 4387780..f65cb6c 100644
--- a/Fortran/log.inc
+++ b/Fortran/log.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: log.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: log.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/log_data.f b/Fortran/log_data.f
index b0635f9..59829d0 100644
--- a/Fortran/log_data.f
+++ b/Fortran/log_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: log_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: log_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA LOG_BLOCK_DATA
diff --git a/Fortran/log_f.c b/Fortran/log_f.c
index 97f7a5e..a15b986 100644
--- a/Fortran/log_f.c
+++ b/Fortran/log_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: log_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: log_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <log.h>
diff --git a/Fortran/prj.inc b/Fortran/prj.inc
index 58b9bac..7bc76c6 100644
--- a/Fortran/prj.inc
+++ b/Fortran/prj.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: prj.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: prj.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/prj_data.f b/Fortran/prj_data.f
index 891c3c2..0bec1a2 100644
--- a/Fortran/prj_data.f
+++ b/Fortran/prj_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: prj_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: prj_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA PRJ_BLOCK_DATA
diff --git a/Fortran/prj_f.c b/Fortran/prj_f.c
index 02c8a9e..0afbab3 100644
--- a/Fortran/prj_f.c
+++ b/Fortran/prj_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: prj_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: prj_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/spc.inc b/Fortran/spc.inc
index 74875da..99f9ab2 100644
--- a/Fortran/spc.inc
+++ b/Fortran/spc.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: spc.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: spc.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/spc_data.f b/Fortran/spc_data.f
index 1086fb8..056b81c 100644
--- a/Fortran/spc_data.f
+++ b/Fortran/spc_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: spc_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: spc_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA SPC_BLOCK_DATA
diff --git a/Fortran/spc_f.c b/Fortran/spc_f.c
index 9800ccd..00e316b 100644
--- a/Fortran/spc_f.c
+++ b/Fortran/spc_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: spc_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: spc_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/sph.inc b/Fortran/sph.inc
index fb16220..36365a5 100644
--- a/Fortran/sph.inc
+++ b/Fortran/sph.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: sph.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: sph.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/sph_f.c b/Fortran/sph_f.c
index 5456747..ccbf9c2 100644
--- a/Fortran/sph_f.c
+++ b/Fortran/sph_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: sph_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: sph_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <sph.h>
diff --git a/Fortran/spx.inc b/Fortran/spx.inc
index 9fd9359..8bb32cf 100644
--- a/Fortran/spx.inc
+++ b/Fortran/spx.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: spx.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: spx.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/spx_data.f b/Fortran/spx_data.f
index 90254b7..99f79d6 100644
--- a/Fortran/spx_data.f
+++ b/Fortran/spx_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: spx_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: spx_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA SPX_BLOCK_DATA
diff --git a/Fortran/spx_f.c b/Fortran/spx_f.c
index 861b50e..4af7654 100644
--- a/Fortran/spx_f.c
+++ b/Fortran/spx_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: spx_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: spx_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <string.h>
diff --git a/Fortran/tab.inc b/Fortran/tab.inc
index 77a483f..2369f9f 100644
--- a/Fortran/tab.inc
+++ b/Fortran/tab.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tab.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: tab.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/tab_data.f b/Fortran/tab_data.f
index 8a690c6..99ff4c7 100644
--- a/Fortran/tab_data.f
+++ b/Fortran/tab_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tab_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: tab_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA TAB_BLOCK_DATA
diff --git a/Fortran/tab_f.c b/Fortran/tab_f.c
index 18fce59..fb7e925 100644
--- a/Fortran/tab_f.c
+++ b/Fortran/tab_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: tab_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: tab_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/test/tcel1.f b/Fortran/test/tcel1.f
index 09b082f..ec3c9ba 100644
--- a/Fortran/test/tcel1.f
+++ b/Fortran/test/tcel1.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tcel1.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tcel1.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TCEL1
diff --git a/Fortran/test/tdis1.f b/Fortran/test/tdis1.f
index dcb6f3c..0753290 100644
--- a/Fortran/test/tdis1.f
+++ b/Fortran/test/tdis1.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tdis1.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tdis1.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TDIS1
diff --git a/Fortran/test/tdis2.f b/Fortran/test/tdis2.f
index b50e482..ca93f90 100644
--- a/Fortran/test/tdis2.f
+++ b/Fortran/test/tdis2.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tdis2.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tdis2.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TDIS2
diff --git a/Fortran/test/tdis2.out b/Fortran/test/tdis2.out
index dc18a89..1466a08 100644
--- a/Fortran/test/tdis2.out
+++ b/Fortran/test/tdis2.out
@@ -36,6 +36,7 @@ offset[1][]:   0.0021000    0.0022000
      maxdis: 0x<address>
                2.0010       2.0020    
      totdis:   3.0000    
+       ndis: 2
         err: 0x0
      disp2x: 0x<address>
   disp2x[0]: 0x<address>  (= tpv7)
@@ -93,6 +94,7 @@ offset[1][]:   0.0021000    0.0022000
      maxdis: 0x<address>
                2.0010       2.0020    
      totdis:   0.0000    
+       ndis: 2
         err: 0x0
      disp2x: 0x<address>
   disp2x[0]: 0x<address>  (= tpv7)
@@ -150,6 +152,7 @@ offset[1][]:   0.0021000    0.0022000
      maxdis: 0x<address>
                2.0010       2.0020    
      totdis:   3.0000    
+       ndis: 2
         err: 0x0
      disp2x: 0x<address>
   disp2x[0]: 0x<address>  (= tpv7)
diff --git a/Fortran/test/tfitshdr.f b/Fortran/test/tfitshdr.f
index 0939707..d2d2639 100644
--- a/Fortran/test/tfitshdr.f
+++ b/Fortran/test/tfitshdr.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tfitshdr.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tfitshdr.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TFITSHDR
diff --git a/Fortran/test/tlin.f b/Fortran/test/tlin.f
index f44e542..2c05d34 100644
--- a/Fortran/test/tlin.f
+++ b/Fortran/test/tlin.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tlin.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tlin.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TLIN
diff --git a/Fortran/test/tlog.f b/Fortran/test/tlog.f
index acf2e41..79be5ef 100644
--- a/Fortran/test/tlog.f
+++ b/Fortran/test/tlog.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tlog.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tlog.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TLOG
diff --git a/Fortran/test/tpih1.f b/Fortran/test/tpih1.f
index fe065df..2f9feff 100644
--- a/Fortran/test/tpih1.f
+++ b/Fortran/test/tpih1.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tpih1.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tpih1.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TPIH1
diff --git a/Fortran/test/tpih2.f b/Fortran/test/tpih2.f
index ab03e18..347a8fa 100644
--- a/Fortran/test/tpih2.f
+++ b/Fortran/test/tpih2.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tpih2.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tpih2.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TPIH2
diff --git a/Fortran/test/tprj1.f b/Fortran/test/tprj1.f
index 3da0253..fa073f0 100644
--- a/Fortran/test/tprj1.f
+++ b/Fortran/test/tprj1.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tprj1.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tprj1.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TPRJ1
diff --git a/Fortran/test/tprj2.f b/Fortran/test/tprj2.f
index 57973da..6058312 100644
--- a/Fortran/test/tprj2.f
+++ b/Fortran/test/tprj2.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tprj2.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tprj2.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TPRJ2
diff --git a/Fortran/test/tspc.f b/Fortran/test/tspc.f
index 28613a6..cdfed1a 100644
--- a/Fortran/test/tspc.f
+++ b/Fortran/test/tspc.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tspc.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tspc.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TSPC
diff --git a/Fortran/test/tsph.f b/Fortran/test/tsph.f
index 9782551..f20b351 100644
--- a/Fortran/test/tsph.f
+++ b/Fortran/test/tsph.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tsph.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tsph.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TSPH
diff --git a/Fortran/test/tspx.f b/Fortran/test/tspx.f
index 4a3f67a..079dd82 100644
--- a/Fortran/test/tspx.f
+++ b/Fortran/test/tspx.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tspx.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tspx.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TSPX
diff --git a/Fortran/test/ttab1.f b/Fortran/test/ttab1.f
index de3304a..9919299 100644
--- a/Fortran/test/ttab1.f
+++ b/Fortran/test/ttab1.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: ttab1.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: ttab1.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TTAB1
diff --git a/Fortran/test/ttab2.f b/Fortran/test/ttab2.f
index 285037a..dc63d1f 100644
--- a/Fortran/test/ttab2.f
+++ b/Fortran/test/ttab2.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: ttab2.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: ttab2.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TTAB2
diff --git a/Fortran/test/ttab3.f b/Fortran/test/ttab3.f
index 2ada163..6e44b8e 100644
--- a/Fortran/test/ttab3.f
+++ b/Fortran/test/ttab3.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: ttab3.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: ttab3.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TTAB3
diff --git a/Fortran/test/tunits.f b/Fortran/test/tunits.f
index d7c4f48..41cfe93 100644
--- a/Fortran/test/tunits.f
+++ b/Fortran/test/tunits.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: tunits.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: tunits.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TUNITS
diff --git a/Fortran/test/twcs.f b/Fortran/test/twcs.f
index 9cb2ad8..3b842cf 100644
--- a/Fortran/test/twcs.f
+++ b/Fortran/test/twcs.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: twcs.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: twcs.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TWCS
diff --git a/Fortran/test/twcsfix.f b/Fortran/test/twcsfix.f
index 1daf892..b1a5fb0 100644
--- a/Fortran/test/twcsfix.f
+++ b/Fortran/test/twcsfix.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: twcsfix.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: twcsfix.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TWCSFIX
diff --git a/Fortran/test/twcsfix.out b/Fortran/test/twcsfix.out
index 94ecf76..849dff3 100644
--- a/Fortran/test/twcsfix.out
+++ b/Fortran/test/twcsfix.out
@@ -122,8 +122,8 @@ WCSFIX status returns: (-1, 0, 0, 0, 0,-1)
      imgpix: (nil)
     i_naxis: 0
       unity: 1
-     affine: 0
-     simple: 0
+     affine: 1
+     simple: 1
         err: 0x0
      tmpcrd: 0x<address>
      m_flag: 0
@@ -310,8 +310,8 @@ WCSFIX status returns: (-1, 0, 0, 0, 0,-1)
      imgpix: (nil)
     i_naxis: 0
       unity: 1
-     affine: 0
-     simple: 0
+     affine: 1
+     simple: 1
         err: 0x0
      tmpcrd: 0x<address>
      m_flag: 0
diff --git a/Fortran/test/twcsmix.f b/Fortran/test/twcsmix.f
index 8fe1ffd..68dd1bb 100644
--- a/Fortran/test/twcsmix.f
+++ b/Fortran/test/twcsmix.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: twcsmix.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: twcsmix.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TWCS2
diff --git a/Fortran/test/twcssub.f b/Fortran/test/twcssub.f
index b57f0a9..395cfe2 100644
--- a/Fortran/test/twcssub.f
+++ b/Fortran/test/twcssub.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: twcssub.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: twcssub.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TWCSSUB
diff --git a/Fortran/test/twcstab.f b/Fortran/test/twcstab.f
index 241feea..6dad069 100644
--- a/Fortran/test/twcstab.f
+++ b/Fortran/test/twcstab.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: twcstab.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: twcstab.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       PROGRAM TWCSTAB
diff --git a/Fortran/wcs.inc b/Fortran/wcs.inc
index b249f63..1c0cba5 100644
--- a/Fortran/wcs.inc
+++ b/Fortran/wcs.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcs.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcs.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcs_data.f b/Fortran/wcs_data.f
index 6b0f5ef..d82ddb3 100644
--- a/Fortran/wcs_data.f
+++ b/Fortran/wcs_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcs_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcs_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA WCS_BLOCK_DATA
diff --git a/Fortran/wcs_f.c b/Fortran/wcs_f.c
index 1e18c86..b607eed 100644
--- a/Fortran/wcs_f.c
+++ b/Fortran/wcs_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcs_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: wcs_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/wcserr.inc b/Fortran/wcserr.inc
index 47c66b2..2c73b79 100644
--- a/Fortran/wcserr.inc
+++ b/Fortran/wcserr.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcserr.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcserr.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcserr_f.c b/Fortran/wcserr_f.c
index 8fb34f9..8968dd6 100644
--- a/Fortran/wcserr_f.c
+++ b/Fortran/wcserr_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcserr_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: wcserr_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/wcsfix.inc b/Fortran/wcsfix.inc
index e19e2f5..eee002c 100644
--- a/Fortran/wcsfix.inc
+++ b/Fortran/wcsfix.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsfix.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcsfix.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcsfix_data.f b/Fortran/wcsfix_data.f
index 6467f51..685a176 100644
--- a/Fortran/wcsfix_data.f
+++ b/Fortran/wcsfix_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsfix_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcsfix_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA WCSFIX_BLOCK_DATA
diff --git a/Fortran/wcsfix_f.c b/Fortran/wcsfix_f.c
index ffe746e..d7f48e9 100644
--- a/Fortran/wcsfix_f.c
+++ b/Fortran/wcsfix_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsfix_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: wcsfix_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <wcsfix.h>
diff --git a/Fortran/wcshdr.inc b/Fortran/wcshdr.inc
index 097ce1a..de02217 100644
--- a/Fortran/wcshdr.inc
+++ b/Fortran/wcshdr.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcshdr.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcshdr.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcshdr_data.f b/Fortran/wcshdr_data.f
index 33eb2aa..43f1414 100644
--- a/Fortran/wcshdr_data.f
+++ b/Fortran/wcshdr_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcshdr_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcshdr_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA WCSHDR_BLOCK_DATA
diff --git a/Fortran/wcshdr_f.c b/Fortran/wcshdr_f.c
index 7f8fc47..b842b00 100644
--- a/Fortran/wcshdr_f.c
+++ b/Fortran/wcshdr_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcshdr_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: wcshdr_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/Fortran/wcsmath.inc b/Fortran/wcsmath.inc
index 9661bf7..d8e149b 100644
--- a/Fortran/wcsmath.inc
+++ b/Fortran/wcsmath.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsmath.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcsmath.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     The value used to represent an undefined parameter.
diff --git a/Fortran/wcsunits.inc b/Fortran/wcsunits.inc
index a9ba49e..dd59958 100644
--- a/Fortran/wcsunits.inc
+++ b/Fortran/wcsunits.inc
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsunits.inc,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcsunits.inc,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
 *     Functions.
diff --git a/Fortran/wcsunits_data.f b/Fortran/wcsunits_data.f
index 5272aa7..18c254e 100644
--- a/Fortran/wcsunits_data.f
+++ b/Fortran/wcsunits_data.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* WCSLIB 5.0 - an implementation of the FITS WCS standard.
+* WCSLIB 5.1 - an implementation of the FITS WCS standard.
 * Copyright (C) 1995-2015, Mark Calabretta
 *
 * This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsunits_data.f,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+* $Id: wcsunits_data.f,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *=======================================================================
 
       BLOCK DATA WCSUNITS_BLOCK_DATA
diff --git a/Fortran/wcsunits_f.c b/Fortran/wcsunits_f.c
index 866c100..1452669 100644
--- a/Fortran/wcsunits_f.c
+++ b/Fortran/wcsunits_f.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsunits_f.c,v 5.0 2015/04/05 09:18:15 mcalabre Exp $
+  $Id: wcsunits_f.c,v 5.1 2015/04/07 10:56:38 mcalabre Exp $
 *===========================================================================*/
 
 #include <stdio.h>
diff --git a/GNUmakefile b/GNUmakefile
index 263d715..b525bd2 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# GNU makefile for building WCSLIB 5.0
+# GNU makefile for building WCSLIB 5.1
 #
 # Summary of the main targets
 # ---------------------------
@@ -32,7 +32,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: GNUmakefile,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+# $Id: GNUmakefile,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include makedefs
diff --git a/INSTALL b/INSTALL
index 0b6e01d..2e88734 100644
--- a/INSTALL
+++ b/INSTALL
@@ -1,5 +1,5 @@
 ------------------------------------------------------------------------------
-WCSLIB 5.0 and PGSBOX 5.0 INSTALLATION
+WCSLIB 5.1 and PGSBOX 5.1 INSTALLATION
 --------------------------------------
 
 WCSLIB requires an ANSI C compiler with standard ANSI C environment, that is,
@@ -10,8 +10,8 @@ Installation of WCSLIB is handled by GNU autoconf; GNU make (referred to here
 as 'gmake') must be used.  The WCSLIB distribution also includes PGSBOX (refer
 to the README file), to unpack it type
 
-  zcat wcslib-5.0.tar.gz | tar pvxf -
-  cd wcslib-5.0
+  zcat wcslib-5.1.tar.gz | tar pvxf -
+  cd wcslib-5.1
 
 then if you do not need to specify any configuration options, simply run
 
@@ -93,7 +93,7 @@ The INSTALL file provided with GNU autoconf 2.53 is appended without change.
 
 Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 http://www.atnf.csiro.au/people/Mark.Calabretta
-$Id: INSTALL,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+$Id: INSTALL,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 
 ==============================================================================
 
diff --git a/README b/README
index e088691..4dcfaf1 100644
--- a/README
+++ b/README
@@ -1,7 +1,7 @@
 ------------------------------------------------------------------------------
-                         WCSLIB 5.0 and PGSBOX 5.0
+                         WCSLIB 5.1 and PGSBOX 5.1
 ------------------------------------------------------------------------------
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -23,7 +23,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: README,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: README,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 ------------------------------------------------------------------------------
 
 Please refer to
diff --git a/THANKS b/THANKS
index 91d5b04..3031a88 100644
--- a/THANKS
+++ b/THANKS
@@ -23,6 +23,7 @@ Michael Droettboom (STScI)
 Rick Ebert (IPAC/NASA)
 Ken Ebisawa (GSFC/NASA)
 S�bastien Fabbro (Gentoo linux maintainer)
+Octavi Fors (U. North Carolina)
 Bob Garwood (NRAO)
 Brian Glendenning (NRAO)
 Eric Greisen (NRAO)
@@ -84,4 +85,4 @@ Daren Scot Wilson (NRAO)
 Tony Wong (ATNF/CSIRO)
 
 
-$Id: THANKS,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+$Id: THANKS,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
diff --git a/VALIDATION b/VALIDATION
index 8912040..6df6043 100644
--- a/VALIDATION
+++ b/VALIDATION
@@ -1,8 +1,18 @@
 Platforms on which the installation procedures and test suite were exercised
 
 
+WCSLIB version 5.1 (2015/04/07)
+-------------------------------
+
+* Dell Latitude D620 (Intel Centrino, i686)
+  Debian linux 7.0 (wheezy)
+  uname -r (kernel version): 3.2.0-4-686-pae
+  gcc --version: gcc (Debian 4.7.2-5) 4.7.2
+  gfortran --version: GNU Fortran (Debian 4.7.2-5) 4.7.2
+
+
 WCSLIB version 5.0 (2015/04/05)
---------------------------------
+-------------------------------
 
 * Dell Latitude D620 (Intel Centrino, i686)
   Debian linux 7.0 (wheezy)
@@ -344,4 +354,4 @@ WCSLIB version 4.4 (2009/08/06)
           2004/04/23
 
 ------------------------------------------------------------------------------
-$Id: VALIDATION,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+$Id: VALIDATION,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
diff --git a/configure b/configure
index b6e42d0..acb7b9a 100755
--- a/configure
+++ b/configure
@@ -1,7 +1,7 @@
 #! /bin/sh
-# From configure.ac Revision: 5.0 .
+# From configure.ac Revision: 5.1 .
 # Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.69 for WCSLIB 5.0.
+# Generated by GNU Autoconf 2.69 for WCSLIB 5.1.
 #
 # Report bugs to <mark at calabretta.id.au>.
 #
@@ -580,9 +580,9 @@ MAKEFLAGS=
 
 # Identity of this package.
 PACKAGE_NAME='WCSLIB'
-PACKAGE_TARNAME='wcslib-5.0'
-PACKAGE_VERSION='5.0'
-PACKAGE_STRING='WCSLIB 5.0'
+PACKAGE_TARNAME='wcslib-5.1'
+PACKAGE_VERSION='5.1'
+PACKAGE_STRING='WCSLIB 5.1'
 PACKAGE_BUGREPORT='mark at calabretta.id.au'
 PACKAGE_URL=''
 
@@ -1274,7 +1274,7 @@ if test "$ac_init_help" = "long"; then
   # Omit some internal or obsolete options to make the list less imposing.
   # This message is too long to be a string in the A/UX 3.1 sh.
   cat <<_ACEOF
-\`configure' configures WCSLIB 5.0 to adapt to many kinds of systems.
+\`configure' configures WCSLIB 5.1 to adapt to many kinds of systems.
 
 Usage: $0 [OPTION]... [VAR=VALUE]...
 
@@ -1322,7 +1322,7 @@ Fine tuning of the installation directories:
   --infodir=DIR           info documentation [DATAROOTDIR/info]
   --localedir=DIR         locale-dependent data [DATAROOTDIR/locale]
   --mandir=DIR            man documentation [DATAROOTDIR/man]
-  --docdir=DIR            documentation root [DATAROOTDIR/doc/wcslib-5.0]
+  --docdir=DIR            documentation root [DATAROOTDIR/doc/wcslib-5.1]
   --htmldir=DIR           html documentation [DOCDIR]
   --dvidir=DIR            dvi documentation [DOCDIR]
   --pdfdir=DIR            pdf documentation [DOCDIR]
@@ -1343,7 +1343,7 @@ fi
 
 if test -n "$ac_init_help"; then
   case $ac_init_help in
-     short | recursive ) echo "Configuration of WCSLIB 5.0:";;
+     short | recursive ) echo "Configuration of WCSLIB 5.1:";;
    esac
   cat <<\_ACEOF
 
@@ -1446,7 +1446,7 @@ fi
 test -n "$ac_init_help" && exit $ac_status
 if $ac_init_version; then
   cat <<\_ACEOF
-WCSLIB configure 5.0
+WCSLIB configure 5.1
 generated by GNU Autoconf 2.69
 
 Copyright (C) 2012 Free Software Foundation, Inc.
@@ -2220,7 +2220,7 @@ cat >config.log <<_ACEOF
 This file contains any messages produced by compilers while
 running configure, to aid debugging if configure makes a mistake.
 
-It was created by WCSLIB $as_me 5.0, which was
+It was created by WCSLIB $as_me 5.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   $ $0 $@
@@ -8987,7 +8987,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
 # report actual input values of CONFIG_FILES etc. instead of their
 # values after options handling.
 ac_log="
-This file was extended by WCSLIB $as_me 5.0, which was
+This file was extended by WCSLIB $as_me 5.1, which was
 generated by GNU Autoconf 2.69.  Invocation command line was
 
   CONFIG_FILES    = $CONFIG_FILES
@@ -9049,7 +9049,7 @@ _ACEOF
 cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
 ac_cs_config="`$as_echo "$ac_configure_args" | sed 's/^ //; s/[\\""\`\$]/\\\\&/g'`"
 ac_cs_version="\\
-WCSLIB config.status 5.0
+WCSLIB config.status 5.1
 configured by $0, generated by GNU Autoconf 2.69,
   with options \\"\$ac_cs_config\\"
 
diff --git a/configure.ac b/configure.ac
index 38ed156..3341617 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3,12 +3,12 @@
 #-----------------------------------------------------------------------------
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: configure.ac,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+# $Id: configure.ac,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 #-----------------------------------------------------------------------------
 
-AC_INIT([WCSLIB], [5.0], [mark at calabretta.id.au], [wcslib-5.0])
+AC_INIT([WCSLIB], [5.1], [mark at calabretta.id.au], [wcslib-5.1])
 AC_PREREQ([2.53])
-AC_REVISION([$Revision: 5.0 $])
+AC_REVISION([$Revision: 5.1 $])
 AC_SUBST([PACKAGE_VERSION])
 AC_DEFINE_UNQUOTED([WCSLIB_VERSION], [$PACKAGE_VERSION], [Define wcslib version])
 
diff --git a/doxygen/GNUmakefile b/doxygen/GNUmakefile
index a53b2b9..4ad1bb7 100644
--- a/doxygen/GNUmakefile
+++ b/doxygen/GNUmakefile
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# GNU makefile for building the documentation for WCSLIB 5.0
+# GNU makefile for building the documentation for WCSLIB 5.1
 #
 # Summary of the main targets
 # ---------------------------
@@ -15,7 +15,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: GNUmakefile,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+# $Id: GNUmakefile,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
diff --git a/doxygen/README b/doxygen/README
index 713870e..5afc81e 100644
--- a/doxygen/README
+++ b/doxygen/README
@@ -26,4 +26,4 @@ generated latex manual.
 
 Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 http://www.atnf.csiro.au/people/Mark.Calabretta
-$Id: README,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+$Id: README,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
diff --git a/doxygen/doxextr.l b/doxygen/doxextr.l
index bea4033..e4f9da3 100644
--- a/doxygen/doxextr.l
+++ b/doxygen/doxextr.l
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: doxextr.l,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: doxextr.l,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 *
 * doxextr.l is a Flex description file containing a lexical scanner definition
diff --git a/doxygen/mainpage.dox b/doxygen/mainpage.dox
index 960d1d1..af1fd77 100644
--- a/doxygen/mainpage.dox
+++ b/doxygen/mainpage.dox
@@ -1,4 +1,4 @@
-/** @mainpage WCSLIB 5.0 and PGSBOX 5.0
+/** @mainpage WCSLIB 5.1 and PGSBOX 5.1
 
 @image html Bonne.gif "Bonne's projection"
 
@@ -19,7 +19,7 @@
 @section copyright Copyright
 
 @verbatim
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   WCSLIB is free software: you can redistribute it and/or modify it under the
@@ -39,7 +39,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: mainpage.dox,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: mainpage.dox,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 @endverbatim
 */
 
@@ -704,7 +704,7 @@ may be set to 0.
 
 /** @page threads Thread-safety
 
-With the following exceptions WCSLIB 5.0 is thread-safe:
+With the following exceptions WCSLIB 5.1 is thread-safe:
 
 - The C code generated by Flex is not re-entrant.  Flex does have the capacity
   for producing re-entrant scanners but they have a different API.  This may
diff --git a/flavours b/flavours
index 4de88c8..149eb8d 100644
--- a/flavours
+++ b/flavours
@@ -12,7 +12,7 @@
 #
 # Reminder: add '-d' to FLFLAGS for debugging.
 #
-# $Id: flavours,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+# $Id: flavours,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 #-----------------------------------------------------------------------------
 
 # The list of FLAVOURs can be set on the command line.
diff --git a/html/annotated.html b/html/annotated.html
index ab0d3fd..93485c1 100644
--- a/html/annotated.html
+++ b/html/annotated.html
@@ -68,7 +68,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/cel_8h.html b/html/cel_8h.html
index 5a2b307..891ae7b 100644
--- a/html/cel_8h.html
+++ b/html/cel_8h.html
@@ -641,7 +641,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/cel_8h_source.html b/html/cel_8h_source.html
index 0f1bda3..f7b7f68 100644
--- a/html/cel_8h_source.html
+++ b/html/cel_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="cel_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: cel.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: cel.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -543,7 +543,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/classes.html b/html/classes.html
index ac60fcc..a60c69a 100644
--- a/html/classes.html
+++ b/html/classes.html
@@ -71,7 +71,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/deprecated.html b/html/deprecated.html
index fde23d2..5949233 100644
--- a/html/deprecated.html
+++ b/html/deprecated.html
@@ -126,7 +126,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/diagnostics.html b/html/diagnostics.html
index e4eed98..ffa975f 100644
--- a/html/diagnostics.html
+++ b/html/diagnostics.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -79,7 +79,7 @@ ERROR 2 in bonset() at line 5727 of file prj.c:
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/dir_af99bb3c152a306abd27951285ad1127.html b/html/dir_af99bb3c152a306abd27951285ad1127.html
index 85c76dc..8cc9be6 100644
--- a/html/dir_af99bb3c152a306abd27951285ad1127.html
+++ b/html/dir_af99bb3c152a306abd27951285ad1127.html
@@ -92,7 +92,7 @@ Files</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:32 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/dis_8h.html b/html/dis_8h.html
index c7f2a10..7ad657b 100644
--- a/html/dis_8h.html
+++ b/html/dis_8h.html
@@ -115,6 +115,9 @@ Functions</h2></td></tr>
 <tr class="memitem:ac589d5e85afe3d775cba4c06734ce653"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653">disx2p</a> (struct <a class="el" href="structdisprm.html">disprm</a> *dis, const double discrd[], double rawcrd[])</td></tr>
 <tr class="memdesc:ac589d5e85afe3d775cba4c06734ce653"><td class="mdescLeft"> </td><td class="mdescRight">Apply de-distortion function.  <a href="#ac589d5e85afe3d775cba4c06734ce653">More...</a><br /></td></tr>
 <tr class="separator:ac589d5e85afe3d775cba4c06734ce653"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a91fa2d34c30be042516a0246d393b116"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dis_8h.html#a91fa2d34c30be042516a0246d393b116">diswarp</a> (struct <a class="el" href="structdisprm.html">disprm</a> *dis, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot)</td></tr>
+<tr class="memdesc:a91fa2d34c30be042516a0246d393b116"><td class="mdescLeft"> </td><td class="mdescRight">Compute measures of distortion.  <a href="#a91fa2d34c30be042516a0246d393b116">More...</a><br /></td></tr>
+<tr class="separator:a91fa2d34c30be042516a0246d393b116"><td class="memSeparator" colspan="2"> </td></tr>
 <tr class="memitem:a402a8a2a75907d0849cee87a0d72b5f5"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="dis_8h.html#a402a8a2a75907d0849cee87a0d72b5f5">tpvset</a> (int j, struct <a class="el" href="structdisprm.html">disprm</a> *dis)</td></tr>
 <tr class="memdesc:a402a8a2a75907d0849cee87a0d72b5f5"><td class="mdescLeft"> </td><td class="mdescRight">(Internal use only.)  <a href="#a402a8a2a75907d0849cee87a0d72b5f5">More...</a><br /></td></tr>
 <tr class="separator:a402a8a2a75907d0849cee87a0d72b5f5"><td class="memSeparator" colspan="2"> </td></tr>
@@ -150,7 +153,8 @@ Variables</h2></td></tr>
 <div class="textblock"><p>These routines apply the distortion functions defined by the extension to the FITS WCS standard proposed in Paper IV. They are based on the <a class="el" href="structdisprm.html" title="Distortion parameters. ">disprm</a> struct which contains all information needed for the computations. The struct contains some members that must be set by the user, and others that are maintained by these routines, somewhat like a C++ class but with no encapsulation.</p>
 <p>Four routines, <a class="el" href="dis_8h.html#a8896e2a5330e55cd85da4a28ed6ee463" title="Default constructor for the disprm struct. ">disini()</a>, <a class="el" href="dis_8h.html#acb2f2341971a191fdbea544602405723" title="Allocate memory for parameters in a disprm struct. ">disparms()</a>, <a class="el" href="dis_8h.html#a42e03676a3def43ef6b936cd7beb4dd5" title="Copy routine for the disprm struct. ">discpy()</a>, and <a class="el" href="dis_8h.html#a83b98d0f6429f4f19024675645026187" t [...]
 <p>A setup routine, <a class="el" href="dis_8h.html#ad1bdf4497eb4513ca8431e1baa419041" title="Setup routine for the disprm struct. ">disset()</a>, computes intermediate values in the <a class="el" href="structdisprm.html" title="Distortion parameters. ">disprm</a> struct from parameters in it that were supplied by the user. The struct always needs to be set up by <a class="el" href="dis_8h.html#ad1bdf4497eb4513ca8431e1baa419041" title="Setup routine for the disprm struct. ">disset()</a>, [...]
-<p><a class="el" href="dis_8h.html#a135726e4c4c5bc00e2eba865ab202201" title="Apply distortion function. ">disp2x()</a> and <a class="el" href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653" title="Apply de-distortion function. ">disx2p()</a> implement the WCS distortion functions, <a class="el" href="dis_8h.html#a135726e4c4c5bc00e2eba865ab202201" title="Apply distortion function. ">disp2x()</a> using separate functions, such as <a class="el" href="dis_8h.html#a4182d3cd45a022e930c44c4f933 [...]
+<p><a class="el" href="dis_8h.html#a135726e4c4c5bc00e2eba865ab202201" title="Apply distortion function. ">disp2x()</a> and <a class="el" href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653" title="Apply de-distortion function. ">disx2p()</a> implement the WCS distortion functions, <a class="el" href="dis_8h.html#a135726e4c4c5bc00e2eba865ab202201" title="Apply distortion function. ">disp2x()</a> using separate functions, such as <a class="el" href="dis_8h.html#a4182d3cd45a022e930c44c4f933 [...]
+<p>An auxiliary routine, <a class="el" href="dis_8h.html#a91fa2d34c30be042516a0246d393b116" title="Compute measures of distortion. ">diswarp()</a>, computes various measures of the distortion over a specified range of pixels. </p>
 </div><h2 class="groupheader">Macro Definition Documentation</h2>
 <a class="anchor" id="a23068602f42552a4257462b2875d8c51"></a>
 <div class="memitem">
@@ -519,6 +523,122 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 
 </div>
 </div>
+<a class="anchor" id="a91fa2d34c30be042516a0246d393b116"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int diswarp </td>
+          <td>(</td>
+          <td class="paramtype">struct <a class="el" href="structdisprm.html">disprm</a> * </td>
+          <td class="paramname"><em>dis</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const double </td>
+          <td class="paramname"><em>pixblc</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const double </td>
+          <td class="paramname"><em>pixtrc</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const double </td>
+          <td class="paramname"><em>pixsamp</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int * </td>
+          <td class="paramname"><em>nsamp</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double </td>
+          <td class="paramname"><em>maxdis</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double * </td>
+          <td class="paramname"><em>maxtot</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double </td>
+          <td class="paramname"><em>avgdis</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double * </td>
+          <td class="paramname"><em>avgtot</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double </td>
+          <td class="paramname"><em>rmsdis</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double * </td>
+          <td class="paramname"><em>rmstot</em> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p><b>diswarp</b>() computes various measures of the distortion over the specified range of coordinates.</p>
+<p>For prior distortions, the measures may be interpreted simply as an offset in pixel coordinates. For sequent distortions, the interpretation depends on the nature of the linear transformation matrix (<code><b>PC</b>i<b>_</b>ja</code> or <code><b>CD</b>i<b>_</b>ja</code>). If the latter introduces a scaling, then the measures will also be scaled. Note also that the image domain, which is rectangular in pixel coordinates, may be rotated, skewed, and/or stretched in intermediate pixel co [...]
+<p><b>PLEASE NOTE:</b> the measures of total distortion may be essentially meaningless if there are multiple sequent distortions with different scaling.</p>
+<p>See also <a class="el" href="lin_8h.html#a27a7a4a2cc3183bb1cd639efaade2265" title="Compute measures of distortion. ">linwarp()</a>.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramdir">[in,out]</td><td class="paramname">dis</td><td>Distortion function parameters.</td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">pixblc</td><td>Start of the range of pixel coordinates (for prior distortions), or intermediate pixel coordinates (for sequent distortions). May be specified as a NULL pointer which is interpreted as (1,1,...). </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">pixtrc</td><td>End of the range of pixel coordinates (prior) or intermediate pixel coordinates (sequent). </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">pixsamp</td><td>If positive or zero, the increment on the particular axis, starting at pixblc[]. Zero is interpreted as a unit increment. pixsamp may also be specified as a NULL pointer which is interpreted as all zeroes, i.e. unit increments on all axes. <br />
+ If negative, the grid size on the particular axis (the absolute value being rounded to the nearest integer). For example, if pixsamp is (-128.0,-128.0,...) then each axis will be sampled at 128 points between pixblc[] and pixtrc[] inclusive. Use caution when using this option on non-square images.</td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">nsamp</td><td>The number of pixel coordinates sampled. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">maxdis</td><td>For each individual distortion function, the maximum absolute value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">maxtot</td><td>For the combination of all distortion functions, the maximum absolute value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">avgdis</td><td>For each individual distortion function, the mean value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">avgtot</td><td>For the combination of all distortion functions, the mean value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">rmsdis</td><td>For each individual distortion function, the root mean square deviation of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">rmstot</td><td>For the combination of all distortion functions, the root mean square deviation of the distortion. <br />
+ Can be specified as a NULL pointer if not required.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
+<li>0: Success.</li>
+<li>1: Null <a class="el" href="structdisprm.html" title="Distortion parameters. ">disprm</a> pointer passed.</li>
+<li>2: Memory allocation failed.</li>
+<li>3: Invalid parameter.</li>
+<li>4: Distort error. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
 <a class="anchor" id="a402a8a2a75907d0849cee87a0d72b5f5"></a>
 <div class="memitem">
 <div class="memproto">
@@ -682,7 +802,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/dis_8h_source.html b/html/dis_8h_source.html
index bc8b5c8..2693ebe 100644
--- a/html/dis_8h_source.html
+++ b/html/dis_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="dis_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: dis.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: dis.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - experimental C routines that implement proposed extensions to</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - experimental C routines that implement proposed extensions to</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* the FITS World Coordinate System (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of distortions in FITS world coordinate systems",</span></div>
@@ -109,579 +109,698 @@
 <div class="line"><a name="l00056"></a><span class="lineno">   56</span> <span class="comment">* disp2x() and disx2p() implement the WCS distortion functions, disp2x() using</span></div>
 <div class="line"><a name="l00057"></a><span class="lineno">   57</span> <span class="comment">* separate functions, such as tpv1(), to do the computation.</span></div>
 <div class="line"><a name="l00058"></a><span class="lineno">   58</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00059"></a><span class="lineno">   59</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00060"></a><span class="lineno">   60</span> <span class="comment">* disini() - Default constructor for the disprm struct</span></div>
-<div class="line"><a name="l00061"></a><span class="lineno">   61</span> <span class="comment">* ----------------------------------------------------</span></div>
-<div class="line"><a name="l00062"></a><span class="lineno">   62</span> <span class="comment">* disini() allocates memory for arrays in a disprm struct and sets all members</span></div>
-<div class="line"><a name="l00063"></a><span class="lineno">   63</span> <span class="comment">* of the struct to default values.</span></div>
-<div class="line"><a name="l00064"></a><span class="lineno">   64</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00065"></a><span class="lineno">   65</span> <span class="comment">* In general, different distortion functions may be associated with each axis,</span></div>
-<div class="line"><a name="l00066"></a><span class="lineno">   66</span> <span class="comment">* and at the point where disini() is invoked, it is usually not known how many</span></div>
-<div class="line"><a name="l00067"></a><span class="lineno">   67</span> <span class="comment">* distortion parameters may be required for each.  Hence a separate routine,</span></div>
-<div class="line"><a name="l00068"></a><span class="lineno">   68</span> <span class="comment">* disparms(), is provided to allocate memory for the parameter arrays if</span></div>
-<div class="line"><a name="l00069"></a><span class="lineno">   69</span> <span class="comment">* desired.  One way or the other, after invoking disini(), it is the caller's</span></div>
-<div class="line"><a name="l00070"></a><span class="lineno">   70</span> <span class="comment">* responsibility to allocate memory (if necessary) for the distortion</span></div>
-<div class="line"><a name="l00071"></a><span class="lineno">   71</span> <span class="comment">* parameters.  If disparms() is used for this purpose, then disfree() will</span></div>
-<div class="line"><a name="l00072"></a><span class="lineno">   72</span> <span class="comment">* free it and subsequent calls to disini() will manage it, e.g. if naxis</span></div>
-<div class="line"><a name="l00073"></a><span class="lineno">   73</span> <span class="comment">* changes.  Of course, if there is no distortion function on an axis then</span></div>
-<div class="line"><a name="l00074"></a><span class="lineno">   74</span> <span class="comment">* there is no need to allocate memory for any parameters.</span></div>
-<div class="line"><a name="l00075"></a><span class="lineno">   75</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00076"></a><span class="lineno">   76</span> <span class="comment">* PLEASE NOTE: every disprm struct must be initialized by disini(), possibly</span></div>
-<div class="line"><a name="l00077"></a><span class="lineno">   77</span> <span class="comment">* repeatedly.  On the first invokation, and only the first invokation,</span></div>
-<div class="line"><a name="l00078"></a><span class="lineno">   78</span> <span class="comment">* disprm::flag must be set to -1 to initialize memory management, regardless</span></div>
-<div class="line"><a name="l00079"></a><span class="lineno">   79</span> <span class="comment">* of whether disini() will actually be used to allocate memory.</span></div>
-<div class="line"><a name="l00080"></a><span class="lineno">   80</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00081"></a><span class="lineno">   81</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00082"></a><span class="lineno">   82</span> <span class="comment">*   alloc     int       If true, allocate memory unconditionally for arrays in</span></div>
-<div class="line"><a name="l00083"></a><span class="lineno">   83</span> <span class="comment">*                       the disprm struct.</span></div>
-<div class="line"><a name="l00084"></a><span class="lineno">   84</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00085"></a><span class="lineno">   85</span> <span class="comment">*                       If false, it is assumed that pointers to these arrays</span></div>
-<div class="line"><a name="l00086"></a><span class="lineno">   86</span> <span class="comment">*                       have been set by the user except if they are null</span></div>
-<div class="line"><a name="l00087"></a><span class="lineno">   87</span> <span class="comment">*                       pointers in which case memory will be allocated for</span></div>
-<div class="line"><a name="l00088"></a><span class="lineno">   88</span> <span class="comment">*                       them regardless.  (In other words, setting alloc true</span></div>
-<div class="line"><a name="l00089"></a><span class="lineno">   89</span> <span class="comment">*                       saves having to initalize these pointers to zero.)</span></div>
-<div class="line"><a name="l00090"></a><span class="lineno">   90</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00091"></a><span class="lineno">   91</span> <span class="comment">*   naxis     int       The number of world coordinate axes, used to determine</span></div>
-<div class="line"><a name="l00092"></a><span class="lineno">   92</span> <span class="comment">*                       array sizes.</span></div>
+<div class="line"><a name="l00059"></a><span class="lineno">   59</span> <span class="comment">* An auxiliary routine, diswarp(), computes various measures of the distortion</span></div>
+<div class="line"><a name="l00060"></a><span class="lineno">   60</span> <span class="comment">* over a specified range of pixels.</span></div>
+<div class="line"><a name="l00061"></a><span class="lineno">   61</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00062"></a><span class="lineno">   62</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00063"></a><span class="lineno">   63</span> <span class="comment">* disini() - Default constructor for the disprm struct</span></div>
+<div class="line"><a name="l00064"></a><span class="lineno">   64</span> <span class="comment">* ----------------------------------------------------</span></div>
+<div class="line"><a name="l00065"></a><span class="lineno">   65</span> <span class="comment">* disini() allocates memory for arrays in a disprm struct and sets all members</span></div>
+<div class="line"><a name="l00066"></a><span class="lineno">   66</span> <span class="comment">* of the struct to default values.</span></div>
+<div class="line"><a name="l00067"></a><span class="lineno">   67</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00068"></a><span class="lineno">   68</span> <span class="comment">* In general, different distortion functions may be associated with each axis,</span></div>
+<div class="line"><a name="l00069"></a><span class="lineno">   69</span> <span class="comment">* and at the point where disini() is invoked, it is usually not known how many</span></div>
+<div class="line"><a name="l00070"></a><span class="lineno">   70</span> <span class="comment">* distortion parameters may be required for each.  Hence a separate routine,</span></div>
+<div class="line"><a name="l00071"></a><span class="lineno">   71</span> <span class="comment">* disparms(), is provided to allocate memory for the parameter arrays if</span></div>
+<div class="line"><a name="l00072"></a><span class="lineno">   72</span> <span class="comment">* desired.  One way or the other, after invoking disini(), it is the caller's</span></div>
+<div class="line"><a name="l00073"></a><span class="lineno">   73</span> <span class="comment">* responsibility to allocate memory (if necessary) for the distortion</span></div>
+<div class="line"><a name="l00074"></a><span class="lineno">   74</span> <span class="comment">* parameters.  If disparms() is used for this purpose, then disfree() will</span></div>
+<div class="line"><a name="l00075"></a><span class="lineno">   75</span> <span class="comment">* free it and subsequent calls to disini() will manage it, e.g. if naxis</span></div>
+<div class="line"><a name="l00076"></a><span class="lineno">   76</span> <span class="comment">* changes.  Of course, if there is no distortion function on an axis then</span></div>
+<div class="line"><a name="l00077"></a><span class="lineno">   77</span> <span class="comment">* there is no need to allocate memory for any parameters.</span></div>
+<div class="line"><a name="l00078"></a><span class="lineno">   78</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00079"></a><span class="lineno">   79</span> <span class="comment">* PLEASE NOTE: every disprm struct must be initialized by disini(), possibly</span></div>
+<div class="line"><a name="l00080"></a><span class="lineno">   80</span> <span class="comment">* repeatedly.  On the first invokation, and only the first invokation,</span></div>
+<div class="line"><a name="l00081"></a><span class="lineno">   81</span> <span class="comment">* disprm::flag must be set to -1 to initialize memory management, regardless</span></div>
+<div class="line"><a name="l00082"></a><span class="lineno">   82</span> <span class="comment">* of whether disini() will actually be used to allocate memory.</span></div>
+<div class="line"><a name="l00083"></a><span class="lineno">   83</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00084"></a><span class="lineno">   84</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00085"></a><span class="lineno">   85</span> <span class="comment">*   alloc     int       If true, allocate memory unconditionally for arrays in</span></div>
+<div class="line"><a name="l00086"></a><span class="lineno">   86</span> <span class="comment">*                       the disprm struct.</span></div>
+<div class="line"><a name="l00087"></a><span class="lineno">   87</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00088"></a><span class="lineno">   88</span> <span class="comment">*                       If false, it is assumed that pointers to these arrays</span></div>
+<div class="line"><a name="l00089"></a><span class="lineno">   89</span> <span class="comment">*                       have been set by the user except if they are null</span></div>
+<div class="line"><a name="l00090"></a><span class="lineno">   90</span> <span class="comment">*                       pointers in which case memory will be allocated for</span></div>
+<div class="line"><a name="l00091"></a><span class="lineno">   91</span> <span class="comment">*                       them regardless.  (In other words, setting alloc true</span></div>
+<div class="line"><a name="l00092"></a><span class="lineno">   92</span> <span class="comment">*                       saves having to initalize these pointers to zero.)</span></div>
 <div class="line"><a name="l00093"></a><span class="lineno">   93</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00094"></a><span class="lineno">   94</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00095"></a><span class="lineno">   95</span> <span class="comment">*   dis       struct disprm*</span></div>
-<div class="line"><a name="l00096"></a><span class="lineno">   96</span> <span class="comment">*                       Distortion function parameters.  Note that, in order</span></div>
-<div class="line"><a name="l00097"></a><span class="lineno">   97</span> <span class="comment">*                       to initialize memory management disprm::flag must be</span></div>
-<div class="line"><a name="l00098"></a><span class="lineno">   98</span> <span class="comment">*                       set to -1 when dis is initialized for the first time</span></div>
-<div class="line"><a name="l00099"></a><span class="lineno">   99</span> <span class="comment">*                       (memory leaks may result if it had already been</span></div>
-<div class="line"><a name="l00100"></a><span class="lineno">  100</span> <span class="comment">*                       initialized).</span></div>
-<div class="line"><a name="l00101"></a><span class="lineno">  101</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00102"></a><span class="lineno">  102</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno">  103</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno">  104</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00105"></a><span class="lineno">  105</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00106"></a><span class="lineno">  106</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00107"></a><span class="lineno">  107</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00108"></a><span class="lineno">  108</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00109"></a><span class="lineno">  109</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00094"></a><span class="lineno">   94</span> <span class="comment">*   naxis     int       The number of world coordinate axes, used to determine</span></div>
+<div class="line"><a name="l00095"></a><span class="lineno">   95</span> <span class="comment">*                       array sizes.</span></div>
+<div class="line"><a name="l00096"></a><span class="lineno">   96</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00097"></a><span class="lineno">   97</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00098"></a><span class="lineno">   98</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00099"></a><span class="lineno">   99</span> <span class="comment">*                       Distortion function parameters.  Note that, in order</span></div>
+<div class="line"><a name="l00100"></a><span class="lineno">  100</span> <span class="comment">*                       to initialize memory management disprm::flag must be</span></div>
+<div class="line"><a name="l00101"></a><span class="lineno">  101</span> <span class="comment">*                       set to -1 when dis is initialized for the first time</span></div>
+<div class="line"><a name="l00102"></a><span class="lineno">  102</span> <span class="comment">*                       (memory leaks may result if it had already been</span></div>
+<div class="line"><a name="l00103"></a><span class="lineno">  103</span> <span class="comment">*                       initialized).</span></div>
+<div class="line"><a name="l00104"></a><span class="lineno">  104</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno">  105</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00106"></a><span class="lineno">  106</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00107"></a><span class="lineno">  107</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00108"></a><span class="lineno">  108</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00109"></a><span class="lineno">  109</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
 <div class="line"><a name="l00110"></a><span class="lineno">  110</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00111"></a><span class="lineno">  111</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00112"></a><span class="lineno">  112</span> <span class="comment">* disparms() - Allocate memory for parameters in a disprm struct</span></div>
-<div class="line"><a name="l00113"></a><span class="lineno">  113</span> <span class="comment">* --------------------------------------------------------------</span></div>
-<div class="line"><a name="l00114"></a><span class="lineno">  114</span> <span class="comment">* disparms() allocates memory for the arrays of distortion function parameters</span></div>
-<div class="line"><a name="l00115"></a><span class="lineno">  115</span> <span class="comment">* in a disprm struct.  It relies on disprm::nparm[] having been set to</span></div>
-<div class="line"><a name="l00116"></a><span class="lineno">  116</span> <span class="comment">* determine the number of parameters for each distortion function.  The</span></div>
-<div class="line"><a name="l00117"></a><span class="lineno">  117</span> <span class="comment">* allocated memory will be freed by disfree().</span></div>
-<div class="line"><a name="l00118"></a><span class="lineno">  118</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00119"></a><span class="lineno">  119</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00120"></a><span class="lineno">  120</span> <span class="comment">*   dis       struct disprm*</span></div>
-<div class="line"><a name="l00121"></a><span class="lineno">  121</span> <span class="comment">*                       disprm::nparm[] is used to determine the number of</span></div>
-<div class="line"><a name="l00122"></a><span class="lineno">  122</span> <span class="comment">*                       parameters in each distortion function.  Memory is</span></div>
-<div class="line"><a name="l00123"></a><span class="lineno">  123</span> <span class="comment">*                       allocated for the distortion function parameters,</span></div>
-<div class="line"><a name="l00124"></a><span class="lineno">  124</span> <span class="comment">*                       disprm::parms[][], and it is initialized to zero.</span></div>
-<div class="line"><a name="l00125"></a><span class="lineno">  125</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno">  126</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00127"></a><span class="lineno">  127</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00128"></a><span class="lineno">  128</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00129"></a><span class="lineno">  129</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00130"></a><span class="lineno">  130</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00131"></a><span class="lineno">  131</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00132"></a><span class="lineno">  132</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00133"></a><span class="lineno">  133</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00111"></a><span class="lineno">  111</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00112"></a><span class="lineno">  112</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00113"></a><span class="lineno">  113</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00114"></a><span class="lineno">  114</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00115"></a><span class="lineno">  115</span> <span class="comment">* disparms() - Allocate memory for parameters in a disprm struct</span></div>
+<div class="line"><a name="l00116"></a><span class="lineno">  116</span> <span class="comment">* --------------------------------------------------------------</span></div>
+<div class="line"><a name="l00117"></a><span class="lineno">  117</span> <span class="comment">* disparms() allocates memory for the arrays of distortion function parameters</span></div>
+<div class="line"><a name="l00118"></a><span class="lineno">  118</span> <span class="comment">* in a disprm struct.  It relies on disprm::nparm[] having been set to</span></div>
+<div class="line"><a name="l00119"></a><span class="lineno">  119</span> <span class="comment">* determine the number of parameters for each distortion function.  The</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno">  120</span> <span class="comment">* allocated memory will be freed by disfree().</span></div>
+<div class="line"><a name="l00121"></a><span class="lineno">  121</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00122"></a><span class="lineno">  122</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00123"></a><span class="lineno">  123</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00124"></a><span class="lineno">  124</span> <span class="comment">*                       disprm::nparm[] is used to determine the number of</span></div>
+<div class="line"><a name="l00125"></a><span class="lineno">  125</span> <span class="comment">*                       parameters in each distortion function.  Memory is</span></div>
+<div class="line"><a name="l00126"></a><span class="lineno">  126</span> <span class="comment">*                       allocated for the distortion function parameters,</span></div>
+<div class="line"><a name="l00127"></a><span class="lineno">  127</span> <span class="comment">*                       disprm::parms[][], and it is initialized to zero.</span></div>
+<div class="line"><a name="l00128"></a><span class="lineno">  128</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00129"></a><span class="lineno">  129</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00130"></a><span class="lineno">  130</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00131"></a><span class="lineno">  131</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00132"></a><span class="lineno">  132</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00133"></a><span class="lineno">  133</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
 <div class="line"><a name="l00134"></a><span class="lineno">  134</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00135"></a><span class="lineno">  135</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00136"></a><span class="lineno">  136</span> <span class="comment">* discpy() - Copy routine for the disprm struct</span></div>
-<div class="line"><a name="l00137"></a><span class="lineno">  137</span> <span class="comment">* ---------------------------------------------</span></div>
-<div class="line"><a name="l00138"></a><span class="lineno">  138</span> <span class="comment">* discpy() does a deep copy of one disprm struct to another, using disini() to</span></div>
-<div class="line"><a name="l00139"></a><span class="lineno">  139</span> <span class="comment">* allocate memory unconditionally for its arrays if required.  Only the</span></div>
-<div class="line"><a name="l00140"></a><span class="lineno">  140</span> <span class="comment">* "information to be provided" part of the struct is copied; a call to</span></div>
-<div class="line"><a name="l00141"></a><span class="lineno">  141</span> <span class="comment">* disset() is required to initialize the remainder.</span></div>
-<div class="line"><a name="l00142"></a><span class="lineno">  142</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00143"></a><span class="lineno">  143</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00144"></a><span class="lineno">  144</span> <span class="comment">*   alloc     int       If true, allocate memory unconditionally for arrays in</span></div>
-<div class="line"><a name="l00145"></a><span class="lineno">  145</span> <span class="comment">*                       the destination, including the parameter array via a</span></div>
-<div class="line"><a name="l00146"></a><span class="lineno">  146</span> <span class="comment">*                       call to disparms().  Otherwise, it is assumed that</span></div>
-<div class="line"><a name="l00147"></a><span class="lineno">  147</span> <span class="comment">*                       pointers to these arrays have been set by the user</span></div>
-<div class="line"><a name="l00148"></a><span class="lineno">  148</span> <span class="comment">*                       except if they are null pointers in which case memory</span></div>
-<div class="line"><a name="l00149"></a><span class="lineno">  149</span> <span class="comment">*                       will be allocated for them regardless.</span></div>
-<div class="line"><a name="l00150"></a><span class="lineno">  150</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00151"></a><span class="lineno">  151</span> <span class="comment">*   dissrc    const struct disprm*</span></div>
-<div class="line"><a name="l00152"></a><span class="lineno">  152</span> <span class="comment">*                       Struct to copy from.</span></div>
+<div class="line"><a name="l00135"></a><span class="lineno">  135</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00136"></a><span class="lineno">  136</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00137"></a><span class="lineno">  137</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00138"></a><span class="lineno">  138</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00139"></a><span class="lineno">  139</span> <span class="comment">* discpy() - Copy routine for the disprm struct</span></div>
+<div class="line"><a name="l00140"></a><span class="lineno">  140</span> <span class="comment">* ---------------------------------------------</span></div>
+<div class="line"><a name="l00141"></a><span class="lineno">  141</span> <span class="comment">* discpy() does a deep copy of one disprm struct to another, using disini() to</span></div>
+<div class="line"><a name="l00142"></a><span class="lineno">  142</span> <span class="comment">* allocate memory unconditionally for its arrays if required.  Only the</span></div>
+<div class="line"><a name="l00143"></a><span class="lineno">  143</span> <span class="comment">* "information to be provided" part of the struct is copied; a call to</span></div>
+<div class="line"><a name="l00144"></a><span class="lineno">  144</span> <span class="comment">* disset() is required to initialize the remainder.</span></div>
+<div class="line"><a name="l00145"></a><span class="lineno">  145</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00146"></a><span class="lineno">  146</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00147"></a><span class="lineno">  147</span> <span class="comment">*   alloc     int       If true, allocate memory unconditionally for arrays in</span></div>
+<div class="line"><a name="l00148"></a><span class="lineno">  148</span> <span class="comment">*                       the destination, including the parameter array via a</span></div>
+<div class="line"><a name="l00149"></a><span class="lineno">  149</span> <span class="comment">*                       call to disparms().  Otherwise, it is assumed that</span></div>
+<div class="line"><a name="l00150"></a><span class="lineno">  150</span> <span class="comment">*                       pointers to these arrays have been set by the user</span></div>
+<div class="line"><a name="l00151"></a><span class="lineno">  151</span> <span class="comment">*                       except if they are null pointers in which case memory</span></div>
+<div class="line"><a name="l00152"></a><span class="lineno">  152</span> <span class="comment">*                       will be allocated for them regardless.</span></div>
 <div class="line"><a name="l00153"></a><span class="lineno">  153</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00154"></a><span class="lineno">  154</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00155"></a><span class="lineno">  155</span> <span class="comment">*   disdst    struct disprm*</span></div>
-<div class="line"><a name="l00156"></a><span class="lineno">  156</span> <span class="comment">*                       Struct to copy to.  disprm::flag should be set to -1</span></div>
-<div class="line"><a name="l00157"></a><span class="lineno">  157</span> <span class="comment">*                       if disdst was not previously initialized (memory leaks</span></div>
-<div class="line"><a name="l00158"></a><span class="lineno">  158</span> <span class="comment">*                       may result if it was previously initialized).</span></div>
-<div class="line"><a name="l00159"></a><span class="lineno">  159</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00160"></a><span class="lineno">  160</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00161"></a><span class="lineno">  161</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00162"></a><span class="lineno">  162</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00163"></a><span class="lineno">  163</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00164"></a><span class="lineno">  164</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00165"></a><span class="lineno">  165</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00166"></a><span class="lineno">  166</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00167"></a><span class="lineno">  167</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00154"></a><span class="lineno">  154</span> <span class="comment">*   dissrc    const struct disprm*</span></div>
+<div class="line"><a name="l00155"></a><span class="lineno">  155</span> <span class="comment">*                       Struct to copy from.</span></div>
+<div class="line"><a name="l00156"></a><span class="lineno">  156</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00157"></a><span class="lineno">  157</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00158"></a><span class="lineno">  158</span> <span class="comment">*   disdst    struct disprm*</span></div>
+<div class="line"><a name="l00159"></a><span class="lineno">  159</span> <span class="comment">*                       Struct to copy to.  disprm::flag should be set to -1</span></div>
+<div class="line"><a name="l00160"></a><span class="lineno">  160</span> <span class="comment">*                       if disdst was not previously initialized (memory leaks</span></div>
+<div class="line"><a name="l00161"></a><span class="lineno">  161</span> <span class="comment">*                       may result if it was previously initialized).</span></div>
+<div class="line"><a name="l00162"></a><span class="lineno">  162</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00163"></a><span class="lineno">  163</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00164"></a><span class="lineno">  164</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00165"></a><span class="lineno">  165</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00166"></a><span class="lineno">  166</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00167"></a><span class="lineno">  167</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
 <div class="line"><a name="l00168"></a><span class="lineno">  168</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00169"></a><span class="lineno">  169</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00170"></a><span class="lineno">  170</span> <span class="comment">* disfree() - Destructor for the disprm struct</span></div>
-<div class="line"><a name="l00171"></a><span class="lineno">  171</span> <span class="comment">* --------------------------------------------</span></div>
-<div class="line"><a name="l00172"></a><span class="lineno">  172</span> <span class="comment">* disfree() frees memory allocated for the disprm arrays by disini() and/or</span></div>
-<div class="line"><a name="l00173"></a><span class="lineno">  173</span> <span class="comment">* disparms().  disini() and disparms() keep a record of the memory they</span></div>
-<div class="line"><a name="l00174"></a><span class="lineno">  174</span> <span class="comment">* allocate and disfree() will only attempt to free this.</span></div>
-<div class="line"><a name="l00175"></a><span class="lineno">  175</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00176"></a><span class="lineno">  176</span> <span class="comment">* PLEASE NOTE: disfree() must not be invoked on a disprm struct that was not</span></div>
-<div class="line"><a name="l00177"></a><span class="lineno">  177</span> <span class="comment">* initialized by disini().</span></div>
+<div class="line"><a name="l00169"></a><span class="lineno">  169</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00170"></a><span class="lineno">  170</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00171"></a><span class="lineno">  171</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00172"></a><span class="lineno">  172</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00173"></a><span class="lineno">  173</span> <span class="comment">* disfree() - Destructor for the disprm struct</span></div>
+<div class="line"><a name="l00174"></a><span class="lineno">  174</span> <span class="comment">* --------------------------------------------</span></div>
+<div class="line"><a name="l00175"></a><span class="lineno">  175</span> <span class="comment">* disfree() frees memory allocated for the disprm arrays by disini() and/or</span></div>
+<div class="line"><a name="l00176"></a><span class="lineno">  176</span> <span class="comment">* disparms().  disini() and disparms() keep a record of the memory they</span></div>
+<div class="line"><a name="l00177"></a><span class="lineno">  177</span> <span class="comment">* allocate and disfree() will only attempt to free this.</span></div>
 <div class="line"><a name="l00178"></a><span class="lineno">  178</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00179"></a><span class="lineno">  179</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00180"></a><span class="lineno">  180</span> <span class="comment">*   dis       struct disprm*</span></div>
-<div class="line"><a name="l00181"></a><span class="lineno">  181</span> <span class="comment">*                       Distortion function parameters.</span></div>
-<div class="line"><a name="l00182"></a><span class="lineno">  182</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00183"></a><span class="lineno">  183</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00184"></a><span class="lineno">  184</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00185"></a><span class="lineno">  185</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00186"></a><span class="lineno">  186</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00187"></a><span class="lineno">  187</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00188"></a><span class="lineno">  188</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00189"></a><span class="lineno">  189</span> <span class="comment">* disprt() - Print routine for the disprm struct</span></div>
-<div class="line"><a name="l00190"></a><span class="lineno">  190</span> <span class="comment">* ----------------------------------------------</span></div>
-<div class="line"><a name="l00191"></a><span class="lineno">  191</span> <span class="comment">* disprt() prints the contents of a disprm struct using wcsprintf().  Mainly</span></div>
-<div class="line"><a name="l00192"></a><span class="lineno">  192</span> <span class="comment">* intended for diagnostic purposes.</span></div>
-<div class="line"><a name="l00193"></a><span class="lineno">  193</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00194"></a><span class="lineno">  194</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00195"></a><span class="lineno">  195</span> <span class="comment">*   dis       const struct disprm*</span></div>
-<div class="line"><a name="l00196"></a><span class="lineno">  196</span> <span class="comment">*                       Distortion function parameters.</span></div>
-<div class="line"><a name="l00197"></a><span class="lineno">  197</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00198"></a><span class="lineno">  198</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00199"></a><span class="lineno">  199</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00200"></a><span class="lineno">  200</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00201"></a><span class="lineno">  201</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00202"></a><span class="lineno">  202</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00203"></a><span class="lineno">  203</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00204"></a><span class="lineno">  204</span> <span class="comment">* disset() - Setup routine for the disprm struct</span></div>
-<div class="line"><a name="l00205"></a><span class="lineno">  205</span> <span class="comment">* ----------------------------------------------</span></div>
-<div class="line"><a name="l00206"></a><span class="lineno">  206</span> <span class="comment">* disset(), sets up the disprm struct according to information supplied within</span></div>
-<div class="line"><a name="l00207"></a><span class="lineno">  207</span> <span class="comment">* it - refer to the explanation of disprm::flag.</span></div>
-<div class="line"><a name="l00208"></a><span class="lineno">  208</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00209"></a><span class="lineno">  209</span> <span class="comment">* Note that this routine need not be called directly; it will be invoked by</span></div>
-<div class="line"><a name="l00210"></a><span class="lineno">  210</span> <span class="comment">* disp2x() and disx2p() if the disprm::flag is anything other than a</span></div>
-<div class="line"><a name="l00211"></a><span class="lineno">  211</span> <span class="comment">* predefined magic value.</span></div>
-<div class="line"><a name="l00212"></a><span class="lineno">  212</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00213"></a><span class="lineno">  213</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00214"></a><span class="lineno">  214</span> <span class="comment">*   dis       struct disprm*</span></div>
-<div class="line"><a name="l00215"></a><span class="lineno">  215</span> <span class="comment">*                       Distortion function parameters.</span></div>
-<div class="line"><a name="l00216"></a><span class="lineno">  216</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00217"></a><span class="lineno">  217</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00218"></a><span class="lineno">  218</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00219"></a><span class="lineno">  219</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00220"></a><span class="lineno">  220</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00221"></a><span class="lineno">  221</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00222"></a><span class="lineno">  222</span> <span class="comment">*                         3: Invalid parameter.</span></div>
-<div class="line"><a name="l00223"></a><span class="lineno">  223</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00224"></a><span class="lineno">  224</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00225"></a><span class="lineno">  225</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00179"></a><span class="lineno">  179</span> <span class="comment">* PLEASE NOTE: disfree() must not be invoked on a disprm struct that was not</span></div>
+<div class="line"><a name="l00180"></a><span class="lineno">  180</span> <span class="comment">* initialized by disini().</span></div>
+<div class="line"><a name="l00181"></a><span class="lineno">  181</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00182"></a><span class="lineno">  182</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00183"></a><span class="lineno">  183</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00184"></a><span class="lineno">  184</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00185"></a><span class="lineno">  185</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00186"></a><span class="lineno">  186</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00187"></a><span class="lineno">  187</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00188"></a><span class="lineno">  188</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00189"></a><span class="lineno">  189</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00190"></a><span class="lineno">  190</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00191"></a><span class="lineno">  191</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00192"></a><span class="lineno">  192</span> <span class="comment">* disprt() - Print routine for the disprm struct</span></div>
+<div class="line"><a name="l00193"></a><span class="lineno">  193</span> <span class="comment">* ----------------------------------------------</span></div>
+<div class="line"><a name="l00194"></a><span class="lineno">  194</span> <span class="comment">* disprt() prints the contents of a disprm struct using wcsprintf().  Mainly</span></div>
+<div class="line"><a name="l00195"></a><span class="lineno">  195</span> <span class="comment">* intended for diagnostic purposes.</span></div>
+<div class="line"><a name="l00196"></a><span class="lineno">  196</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00197"></a><span class="lineno">  197</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00198"></a><span class="lineno">  198</span> <span class="comment">*   dis       const struct disprm*</span></div>
+<div class="line"><a name="l00199"></a><span class="lineno">  199</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00200"></a><span class="lineno">  200</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00201"></a><span class="lineno">  201</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00202"></a><span class="lineno">  202</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00203"></a><span class="lineno">  203</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00204"></a><span class="lineno">  204</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00205"></a><span class="lineno">  205</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00206"></a><span class="lineno">  206</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00207"></a><span class="lineno">  207</span> <span class="comment">* disset() - Setup routine for the disprm struct</span></div>
+<div class="line"><a name="l00208"></a><span class="lineno">  208</span> <span class="comment">* ----------------------------------------------</span></div>
+<div class="line"><a name="l00209"></a><span class="lineno">  209</span> <span class="comment">* disset(), sets up the disprm struct according to information supplied within</span></div>
+<div class="line"><a name="l00210"></a><span class="lineno">  210</span> <span class="comment">* it - refer to the explanation of disprm::flag.</span></div>
+<div class="line"><a name="l00211"></a><span class="lineno">  211</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00212"></a><span class="lineno">  212</span> <span class="comment">* Note that this routine need not be called directly; it will be invoked by</span></div>
+<div class="line"><a name="l00213"></a><span class="lineno">  213</span> <span class="comment">* disp2x() and disx2p() if the disprm::flag is anything other than a</span></div>
+<div class="line"><a name="l00214"></a><span class="lineno">  214</span> <span class="comment">* predefined magic value.</span></div>
+<div class="line"><a name="l00215"></a><span class="lineno">  215</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00216"></a><span class="lineno">  216</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00217"></a><span class="lineno">  217</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00218"></a><span class="lineno">  218</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00219"></a><span class="lineno">  219</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00220"></a><span class="lineno">  220</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00221"></a><span class="lineno">  221</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00222"></a><span class="lineno">  222</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00223"></a><span class="lineno">  223</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00224"></a><span class="lineno">  224</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00225"></a><span class="lineno">  225</span> <span class="comment">*                         3: Invalid parameter.</span></div>
 <div class="line"><a name="l00226"></a><span class="lineno">  226</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00227"></a><span class="lineno">  227</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00228"></a><span class="lineno">  228</span> <span class="comment">* disp2x() - Apply distortion function</span></div>
-<div class="line"><a name="l00229"></a><span class="lineno">  229</span> <span class="comment">* ------------------------------------</span></div>
-<div class="line"><a name="l00230"></a><span class="lineno">  230</span> <span class="comment">* disp2x() applies the distortion functions.  By definition, the distortion</span></div>
-<div class="line"><a name="l00231"></a><span class="lineno">  231</span> <span class="comment">* is in the pixel-to-world direction.</span></div>
-<div class="line"><a name="l00232"></a><span class="lineno">  232</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00233"></a><span class="lineno">  233</span> <span class="comment">* Depending on the point in the algorithm chain at which it is invoked,</span></div>
-<div class="line"><a name="l00234"></a><span class="lineno">  234</span> <span class="comment">* disp2x() may transform pixel coordinates to corrected pixel coordinates, or</span></div>
-<div class="line"><a name="l00235"></a><span class="lineno">  235</span> <span class="comment">* intermediate pixel coordinates to corrected intermediate pixel coordinates,</span></div>
-<div class="line"><a name="l00236"></a><span class="lineno">  236</span> <span class="comment">* or image coordinates to corrected image coordinates.</span></div>
-<div class="line"><a name="l00237"></a><span class="lineno">  237</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00238"></a><span class="lineno">  238</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00239"></a><span class="lineno">  239</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00240"></a><span class="lineno">  240</span> <span class="comment">*   dis       struct disprm*</span></div>
-<div class="line"><a name="l00241"></a><span class="lineno">  241</span> <span class="comment">*                       Distortion function parameters.</span></div>
-<div class="line"><a name="l00242"></a><span class="lineno">  242</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00243"></a><span class="lineno">  243</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00244"></a><span class="lineno">  244</span> <span class="comment">*   rawcrd    const double[]</span></div>
-<div class="line"><a name="l00245"></a><span class="lineno">  245</span> <span class="comment">*                       Array of coordinates.</span></div>
-<div class="line"><a name="l00246"></a><span class="lineno">  246</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00247"></a><span class="lineno">  247</span> <span class="comment">* Returned:</span></div>
-<div class="line"><a name="l00248"></a><span class="lineno">  248</span> <span class="comment">*   discrd    double[]  Array of coordinates to which the distortion functions</span></div>
-<div class="line"><a name="l00249"></a><span class="lineno">  249</span> <span class="comment">*                       have been applied.</span></div>
-<div class="line"><a name="l00250"></a><span class="lineno">  250</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00251"></a><span class="lineno">  251</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00252"></a><span class="lineno">  252</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00253"></a><span class="lineno">  253</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00254"></a><span class="lineno">  254</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00255"></a><span class="lineno">  255</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00256"></a><span class="lineno">  256</span> <span class="comment">*                         3: Invalid parameter.</span></div>
-<div class="line"><a name="l00257"></a><span class="lineno">  257</span> <span class="comment">*                         4: Distort error.</span></div>
-<div class="line"><a name="l00258"></a><span class="lineno">  258</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00259"></a><span class="lineno">  259</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00260"></a><span class="lineno">  260</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
-<div class="line"><a name="l00261"></a><span class="lineno">  261</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00227"></a><span class="lineno">  227</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00228"></a><span class="lineno">  228</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00229"></a><span class="lineno">  229</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00230"></a><span class="lineno">  230</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00231"></a><span class="lineno">  231</span> <span class="comment">* disp2x() - Apply distortion function</span></div>
+<div class="line"><a name="l00232"></a><span class="lineno">  232</span> <span class="comment">* ------------------------------------</span></div>
+<div class="line"><a name="l00233"></a><span class="lineno">  233</span> <span class="comment">* disp2x() applies the distortion functions.  By definition, the distortion</span></div>
+<div class="line"><a name="l00234"></a><span class="lineno">  234</span> <span class="comment">* is in the pixel-to-world direction.</span></div>
+<div class="line"><a name="l00235"></a><span class="lineno">  235</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00236"></a><span class="lineno">  236</span> <span class="comment">* Depending on the point in the algorithm chain at which it is invoked,</span></div>
+<div class="line"><a name="l00237"></a><span class="lineno">  237</span> <span class="comment">* disp2x() may transform pixel coordinates to corrected pixel coordinates, or</span></div>
+<div class="line"><a name="l00238"></a><span class="lineno">  238</span> <span class="comment">* intermediate pixel coordinates to corrected intermediate pixel coordinates,</span></div>
+<div class="line"><a name="l00239"></a><span class="lineno">  239</span> <span class="comment">* or image coordinates to corrected image coordinates.</span></div>
+<div class="line"><a name="l00240"></a><span class="lineno">  240</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00241"></a><span class="lineno">  241</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00242"></a><span class="lineno">  242</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00243"></a><span class="lineno">  243</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00244"></a><span class="lineno">  244</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00245"></a><span class="lineno">  245</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00246"></a><span class="lineno">  246</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00247"></a><span class="lineno">  247</span> <span class="comment">*   rawcrd    const double[naxis]</span></div>
+<div class="line"><a name="l00248"></a><span class="lineno">  248</span> <span class="comment">*                       Array of coordinates.</span></div>
+<div class="line"><a name="l00249"></a><span class="lineno">  249</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00250"></a><span class="lineno">  250</span> <span class="comment">* Returned:</span></div>
+<div class="line"><a name="l00251"></a><span class="lineno">  251</span> <span class="comment">*   discrd    double[naxis]</span></div>
+<div class="line"><a name="l00252"></a><span class="lineno">  252</span> <span class="comment">*                       Array of coordinates to which the distortion functions</span></div>
+<div class="line"><a name="l00253"></a><span class="lineno">  253</span> <span class="comment">*                       have been applied.</span></div>
+<div class="line"><a name="l00254"></a><span class="lineno">  254</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00255"></a><span class="lineno">  255</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00256"></a><span class="lineno">  256</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00257"></a><span class="lineno">  257</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00258"></a><span class="lineno">  258</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00259"></a><span class="lineno">  259</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00260"></a><span class="lineno">  260</span> <span class="comment">*                         3: Invalid parameter.</span></div>
+<div class="line"><a name="l00261"></a><span class="lineno">  261</span> <span class="comment">*                         4: Distort error.</span></div>
 <div class="line"><a name="l00262"></a><span class="lineno">  262</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00263"></a><span class="lineno">  263</span> <span class="comment">* disx2p() - Apply de-distortion function</span></div>
-<div class="line"><a name="l00264"></a><span class="lineno">  264</span> <span class="comment">* ---------------------------------------</span></div>
-<div class="line"><a name="l00265"></a><span class="lineno">  265</span> <span class="comment">* disx2p() applies the inverse of the distortion functions.  By definition,</span></div>
-<div class="line"><a name="l00266"></a><span class="lineno">  266</span> <span class="comment">* the de-distortion is in the world-to-pixel direction.</span></div>
-<div class="line"><a name="l00267"></a><span class="lineno">  267</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00268"></a><span class="lineno">  268</span> <span class="comment">* Depending on the point in the algorithm chain at which it is invoked,</span></div>
-<div class="line"><a name="l00269"></a><span class="lineno">  269</span> <span class="comment">* disx2p() may transform corrected pixel coordinates to pixel coordinates, or</span></div>
-<div class="line"><a name="l00270"></a><span class="lineno">  270</span> <span class="comment">* corrected intermediate pixel coordinates to intermediate pixel coordinates,</span></div>
-<div class="line"><a name="l00271"></a><span class="lineno">  271</span> <span class="comment">* or corrected image coordinates to image coordinates.</span></div>
-<div class="line"><a name="l00272"></a><span class="lineno">  272</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00273"></a><span class="lineno">  273</span> <span class="comment">* disx2p() iteratively solves for the inverse using disp2x().  It assumes</span></div>
-<div class="line"><a name="l00274"></a><span class="lineno">  274</span> <span class="comment">* that the distortion is small and the functions are well-behaved, being</span></div>
-<div class="line"><a name="l00275"></a><span class="lineno">  275</span> <span class="comment">* continuous and with continuous derivatives.  Also that, to first order</span></div>
-<div class="line"><a name="l00276"></a><span class="lineno">  276</span> <span class="comment">* in the neighbourhood of the solution, discrd[j] ~= a + b*rawcrd[j], i.e.</span></div>
-<div class="line"><a name="l00277"></a><span class="lineno">  277</span> <span class="comment">* independent of rawcrd[i], where i != j.  This is effectively equivalent to</span></div>
-<div class="line"><a name="l00278"></a><span class="lineno">  278</span> <span class="comment">* assuming that the distortion functions are separable to first order.</span></div>
-<div class="line"><a name="l00279"></a><span class="lineno">  279</span> <span class="comment">* Furthermore, a is assumed to be small, and b close to unity.</span></div>
-<div class="line"><a name="l00280"></a><span class="lineno">  280</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00281"></a><span class="lineno">  281</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00282"></a><span class="lineno">  282</span> <span class="comment">*   dis       struct disprm*</span></div>
-<div class="line"><a name="l00283"></a><span class="lineno">  283</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00263"></a><span class="lineno">  263</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00264"></a><span class="lineno">  264</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00265"></a><span class="lineno">  265</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00266"></a><span class="lineno">  266</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00267"></a><span class="lineno">  267</span> <span class="comment">* disx2p() - Apply de-distortion function</span></div>
+<div class="line"><a name="l00268"></a><span class="lineno">  268</span> <span class="comment">* ---------------------------------------</span></div>
+<div class="line"><a name="l00269"></a><span class="lineno">  269</span> <span class="comment">* disx2p() applies the inverse of the distortion functions.  By definition,</span></div>
+<div class="line"><a name="l00270"></a><span class="lineno">  270</span> <span class="comment">* the de-distortion is in the world-to-pixel direction.</span></div>
+<div class="line"><a name="l00271"></a><span class="lineno">  271</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00272"></a><span class="lineno">  272</span> <span class="comment">* Depending on the point in the algorithm chain at which it is invoked,</span></div>
+<div class="line"><a name="l00273"></a><span class="lineno">  273</span> <span class="comment">* disx2p() may transform corrected pixel coordinates to pixel coordinates, or</span></div>
+<div class="line"><a name="l00274"></a><span class="lineno">  274</span> <span class="comment">* corrected intermediate pixel coordinates to intermediate pixel coordinates,</span></div>
+<div class="line"><a name="l00275"></a><span class="lineno">  275</span> <span class="comment">* or corrected image coordinates to image coordinates.</span></div>
+<div class="line"><a name="l00276"></a><span class="lineno">  276</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00277"></a><span class="lineno">  277</span> <span class="comment">* disx2p() iteratively solves for the inverse using disp2x().  It assumes</span></div>
+<div class="line"><a name="l00278"></a><span class="lineno">  278</span> <span class="comment">* that the distortion is small and the functions are well-behaved, being</span></div>
+<div class="line"><a name="l00279"></a><span class="lineno">  279</span> <span class="comment">* continuous and with continuous derivatives.  Also that, to first order</span></div>
+<div class="line"><a name="l00280"></a><span class="lineno">  280</span> <span class="comment">* in the neighbourhood of the solution, discrd[j] ~= a + b*rawcrd[j], i.e.</span></div>
+<div class="line"><a name="l00281"></a><span class="lineno">  281</span> <span class="comment">* independent of rawcrd[i], where i != j.  This is effectively equivalent to</span></div>
+<div class="line"><a name="l00282"></a><span class="lineno">  282</span> <span class="comment">* assuming that the distortion functions are separable to first order.</span></div>
+<div class="line"><a name="l00283"></a><span class="lineno">  283</span> <span class="comment">* Furthermore, a is assumed to be small, and b close to unity.</span></div>
 <div class="line"><a name="l00284"></a><span class="lineno">  284</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00285"></a><span class="lineno">  285</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00286"></a><span class="lineno">  286</span> <span class="comment">*   discrd    const double[]</span></div>
-<div class="line"><a name="l00287"></a><span class="lineno">  287</span> <span class="comment">*                       Array of coordinates.</span></div>
+<div class="line"><a name="l00285"></a><span class="lineno">  285</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00286"></a><span class="lineno">  286</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00287"></a><span class="lineno">  287</span> <span class="comment">*                       Distortion function parameters.</span></div>
 <div class="line"><a name="l00288"></a><span class="lineno">  288</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00289"></a><span class="lineno">  289</span> <span class="comment">* Returned:</span></div>
-<div class="line"><a name="l00290"></a><span class="lineno">  290</span> <span class="comment">*   rawcrd    double[]  Array of coordinates to which the inverse distortion</span></div>
-<div class="line"><a name="l00291"></a><span class="lineno">  291</span> <span class="comment">*                       functions have been applied.</span></div>
+<div class="line"><a name="l00289"></a><span class="lineno">  289</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00290"></a><span class="lineno">  290</span> <span class="comment">*   discrd    const double[naxis]</span></div>
+<div class="line"><a name="l00291"></a><span class="lineno">  291</span> <span class="comment">*                       Array of coordinates.</span></div>
 <div class="line"><a name="l00292"></a><span class="lineno">  292</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00293"></a><span class="lineno">  293</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00294"></a><span class="lineno">  294</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00295"></a><span class="lineno">  295</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00296"></a><span class="lineno">  296</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
-<div class="line"><a name="l00297"></a><span class="lineno">  297</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00298"></a><span class="lineno">  298</span> <span class="comment">*                         3: Invalid parameter.</span></div>
-<div class="line"><a name="l00299"></a><span class="lineno">  299</span> <span class="comment">*                         5: De-distort error.</span></div>
-<div class="line"><a name="l00300"></a><span class="lineno">  300</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00301"></a><span class="lineno">  301</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00302"></a><span class="lineno">  302</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
-<div class="line"><a name="l00303"></a><span class="lineno">  303</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00304"></a><span class="lineno">  304</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00305"></a><span class="lineno">  305</span> <span class="comment">* disprm struct - Distortion parameters</span></div>
-<div class="line"><a name="l00306"></a><span class="lineno">  306</span> <span class="comment">* -------------------------------------</span></div>
-<div class="line"><a name="l00307"></a><span class="lineno">  307</span> <span class="comment">* The disprm struct contains all of the information required to apply a set of</span></div>
-<div class="line"><a name="l00308"></a><span class="lineno">  308</span> <span class="comment">* distortion functions.  It consists of certain members that must be set by</span></div>
-<div class="line"><a name="l00309"></a><span class="lineno">  309</span> <span class="comment">* the user ("given") and others that are set by the WCSLIB routines</span></div>
-<div class="line"><a name="l00310"></a><span class="lineno">  310</span> <span class="comment">* ("returned").</span></div>
-<div class="line"><a name="l00311"></a><span class="lineno">  311</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00312"></a><span class="lineno">  312</span> <span class="comment">*   int flag</span></div>
-<div class="line"><a name="l00313"></a><span class="lineno">  313</span> <span class="comment">*     (Given and returned) This flag must be set to zero whenever any of the</span></div>
-<div class="line"><a name="l00314"></a><span class="lineno">  314</span> <span class="comment">*     following members of the disprm struct are set or modified:</span></div>
-<div class="line"><a name="l00315"></a><span class="lineno">  315</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00316"></a><span class="lineno">  316</span> <span class="comment">*       - disprm::naxis,</span></div>
-<div class="line"><a name="l00317"></a><span class="lineno">  317</span> <span class="comment">*       - disprm::dtype,</span></div>
-<div class="line"><a name="l00318"></a><span class="lineno">  318</span> <span class="comment">*       - disprm::axmap,</span></div>
-<div class="line"><a name="l00319"></a><span class="lineno">  319</span> <span class="comment">*       - disprm::nparm,</span></div>
-<div class="line"><a name="l00320"></a><span class="lineno">  320</span> <span class="comment">*       - disprm::parms.</span></div>
-<div class="line"><a name="l00321"></a><span class="lineno">  321</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00322"></a><span class="lineno">  322</span> <span class="comment">*     This signals the initialization routine, disset(), to recompute the</span></div>
-<div class="line"><a name="l00323"></a><span class="lineno">  323</span> <span class="comment">*     returned members of the disprm struct.  disset() will reset flag to</span></div>
-<div class="line"><a name="l00324"></a><span class="lineno">  324</span> <span class="comment">*     indicate that this has been done.</span></div>
+<div class="line"><a name="l00293"></a><span class="lineno">  293</span> <span class="comment">* Returned:</span></div>
+<div class="line"><a name="l00294"></a><span class="lineno">  294</span> <span class="comment">*   rawcrd    double[naxis]</span></div>
+<div class="line"><a name="l00295"></a><span class="lineno">  295</span> <span class="comment">*                       Array of coordinates to which the inverse distortion</span></div>
+<div class="line"><a name="l00296"></a><span class="lineno">  296</span> <span class="comment">*                       functions have been applied.</span></div>
+<div class="line"><a name="l00297"></a><span class="lineno">  297</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00298"></a><span class="lineno">  298</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00299"></a><span class="lineno">  299</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00300"></a><span class="lineno">  300</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00301"></a><span class="lineno">  301</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00302"></a><span class="lineno">  302</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00303"></a><span class="lineno">  303</span> <span class="comment">*                         3: Invalid parameter.</span></div>
+<div class="line"><a name="l00304"></a><span class="lineno">  304</span> <span class="comment">*                         5: De-distort error.</span></div>
+<div class="line"><a name="l00305"></a><span class="lineno">  305</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00306"></a><span class="lineno">  306</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00307"></a><span class="lineno">  307</span> <span class="comment">*                       disprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00308"></a><span class="lineno">  308</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00309"></a><span class="lineno">  309</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00310"></a><span class="lineno">  310</span> <span class="comment">* diswarp() - Compute measures of distortion</span></div>
+<div class="line"><a name="l00311"></a><span class="lineno">  311</span> <span class="comment">* ------------------------------------------</span></div>
+<div class="line"><a name="l00312"></a><span class="lineno">  312</span> <span class="comment">* diswarp() computes various measures of the distortion over the specified</span></div>
+<div class="line"><a name="l00313"></a><span class="lineno">  313</span> <span class="comment">* range of coordinates.</span></div>
+<div class="line"><a name="l00314"></a><span class="lineno">  314</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00315"></a><span class="lineno">  315</span> <span class="comment">* For prior distortions, the measures may be interpreted simply as an offset</span></div>
+<div class="line"><a name="l00316"></a><span class="lineno">  316</span> <span class="comment">* in pixel coordinates.  For sequent distortions, the interpretation depends</span></div>
+<div class="line"><a name="l00317"></a><span class="lineno">  317</span> <span class="comment">* on the nature of the linear transformation matrix (PCi_ja or CDi_ja).  If</span></div>
+<div class="line"><a name="l00318"></a><span class="lineno">  318</span> <span class="comment">* the latter introduces a scaling, then the measures will also be scaled.</span></div>
+<div class="line"><a name="l00319"></a><span class="lineno">  319</span> <span class="comment">* Note also that the image domain, which is rectangular in pixel coordinates,</span></div>
+<div class="line"><a name="l00320"></a><span class="lineno">  320</span> <span class="comment">* may be rotated, skewed, and/or stretched in intermediate pixel coordinates,</span></div>
+<div class="line"><a name="l00321"></a><span class="lineno">  321</span> <span class="comment">* and in general cannot be defined using pixblc[] and pixtrc[].</span></div>
+<div class="line"><a name="l00322"></a><span class="lineno">  322</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00323"></a><span class="lineno">  323</span> <span class="comment">* PLEASE NOTE: the measures of total distortion may be essentially meaningless</span></div>
+<div class="line"><a name="l00324"></a><span class="lineno">  324</span> <span class="comment">* if there are multiple sequent distortions with different scaling.</span></div>
 <div class="line"><a name="l00325"></a><span class="lineno">  325</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00326"></a><span class="lineno">  326</span> <span class="comment">*     PLEASE NOTE: flag must be set to -1 when disini() is called for the</span></div>
-<div class="line"><a name="l00327"></a><span class="lineno">  327</span> <span class="comment">*     first time for a particular disprm struct in order to initialize memory</span></div>
-<div class="line"><a name="l00328"></a><span class="lineno">  328</span> <span class="comment">*     management.  It must ONLY be used on the first initialization otherwise</span></div>
-<div class="line"><a name="l00329"></a><span class="lineno">  329</span> <span class="comment">*     memory leaks may result.</span></div>
-<div class="line"><a name="l00330"></a><span class="lineno">  330</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00331"></a><span class="lineno">  331</span> <span class="comment">*   int naxis</span></div>
-<div class="line"><a name="l00332"></a><span class="lineno">  332</span> <span class="comment">*     (Given or returned) Number of pixel and world coordinate elements.</span></div>
-<div class="line"><a name="l00333"></a><span class="lineno">  333</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00334"></a><span class="lineno">  334</span> <span class="comment">*     If disini() is used to initialize the disprm struct (as would normally</span></div>
-<div class="line"><a name="l00335"></a><span class="lineno">  335</span> <span class="comment">*     be the case) then it will set naxis from the value passed to it as a</span></div>
-<div class="line"><a name="l00336"></a><span class="lineno">  336</span> <span class="comment">*     function argument.  The user should not subsequently modify it.</span></div>
-<div class="line"><a name="l00337"></a><span class="lineno">  337</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00338"></a><span class="lineno">  338</span> <span class="comment">*   char (*dtype)[16]</span></div>
-<div class="line"><a name="l00339"></a><span class="lineno">  339</span> <span class="comment">*     (Given) Pointer to the first element of an array of char[16] containing</span></div>
-<div class="line"><a name="l00340"></a><span class="lineno">  340</span> <span class="comment">*     the name of the distortion function for each axis.</span></div>
-<div class="line"><a name="l00341"></a><span class="lineno">  341</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00342"></a><span class="lineno">  342</span> <span class="comment">*   int **axmap</span></div>
-<div class="line"><a name="l00343"></a><span class="lineno">  343</span> <span class="comment">*     (Given) Pointer to the first element of an array of int* containing</span></div>
-<div class="line"><a name="l00344"></a><span class="lineno">  344</span> <span class="comment">*     pointers to the first elements of the axis mapping arrays for each axis.</span></div>
-<div class="line"><a name="l00345"></a><span class="lineno">  345</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00346"></a><span class="lineno">  346</span> <span class="comment">*     An axis mapping associates the independent variables of a distortion</span></div>
-<div class="line"><a name="l00347"></a><span class="lineno">  347</span> <span class="comment">*     function with the 1-relative image axis number.  For example, consider</span></div>
-<div class="line"><a name="l00348"></a><span class="lineno">  348</span> <span class="comment">*     an image with a spectrum on the first axis, followed by RA, Dec, and</span></div>
-<div class="line"><a name="l00349"></a><span class="lineno">  349</span> <span class="comment">*     time axes.  For a distortion in (RA,Dec) and no distortion on the</span></div>
-<div class="line"><a name="l00350"></a><span class="lineno">  350</span> <span class="comment">*     spectral or time axes, the axis mapping arrays, axmap[j][], would be</span></div>
-<div class="line"><a name="l00351"></a><span class="lineno">  351</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00352"></a><span class="lineno">  352</span> <span class="comment">=       j=0: [0, 0, 0, 0]   ...no  distortion on spectral axis,</span></div>
-<div class="line"><a name="l00353"></a><span class="lineno">  353</span> <span class="comment">=         1: [2, 3, 0, 0]   ...RA  distortion depends on RA and Dec,</span></div>
-<div class="line"><a name="l00354"></a><span class="lineno">  354</span> <span class="comment">=         2: [3, 2, 0, 0]   ...Dec distortion depends on Dec and RA,</span></div>
-<div class="line"><a name="l00355"></a><span class="lineno">  355</span> <span class="comment">=         3: [0, 0, 0, 0]   ...no  distortion on time axis,</span></div>
+<div class="line"><a name="l00326"></a><span class="lineno">  326</span> <span class="comment">* See also linwarp().</span></div>
+<div class="line"><a name="l00327"></a><span class="lineno">  327</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00328"></a><span class="lineno">  328</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00329"></a><span class="lineno">  329</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00330"></a><span class="lineno">  330</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00331"></a><span class="lineno">  331</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00332"></a><span class="lineno">  332</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00333"></a><span class="lineno">  333</span> <span class="comment">*   pixblc    const double[naxis]</span></div>
+<div class="line"><a name="l00334"></a><span class="lineno">  334</span> <span class="comment">*                       Start of the range of pixel coordinates (for prior</span></div>
+<div class="line"><a name="l00335"></a><span class="lineno">  335</span> <span class="comment">*                       distortions), or intermediate pixel coordinates (for</span></div>
+<div class="line"><a name="l00336"></a><span class="lineno">  336</span> <span class="comment">*                       sequent distortions).  May be specified as a NULL</span></div>
+<div class="line"><a name="l00337"></a><span class="lineno">  337</span> <span class="comment">*                       pointer which is interpreted as (1,1,...).</span></div>
+<div class="line"><a name="l00338"></a><span class="lineno">  338</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00339"></a><span class="lineno">  339</span> <span class="comment">*   pixtrc    const double[naxis]</span></div>
+<div class="line"><a name="l00340"></a><span class="lineno">  340</span> <span class="comment">*                       End of the range of pixel coordinates (prior) or</span></div>
+<div class="line"><a name="l00341"></a><span class="lineno">  341</span> <span class="comment">*                       intermediate pixel coordinates (sequent).</span></div>
+<div class="line"><a name="l00342"></a><span class="lineno">  342</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00343"></a><span class="lineno">  343</span> <span class="comment">*   pixsamp   const double[naxis]</span></div>
+<div class="line"><a name="l00344"></a><span class="lineno">  344</span> <span class="comment">*                       If positive or zero, the increment on the particular</span></div>
+<div class="line"><a name="l00345"></a><span class="lineno">  345</span> <span class="comment">*                       axis, starting at pixblc[].  Zero is interpreted as a</span></div>
+<div class="line"><a name="l00346"></a><span class="lineno">  346</span> <span class="comment">*                       unit increment.  pixsamp may also be specified as a</span></div>
+<div class="line"><a name="l00347"></a><span class="lineno">  347</span> <span class="comment">*                       NULL pointer which is interpreted as all zeroes, i.e.</span></div>
+<div class="line"><a name="l00348"></a><span class="lineno">  348</span> <span class="comment">*                       unit increments on all axes.</span></div>
+<div class="line"><a name="l00349"></a><span class="lineno">  349</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00350"></a><span class="lineno">  350</span> <span class="comment">*                       If negative, the grid size on the particular axis (the</span></div>
+<div class="line"><a name="l00351"></a><span class="lineno">  351</span> <span class="comment">*                       absolute value being rounded to the nearest integer).</span></div>
+<div class="line"><a name="l00352"></a><span class="lineno">  352</span> <span class="comment">*                       For example, if pixsamp is (-128.0,-128.0,...) then</span></div>
+<div class="line"><a name="l00353"></a><span class="lineno">  353</span> <span class="comment">*                       each axis will be sampled at 128 points between</span></div>
+<div class="line"><a name="l00354"></a><span class="lineno">  354</span> <span class="comment">*                       pixblc[] and pixtrc[] inclusive.  Use caution when</span></div>
+<div class="line"><a name="l00355"></a><span class="lineno">  355</span> <span class="comment">*                       using this option on non-square images.</span></div>
 <div class="line"><a name="l00356"></a><span class="lineno">  356</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00357"></a><span class="lineno">  357</span> <span class="comment">*     where zero indicates that there is no corresponding independent</span></div>
-<div class="line"><a name="l00358"></a><span class="lineno">  358</span> <span class="comment">*     variable.</span></div>
+<div class="line"><a name="l00357"></a><span class="lineno">  357</span> <span class="comment">* Returned:</span></div>
+<div class="line"><a name="l00358"></a><span class="lineno">  358</span> <span class="comment">*   nsamp     int*      The number of pixel coordinates sampled.</span></div>
 <div class="line"><a name="l00359"></a><span class="lineno">  359</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00360"></a><span class="lineno">  360</span> <span class="comment">*   double **offset</span></div>
-<div class="line"><a name="l00361"></a><span class="lineno">  361</span> <span class="comment">*     (Given) Pointer to the first element of an array of double* containing</span></div>
-<div class="line"><a name="l00362"></a><span class="lineno">  362</span> <span class="comment">*     an offset used to renormalize the independent variables of the</span></div>
-<div class="line"><a name="l00363"></a><span class="lineno">  363</span> <span class="comment">*     distortion function for each axis.</span></div>
-<div class="line"><a name="l00364"></a><span class="lineno">  364</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00365"></a><span class="lineno">  365</span> <span class="comment">*     The offsets are subtracted from the independent variables before</span></div>
-<div class="line"><a name="l00366"></a><span class="lineno">  366</span> <span class="comment">*     scaling.</span></div>
+<div class="line"><a name="l00360"></a><span class="lineno">  360</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00361"></a><span class="lineno">  361</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00362"></a><span class="lineno">  362</span> <span class="comment">*   maxdis    double[naxis]</span></div>
+<div class="line"><a name="l00363"></a><span class="lineno">  363</span> <span class="comment">*                       For each individual distortion function, the</span></div>
+<div class="line"><a name="l00364"></a><span class="lineno">  364</span> <span class="comment">*                       maximum absolute value of the distortion.</span></div>
+<div class="line"><a name="l00365"></a><span class="lineno">  365</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00366"></a><span class="lineno">  366</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
 <div class="line"><a name="l00367"></a><span class="lineno">  367</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00368"></a><span class="lineno">  368</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
-<div class="line"><a name="l00369"></a><span class="lineno">  369</span> <span class="comment">*     disprm::offset is changed.</span></div>
+<div class="line"><a name="l00368"></a><span class="lineno">  368</span> <span class="comment">*   maxtot    double*   For the combination of all distortion functions, the</span></div>
+<div class="line"><a name="l00369"></a><span class="lineno">  369</span> <span class="comment">*                       maximum absolute value of the distortion.</span></div>
 <div class="line"><a name="l00370"></a><span class="lineno">  370</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00371"></a><span class="lineno">  371</span> <span class="comment">*   double **scale</span></div>
-<div class="line"><a name="l00372"></a><span class="lineno">  372</span> <span class="comment">*     (Given) Pointer to the first element of an array of double* containing</span></div>
-<div class="line"><a name="l00373"></a><span class="lineno">  373</span> <span class="comment">*     a scale used to renormalize the independent variables of the distortion</span></div>
-<div class="line"><a name="l00374"></a><span class="lineno">  374</span> <span class="comment">*     function for each axis.</span></div>
-<div class="line"><a name="l00375"></a><span class="lineno">  375</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00376"></a><span class="lineno">  376</span> <span class="comment">*     The scale is applied to the independent variables after the offsets are</span></div>
-<div class="line"><a name="l00377"></a><span class="lineno">  377</span> <span class="comment">*     subtracted.</span></div>
+<div class="line"><a name="l00371"></a><span class="lineno">  371</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00372"></a><span class="lineno">  372</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00373"></a><span class="lineno">  373</span> <span class="comment">*   avgdis    double[naxis]</span></div>
+<div class="line"><a name="l00374"></a><span class="lineno">  374</span> <span class="comment">*                       For each individual distortion function, the</span></div>
+<div class="line"><a name="l00375"></a><span class="lineno">  375</span> <span class="comment">*                       mean value of the distortion.</span></div>
+<div class="line"><a name="l00376"></a><span class="lineno">  376</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00377"></a><span class="lineno">  377</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
 <div class="line"><a name="l00378"></a><span class="lineno">  378</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00379"></a><span class="lineno">  379</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
-<div class="line"><a name="l00380"></a><span class="lineno">  380</span> <span class="comment">*     disprm::scale is changed.</span></div>
+<div class="line"><a name="l00379"></a><span class="lineno">  379</span> <span class="comment">*   avgtot    double*   For the combination of all distortion functions, the</span></div>
+<div class="line"><a name="l00380"></a><span class="lineno">  380</span> <span class="comment">*                       mean value of the distortion.</span></div>
 <div class="line"><a name="l00381"></a><span class="lineno">  381</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00382"></a><span class="lineno">  382</span> <span class="comment">*   int *nparm</span></div>
-<div class="line"><a name="l00383"></a><span class="lineno">  383</span> <span class="comment">*     (Given) Pointer to the first element of an array of int containing the</span></div>
-<div class="line"><a name="l00384"></a><span class="lineno">  384</span> <span class="comment">*     number of distortion parameters for each axis.</span></div>
-<div class="line"><a name="l00385"></a><span class="lineno">  385</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00386"></a><span class="lineno">  386</span> <span class="comment">*     The number of parameters specified must satisfy the requirements of the</span></div>
-<div class="line"><a name="l00387"></a><span class="lineno">  387</span> <span class="comment">*     particular distortion function.  For example, the polynomial distortion</span></div>
-<div class="line"><a name="l00388"></a><span class="lineno">  388</span> <span class="comment">*     associated with the TPV "projection" must have a number that corresponds</span></div>
-<div class="line"><a name="l00389"></a><span class="lineno">  389</span> <span class="comment">*     to the degree of the polynomial:</span></div>
-<div class="line"><a name="l00390"></a><span class="lineno">  390</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00391"></a><span class="lineno">  391</span> <span class="comment">=       Degree 1:   4</span></div>
-<div class="line"><a name="l00392"></a><span class="lineno">  392</span> <span class="comment">=              2:   7</span></div>
-<div class="line"><a name="l00393"></a><span class="lineno">  393</span> <span class="comment">=              3:  12</span></div>
-<div class="line"><a name="l00394"></a><span class="lineno">  394</span> <span class="comment">=              4:  17</span></div>
-<div class="line"><a name="l00395"></a><span class="lineno">  395</span> <span class="comment">=              5:  24</span></div>
-<div class="line"><a name="l00396"></a><span class="lineno">  396</span> <span class="comment">=              6:  31</span></div>
-<div class="line"><a name="l00397"></a><span class="lineno">  397</span> <span class="comment">=              7:  40</span></div>
-<div class="line"><a name="l00398"></a><span class="lineno">  398</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00399"></a><span class="lineno">  399</span> <span class="comment">*   double **parms</span></div>
-<div class="line"><a name="l00400"></a><span class="lineno">  400</span> <span class="comment">*     (Given) Pointer to the first element of an array of double* containing</span></div>
-<div class="line"><a name="l00401"></a><span class="lineno">  401</span> <span class="comment">*     pointers to the first elements of the arrays of distortion parameters</span></div>
-<div class="line"><a name="l00402"></a><span class="lineno">  402</span> <span class="comment">*     for each axis.</span></div>
+<div class="line"><a name="l00382"></a><span class="lineno">  382</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00383"></a><span class="lineno">  383</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00384"></a><span class="lineno">  384</span> <span class="comment">*   rmsdis    double[naxis]</span></div>
+<div class="line"><a name="l00385"></a><span class="lineno">  385</span> <span class="comment">*                       For each individual distortion function, the</span></div>
+<div class="line"><a name="l00386"></a><span class="lineno">  386</span> <span class="comment">*                       root mean square deviation of the distortion.</span></div>
+<div class="line"><a name="l00387"></a><span class="lineno">  387</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00388"></a><span class="lineno">  388</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00389"></a><span class="lineno">  389</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00390"></a><span class="lineno">  390</span> <span class="comment">*   rmstot    double*   For the combination of all distortion functions, the</span></div>
+<div class="line"><a name="l00391"></a><span class="lineno">  391</span> <span class="comment">*                       root mean square deviation of the distortion.</span></div>
+<div class="line"><a name="l00392"></a><span class="lineno">  392</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00393"></a><span class="lineno">  393</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00394"></a><span class="lineno">  394</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00395"></a><span class="lineno">  395</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00396"></a><span class="lineno">  396</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00397"></a><span class="lineno">  397</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00398"></a><span class="lineno">  398</span> <span class="comment">*                         1: Null disprm pointer passed.</span></div>
+<div class="line"><a name="l00399"></a><span class="lineno">  399</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00400"></a><span class="lineno">  400</span> <span class="comment">*                         3: Invalid parameter.</span></div>
+<div class="line"><a name="l00401"></a><span class="lineno">  401</span> <span class="comment">*                         4: Distort error.</span></div>
+<div class="line"><a name="l00402"></a><span class="lineno">  402</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00403"></a><span class="lineno">  403</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00404"></a><span class="lineno">  404</span> <span class="comment">*     disparms() may be used to allocate memory for these arrays.</span></div>
-<div class="line"><a name="l00405"></a><span class="lineno">  405</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00406"></a><span class="lineno">  406</span> <span class="comment">*   double *maxdis</span></div>
-<div class="line"><a name="l00407"></a><span class="lineno">  407</span> <span class="comment">*     (Given) Pointer to the first element of an array of double specifying</span></div>
-<div class="line"><a name="l00408"></a><span class="lineno">  408</span> <span class="comment">*     the maximum absolute value of the distortion for each axis computed over</span></div>
-<div class="line"><a name="l00409"></a><span class="lineno">  409</span> <span class="comment">*     the whole image.</span></div>
+<div class="line"><a name="l00404"></a><span class="lineno">  404</span> <span class="comment">* disprm struct - Distortion parameters</span></div>
+<div class="line"><a name="l00405"></a><span class="lineno">  405</span> <span class="comment">* -------------------------------------</span></div>
+<div class="line"><a name="l00406"></a><span class="lineno">  406</span> <span class="comment">* The disprm struct contains all of the information required to apply a set of</span></div>
+<div class="line"><a name="l00407"></a><span class="lineno">  407</span> <span class="comment">* distortion functions.  It consists of certain members that must be set by</span></div>
+<div class="line"><a name="l00408"></a><span class="lineno">  408</span> <span class="comment">* the user ("given") and others that are set by the WCSLIB routines</span></div>
+<div class="line"><a name="l00409"></a><span class="lineno">  409</span> <span class="comment">* ("returned").</span></div>
 <div class="line"><a name="l00410"></a><span class="lineno">  410</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00411"></a><span class="lineno">  411</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
-<div class="line"><a name="l00412"></a><span class="lineno">  412</span> <span class="comment">*     disprm::maxdis is changed.</span></div>
-<div class="line"><a name="l00413"></a><span class="lineno">  413</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00414"></a><span class="lineno">  414</span> <span class="comment">*   double totdis</span></div>
-<div class="line"><a name="l00415"></a><span class="lineno">  415</span> <span class="comment">*     (Given) The maximum absolute value of the combination of all distortion</span></div>
-<div class="line"><a name="l00416"></a><span class="lineno">  416</span> <span class="comment">*     functions specified as an offset in pixel coordinates computed over the</span></div>
-<div class="line"><a name="l00417"></a><span class="lineno">  417</span> <span class="comment">*     whole image.</span></div>
-<div class="line"><a name="l00418"></a><span class="lineno">  418</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00419"></a><span class="lineno">  419</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
-<div class="line"><a name="l00420"></a><span class="lineno">  420</span> <span class="comment">*     disprm::totdis is changed.</span></div>
-<div class="line"><a name="l00421"></a><span class="lineno">  421</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00422"></a><span class="lineno">  422</span> <span class="comment">*   struct wcserr *err</span></div>
-<div class="line"><a name="l00423"></a><span class="lineno">  423</span> <span class="comment">*     (Returned) If enabled, when an error status is returned, this struct</span></div>
-<div class="line"><a name="l00424"></a><span class="lineno">  424</span> <span class="comment">*     contains detailed information about the error, see wcserr_enable().</span></div>
-<div class="line"><a name="l00425"></a><span class="lineno">  425</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00426"></a><span class="lineno">  426</span> <span class="comment">*   int (**disp2x)(DISP2X_ARGS)</span></div>
-<div class="line"><a name="l00427"></a><span class="lineno">  427</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00428"></a><span class="lineno">  428</span> <span class="comment">*   int (**disx2p)(DISX2P_ARGS)</span></div>
-<div class="line"><a name="l00429"></a><span class="lineno">  429</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00430"></a><span class="lineno">  430</span> <span class="comment">*   double *tmpmem</span></div>
-<div class="line"><a name="l00431"></a><span class="lineno">  431</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00432"></a><span class="lineno">  432</span> <span class="comment">*   int **iwrk</span></div>
-<div class="line"><a name="l00433"></a><span class="lineno">  433</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00434"></a><span class="lineno">  434</span> <span class="comment">*   double **dwrk</span></div>
-<div class="line"><a name="l00435"></a><span class="lineno">  435</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00436"></a><span class="lineno">  436</span> <span class="comment">*   int m_flag</span></div>
-<div class="line"><a name="l00437"></a><span class="lineno">  437</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00438"></a><span class="lineno">  438</span> <span class="comment">*   int m_naxis</span></div>
-<div class="line"><a name="l00439"></a><span class="lineno">  439</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00440"></a><span class="lineno">  440</span> <span class="comment">*   char (*m_dtype)[16]</span></div>
-<div class="line"><a name="l00441"></a><span class="lineno">  441</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00442"></a><span class="lineno">  442</span> <span class="comment">*   int **m_axmap</span></div>
-<div class="line"><a name="l00443"></a><span class="lineno">  443</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00444"></a><span class="lineno">  444</span> <span class="comment">*   double **m_offset</span></div>
-<div class="line"><a name="l00445"></a><span class="lineno">  445</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00446"></a><span class="lineno">  446</span> <span class="comment">*   double **m_scale</span></div>
-<div class="line"><a name="l00447"></a><span class="lineno">  447</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00448"></a><span class="lineno">  448</span> <span class="comment">*   int *m_nparm</span></div>
-<div class="line"><a name="l00449"></a><span class="lineno">  449</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00450"></a><span class="lineno">  450</span> <span class="comment">*   double **m_parms</span></div>
-<div class="line"><a name="l00451"></a><span class="lineno">  451</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00452"></a><span class="lineno">  452</span> <span class="comment">*   double *m_maxdis</span></div>
-<div class="line"><a name="l00453"></a><span class="lineno">  453</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00454"></a><span class="lineno">  454</span> <span class="comment">*   int m_alloc</span></div>
-<div class="line"><a name="l00455"></a><span class="lineno">  455</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00456"></a><span class="lineno">  456</span> <span class="comment">*   int m_padding</span></div>
-<div class="line"><a name="l00457"></a><span class="lineno">  457</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00411"></a><span class="lineno">  411</span> <span class="comment">*   int flag</span></div>
+<div class="line"><a name="l00412"></a><span class="lineno">  412</span> <span class="comment">*     (Given and returned) This flag must be set to zero whenever any of the</span></div>
+<div class="line"><a name="l00413"></a><span class="lineno">  413</span> <span class="comment">*     following members of the disprm struct are set or modified:</span></div>
+<div class="line"><a name="l00414"></a><span class="lineno">  414</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00415"></a><span class="lineno">  415</span> <span class="comment">*       - disprm::naxis,</span></div>
+<div class="line"><a name="l00416"></a><span class="lineno">  416</span> <span class="comment">*       - disprm::dtype,</span></div>
+<div class="line"><a name="l00417"></a><span class="lineno">  417</span> <span class="comment">*       - disprm::axmap,</span></div>
+<div class="line"><a name="l00418"></a><span class="lineno">  418</span> <span class="comment">*       - disprm::nparm,</span></div>
+<div class="line"><a name="l00419"></a><span class="lineno">  419</span> <span class="comment">*       - disprm::parms.</span></div>
+<div class="line"><a name="l00420"></a><span class="lineno">  420</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00421"></a><span class="lineno">  421</span> <span class="comment">*     This signals the initialization routine, disset(), to recompute the</span></div>
+<div class="line"><a name="l00422"></a><span class="lineno">  422</span> <span class="comment">*     returned members of the disprm struct.  disset() will reset flag to</span></div>
+<div class="line"><a name="l00423"></a><span class="lineno">  423</span> <span class="comment">*     indicate that this has been done.</span></div>
+<div class="line"><a name="l00424"></a><span class="lineno">  424</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00425"></a><span class="lineno">  425</span> <span class="comment">*     PLEASE NOTE: flag must be set to -1 when disini() is called for the</span></div>
+<div class="line"><a name="l00426"></a><span class="lineno">  426</span> <span class="comment">*     first time for a particular disprm struct in order to initialize memory</span></div>
+<div class="line"><a name="l00427"></a><span class="lineno">  427</span> <span class="comment">*     management.  It must ONLY be used on the first initialization otherwise</span></div>
+<div class="line"><a name="l00428"></a><span class="lineno">  428</span> <span class="comment">*     memory leaks may result.</span></div>
+<div class="line"><a name="l00429"></a><span class="lineno">  429</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00430"></a><span class="lineno">  430</span> <span class="comment">*   int naxis</span></div>
+<div class="line"><a name="l00431"></a><span class="lineno">  431</span> <span class="comment">*     (Given or returned) Number of pixel and world coordinate elements.</span></div>
+<div class="line"><a name="l00432"></a><span class="lineno">  432</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00433"></a><span class="lineno">  433</span> <span class="comment">*     If disini() is used to initialize the disprm struct (as would normally</span></div>
+<div class="line"><a name="l00434"></a><span class="lineno">  434</span> <span class="comment">*     be the case) then it will set naxis from the value passed to it as a</span></div>
+<div class="line"><a name="l00435"></a><span class="lineno">  435</span> <span class="comment">*     function argument.  The user should not subsequently modify it.</span></div>
+<div class="line"><a name="l00436"></a><span class="lineno">  436</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00437"></a><span class="lineno">  437</span> <span class="comment">*   char (*dtype)[16]</span></div>
+<div class="line"><a name="l00438"></a><span class="lineno">  438</span> <span class="comment">*     (Given) Pointer to the first element of an array of char[16] containing</span></div>
+<div class="line"><a name="l00439"></a><span class="lineno">  439</span> <span class="comment">*     the name of the distortion function for each axis.</span></div>
+<div class="line"><a name="l00440"></a><span class="lineno">  440</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00441"></a><span class="lineno">  441</span> <span class="comment">*   int **axmap</span></div>
+<div class="line"><a name="l00442"></a><span class="lineno">  442</span> <span class="comment">*     (Given) Pointer to the first element of an array of int* containing</span></div>
+<div class="line"><a name="l00443"></a><span class="lineno">  443</span> <span class="comment">*     pointers to the first elements of the axis mapping arrays for each axis.</span></div>
+<div class="line"><a name="l00444"></a><span class="lineno">  444</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00445"></a><span class="lineno">  445</span> <span class="comment">*     An axis mapping associates the independent variables of a distortion</span></div>
+<div class="line"><a name="l00446"></a><span class="lineno">  446</span> <span class="comment">*     function with the 1-relative image axis number.  For example, consider</span></div>
+<div class="line"><a name="l00447"></a><span class="lineno">  447</span> <span class="comment">*     an image with a spectrum on the first axis, followed by RA, Dec, and</span></div>
+<div class="line"><a name="l00448"></a><span class="lineno">  448</span> <span class="comment">*     time axes.  For a distortion in (RA,Dec) and no distortion on the</span></div>
+<div class="line"><a name="l00449"></a><span class="lineno">  449</span> <span class="comment">*     spectral or time axes, the axis mapping arrays, axmap[j][], would be</span></div>
+<div class="line"><a name="l00450"></a><span class="lineno">  450</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00451"></a><span class="lineno">  451</span> <span class="comment">=       j=0: [0, 0, 0, 0]   ...no  distortion on spectral axis,</span></div>
+<div class="line"><a name="l00452"></a><span class="lineno">  452</span> <span class="comment">=         1: [2, 3, 0, 0]   ...RA  distortion depends on RA and Dec,</span></div>
+<div class="line"><a name="l00453"></a><span class="lineno">  453</span> <span class="comment">=         2: [3, 2, 0, 0]   ...Dec distortion depends on Dec and RA,</span></div>
+<div class="line"><a name="l00454"></a><span class="lineno">  454</span> <span class="comment">=         3: [0, 0, 0, 0]   ...no  distortion on time axis,</span></div>
+<div class="line"><a name="l00455"></a><span class="lineno">  455</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00456"></a><span class="lineno">  456</span> <span class="comment">*     where zero indicates that there is no corresponding independent</span></div>
+<div class="line"><a name="l00457"></a><span class="lineno">  457</span> <span class="comment">*     variable.</span></div>
 <div class="line"><a name="l00458"></a><span class="lineno">  458</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00459"></a><span class="lineno">  459</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00460"></a><span class="lineno">  460</span> <span class="comment">* Global variable: const char *dis_errmsg[] - Status return messages</span></div>
-<div class="line"><a name="l00461"></a><span class="lineno">  461</span> <span class="comment">* ------------------------------------------------------------------</span></div>
-<div class="line"><a name="l00462"></a><span class="lineno">  462</span> <span class="comment">* Error messages to match the status value returned from each function.</span></div>
+<div class="line"><a name="l00459"></a><span class="lineno">  459</span> <span class="comment">*   double **offset</span></div>
+<div class="line"><a name="l00460"></a><span class="lineno">  460</span> <span class="comment">*     (Given) Pointer to the first element of an array of double* containing</span></div>
+<div class="line"><a name="l00461"></a><span class="lineno">  461</span> <span class="comment">*     an offset used to renormalize the independent variables of the</span></div>
+<div class="line"><a name="l00462"></a><span class="lineno">  462</span> <span class="comment">*     distortion function for each axis.</span></div>
 <div class="line"><a name="l00463"></a><span class="lineno">  463</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00464"></a><span class="lineno">  464</span> <span class="comment">*===========================================================================*/</span></div>
-<div class="line"><a name="l00465"></a><span class="lineno">  465</span> </div>
-<div class="line"><a name="l00466"></a><span class="lineno">  466</span> <span class="preprocessor">#ifndef WCSLIB_DIS</span></div>
-<div class="line"><a name="l00467"></a><span class="lineno">  467</span> <span class="preprocessor">#define WCSLIB_DIS</span></div>
-<div class="line"><a name="l00468"></a><span class="lineno">  468</span> </div>
-<div class="line"><a name="l00469"></a><span class="lineno">  469</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
-<div class="line"><a name="l00470"></a><span class="lineno">  470</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
-<div class="line"><a name="l00471"></a><span class="lineno">  471</span> <span class="preprocessor">#endif</span></div>
-<div class="line"><a name="l00472"></a><span class="lineno">  472</span> </div>
-<div class="line"><a name="l00473"></a><span class="lineno">  473</span> </div>
-<div class="line"><a name="l00474"></a><span class="lineno">  474</span> <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="dis_8h.html#a6f125a402553f5dab46435299f0742a3">dis_errmsg</a>[];</div>
-<div class="line"><a name="l00475"></a><span class="lineno">  475</span> </div>
-<div class="line"><a name="l00476"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fd">  476</a></span> <span class="keyword">enum</span> <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fd">dis_errmsg_enum</a> {</div>
-<div class="line"><a name="l00477"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8">  477</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8">DISERR_SUCCESS</a>      = 0,      <span class="comment">/* Success. */</span></div>
-<div class="line"><a name="l00478"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46">  478</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46">DISERR_NULL_POINTER</a> = 1,      <span class="comment">/* Null disprm pointer passed. */</span></div>
-<div class="line"><a name="l00479"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80">  479</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80">DISERR_MEMORY</a>       = 2,      <span class="comment">/* Memory allocation failed. */</span></div>
-<div class="line"><a name="l00480"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0">  480</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0">DISERR_BAD_PARAM</a>    = 3,      <span class="comment">/* Invalid parameter value. */</span></div>
-<div class="line"><a name="l00481"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579">  481</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579">DISERR_DISTORT</a>      = 4,      <span class="comment">/* Distortion error. */</span></div>
-<div class="line"><a name="l00482"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a">  482</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a">DISERR_DEDISTORT</a>    = 5       <span class="comment">/* De-distortion error. */</span></div>
-<div class="line"><a name="l00483"></a><span class="lineno">  483</span> };</div>
-<div class="line"><a name="l00484"></a><span class="lineno">  484</span> </div>
-<div class="line"><a name="l00485"></a><span class="lineno">  485</span> <span class="comment">/* For use in declaring distortion function prototypes. */</span></div>
-<div class="line"><a name="l00486"></a><span class="lineno"><a class="line" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">  486</a></span> <span class="preprocessor">#define DISP2X_ARGS int nparm, const double parms[], int ncrd, \</span></div>
-<div class="line"><a name="l00487"></a><span class="lineno">  487</span> <span class="preprocessor">const double rawcrd[], double *discrd</span></div>
-<div class="line"><a name="l00488"></a><span class="lineno">  488</span> </div>
-<div class="line"><a name="l00489"></a><span class="lineno">  489</span> <span class="comment">/* For use in declaring de-distortion function prototypes. */</span></div>
-<div class="line"><a name="l00490"></a><span class="lineno"><a class="line" href="dis_8h.html#ac593cd79fb7f89b1c7395d0ecf2f7876">  490</a></span> <span class="preprocessor">#define DISX2P_ARGS int nparm, const double parms[], int ncrd, \</span></div>
-<div class="line"><a name="l00491"></a><span class="lineno">  491</span> <span class="preprocessor">const double discrd[], double rawcrd[]</span></div>
-<div class="line"><a name="l00492"></a><span class="lineno">  492</span> </div>
-<div class="line"><a name="l00493"></a><span class="lineno">  493</span> </div>
-<div class="line"><a name="l00494"></a><span class="lineno"><a class="line" href="structdisprm.html">  494</a></span> <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> {</div>
-<div class="line"><a name="l00495"></a><span class="lineno">  495</span>   <span class="comment">/* Initialization flag (see the prologue above).                          */</span></div>
-<div class="line"><a name="l00496"></a><span class="lineno">  496</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00497"></a><span class="lineno"><a class="line" href="structdisprm.html#a4d6ba28bee2fc636f4b2b9ca4b50b0a4">  497</a></span>   <span class="keywordtype">int</span> <a class="code" href="structdisprm.html#a4d6ba28bee2fc636f4b2b9ca4b50b0a4">flag</a>;                     <span class="comment">/* Set to zero to force initialization.     */</span></div>
-<div class="line"><a name="l00498"></a><span class="lineno">  498</span> </div>
-<div class="line"><a name="l00499"></a><span class="lineno">  499</span>   <span class="comment">/* Parameters to be provided (see the prologue above).                    */</span></div>
-<div class="line"><a name="l00500"></a><span class="lineno">  500</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00501"></a><span class="lineno"><a class="line" href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">  501</a></span>   <span class="keywordtype">int</span> <a class="code" href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">naxis</a>;                    <span class="comment">/* The number of pixel coordinate elements, */</span></div>
-<div class="line"><a name="l00502"></a><span class="lineno">  502</span>                                 <span class="comment">/* given by NAXIS.                          */</span></div>
-<div class="line"><a name="l00503"></a><span class="lineno"><a class="line" href="structdisprm.html#a0d3386f4226b13c77deb97610ffeecb1">  503</a></span>   char   (*<a class="code" href="structdisprm.html#a0d3386f4226b13c77deb97610ffeecb1">dtype</a>)[16];          <span class="comment">/* For each axis, the distortion type.      */</span></div>
-<div class="line"><a name="l00504"></a><span class="lineno"><a class="line" href="structdisprm.html#ab62d14319c82c93c70d290728cab78c4">  504</a></span>   <span class="keywordtype">int</span>    **<a class="code" href="structdisprm.html#ab62d14319c82c93c70d290728cab78c4">axmap</a>;               <span class="comment">/* For each axis, the axis mapping array.   */</span></div>
-<div class="line"><a name="l00505"></a><span class="lineno"><a class="line" href="structdisprm.html#a8b0ac30436d7bb3e12e0ca1c64fda337">  505</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a8b0ac30436d7bb3e12e0ca1c64fda337">offset</a>;              <span class="comment">/* For each axis, renormalization offset.   */</span></div>
-<div class="line"><a name="l00506"></a><span class="lineno"><a class="line" href="structdisprm.html#a1f7b541d7130698acc6781b7ca83dab8">  506</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a1f7b541d7130698acc6781b7ca83dab8">scale</a>;               <span class="comment">/* For each axis, renormalization scale.    */</span></div>
-<div class="line"><a name="l00507"></a><span class="lineno"><a class="line" href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">  507</a></span>   <span class="keywordtype">int</span>    *<a class="code" href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">nparm</a>;                <span class="comment">/* For each axis, the number of distortion  */</span></div>
-<div class="line"><a name="l00508"></a><span class="lineno">  508</span>                                 <span class="comment">/* parameters.                              */</span></div>
-<div class="line"><a name="l00509"></a><span class="lineno"><a class="line" href="structdisprm.html#a25efb5ab856ffa06135a5d429e1c6b02">  509</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a25efb5ab856ffa06135a5d429e1c6b02">parms</a>;               <span class="comment">/* For each axis, the array of distortion   */</span></div>
-<div class="line"><a name="l00510"></a><span class="lineno">  510</span>                                 <span class="comment">/* parameters.                              */</span></div>
-<div class="line"><a name="l00511"></a><span class="lineno"><a class="line" href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">  511</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">maxdis</a>;               <span class="comment">/* For each axis, the maximum distortion.   */</span></div>
-<div class="line"><a name="l00512"></a><span class="lineno"><a class="line" href="structdisprm.html#a10a16217368a5cdd34d802fff442f383">  512</a></span>   <span class="keywordtype">double</span> <a class="code" href="structdisprm.html#a10a16217368a5cdd34d802fff442f383">totdis</a>;                <span class="comment">/* The maximum combined distortion.         */</span></div>
-<div class="line"><a name="l00513"></a><span class="lineno">  513</span> </div>
-<div class="line"><a name="l00514"></a><span class="lineno">  514</span>   <span class="comment">/* Error handling, if enabled.                                            */</span></div>
-<div class="line"><a name="l00515"></a><span class="lineno">  515</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00516"></a><span class="lineno"><a class="line" href="structdisprm.html#a40a81085335f9d9aa617eb9605ae9421">  516</a></span>   <span class="keyword">struct </span><a class="code" href="structwcserr.html">wcserr</a> *<a class="code" href="structdisprm.html#a40a81085335f9d9aa617eb9605ae9421">err</a>;</div>
-<div class="line"><a name="l00517"></a><span class="lineno">  517</span> </div>
-<div class="line"><a name="l00518"></a><span class="lineno">  518</span>   <span class="comment">/* Private - the remainder are for internal use.                          */</span></div>
-<div class="line"><a name="l00519"></a><span class="lineno">  519</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00520"></a><span class="lineno"><a class="line" href="structdisprm.html#a43a6e8d5c70b82c5eb573de7e0d2fbfa">  520</a></span>   int (**<a class="code" href="structdisprm.html#a43a6e8d5c70b82c5eb573de7e0d2fbfa">disp2x</a>)(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);  <span class="comment">/* For each axis, pointers to the           */</span></div>
-<div class="line"><a name="l00521"></a><span class="lineno"><a class="line" href="structdisprm.html#ae627d5f290ed7ad85d3665cf28c5dbf4">  521</a></span>   int (**<a class="code" href="structdisprm.html#ae627d5f290ed7ad85d3665cf28c5dbf4">disx2p</a>)(<a class="code" href="dis_8h.html#ac593cd79fb7f89b1c7395d0ecf2f7876">DISX2P_ARGS</a>);  <span class="comment">/* distortion function and its inverse.     */</span></div>
-<div class="line"><a name="l00522"></a><span class="lineno">  522</span> </div>
-<div class="line"><a name="l00523"></a><span class="lineno"><a class="line" href="structdisprm.html#a7f80d2d542c266d14a336c13d2ebeab2">  523</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structdisprm.html#a7f80d2d542c266d14a336c13d2ebeab2">tmpmem</a>;</div>
-<div class="line"><a name="l00524"></a><span class="lineno"><a class="line" href="structdisprm.html#a711121ef59301a0eaf3b6025d8259bd7">  524</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a711121ef59301a0eaf3b6025d8259bd7">iwrk</a>;</div>
-<div class="line"><a name="l00525"></a><span class="lineno"><a class="line" href="structdisprm.html#a5002d95480beaa900deae051ec7e45b1">  525</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a5002d95480beaa900deae051ec7e45b1">dwrk</a>;</div>
-<div class="line"><a name="l00526"></a><span class="lineno">  526</span> </div>
-<div class="line"><a name="l00527"></a><span class="lineno"><a class="line" href="structdisprm.html#a6a8b2e3fc58d8f21668a82a93b199712">  527</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structdisprm.html#afb5079136a7ec5ae4effef9790e31439">m_flag</a>, <a class="code" href="structdisprm.html#a6a8b2e3fc58d8f21668a82a93b199712">m_naxis</a>;       <span class="comment">/* The remainder are for memory management. */</span></div>
-<div class="line"><a name="l00528"></a><span class="lineno"><a class="line" href="structdisprm.html#a5f720fe9e047c9bfc3118ea43fcb193a">  528</a></span>   char   (*<a class="code" href="structdisprm.html#a5f720fe9e047c9bfc3118ea43fcb193a">m_dtype</a>)[16];</div>
-<div class="line"><a name="l00529"></a><span class="lineno"><a class="line" href="structdisprm.html#a66547c34ec789c7efe10dc8f78295602">  529</a></span>   <span class="keywordtype">int</span>    **<a class="code" href="structdisprm.html#a66547c34ec789c7efe10dc8f78295602">m_axmap</a>;</div>
-<div class="line"><a name="l00530"></a><span class="lineno"><a class="line" href="structdisprm.html#ad86b9715da25195e7a345ccf631ff87a">  530</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a11c48b7be30b22236cdae89cb47a6317">m_offset</a>, **<a class="code" href="structdisprm.html#ad86b9715da25195e7a345ccf631ff87a">m_scale</a>;</div>
-<div class="line"><a name="l00531"></a><span class="lineno"><a class="line" href="structdisprm.html#ac54a69ee59f8c525309df6761ffadfed">  531</a></span>   <span class="keywordtype">int</span>    *<a class="code" href="structdisprm.html#ac54a69ee59f8c525309df6761ffadfed">m_nparm</a>;</div>
-<div class="line"><a name="l00532"></a><span class="lineno"><a class="line" href="structdisprm.html#a64b9a5952a1a87ccd6b2533757c5ae36">  532</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a64b9a5952a1a87ccd6b2533757c5ae36">m_parms</a>;</div>
-<div class="line"><a name="l00533"></a><span class="lineno"><a class="line" href="structdisprm.html#a4f692b3bb436ceab5861ec9566d127e4">  533</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structdisprm.html#a4f692b3bb436ceab5861ec9566d127e4">m_maxdis</a>;</div>
-<div class="line"><a name="l00534"></a><span class="lineno"><a class="line" href="structdisprm.html#a01ec67e521b93c377aa76248b955bebc">  534</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structdisprm.html#a9d200cabe1a6a192f44a17535917cd3c">m_alloc</a>, <a class="code" href="structdisprm.html#a01ec67e521b93c377aa76248b955bebc">m_padding</a>;</div>
-<div class="line"><a name="l00535"></a><span class="lineno">  535</span> };</div>
-<div class="line"><a name="l00536"></a><span class="lineno">  536</span> </div>
-<div class="line"><a name="l00537"></a><span class="lineno">  537</span> <span class="comment">/* Size of the disprm struct in int units, used by the Fortran wrappers. */</span></div>
-<div class="line"><a name="l00538"></a><span class="lineno"><a class="line" href="dis_8h.html#a5df41117cb392fc0c5d051002b441aa9">  538</a></span> <span class="preprocessor">#define DISLEN (sizeof(struct disprm)/sizeof(int))</span></div>
-<div class="line"><a name="l00539"></a><span class="lineno">  539</span> </div>
-<div class="line"><a name="l00540"></a><span class="lineno">  540</span> </div>
-<div class="line"><a name="l00541"></a><span class="lineno">  541</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a8896e2a5330e55cd85da4a28ed6ee463">disini</a>(<span class="keywordtype">int</span> alloc, <span class="keywordtype">int</span> naxis, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
-<div class="line"><a name="l00542"></a><span class="lineno">  542</span> </div>
-<div class="line"><a name="l00543"></a><span class="lineno">  543</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#acb2f2341971a191fdbea544602405723">disparms</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
-<div class="line"><a name="l00544"></a><span class="lineno">  544</span> </div>
-<div class="line"><a name="l00545"></a><span class="lineno">  545</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a42e03676a3def43ef6b936cd7beb4dd5">discpy</a>(<span class="keywordtype">int</span> alloc, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dissrc, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *disdst);</div>
-<div class="line"><a name="l00546"></a><span class="lineno">  546</span> </div>
-<div class="line"><a name="l00547"></a><span class="lineno">  547</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a83b98d0f6429f4f19024675645026187">disfree</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
-<div class="line"><a name="l00548"></a><span class="lineno">  548</span> </div>
-<div class="line"><a name="l00549"></a><span class="lineno">  549</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#aeee35e0d5183e74f20c64526d908886b">disprt</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
-<div class="line"><a name="l00550"></a><span class="lineno">  550</span> </div>
-<div class="line"><a name="l00551"></a><span class="lineno">  551</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#ad1bdf4497eb4513ca8431e1baa419041">disset</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
-<div class="line"><a name="l00552"></a><span class="lineno">  552</span> </div>
-<div class="line"><a name="l00553"></a><span class="lineno">  553</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a135726e4c4c5bc00e2eba865ab202201">disp2x</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis, <span class="keyword">const</span> <span class="keywordtype">double</span> rawcrd[], <span class="keywordtype">double</span> discrd[]);</div>
-<div class="line"><a name="l00554"></a><span class="lineno">  554</span> </div>
-<div class="line"><a name="l00555"></a><span class="lineno">  555</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653">disx2p</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis, <span class="keyword">const</span> <span class="keywordtype">double</span> discrd[], <span class="keywordtype">double</span> rawcrd[]);</div>
-<div class="line"><a name="l00556"></a><span class="lineno">  556</span> </div>
-<div class="line"><a name="l00557"></a><span class="lineno">  557</span> </div>
-<div class="line"><a name="l00558"></a><span class="lineno">  558</span> <span class="comment">/* Specialist distortion functions (internal use only). */</span></div>
-<div class="line"><a name="l00559"></a><span class="lineno">  559</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a402a8a2a75907d0849cee87a0d72b5f5">tpvset</a>(<span class="keywordtype">int</span> j, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
-<div class="line"><a name="l00560"></a><span class="lineno">  560</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a4182d3cd45a022e930c44c4f933c0639">tpv1</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
-<div class="line"><a name="l00561"></a><span class="lineno">  561</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a961d359c77ef6d9e4d2f2f14a53d0b39">tpv2</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
-<div class="line"><a name="l00562"></a><span class="lineno">  562</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a5d5f35665cd05c17322147bf483ec914">tpv3</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
-<div class="line"><a name="l00563"></a><span class="lineno">  563</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#afca391dcab0909f05654f99505f2a4fb">tpv4</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
-<div class="line"><a name="l00564"></a><span class="lineno">  564</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a393642b85f8a7da45a0447c81a20202d">tpv5</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
-<div class="line"><a name="l00565"></a><span class="lineno">  565</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a4c12eaf2bad14222de4213f69206c7a8">tpv6</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
-<div class="line"><a name="l00566"></a><span class="lineno">  566</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a952910ebfd260e7d9b59e134674f8f26">tpv7</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
-<div class="line"><a name="l00567"></a><span class="lineno">  567</span> </div>
-<div class="line"><a name="l00568"></a><span class="lineno">  568</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
-<div class="line"><a name="l00569"></a><span class="lineno">  569</span> }</div>
-<div class="line"><a name="l00570"></a><span class="lineno">  570</span> <span class="preprocessor">#endif</span></div>
-<div class="line"><a name="l00571"></a><span class="lineno">  571</span> </div>
-<div class="line"><a name="l00572"></a><span class="lineno">  572</span> <span class="preprocessor">#endif </span><span class="comment">/* WCSLIB_DIS */</span><span class="preprocessor"></span></div>
-<div class="ttc" id="structdisprm_html_a4d6ba28bee2fc636f4b2b9ca4b50b0a4"><div class="ttname"><a href="structdisprm.html#a4d6ba28bee2fc636f4b2b9ca4b50b0a4">disprm::flag</a></div><div class="ttdeci">int flag</div><div class="ttdef"><b>Definition:</b> dis.h:497</div></div>
+<div class="line"><a name="l00464"></a><span class="lineno">  464</span> <span class="comment">*     The offsets are subtracted from the independent variables before</span></div>
+<div class="line"><a name="l00465"></a><span class="lineno">  465</span> <span class="comment">*     scaling.</span></div>
+<div class="line"><a name="l00466"></a><span class="lineno">  466</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00467"></a><span class="lineno">  467</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
+<div class="line"><a name="l00468"></a><span class="lineno">  468</span> <span class="comment">*     disprm::offset is changed.</span></div>
+<div class="line"><a name="l00469"></a><span class="lineno">  469</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00470"></a><span class="lineno">  470</span> <span class="comment">*   double **scale</span></div>
+<div class="line"><a name="l00471"></a><span class="lineno">  471</span> <span class="comment">*     (Given) Pointer to the first element of an array of double* containing</span></div>
+<div class="line"><a name="l00472"></a><span class="lineno">  472</span> <span class="comment">*     a scale used to renormalize the independent variables of the distortion</span></div>
+<div class="line"><a name="l00473"></a><span class="lineno">  473</span> <span class="comment">*     function for each axis.</span></div>
+<div class="line"><a name="l00474"></a><span class="lineno">  474</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00475"></a><span class="lineno">  475</span> <span class="comment">*     The scale is applied to the independent variables after the offsets are</span></div>
+<div class="line"><a name="l00476"></a><span class="lineno">  476</span> <span class="comment">*     subtracted.</span></div>
+<div class="line"><a name="l00477"></a><span class="lineno">  477</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00478"></a><span class="lineno">  478</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
+<div class="line"><a name="l00479"></a><span class="lineno">  479</span> <span class="comment">*     disprm::scale is changed.</span></div>
+<div class="line"><a name="l00480"></a><span class="lineno">  480</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00481"></a><span class="lineno">  481</span> <span class="comment">*   int *nparm</span></div>
+<div class="line"><a name="l00482"></a><span class="lineno">  482</span> <span class="comment">*     (Given) Pointer to the first element of an array of int containing the</span></div>
+<div class="line"><a name="l00483"></a><span class="lineno">  483</span> <span class="comment">*     number of distortion parameters for each axis.</span></div>
+<div class="line"><a name="l00484"></a><span class="lineno">  484</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00485"></a><span class="lineno">  485</span> <span class="comment">*     The number of parameters specified must satisfy the requirements of the</span></div>
+<div class="line"><a name="l00486"></a><span class="lineno">  486</span> <span class="comment">*     particular distortion function.  For example, the polynomial distortion</span></div>
+<div class="line"><a name="l00487"></a><span class="lineno">  487</span> <span class="comment">*     associated with the TPV "projection" must have a number that corresponds</span></div>
+<div class="line"><a name="l00488"></a><span class="lineno">  488</span> <span class="comment">*     to the degree of the polynomial:</span></div>
+<div class="line"><a name="l00489"></a><span class="lineno">  489</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00490"></a><span class="lineno">  490</span> <span class="comment">=       Degree 1:   4</span></div>
+<div class="line"><a name="l00491"></a><span class="lineno">  491</span> <span class="comment">=              2:   7</span></div>
+<div class="line"><a name="l00492"></a><span class="lineno">  492</span> <span class="comment">=              3:  12</span></div>
+<div class="line"><a name="l00493"></a><span class="lineno">  493</span> <span class="comment">=              4:  17</span></div>
+<div class="line"><a name="l00494"></a><span class="lineno">  494</span> <span class="comment">=              5:  24</span></div>
+<div class="line"><a name="l00495"></a><span class="lineno">  495</span> <span class="comment">=              6:  31</span></div>
+<div class="line"><a name="l00496"></a><span class="lineno">  496</span> <span class="comment">=              7:  40</span></div>
+<div class="line"><a name="l00497"></a><span class="lineno">  497</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00498"></a><span class="lineno">  498</span> <span class="comment">*   double **parms</span></div>
+<div class="line"><a name="l00499"></a><span class="lineno">  499</span> <span class="comment">*     (Given) Pointer to the first element of an array of double* containing</span></div>
+<div class="line"><a name="l00500"></a><span class="lineno">  500</span> <span class="comment">*     pointers to the first elements of the arrays of distortion parameters</span></div>
+<div class="line"><a name="l00501"></a><span class="lineno">  501</span> <span class="comment">*     for each axis.</span></div>
+<div class="line"><a name="l00502"></a><span class="lineno">  502</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00503"></a><span class="lineno">  503</span> <span class="comment">*     disparms() may be used to allocate memory for these arrays.</span></div>
+<div class="line"><a name="l00504"></a><span class="lineno">  504</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00505"></a><span class="lineno">  505</span> <span class="comment">*   double *maxdis</span></div>
+<div class="line"><a name="l00506"></a><span class="lineno">  506</span> <span class="comment">*     (Given) Pointer to the first element of an array of double specifying</span></div>
+<div class="line"><a name="l00507"></a><span class="lineno">  507</span> <span class="comment">*     the maximum absolute value of the distortion for each axis computed over</span></div>
+<div class="line"><a name="l00508"></a><span class="lineno">  508</span> <span class="comment">*     the whole image.</span></div>
+<div class="line"><a name="l00509"></a><span class="lineno">  509</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00510"></a><span class="lineno">  510</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
+<div class="line"><a name="l00511"></a><span class="lineno">  511</span> <span class="comment">*     disprm::maxdis is changed.</span></div>
+<div class="line"><a name="l00512"></a><span class="lineno">  512</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00513"></a><span class="lineno">  513</span> <span class="comment">*   double totdis</span></div>
+<div class="line"><a name="l00514"></a><span class="lineno">  514</span> <span class="comment">*     (Given) The maximum absolute value of the combination of all distortion</span></div>
+<div class="line"><a name="l00515"></a><span class="lineno">  515</span> <span class="comment">*     functions specified as an offset in pixel coordinates computed over the</span></div>
+<div class="line"><a name="l00516"></a><span class="lineno">  516</span> <span class="comment">*     whole image.</span></div>
+<div class="line"><a name="l00517"></a><span class="lineno">  517</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00518"></a><span class="lineno">  518</span> <span class="comment">*     It is not necessary to reset the disprm struct (via disset()) when</span></div>
+<div class="line"><a name="l00519"></a><span class="lineno">  519</span> <span class="comment">*     disprm::totdis is changed.</span></div>
+<div class="line"><a name="l00520"></a><span class="lineno">  520</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00521"></a><span class="lineno">  521</span> <span class="comment">*   int ndis</span></div>
+<div class="line"><a name="l00522"></a><span class="lineno">  522</span> <span class="comment">*     (Returned) The number of distortion functions.</span></div>
+<div class="line"><a name="l00523"></a><span class="lineno">  523</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00524"></a><span class="lineno">  524</span> <span class="comment">*   int padding</span></div>
+<div class="line"><a name="l00525"></a><span class="lineno">  525</span> <span class="comment">*     (An unused variable inserted for alignment purposes only.)</span></div>
+<div class="line"><a name="l00526"></a><span class="lineno">  526</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00527"></a><span class="lineno">  527</span> <span class="comment">*   struct wcserr *err</span></div>
+<div class="line"><a name="l00528"></a><span class="lineno">  528</span> <span class="comment">*     (Returned) If enabled, when an error status is returned, this struct</span></div>
+<div class="line"><a name="l00529"></a><span class="lineno">  529</span> <span class="comment">*     contains detailed information about the error, see wcserr_enable().</span></div>
+<div class="line"><a name="l00530"></a><span class="lineno">  530</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00531"></a><span class="lineno">  531</span> <span class="comment">*   int (**disp2x)(DISP2X_ARGS)</span></div>
+<div class="line"><a name="l00532"></a><span class="lineno">  532</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00533"></a><span class="lineno">  533</span> <span class="comment">*   int (**disx2p)(DISX2P_ARGS)</span></div>
+<div class="line"><a name="l00534"></a><span class="lineno">  534</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00535"></a><span class="lineno">  535</span> <span class="comment">*   double *tmpmem</span></div>
+<div class="line"><a name="l00536"></a><span class="lineno">  536</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00537"></a><span class="lineno">  537</span> <span class="comment">*   int **iwrk</span></div>
+<div class="line"><a name="l00538"></a><span class="lineno">  538</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00539"></a><span class="lineno">  539</span> <span class="comment">*   double **dwrk</span></div>
+<div class="line"><a name="l00540"></a><span class="lineno">  540</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00541"></a><span class="lineno">  541</span> <span class="comment">*   int m_flag</span></div>
+<div class="line"><a name="l00542"></a><span class="lineno">  542</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00543"></a><span class="lineno">  543</span> <span class="comment">*   int m_naxis</span></div>
+<div class="line"><a name="l00544"></a><span class="lineno">  544</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00545"></a><span class="lineno">  545</span> <span class="comment">*   char (*m_dtype)[16]</span></div>
+<div class="line"><a name="l00546"></a><span class="lineno">  546</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00547"></a><span class="lineno">  547</span> <span class="comment">*   int **m_axmap</span></div>
+<div class="line"><a name="l00548"></a><span class="lineno">  548</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00549"></a><span class="lineno">  549</span> <span class="comment">*   double **m_offset</span></div>
+<div class="line"><a name="l00550"></a><span class="lineno">  550</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00551"></a><span class="lineno">  551</span> <span class="comment">*   double **m_scale</span></div>
+<div class="line"><a name="l00552"></a><span class="lineno">  552</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00553"></a><span class="lineno">  553</span> <span class="comment">*   int *m_nparm</span></div>
+<div class="line"><a name="l00554"></a><span class="lineno">  554</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00555"></a><span class="lineno">  555</span> <span class="comment">*   double **m_parms</span></div>
+<div class="line"><a name="l00556"></a><span class="lineno">  556</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00557"></a><span class="lineno">  557</span> <span class="comment">*   double *m_maxdis</span></div>
+<div class="line"><a name="l00558"></a><span class="lineno">  558</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00559"></a><span class="lineno">  559</span> <span class="comment">*   int m_alloc</span></div>
+<div class="line"><a name="l00560"></a><span class="lineno">  560</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00561"></a><span class="lineno">  561</span> <span class="comment">*   int m_padding</span></div>
+<div class="line"><a name="l00562"></a><span class="lineno">  562</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00563"></a><span class="lineno">  563</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00564"></a><span class="lineno">  564</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00565"></a><span class="lineno">  565</span> <span class="comment">* Global variable: const char *dis_errmsg[] - Status return messages</span></div>
+<div class="line"><a name="l00566"></a><span class="lineno">  566</span> <span class="comment">* ------------------------------------------------------------------</span></div>
+<div class="line"><a name="l00567"></a><span class="lineno">  567</span> <span class="comment">* Error messages to match the status value returned from each function.</span></div>
+<div class="line"><a name="l00568"></a><span class="lineno">  568</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00569"></a><span class="lineno">  569</span> <span class="comment">*===========================================================================*/</span></div>
+<div class="line"><a name="l00570"></a><span class="lineno">  570</span> </div>
+<div class="line"><a name="l00571"></a><span class="lineno">  571</span> <span class="preprocessor">#ifndef WCSLIB_DIS</span></div>
+<div class="line"><a name="l00572"></a><span class="lineno">  572</span> <span class="preprocessor">#define WCSLIB_DIS</span></div>
+<div class="line"><a name="l00573"></a><span class="lineno">  573</span> </div>
+<div class="line"><a name="l00574"></a><span class="lineno">  574</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a name="l00575"></a><span class="lineno">  575</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
+<div class="line"><a name="l00576"></a><span class="lineno">  576</span> <span class="preprocessor">#endif</span></div>
+<div class="line"><a name="l00577"></a><span class="lineno">  577</span> </div>
+<div class="line"><a name="l00578"></a><span class="lineno">  578</span> </div>
+<div class="line"><a name="l00579"></a><span class="lineno">  579</span> <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="dis_8h.html#a6f125a402553f5dab46435299f0742a3">dis_errmsg</a>[];</div>
+<div class="line"><a name="l00580"></a><span class="lineno">  580</span> </div>
+<div class="line"><a name="l00581"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fd">  581</a></span> <span class="keyword">enum</span> <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fd">dis_errmsg_enum</a> {</div>
+<div class="line"><a name="l00582"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8">  582</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8">DISERR_SUCCESS</a>      = 0,      <span class="comment">/* Success. */</span></div>
+<div class="line"><a name="l00583"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46">  583</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46">DISERR_NULL_POINTER</a> = 1,      <span class="comment">/* Null disprm pointer passed. */</span></div>
+<div class="line"><a name="l00584"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80">  584</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80">DISERR_MEMORY</a>       = 2,      <span class="comment">/* Memory allocation failed. */</span></div>
+<div class="line"><a name="l00585"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0">  585</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0">DISERR_BAD_PARAM</a>    = 3,      <span class="comment">/* Invalid parameter value. */</span></div>
+<div class="line"><a name="l00586"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579">  586</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579">DISERR_DISTORT</a>      = 4,      <span class="comment">/* Distortion error. */</span></div>
+<div class="line"><a name="l00587"></a><span class="lineno"><a class="line" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a">  587</a></span>   <a class="code" href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a">DISERR_DEDISTORT</a>    = 5       <span class="comment">/* De-distortion error. */</span></div>
+<div class="line"><a name="l00588"></a><span class="lineno">  588</span> };</div>
+<div class="line"><a name="l00589"></a><span class="lineno">  589</span> </div>
+<div class="line"><a name="l00590"></a><span class="lineno">  590</span> <span class="comment">/* For use in declaring distortion function prototypes. */</span></div>
+<div class="line"><a name="l00591"></a><span class="lineno"><a class="line" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">  591</a></span> <span class="preprocessor">#define DISP2X_ARGS int nparm, const double parms[], int ncrd, \</span></div>
+<div class="line"><a name="l00592"></a><span class="lineno">  592</span> <span class="preprocessor">const double rawcrd[], double *discrd</span></div>
+<div class="line"><a name="l00593"></a><span class="lineno">  593</span> </div>
+<div class="line"><a name="l00594"></a><span class="lineno">  594</span> <span class="comment">/* For use in declaring de-distortion function prototypes. */</span></div>
+<div class="line"><a name="l00595"></a><span class="lineno"><a class="line" href="dis_8h.html#ac593cd79fb7f89b1c7395d0ecf2f7876">  595</a></span> <span class="preprocessor">#define DISX2P_ARGS int nparm, const double parms[], int ncrd, \</span></div>
+<div class="line"><a name="l00596"></a><span class="lineno">  596</span> <span class="preprocessor">const double discrd[], double rawcrd[]</span></div>
+<div class="line"><a name="l00597"></a><span class="lineno">  597</span> </div>
+<div class="line"><a name="l00598"></a><span class="lineno">  598</span> </div>
+<div class="line"><a name="l00599"></a><span class="lineno"><a class="line" href="structdisprm.html">  599</a></span> <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> {</div>
+<div class="line"><a name="l00600"></a><span class="lineno">  600</span>   <span class="comment">/* Initialization flag (see the prologue above).                          */</span></div>
+<div class="line"><a name="l00601"></a><span class="lineno">  601</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00602"></a><span class="lineno"><a class="line" href="structdisprm.html#a4d6ba28bee2fc636f4b2b9ca4b50b0a4">  602</a></span>   <span class="keywordtype">int</span> <a class="code" href="structdisprm.html#a4d6ba28bee2fc636f4b2b9ca4b50b0a4">flag</a>;                     <span class="comment">/* Set to zero to force initialization.     */</span></div>
+<div class="line"><a name="l00603"></a><span class="lineno">  603</span> </div>
+<div class="line"><a name="l00604"></a><span class="lineno">  604</span>   <span class="comment">/* Parameters to be provided (see the prologue above).                    */</span></div>
+<div class="line"><a name="l00605"></a><span class="lineno">  605</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00606"></a><span class="lineno"><a class="line" href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">  606</a></span>   <span class="keywordtype">int</span> <a class="code" href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">naxis</a>;                    <span class="comment">/* The number of pixel coordinate elements, */</span></div>
+<div class="line"><a name="l00607"></a><span class="lineno">  607</span>                                 <span class="comment">/* given by NAXIS.                          */</span></div>
+<div class="line"><a name="l00608"></a><span class="lineno"><a class="line" href="structdisprm.html#a0d3386f4226b13c77deb97610ffeecb1">  608</a></span>   char   (*<a class="code" href="structdisprm.html#a0d3386f4226b13c77deb97610ffeecb1">dtype</a>)[16];          <span class="comment">/* For each axis, the distortion type.      */</span></div>
+<div class="line"><a name="l00609"></a><span class="lineno"><a class="line" href="structdisprm.html#ab62d14319c82c93c70d290728cab78c4">  609</a></span>   <span class="keywordtype">int</span>    **<a class="code" href="structdisprm.html#ab62d14319c82c93c70d290728cab78c4">axmap</a>;               <span class="comment">/* For each axis, the axis mapping array.   */</span></div>
+<div class="line"><a name="l00610"></a><span class="lineno"><a class="line" href="structdisprm.html#a8b0ac30436d7bb3e12e0ca1c64fda337">  610</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a8b0ac30436d7bb3e12e0ca1c64fda337">offset</a>;              <span class="comment">/* For each axis, renormalization offset.   */</span></div>
+<div class="line"><a name="l00611"></a><span class="lineno"><a class="line" href="structdisprm.html#a1f7b541d7130698acc6781b7ca83dab8">  611</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a1f7b541d7130698acc6781b7ca83dab8">scale</a>;               <span class="comment">/* For each axis, renormalization scale.    */</span></div>
+<div class="line"><a name="l00612"></a><span class="lineno"><a class="line" href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">  612</a></span>   <span class="keywordtype">int</span>    *<a class="code" href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">nparm</a>;                <span class="comment">/* For each axis, the number of distortion  */</span></div>
+<div class="line"><a name="l00613"></a><span class="lineno">  613</span>                                 <span class="comment">/* parameters.                              */</span></div>
+<div class="line"><a name="l00614"></a><span class="lineno"><a class="line" href="structdisprm.html#a25efb5ab856ffa06135a5d429e1c6b02">  614</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a25efb5ab856ffa06135a5d429e1c6b02">parms</a>;               <span class="comment">/* For each axis, the array of distortion   */</span></div>
+<div class="line"><a name="l00615"></a><span class="lineno">  615</span>                                 <span class="comment">/* parameters.                              */</span></div>
+<div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">  616</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">maxdis</a>;               <span class="comment">/* For each axis, the maximum distortion.   */</span></div>
+<div class="line"><a name="l00617"></a><span class="lineno"><a class="line" href="structdisprm.html#a10a16217368a5cdd34d802fff442f383">  617</a></span>   <span class="keywordtype">double</span> <a class="code" href="structdisprm.html#a10a16217368a5cdd34d802fff442f383">totdis</a>;                <span class="comment">/* The maximum combined distortion.         */</span></div>
+<div class="line"><a name="l00618"></a><span class="lineno">  618</span> </div>
+<div class="line"><a name="l00619"></a><span class="lineno">  619</span>   <span class="comment">/* Information derived from the parameters supplied.                      */</span></div>
+<div class="line"><a name="l00620"></a><span class="lineno">  620</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00621"></a><span class="lineno"><a class="line" href="structdisprm.html#a7fae0b75ba71ee0eaafaa1d3a20cc6af">  621</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structdisprm.html#a7fae0b75ba71ee0eaafaa1d3a20cc6af">ndis</a>;                  <span class="comment">/* The number of distortion functions.      */</span></div>
+<div class="line"><a name="l00622"></a><span class="lineno"><a class="line" href="structdisprm.html#a813473ae9d7c62ff0fd265d96832d539">  622</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structdisprm.html#a813473ae9d7c62ff0fd265d96832d539">padding</a>;               <span class="comment">/* (Dummy inserted for alignment purposes.) */</span></div>
+<div class="line"><a name="l00623"></a><span class="lineno">  623</span> </div>
+<div class="line"><a name="l00624"></a><span class="lineno">  624</span>   <span class="comment">/* Error handling, if enabled.                                            */</span></div>
+<div class="line"><a name="l00625"></a><span class="lineno">  625</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00626"></a><span class="lineno"><a class="line" href="structdisprm.html#a40a81085335f9d9aa617eb9605ae9421">  626</a></span>   <span class="keyword">struct </span><a class="code" href="structwcserr.html">wcserr</a> *<a class="code" href="structdisprm.html#a40a81085335f9d9aa617eb9605ae9421">err</a>;</div>
+<div class="line"><a name="l00627"></a><span class="lineno">  627</span> </div>
+<div class="line"><a name="l00628"></a><span class="lineno">  628</span>   <span class="comment">/* Private - the remainder are for internal use.                          */</span></div>
+<div class="line"><a name="l00629"></a><span class="lineno">  629</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00630"></a><span class="lineno"><a class="line" href="structdisprm.html#a43a6e8d5c70b82c5eb573de7e0d2fbfa">  630</a></span>   int (**<a class="code" href="structdisprm.html#a43a6e8d5c70b82c5eb573de7e0d2fbfa">disp2x</a>)(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);  <span class="comment">/* For each axis, pointers to the           */</span></div>
+<div class="line"><a name="l00631"></a><span class="lineno"><a class="line" href="structdisprm.html#ae627d5f290ed7ad85d3665cf28c5dbf4">  631</a></span>   int (**<a class="code" href="structdisprm.html#ae627d5f290ed7ad85d3665cf28c5dbf4">disx2p</a>)(<a class="code" href="dis_8h.html#ac593cd79fb7f89b1c7395d0ecf2f7876">DISX2P_ARGS</a>);  <span class="comment">/* distortion function and its inverse.     */</span></div>
+<div class="line"><a name="l00632"></a><span class="lineno">  632</span> </div>
+<div class="line"><a name="l00633"></a><span class="lineno"><a class="line" href="structdisprm.html#a7f80d2d542c266d14a336c13d2ebeab2">  633</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structdisprm.html#a7f80d2d542c266d14a336c13d2ebeab2">tmpmem</a>;</div>
+<div class="line"><a name="l00634"></a><span class="lineno"><a class="line" href="structdisprm.html#a711121ef59301a0eaf3b6025d8259bd7">  634</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a711121ef59301a0eaf3b6025d8259bd7">iwrk</a>;</div>
+<div class="line"><a name="l00635"></a><span class="lineno"><a class="line" href="structdisprm.html#a5002d95480beaa900deae051ec7e45b1">  635</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a5002d95480beaa900deae051ec7e45b1">dwrk</a>;</div>
+<div class="line"><a name="l00636"></a><span class="lineno">  636</span> </div>
+<div class="line"><a name="l00637"></a><span class="lineno"><a class="line" href="structdisprm.html#a6a8b2e3fc58d8f21668a82a93b199712">  637</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structdisprm.html#afb5079136a7ec5ae4effef9790e31439">m_flag</a>, <a class="code" href="structdisprm.html#a6a8b2e3fc58d8f21668a82a93b199712">m_naxis</a>;       <span class="comment">/* The remainder are for memory management. */</span></div>
+<div class="line"><a name="l00638"></a><span class="lineno"><a class="line" href="structdisprm.html#a5f720fe9e047c9bfc3118ea43fcb193a">  638</a></span>   char   (*<a class="code" href="structdisprm.html#a5f720fe9e047c9bfc3118ea43fcb193a">m_dtype</a>)[16];</div>
+<div class="line"><a name="l00639"></a><span class="lineno"><a class="line" href="structdisprm.html#a66547c34ec789c7efe10dc8f78295602">  639</a></span>   <span class="keywordtype">int</span>    **<a class="code" href="structdisprm.html#a66547c34ec789c7efe10dc8f78295602">m_axmap</a>;</div>
+<div class="line"><a name="l00640"></a><span class="lineno"><a class="line" href="structdisprm.html#ad86b9715da25195e7a345ccf631ff87a">  640</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a11c48b7be30b22236cdae89cb47a6317">m_offset</a>, **<a class="code" href="structdisprm.html#ad86b9715da25195e7a345ccf631ff87a">m_scale</a>;</div>
+<div class="line"><a name="l00641"></a><span class="lineno"><a class="line" href="structdisprm.html#ac54a69ee59f8c525309df6761ffadfed">  641</a></span>   <span class="keywordtype">int</span>    *<a class="code" href="structdisprm.html#ac54a69ee59f8c525309df6761ffadfed">m_nparm</a>;</div>
+<div class="line"><a name="l00642"></a><span class="lineno"><a class="line" href="structdisprm.html#a64b9a5952a1a87ccd6b2533757c5ae36">  642</a></span>   <span class="keywordtype">double</span> **<a class="code" href="structdisprm.html#a64b9a5952a1a87ccd6b2533757c5ae36">m_parms</a>;</div>
+<div class="line"><a name="l00643"></a><span class="lineno"><a class="line" href="structdisprm.html#a4f692b3bb436ceab5861ec9566d127e4">  643</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structdisprm.html#a4f692b3bb436ceab5861ec9566d127e4">m_maxdis</a>;</div>
+<div class="line"><a name="l00644"></a><span class="lineno"><a class="line" href="structdisprm.html#a01ec67e521b93c377aa76248b955bebc">  644</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structdisprm.html#a9d200cabe1a6a192f44a17535917cd3c">m_alloc</a>, <a class="code" href="structdisprm.html#a01ec67e521b93c377aa76248b955bebc">m_padding</a>;</div>
+<div class="line"><a name="l00645"></a><span class="lineno">  645</span> };</div>
+<div class="line"><a name="l00646"></a><span class="lineno">  646</span> </div>
+<div class="line"><a name="l00647"></a><span class="lineno">  647</span> <span class="comment">/* Size of the disprm struct in int units, used by the Fortran wrappers. */</span></div>
+<div class="line"><a name="l00648"></a><span class="lineno"><a class="line" href="dis_8h.html#a5df41117cb392fc0c5d051002b441aa9">  648</a></span> <span class="preprocessor">#define DISLEN (sizeof(struct disprm)/sizeof(int))</span></div>
+<div class="line"><a name="l00649"></a><span class="lineno">  649</span> </div>
+<div class="line"><a name="l00650"></a><span class="lineno">  650</span> </div>
+<div class="line"><a name="l00651"></a><span class="lineno">  651</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a8896e2a5330e55cd85da4a28ed6ee463">disini</a>(<span class="keywordtype">int</span> alloc, <span class="keywordtype">int</span> naxis, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
+<div class="line"><a name="l00652"></a><span class="lineno">  652</span> </div>
+<div class="line"><a name="l00653"></a><span class="lineno">  653</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#acb2f2341971a191fdbea544602405723">disparms</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
+<div class="line"><a name="l00654"></a><span class="lineno">  654</span> </div>
+<div class="line"><a name="l00655"></a><span class="lineno">  655</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a42e03676a3def43ef6b936cd7beb4dd5">discpy</a>(<span class="keywordtype">int</span> alloc, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dissrc, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *disdst);</div>
+<div class="line"><a name="l00656"></a><span class="lineno">  656</span> </div>
+<div class="line"><a name="l00657"></a><span class="lineno">  657</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a83b98d0f6429f4f19024675645026187">disfree</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
+<div class="line"><a name="l00658"></a><span class="lineno">  658</span> </div>
+<div class="line"><a name="l00659"></a><span class="lineno">  659</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#aeee35e0d5183e74f20c64526d908886b">disprt</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
+<div class="line"><a name="l00660"></a><span class="lineno">  660</span> </div>
+<div class="line"><a name="l00661"></a><span class="lineno">  661</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#ad1bdf4497eb4513ca8431e1baa419041">disset</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
+<div class="line"><a name="l00662"></a><span class="lineno">  662</span> </div>
+<div class="line"><a name="l00663"></a><span class="lineno">  663</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a135726e4c4c5bc00e2eba865ab202201">disp2x</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis, <span class="keyword">const</span> <span class="keywordtype">double</span> rawcrd[], <span class="keywordtype">double</span> discrd[]);</div>
+<div class="line"><a name="l00664"></a><span class="lineno">  664</span> </div>
+<div class="line"><a name="l00665"></a><span class="lineno">  665</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653">disx2p</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis, <span class="keyword">const</span> <span class="keywordtype">double</span> discrd[], <span class="keywordtype">double</span> rawcrd[]);</div>
+<div class="line"><a name="l00666"></a><span class="lineno">  666</span> </div>
+<div class="line"><a name="l00667"></a><span class="lineno">  667</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a91fa2d34c30be042516a0246d393b116">diswarp</a>(<span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis, <span class="keyword">const</span> <span class="keywordtype">double</span> pixblc[], <span class="keyword">const</span> <span class="keywordtype">double</span> pixtrc[],</div>
+<div class="line"><a name="l00668"></a><span class="lineno">  668</span>             <span class="keyword">const</span> <span class="keywordtype">double</span> pixsamp[], <span class="keywordtype">int</span> *nsamp,</div>
+<div class="line"><a name="l00669"></a><span class="lineno">  669</span>             <span class="keywordtype">double</span> maxdis[], <span class="keywordtype">double</span> *maxtot,</div>
+<div class="line"><a name="l00670"></a><span class="lineno">  670</span>             <span class="keywordtype">double</span> avgdis[], <span class="keywordtype">double</span> *avgtot,</div>
+<div class="line"><a name="l00671"></a><span class="lineno">  671</span>             <span class="keywordtype">double</span> rmsdis[], <span class="keywordtype">double</span> *rmstot);</div>
+<div class="line"><a name="l00672"></a><span class="lineno">  672</span> </div>
+<div class="line"><a name="l00673"></a><span class="lineno">  673</span> </div>
+<div class="line"><a name="l00674"></a><span class="lineno">  674</span> <span class="comment">/* Specialist distortion functions (internal use only). */</span></div>
+<div class="line"><a name="l00675"></a><span class="lineno">  675</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a402a8a2a75907d0849cee87a0d72b5f5">tpvset</a>(<span class="keywordtype">int</span> j, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
+<div class="line"><a name="l00676"></a><span class="lineno">  676</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a4182d3cd45a022e930c44c4f933c0639">tpv1</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
+<div class="line"><a name="l00677"></a><span class="lineno">  677</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a961d359c77ef6d9e4d2f2f14a53d0b39">tpv2</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
+<div class="line"><a name="l00678"></a><span class="lineno">  678</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a5d5f35665cd05c17322147bf483ec914">tpv3</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
+<div class="line"><a name="l00679"></a><span class="lineno">  679</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#afca391dcab0909f05654f99505f2a4fb">tpv4</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
+<div class="line"><a name="l00680"></a><span class="lineno">  680</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a393642b85f8a7da45a0447c81a20202d">tpv5</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
+<div class="line"><a name="l00681"></a><span class="lineno">  681</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a4c12eaf2bad14222de4213f69206c7a8">tpv6</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
+<div class="line"><a name="l00682"></a><span class="lineno">  682</span> <span class="keywordtype">int</span> <a class="code" href="dis_8h.html#a952910ebfd260e7d9b59e134674f8f26">tpv7</a>(<a class="code" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>);</div>
+<div class="line"><a name="l00683"></a><span class="lineno">  683</span> </div>
+<div class="line"><a name="l00684"></a><span class="lineno">  684</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a name="l00685"></a><span class="lineno">  685</span> }</div>
+<div class="line"><a name="l00686"></a><span class="lineno">  686</span> <span class="preprocessor">#endif</span></div>
+<div class="line"><a name="l00687"></a><span class="lineno">  687</span> </div>
+<div class="line"><a name="l00688"></a><span class="lineno">  688</span> <span class="preprocessor">#endif </span><span class="comment">/* WCSLIB_DIS */</span><span class="preprocessor"></span></div>
+<div class="ttc" id="structdisprm_html_a4d6ba28bee2fc636f4b2b9ca4b50b0a4"><div class="ttname"><a href="structdisprm.html#a4d6ba28bee2fc636f4b2b9ca4b50b0a4">disprm::flag</a></div><div class="ttdeci">int flag</div><div class="ttdef"><b>Definition:</b> dis.h:602</div></div>
 <div class="ttc" id="dis_8h_html_a42e03676a3def43ef6b936cd7beb4dd5"><div class="ttname"><a href="dis_8h.html#a42e03676a3def43ef6b936cd7beb4dd5">discpy</a></div><div class="ttdeci">int discpy(int alloc, const struct disprm *dissrc, struct disprm *disdst)</div><div class="ttdoc">Copy routine for the disprm struct. </div></div>
-<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579">DISERR_DISTORT</a></div><div class="ttdef"><b>Definition:</b> dis.h:481</div></div>
+<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdadbabbc4a9fe6441177efcd050b4cc579">DISERR_DISTORT</a></div><div class="ttdef"><b>Definition:</b> dis.h:586</div></div>
 <div class="ttc" id="dis_8h_html_a6f125a402553f5dab46435299f0742a3"><div class="ttname"><a href="dis_8h.html#a6f125a402553f5dab46435299f0742a3">dis_errmsg</a></div><div class="ttdeci">const char * dis_errmsg[]</div><div class="ttdoc">Status return messages. </div></div>
-<div class="ttc" id="structdisprm_html_ab62d14319c82c93c70d290728cab78c4"><div class="ttname"><a href="structdisprm.html#ab62d14319c82c93c70d290728cab78c4">disprm::axmap</a></div><div class="ttdeci">int ** axmap</div><div class="ttdef"><b>Definition:</b> dis.h:504</div></div>
+<div class="ttc" id="structdisprm_html_ab62d14319c82c93c70d290728cab78c4"><div class="ttname"><a href="structdisprm.html#ab62d14319c82c93c70d290728cab78c4">disprm::axmap</a></div><div class="ttdeci">int ** axmap</div><div class="ttdef"><b>Definition:</b> dis.h:609</div></div>
 <div class="ttc" id="dis_8h_html_a135726e4c4c5bc00e2eba865ab202201"><div class="ttname"><a href="dis_8h.html#a135726e4c4c5bc00e2eba865ab202201">disp2x</a></div><div class="ttdeci">int disp2x(struct disprm *dis, const double rawcrd[], double discrd[])</div><div class="ttdoc">Apply distortion function. </div></div>
-<div class="ttc" id="structdisprm_html_a1f7b541d7130698acc6781b7ca83dab8"><div class="ttname"><a href="structdisprm.html#a1f7b541d7130698acc6781b7ca83dab8">disprm::scale</a></div><div class="ttdeci">double ** scale</div><div class="ttdef"><b>Definition:</b> dis.h:506</div></div>
-<div class="ttc" id="structdisprm_html_a66547c34ec789c7efe10dc8f78295602"><div class="ttname"><a href="structdisprm.html#a66547c34ec789c7efe10dc8f78295602">disprm::m_axmap</a></div><div class="ttdeci">int ** m_axmap</div><div class="ttdef"><b>Definition:</b> dis.h:529</div></div>
-<div class="ttc" id="structdisprm_html_ad86b9715da25195e7a345ccf631ff87a"><div class="ttname"><a href="structdisprm.html#ad86b9715da25195e7a345ccf631ff87a">disprm::m_scale</a></div><div class="ttdeci">double ** m_scale</div><div class="ttdef"><b>Definition:</b> dis.h:530</div></div>
+<div class="ttc" id="structdisprm_html_a1f7b541d7130698acc6781b7ca83dab8"><div class="ttname"><a href="structdisprm.html#a1f7b541d7130698acc6781b7ca83dab8">disprm::scale</a></div><div class="ttdeci">double ** scale</div><div class="ttdef"><b>Definition:</b> dis.h:611</div></div>
+<div class="ttc" id="structdisprm_html_a66547c34ec789c7efe10dc8f78295602"><div class="ttname"><a href="structdisprm.html#a66547c34ec789c7efe10dc8f78295602">disprm::m_axmap</a></div><div class="ttdeci">int ** m_axmap</div><div class="ttdef"><b>Definition:</b> dis.h:639</div></div>
+<div class="ttc" id="structdisprm_html_ad86b9715da25195e7a345ccf631ff87a"><div class="ttname"><a href="structdisprm.html#ad86b9715da25195e7a345ccf631ff87a">disprm::m_scale</a></div><div class="ttdeci">double ** m_scale</div><div class="ttdef"><b>Definition:</b> dis.h:640</div></div>
 <div class="ttc" id="structwcserr_html"><div class="ttname"><a href="structwcserr.html">wcserr</a></div><div class="ttdoc">Error message handling. </div><div class="ttdef"><b>Definition:</b> wcserr.h:221</div></div>
 <div class="ttc" id="dis_8h_html_ac589d5e85afe3d775cba4c06734ce653"><div class="ttname"><a href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653">disx2p</a></div><div class="ttdeci">int disx2p(struct disprm *dis, const double discrd[], double rawcrd[])</div><div class="ttdoc">Apply de-distortion function. </div></div>
-<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0">DISERR_BAD_PARAM</a></div><div class="ttdef"><b>Definition:</b> dis.h:480</div></div>
+<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdace3a5f769a3b8966f980f1279e2f08b0">DISERR_BAD_PARAM</a></div><div class="ttdef"><b>Definition:</b> dis.h:585</div></div>
 <div class="ttc" id="dis_8h_html_ad1bdf4497eb4513ca8431e1baa419041"><div class="ttname"><a href="dis_8h.html#ad1bdf4497eb4513ca8431e1baa419041">disset</a></div><div class="ttdeci">int disset(struct disprm *dis)</div><div class="ttdoc">Setup routine for the disprm struct. </div></div>
-<div class="ttc" id="structdisprm_html_a201bc2948f326bbed9a0e1f818720ef9"><div class="ttname"><a href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">disprm::naxis</a></div><div class="ttdeci">int naxis</div><div class="ttdef"><b>Definition:</b> dis.h:501</div></div>
-<div class="ttc" id="structdisprm_html_a11c48b7be30b22236cdae89cb47a6317"><div class="ttname"><a href="structdisprm.html#a11c48b7be30b22236cdae89cb47a6317">disprm::m_offset</a></div><div class="ttdeci">double ** m_offset</div><div class="ttdef"><b>Definition:</b> dis.h:530</div></div>
+<div class="ttc" id="structdisprm_html_a201bc2948f326bbed9a0e1f818720ef9"><div class="ttname"><a href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">disprm::naxis</a></div><div class="ttdeci">int naxis</div><div class="ttdef"><b>Definition:</b> dis.h:606</div></div>
+<div class="ttc" id="structdisprm_html_a11c48b7be30b22236cdae89cb47a6317"><div class="ttname"><a href="structdisprm.html#a11c48b7be30b22236cdae89cb47a6317">disprm::m_offset</a></div><div class="ttdeci">double ** m_offset</div><div class="ttdef"><b>Definition:</b> dis.h:640</div></div>
 <div class="ttc" id="dis_8h_html_a393642b85f8a7da45a0447c81a20202d"><div class="ttname"><a href="dis_8h.html#a393642b85f8a7da45a0447c81a20202d">tpv5</a></div><div class="ttdeci">int tpv5(DISP2X_ARGS)</div><div class="ttdoc">(Internal use only.) </div></div>
 <div class="ttc" id="dis_8h_html_a4182d3cd45a022e930c44c4f933c0639"><div class="ttname"><a href="dis_8h.html#a4182d3cd45a022e930c44c4f933c0639">tpv1</a></div><div class="ttdeci">int tpv1(DISP2X_ARGS)</div><div class="ttdoc">(Internal use only.) </div></div>
-<div class="ttc" id="structdisprm_html_afb5079136a7ec5ae4effef9790e31439"><div class="ttname"><a href="structdisprm.html#afb5079136a7ec5ae4effef9790e31439">disprm::m_flag</a></div><div class="ttdeci">int m_flag</div><div class="ttdef"><b>Definition:</b> dis.h:527</div></div>
-<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a">DISERR_DEDISTORT</a></div><div class="ttdef"><b>Definition:</b> dis.h:482</div></div>
-<div class="ttc" id="structdisprm_html_afd6bd50c561b27d0a1223e9c6c4f8baa"><div class="ttname"><a href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">disprm::nparm</a></div><div class="ttdeci">int * nparm</div><div class="ttdef"><b>Definition:</b> dis.h:507</div></div>
-<div class="ttc" id="structdisprm_html"><div class="ttname"><a href="structdisprm.html">disprm</a></div><div class="ttdoc">Distortion parameters. </div><div class="ttdef"><b>Definition:</b> dis.h:494</div></div>
+<div class="ttc" id="structdisprm_html_afb5079136a7ec5ae4effef9790e31439"><div class="ttname"><a href="structdisprm.html#afb5079136a7ec5ae4effef9790e31439">disprm::m_flag</a></div><div class="ttdeci">int m_flag</div><div class="ttdef"><b>Definition:</b> dis.h:637</div></div>
+<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdabe0645cb8d4bfc0f496aa84336ca492a">DISERR_DEDISTORT</a></div><div class="ttdef"><b>Definition:</b> dis.h:587</div></div>
+<div class="ttc" id="structdisprm_html_a7fae0b75ba71ee0eaafaa1d3a20cc6af"><div class="ttname"><a href="structdisprm.html#a7fae0b75ba71ee0eaafaa1d3a20cc6af">disprm::ndis</a></div><div class="ttdeci">int ndis</div><div class="ttdef"><b>Definition:</b> dis.h:621</div></div>
+<div class="ttc" id="structdisprm_html_afd6bd50c561b27d0a1223e9c6c4f8baa"><div class="ttname"><a href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">disprm::nparm</a></div><div class="ttdeci">int * nparm</div><div class="ttdef"><b>Definition:</b> dis.h:612</div></div>
+<div class="ttc" id="structdisprm_html"><div class="ttname"><a href="structdisprm.html">disprm</a></div><div class="ttdoc">Distortion parameters. </div><div class="ttdef"><b>Definition:</b> dis.h:599</div></div>
 <div class="ttc" id="dis_8h_html_a5d5f35665cd05c17322147bf483ec914"><div class="ttname"><a href="dis_8h.html#a5d5f35665cd05c17322147bf483ec914">tpv3</a></div><div class="ttdeci">int tpv3(DISP2X_ARGS)</div><div class="ttdoc">(Internal use only.) </div></div>
-<div class="ttc" id="structdisprm_html_a0d3386f4226b13c77deb97610ffeecb1"><div class="ttname"><a href="structdisprm.html#a0d3386f4226b13c77deb97610ffeecb1">disprm::dtype</a></div><div class="ttdeci">char(* dtype)[16]</div><div class="ttdef"><b>Definition:</b> dis.h:503</div></div>
-<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46">DISERR_NULL_POINTER</a></div><div class="ttdef"><b>Definition:</b> dis.h:478</div></div>
+<div class="ttc" id="structdisprm_html_a0d3386f4226b13c77deb97610ffeecb1"><div class="ttname"><a href="structdisprm.html#a0d3386f4226b13c77deb97610ffeecb1">disprm::dtype</a></div><div class="ttdeci">char(* dtype)[16]</div><div class="ttdef"><b>Definition:</b> dis.h:608</div></div>
+<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda8c5a7d847d62520f972e51435d4d0d46">DISERR_NULL_POINTER</a></div><div class="ttdef"><b>Definition:</b> dis.h:583</div></div>
 <div class="ttc" id="dis_8h_html_a83b98d0f6429f4f19024675645026187"><div class="ttname"><a href="dis_8h.html#a83b98d0f6429f4f19024675645026187">disfree</a></div><div class="ttdeci">int disfree(struct disprm *dis)</div><div class="ttdoc">Destructor for the disprm struct. </div></div>
-<div class="ttc" id="structdisprm_html_a64b9a5952a1a87ccd6b2533757c5ae36"><div class="ttname"><a href="structdisprm.html#a64b9a5952a1a87ccd6b2533757c5ae36">disprm::m_parms</a></div><div class="ttdeci">double ** m_parms</div><div class="ttdef"><b>Definition:</b> dis.h:532</div></div>
+<div class="ttc" id="structdisprm_html_a64b9a5952a1a87ccd6b2533757c5ae36"><div class="ttname"><a href="structdisprm.html#a64b9a5952a1a87ccd6b2533757c5ae36">disprm::m_parms</a></div><div class="ttdeci">double ** m_parms</div><div class="ttdef"><b>Definition:</b> dis.h:642</div></div>
 <div class="ttc" id="dis_8h_html_afca391dcab0909f05654f99505f2a4fb"><div class="ttname"><a href="dis_8h.html#afca391dcab0909f05654f99505f2a4fb">tpv4</a></div><div class="ttdeci">int tpv4(DISP2X_ARGS)</div><div class="ttdoc">(Internal use only.) </div></div>
-<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fd"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fd">dis_errmsg_enum</a></div><div class="ttdeci">dis_errmsg_enum</div><div class="ttdef"><b>Definition:</b> dis.h:476</div></div>
-<div class="ttc" id="structdisprm_html_a6a8b2e3fc58d8f21668a82a93b199712"><div class="ttname"><a href="structdisprm.html#a6a8b2e3fc58d8f21668a82a93b199712">disprm::m_naxis</a></div><div class="ttdeci">int m_naxis</div><div class="ttdef"><b>Definition:</b> dis.h:527</div></div>
+<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fd"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fd">dis_errmsg_enum</a></div><div class="ttdeci">dis_errmsg_enum</div><div class="ttdef"><b>Definition:</b> dis.h:581</div></div>
+<div class="ttc" id="structdisprm_html_a6a8b2e3fc58d8f21668a82a93b199712"><div class="ttname"><a href="structdisprm.html#a6a8b2e3fc58d8f21668a82a93b199712">disprm::m_naxis</a></div><div class="ttdeci">int m_naxis</div><div class="ttdef"><b>Definition:</b> dis.h:637</div></div>
 <div class="ttc" id="dis_8h_html_aeee35e0d5183e74f20c64526d908886b"><div class="ttname"><a href="dis_8h.html#aeee35e0d5183e74f20c64526d908886b">disprt</a></div><div class="ttdeci">int disprt(const struct disprm *dis)</div><div class="ttdoc">Print routine for the disprm struct. </div></div>
-<div class="ttc" id="structdisprm_html_a7f80d2d542c266d14a336c13d2ebeab2"><div class="ttname"><a href="structdisprm.html#a7f80d2d542c266d14a336c13d2ebeab2">disprm::tmpmem</a></div><div class="ttdeci">double * tmpmem</div><div class="ttdef"><b>Definition:</b> dis.h:523</div></div>
-<div class="ttc" id="structdisprm_html_a01ec67e521b93c377aa76248b955bebc"><div class="ttname"><a href="structdisprm.html#a01ec67e521b93c377aa76248b955bebc">disprm::m_padding</a></div><div class="ttdeci">int m_padding</div><div class="ttdef"><b>Definition:</b> dis.h:534</div></div>
-<div class="ttc" id="structdisprm_html_ac107b9b4c645a461036476290a87ab22"><div class="ttname"><a href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">disprm::maxdis</a></div><div class="ttdeci">double * maxdis</div><div class="ttdef"><b>Definition:</b> dis.h:511</div></div>
-<div class="ttc" id="structdisprm_html_a9d200cabe1a6a192f44a17535917cd3c"><div class="ttname"><a href="structdisprm.html#a9d200cabe1a6a192f44a17535917cd3c">disprm::m_alloc</a></div><div class="ttdeci">int m_alloc</div><div class="ttdef"><b>Definition:</b> dis.h:534</div></div>
-<div class="ttc" id="structdisprm_html_a5002d95480beaa900deae051ec7e45b1"><div class="ttname"><a href="structdisprm.html#a5002d95480beaa900deae051ec7e45b1">disprm::dwrk</a></div><div class="ttdeci">double ** dwrk</div><div class="ttdef"><b>Definition:</b> dis.h:525</div></div>
-<div class="ttc" id="structdisprm_html_a10a16217368a5cdd34d802fff442f383"><div class="ttname"><a href="structdisprm.html#a10a16217368a5cdd34d802fff442f383">disprm::totdis</a></div><div class="ttdeci">double totdis</div><div class="ttdef"><b>Definition:</b> dis.h:512</div></div>
-<div class="ttc" id="structdisprm_html_ae627d5f290ed7ad85d3665cf28c5dbf4"><div class="ttname"><a href="structdisprm.html#ae627d5f290ed7ad85d3665cf28c5dbf4">disprm::disx2p</a></div><div class="ttdeci">int(** disx2p)(DISX2P_ARGS)</div><div class="ttdef"><b>Definition:</b> dis.h:521</div></div>
-<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8">DISERR_SUCCESS</a></div><div class="ttdef"><b>Definition:</b> dis.h:477</div></div>
+<div class="ttc" id="structdisprm_html_a7f80d2d542c266d14a336c13d2ebeab2"><div class="ttname"><a href="structdisprm.html#a7f80d2d542c266d14a336c13d2ebeab2">disprm::tmpmem</a></div><div class="ttdeci">double * tmpmem</div><div class="ttdef"><b>Definition:</b> dis.h:633</div></div>
+<div class="ttc" id="structdisprm_html_a01ec67e521b93c377aa76248b955bebc"><div class="ttname"><a href="structdisprm.html#a01ec67e521b93c377aa76248b955bebc">disprm::m_padding</a></div><div class="ttdeci">int m_padding</div><div class="ttdef"><b>Definition:</b> dis.h:644</div></div>
+<div class="ttc" id="structdisprm_html_ac107b9b4c645a461036476290a87ab22"><div class="ttname"><a href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">disprm::maxdis</a></div><div class="ttdeci">double * maxdis</div><div class="ttdef"><b>Definition:</b> dis.h:616</div></div>
+<div class="ttc" id="structdisprm_html_a9d200cabe1a6a192f44a17535917cd3c"><div class="ttname"><a href="structdisprm.html#a9d200cabe1a6a192f44a17535917cd3c">disprm::m_alloc</a></div><div class="ttdeci">int m_alloc</div><div class="ttdef"><b>Definition:</b> dis.h:644</div></div>
+<div class="ttc" id="structdisprm_html_a5002d95480beaa900deae051ec7e45b1"><div class="ttname"><a href="structdisprm.html#a5002d95480beaa900deae051ec7e45b1">disprm::dwrk</a></div><div class="ttdeci">double ** dwrk</div><div class="ttdef"><b>Definition:</b> dis.h:635</div></div>
+<div class="ttc" id="structdisprm_html_a10a16217368a5cdd34d802fff442f383"><div class="ttname"><a href="structdisprm.html#a10a16217368a5cdd34d802fff442f383">disprm::totdis</a></div><div class="ttdeci">double totdis</div><div class="ttdef"><b>Definition:</b> dis.h:617</div></div>
+<div class="ttc" id="structdisprm_html_ae627d5f290ed7ad85d3665cf28c5dbf4"><div class="ttname"><a href="structdisprm.html#ae627d5f290ed7ad85d3665cf28c5dbf4">disprm::disx2p</a></div><div class="ttdeci">int(** disx2p)(DISX2P_ARGS)</div><div class="ttdef"><b>Definition:</b> dis.h:631</div></div>
+<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fdaeaef8bb1725ea601f43900897ee144a8">DISERR_SUCCESS</a></div><div class="ttdef"><b>Definition:</b> dis.h:582</div></div>
 <div class="ttc" id="dis_8h_html_a402a8a2a75907d0849cee87a0d72b5f5"><div class="ttname"><a href="dis_8h.html#a402a8a2a75907d0849cee87a0d72b5f5">tpvset</a></div><div class="ttdeci">int tpvset(int j, struct disprm *dis)</div><div class="ttdoc">(Internal use only.) </div></div>
-<div class="ttc" id="structdisprm_html_a40a81085335f9d9aa617eb9605ae9421"><div class="ttname"><a href="structdisprm.html#a40a81085335f9d9aa617eb9605ae9421">disprm::err</a></div><div class="ttdeci">struct wcserr * err</div><div class="ttdef"><b>Definition:</b> dis.h:516</div></div>
+<div class="ttc" id="structdisprm_html_a40a81085335f9d9aa617eb9605ae9421"><div class="ttname"><a href="structdisprm.html#a40a81085335f9d9aa617eb9605ae9421">disprm::err</a></div><div class="ttdeci">struct wcserr * err</div><div class="ttdef"><b>Definition:</b> dis.h:626</div></div>
 <div class="ttc" id="dis_8h_html_a8896e2a5330e55cd85da4a28ed6ee463"><div class="ttname"><a href="dis_8h.html#a8896e2a5330e55cd85da4a28ed6ee463">disini</a></div><div class="ttdeci">int disini(int alloc, int naxis, struct disprm *dis)</div><div class="ttdoc">Default constructor for the disprm struct. </div></div>
 <div class="ttc" id="dis_8h_html_a4c12eaf2bad14222de4213f69206c7a8"><div class="ttname"><a href="dis_8h.html#a4c12eaf2bad14222de4213f69206c7a8">tpv6</a></div><div class="ttdeci">int tpv6(DISP2X_ARGS)</div><div class="ttdoc">(Internal use only.) </div></div>
-<div class="ttc" id="structdisprm_html_a25efb5ab856ffa06135a5d429e1c6b02"><div class="ttname"><a href="structdisprm.html#a25efb5ab856ffa06135a5d429e1c6b02">disprm::parms</a></div><div class="ttdeci">double ** parms</div><div class="ttdef"><b>Definition:</b> dis.h:509</div></div>
-<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80">DISERR_MEMORY</a></div><div class="ttdef"><b>Definition:</b> dis.h:479</div></div>
-<div class="ttc" id="structdisprm_html_ac54a69ee59f8c525309df6761ffadfed"><div class="ttname"><a href="structdisprm.html#ac54a69ee59f8c525309df6761ffadfed">disprm::m_nparm</a></div><div class="ttdeci">int * m_nparm</div><div class="ttdef"><b>Definition:</b> dis.h:531</div></div>
+<div class="ttc" id="structdisprm_html_a25efb5ab856ffa06135a5d429e1c6b02"><div class="ttname"><a href="structdisprm.html#a25efb5ab856ffa06135a5d429e1c6b02">disprm::parms</a></div><div class="ttdeci">double ** parms</div><div class="ttdef"><b>Definition:</b> dis.h:614</div></div>
+<div class="ttc" id="dis_8h_html_a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80"><div class="ttname"><a href="dis_8h.html#a27ab258e601dcfa4d184a35edbc590fda7298d8c404456ac8c3a5365f2f266d80">DISERR_MEMORY</a></div><div class="ttdef"><b>Definition:</b> dis.h:584</div></div>
+<div class="ttc" id="structdisprm_html_ac54a69ee59f8c525309df6761ffadfed"><div class="ttname"><a href="structdisprm.html#ac54a69ee59f8c525309df6761ffadfed">disprm::m_nparm</a></div><div class="ttdeci">int * m_nparm</div><div class="ttdef"><b>Definition:</b> dis.h:641</div></div>
 <div class="ttc" id="dis_8h_html_a961d359c77ef6d9e4d2f2f14a53d0b39"><div class="ttname"><a href="dis_8h.html#a961d359c77ef6d9e4d2f2f14a53d0b39">tpv2</a></div><div class="ttdeci">int tpv2(DISP2X_ARGS)</div><div class="ttdoc">(Internal use only.) </div></div>
-<div class="ttc" id="structdisprm_html_a4f692b3bb436ceab5861ec9566d127e4"><div class="ttname"><a href="structdisprm.html#a4f692b3bb436ceab5861ec9566d127e4">disprm::m_maxdis</a></div><div class="ttdeci">double * m_maxdis</div><div class="ttdef"><b>Definition:</b> dis.h:533</div></div>
-<div class="ttc" id="structdisprm_html_a8b0ac30436d7bb3e12e0ca1c64fda337"><div class="ttname"><a href="structdisprm.html#a8b0ac30436d7bb3e12e0ca1c64fda337">disprm::offset</a></div><div class="ttdeci">double ** offset</div><div class="ttdef"><b>Definition:</b> dis.h:505</div></div>
-<div class="ttc" id="dis_8h_html_ac593cd79fb7f89b1c7395d0ecf2f7876"><div class="ttname"><a href="dis_8h.html#ac593cd79fb7f89b1c7395d0ecf2f7876">DISX2P_ARGS</a></div><div class="ttdeci">#define DISX2P_ARGS</div><div class="ttdef"><b>Definition:</b> dis.h:490</div></div>
-<div class="ttc" id="structdisprm_html_a43a6e8d5c70b82c5eb573de7e0d2fbfa"><div class="ttname"><a href="structdisprm.html#a43a6e8d5c70b82c5eb573de7e0d2fbfa">disprm::disp2x</a></div><div class="ttdeci">int(** disp2x)(DISP2X_ARGS)</div><div class="ttdef"><b>Definition:</b> dis.h:520</div></div>
-<div class="ttc" id="structdisprm_html_a711121ef59301a0eaf3b6025d8259bd7"><div class="ttname"><a href="structdisprm.html#a711121ef59301a0eaf3b6025d8259bd7">disprm::iwrk</a></div><div class="ttdeci">double ** iwrk</div><div class="ttdef"><b>Definition:</b> dis.h:524</div></div>
-<div class="ttc" id="structdisprm_html_a5f720fe9e047c9bfc3118ea43fcb193a"><div class="ttname"><a href="structdisprm.html#a5f720fe9e047c9bfc3118ea43fcb193a">disprm::m_dtype</a></div><div class="ttdeci">char(* m_dtype)[16]</div><div class="ttdef"><b>Definition:</b> dis.h:528</div></div>
+<div class="ttc" id="structdisprm_html_a4f692b3bb436ceab5861ec9566d127e4"><div class="ttname"><a href="structdisprm.html#a4f692b3bb436ceab5861ec9566d127e4">disprm::m_maxdis</a></div><div class="ttdeci">double * m_maxdis</div><div class="ttdef"><b>Definition:</b> dis.h:643</div></div>
+<div class="ttc" id="dis_8h_html_a91fa2d34c30be042516a0246d393b116"><div class="ttname"><a href="dis_8h.html#a91fa2d34c30be042516a0246d393b116">diswarp</a></div><div class="ttdeci">int diswarp(struct disprm *dis, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot)</div><div class="ttdoc">Compute measures of distortion. </div></div>
+<div class="ttc" id="structdisprm_html_a8b0ac30436d7bb3e12e0ca1c64fda337"><div class="ttname"><a href="structdisprm.html#a8b0ac30436d7bb3e12e0ca1c64fda337">disprm::offset</a></div><div class="ttdeci">double ** offset</div><div class="ttdef"><b>Definition:</b> dis.h:610</div></div>
+<div class="ttc" id="structdisprm_html_a813473ae9d7c62ff0fd265d96832d539"><div class="ttname"><a href="structdisprm.html#a813473ae9d7c62ff0fd265d96832d539">disprm::padding</a></div><div class="ttdeci">int padding</div><div class="ttdef"><b>Definition:</b> dis.h:622</div></div>
+<div class="ttc" id="dis_8h_html_ac593cd79fb7f89b1c7395d0ecf2f7876"><div class="ttname"><a href="dis_8h.html#ac593cd79fb7f89b1c7395d0ecf2f7876">DISX2P_ARGS</a></div><div class="ttdeci">#define DISX2P_ARGS</div><div class="ttdef"><b>Definition:</b> dis.h:595</div></div>
+<div class="ttc" id="structdisprm_html_a43a6e8d5c70b82c5eb573de7e0d2fbfa"><div class="ttname"><a href="structdisprm.html#a43a6e8d5c70b82c5eb573de7e0d2fbfa">disprm::disp2x</a></div><div class="ttdeci">int(** disp2x)(DISP2X_ARGS)</div><div class="ttdef"><b>Definition:</b> dis.h:630</div></div>
+<div class="ttc" id="structdisprm_html_a711121ef59301a0eaf3b6025d8259bd7"><div class="ttname"><a href="structdisprm.html#a711121ef59301a0eaf3b6025d8259bd7">disprm::iwrk</a></div><div class="ttdeci">double ** iwrk</div><div class="ttdef"><b>Definition:</b> dis.h:634</div></div>
+<div class="ttc" id="structdisprm_html_a5f720fe9e047c9bfc3118ea43fcb193a"><div class="ttname"><a href="structdisprm.html#a5f720fe9e047c9bfc3118ea43fcb193a">disprm::m_dtype</a></div><div class="ttdeci">char(* m_dtype)[16]</div><div class="ttdef"><b>Definition:</b> dis.h:638</div></div>
 <div class="ttc" id="dis_8h_html_a952910ebfd260e7d9b59e134674f8f26"><div class="ttname"><a href="dis_8h.html#a952910ebfd260e7d9b59e134674f8f26">tpv7</a></div><div class="ttdeci">int tpv7(DISP2X_ARGS)</div><div class="ttdoc">(Internal use only.) </div></div>
 <div class="ttc" id="dis_8h_html_acb2f2341971a191fdbea544602405723"><div class="ttname"><a href="dis_8h.html#acb2f2341971a191fdbea544602405723">disparms</a></div><div class="ttdeci">int disparms(struct disprm *dis)</div><div class="ttdoc">Allocate memory for parameters in a disprm struct. </div></div>
-<div class="ttc" id="dis_8h_html_a23068602f42552a4257462b2875d8c51"><div class="ttname"><a href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a></div><div class="ttdeci">#define DISP2X_ARGS</div><div class="ttdef"><b>Definition:</b> dis.h:486</div></div>
+<div class="ttc" id="dis_8h_html_a23068602f42552a4257462b2875d8c51"><div class="ttname"><a href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a></div><div class="ttdeci">#define DISP2X_ARGS</div><div class="ttdef"><b>Definition:</b> dis.h:591</div></div>
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/files.html b/html/files.html
index c29e7ec..db5344d 100644
--- a/html/files.html
+++ b/html/files.html
@@ -75,7 +75,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/fitshdr_8h.html b/html/fitshdr_8h.html
index 799b759..826da9b 100644
--- a/html/fitshdr_8h.html
+++ b/html/fitshdr_8h.html
@@ -389,7 +389,7 @@ the previous keyrecord contained either a valid string keyvalue or a valid <code
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/fitshdr_8h_source.html b/html/fitshdr_8h_source.html
index 2c88725..fed8316 100644
--- a/html/fitshdr_8h_source.html
+++ b/html/fitshdr_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="fitshdr_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,7 +75,7 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: fitshdr.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: fitshdr.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* The Flexible Image Transport System (FITS), a data format widely used in</span></div>
@@ -520,7 +520,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/fortran.html b/html/fortran.html
index c6401b3..8b9ceef 100644
--- a/html/fortran.html
+++ b/html/fortran.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -103,7 +103,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions.html b/html/functions.html
index 18962f7..3ac4293 100644
--- a/html/functions.html
+++ b/html/functions.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_b.html b/html/functions_b.html
index ae66cc5..5ffceb4 100644
--- a/html/functions_b.html
+++ b/html/functions_b.html
@@ -89,7 +89,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_c.html b/html/functions_c.html
index 633e2c8..77c7c4a 100644
--- a/html/functions_c.html
+++ b/html/functions_c.html
@@ -151,7 +151,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_d.html b/html/functions_d.html
index b0f884c..b26219e 100644
--- a/html/functions_d.html
+++ b/html/functions_d.html
@@ -194,7 +194,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_e.html b/html/functions_e.html
index 0f063c3..31fbf9b 100644
--- a/html/functions_e.html
+++ b/html/functions_e.html
@@ -117,7 +117,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_f.html b/html/functions_f.html
index 9175af6..8a0664c 100644
--- a/html/functions_f.html
+++ b/html/functions_f.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_g.html b/html/functions_g.html
index c0b5dcf..f2705aa 100644
--- a/html/functions_g.html
+++ b/html/functions_g.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_i.html b/html/functions_i.html
index 067c90b..51dd120 100644
--- a/html/functions_i.html
+++ b/html/functions_i.html
@@ -110,7 +110,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_k.html b/html/functions_k.html
index 7f5a161..fce9dc5 100644
--- a/html/functions_k.html
+++ b/html/functions_k.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_l.html b/html/functions_l.html
index a7bd1d8..549ba24 100644
--- a/html/functions_l.html
+++ b/html/functions_l.html
@@ -113,7 +113,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_m.html b/html/functions_m.html
index 2d96a9b..bf11567 100644
--- a/html/functions_m.html
+++ b/html/functions_m.html
@@ -227,7 +227,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_n.html b/html/functions_n.html
index 2bd4d3b..4211815 100644
--- a/html/functions_n.html
+++ b/html/functions_n.html
@@ -97,6 +97,9 @@
 <li>ndim
 : <a class="el" href="structwtbarr.html#af862b4f90b0406ed8dd0c240768d4bd3">wtbarr</a>
 </li>
+<li>ndis
+: <a class="el" href="structdisprm.html#a7fae0b75ba71ee0eaafaa1d3a20cc6af">disprm</a>
+</li>
 <li>nparm
 : <a class="el" href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">disprm</a>
 </li>
@@ -122,7 +125,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_o.html b/html/functions_o.html
index 0448b24..7783cf4 100644
--- a/html/functions_o.html
+++ b/html/functions_o.html
@@ -90,7 +90,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_p.html b/html/functions_p.html
index e98f781..c0353f1 100644
--- a/html/functions_p.html
+++ b/html/functions_p.html
@@ -84,6 +84,7 @@
 </li>
 <li>padding
 : <a class="el" href="structcelprm.html#acab5a98c001b85a565b7976499c1739c">celprm</a>
+, <a class="el" href="structdisprm.html#a813473ae9d7c62ff0fd265d96832d539">disprm</a>
 , <a class="el" href="structfitskey.html#a42413fd1f1f3117a4bc4c0599c2c3889">fitskey</a>
 , <a class="el" href="structprjprm.html#a75cda8ae364a914f64e119ba859c8372">prjprm</a>
 , <a class="el" href="structspxprm.html#a947deca62dd508673f5b00f639d3af79">spxprm</a>
@@ -134,7 +135,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_r.html b/html/functions_r.html
index e92fd43..fa87479 100644
--- a/html/functions_r.html
+++ b/html/functions_r.html
@@ -105,7 +105,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_s.html b/html/functions_s.html
index 727abe3..19546b3 100644
--- a/html/functions_s.html
+++ b/html/functions_s.html
@@ -132,7 +132,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_t.html b/html/functions_t.html
index 3c21293..baa1cd1 100644
--- a/html/functions_t.html
+++ b/html/functions_t.html
@@ -109,7 +109,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_u.html b/html/functions_u.html
index db23307..367246d 100644
--- a/html/functions_u.html
+++ b/html/functions_u.html
@@ -89,7 +89,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_v.html b/html/functions_v.html
index 389a366..9998246 100644
--- a/html/functions_v.html
+++ b/html/functions_v.html
@@ -108,7 +108,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars.html b/html/functions_vars.html
index b5c1f6d..41dc48e 100644
--- a/html/functions_vars.html
+++ b/html/functions_vars.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_b.html b/html/functions_vars_b.html
index 857d8ad..2ba5c26 100644
--- a/html/functions_vars_b.html
+++ b/html/functions_vars_b.html
@@ -89,7 +89,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_c.html b/html/functions_vars_c.html
index 7975cb7..b1dcec5 100644
--- a/html/functions_vars_c.html
+++ b/html/functions_vars_c.html
@@ -151,7 +151,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_d.html b/html/functions_vars_d.html
index f957f28..e0734d7 100644
--- a/html/functions_vars_d.html
+++ b/html/functions_vars_d.html
@@ -194,7 +194,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_e.html b/html/functions_vars_e.html
index 68a84e7..c0543f6 100644
--- a/html/functions_vars_e.html
+++ b/html/functions_vars_e.html
@@ -117,7 +117,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_f.html b/html/functions_vars_f.html
index 8429b6e..44f276a 100644
--- a/html/functions_vars_f.html
+++ b/html/functions_vars_f.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_g.html b/html/functions_vars_g.html
index 67f3bbc..a4a1c3d 100644
--- a/html/functions_vars_g.html
+++ b/html/functions_vars_g.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_i.html b/html/functions_vars_i.html
index f279651..66df190 100644
--- a/html/functions_vars_i.html
+++ b/html/functions_vars_i.html
@@ -110,7 +110,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_k.html b/html/functions_vars_k.html
index 275ca77..3858f44 100644
--- a/html/functions_vars_k.html
+++ b/html/functions_vars_k.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_l.html b/html/functions_vars_l.html
index 1d3ee3d..4237eeb 100644
--- a/html/functions_vars_l.html
+++ b/html/functions_vars_l.html
@@ -113,7 +113,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_m.html b/html/functions_vars_m.html
index e7957a8..a557200 100644
--- a/html/functions_vars_m.html
+++ b/html/functions_vars_m.html
@@ -227,7 +227,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_n.html b/html/functions_vars_n.html
index d5336e5..a0fd27c 100644
--- a/html/functions_vars_n.html
+++ b/html/functions_vars_n.html
@@ -97,6 +97,9 @@
 <li>ndim
 : <a class="el" href="structwtbarr.html#af862b4f90b0406ed8dd0c240768d4bd3">wtbarr</a>
 </li>
+<li>ndis
+: <a class="el" href="structdisprm.html#a7fae0b75ba71ee0eaafaa1d3a20cc6af">disprm</a>
+</li>
 <li>nparm
 : <a class="el" href="structdisprm.html#afd6bd50c561b27d0a1223e9c6c4f8baa">disprm</a>
 </li>
@@ -122,7 +125,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_o.html b/html/functions_vars_o.html
index 958f3fc..934cb12 100644
--- a/html/functions_vars_o.html
+++ b/html/functions_vars_o.html
@@ -90,7 +90,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_p.html b/html/functions_vars_p.html
index 8d3a099..3384808 100644
--- a/html/functions_vars_p.html
+++ b/html/functions_vars_p.html
@@ -84,6 +84,7 @@
 </li>
 <li>padding
 : <a class="el" href="structcelprm.html#acab5a98c001b85a565b7976499c1739c">celprm</a>
+, <a class="el" href="structdisprm.html#a813473ae9d7c62ff0fd265d96832d539">disprm</a>
 , <a class="el" href="structfitskey.html#a42413fd1f1f3117a4bc4c0599c2c3889">fitskey</a>
 , <a class="el" href="structprjprm.html#a75cda8ae364a914f64e119ba859c8372">prjprm</a>
 , <a class="el" href="structspxprm.html#a947deca62dd508673f5b00f639d3af79">spxprm</a>
@@ -134,7 +135,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_r.html b/html/functions_vars_r.html
index 9866885..dee5dbf 100644
--- a/html/functions_vars_r.html
+++ b/html/functions_vars_r.html
@@ -105,7 +105,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_s.html b/html/functions_vars_s.html
index c9d5d56..fbb472b 100644
--- a/html/functions_vars_s.html
+++ b/html/functions_vars_s.html
@@ -132,7 +132,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_t.html b/html/functions_vars_t.html
index 69edefc..7bdd1b6 100644
--- a/html/functions_vars_t.html
+++ b/html/functions_vars_t.html
@@ -109,7 +109,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_u.html b/html/functions_vars_u.html
index 02b6814..ed50be7 100644
--- a/html/functions_vars_u.html
+++ b/html/functions_vars_u.html
@@ -89,7 +89,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_v.html b/html/functions_vars_v.html
index debd830..033fd80 100644
--- a/html/functions_vars_v.html
+++ b/html/functions_vars_v.html
@@ -108,7 +108,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_w.html b/html/functions_vars_w.html
index 26eea23..296d882 100644
--- a/html/functions_vars_w.html
+++ b/html/functions_vars_w.html
@@ -102,7 +102,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_x.html b/html/functions_vars_x.html
index f3110df..e0b57af 100644
--- a/html/functions_vars_x.html
+++ b/html/functions_vars_x.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_y.html b/html/functions_vars_y.html
index caf802b..5286311 100644
--- a/html/functions_vars_y.html
+++ b/html/functions_vars_y.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_vars_z.html b/html/functions_vars_z.html
index 9e7976c..aac2dfb 100644
--- a/html/functions_vars_z.html
+++ b/html/functions_vars_z.html
@@ -89,7 +89,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_w.html b/html/functions_w.html
index f7f5a61..d82b319 100644
--- a/html/functions_w.html
+++ b/html/functions_w.html
@@ -102,7 +102,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_x.html b/html/functions_x.html
index 5dfcf7f..e7f6500 100644
--- a/html/functions_x.html
+++ b/html/functions_x.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_y.html b/html/functions_y.html
index 3de6b52..7c277da 100644
--- a/html/functions_y.html
+++ b/html/functions_y.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/functions_z.html b/html/functions_z.html
index 962e87c..0ad9a2a 100644
--- a/html/functions_z.html
+++ b/html/functions_z.html
@@ -89,7 +89,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/getwcstab_8h.html b/html/getwcstab_8h.html
index 8af9d7a..9d12323 100644
--- a/html/getwcstab_8h.html
+++ b/html/getwcstab_8h.html
@@ -135,7 +135,7 @@ Functions</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/getwcstab_8h_source.html b/html/getwcstab_8h_source.html
index 31c2b3c..26836b0 100644
--- a/html/getwcstab_8h_source.html
+++ b/html/getwcstab_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="getwcstab_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,7 +75,7 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: getwcstab.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: getwcstab.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* Summary of the getwcstab routines</span></div>
@@ -254,7 +254,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals.html b/html/globals.html
index 1ae5691..8e4fab0 100644
--- a/html/globals.html
+++ b/html/globals.html
@@ -147,7 +147,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_b.html b/html/globals_b.html
index bce7e7d..3c9459b 100644
--- a/html/globals_b.html
+++ b/html/globals_b.html
@@ -99,7 +99,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_c.html b/html/globals_c.html
index ea03882..735dc52 100644
--- a/html/globals_c.html
+++ b/html/globals_c.html
@@ -258,7 +258,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_d.html b/html/globals_d.html
index 9a4ce9b..ad6aad0 100644
--- a/html/globals_d.html
+++ b/html/globals_d.html
@@ -143,6 +143,9 @@
 <li>disset()
 : <a class="el" href="dis_8h.html#ad1bdf4497eb4513ca8431e1baa419041">dis.h</a>
 </li>
+<li>diswarp()
+: <a class="el" href="dis_8h.html#a91fa2d34c30be042516a0246d393b116">dis.h</a>
+</li>
 <li>disx2p()
 : <a class="el" href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653">dis.h</a>
 </li>
@@ -153,7 +156,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_defs.html b/html/globals_defs.html
index 36483ce..876b0e5 100644
--- a/html/globals_defs.html
+++ b/html/globals_defs.html
@@ -549,7 +549,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_e.html b/html/globals_e.html
index f8d07d1..52232d3 100644
--- a/html/globals_e.html
+++ b/html/globals_e.html
@@ -93,7 +93,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_enum.html b/html/globals_enum.html
index daa528d..a2b1b5e 100644
--- a/html/globals_enum.html
+++ b/html/globals_enum.html
@@ -95,7 +95,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_eval.html b/html/globals_eval.html
index 135f332..f343a50 100644
--- a/html/globals_eval.html
+++ b/html/globals_eval.html
@@ -391,7 +391,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_f.html b/html/globals_f.html
index 21b6213..fd122f1 100644
--- a/html/globals_f.html
+++ b/html/globals_f.html
@@ -180,7 +180,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func.html b/html/globals_func.html
index e37cc29..e3568ec 100644
--- a/html/globals_func.html
+++ b/html/globals_func.html
@@ -143,7 +143,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_b.html b/html/globals_func_b.html
index 29f305c..1a034b6 100644
--- a/html/globals_func_b.html
+++ b/html/globals_func_b.html
@@ -95,7 +95,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_c.html b/html/globals_func_c.html
index 9a3479d..d1d3f11 100644
--- a/html/globals_func_c.html
+++ b/html/globals_func_c.html
@@ -188,7 +188,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_d.html b/html/globals_func_d.html
index 216cdbf..1eb0037 100644
--- a/html/globals_func_d.html
+++ b/html/globals_func_d.html
@@ -103,6 +103,9 @@
 <li>disset()
 : <a class="el" href="dis_8h.html#ad1bdf4497eb4513ca8431e1baa419041">dis.h</a>
 </li>
+<li>diswarp()
+: <a class="el" href="dis_8h.html#a91fa2d34c30be042516a0246d393b116">dis.h</a>
+</li>
 <li>disx2p()
 : <a class="el" href="dis_8h.html#ac589d5e85afe3d775cba4c06734ce653">dis.h</a>
 </li>
@@ -110,7 +113,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_e.html b/html/globals_func_e.html
index e2e76bf..6a154da 100644
--- a/html/globals_func_e.html
+++ b/html/globals_func_e.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_f.html b/html/globals_func_f.html
index 88fc3f9..d267a1a 100644
--- a/html/globals_func_f.html
+++ b/html/globals_func_f.html
@@ -110,7 +110,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_h.html b/html/globals_func_h.html
index 79087ae..35dd3c8 100644
--- a/html/globals_func_h.html
+++ b/html/globals_func_h.html
@@ -92,7 +92,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_l.html b/html/globals_func_l.html
index 548631a..08ef794 100644
--- a/html/globals_func_l.html
+++ b/html/globals_func_l.html
@@ -103,6 +103,9 @@
 <li>linset()
 : <a class="el" href="lin_8h.html#a5c01c0991c8d0c4437581a7c1453b09a">lin.h</a>
 </li>
+<li>linwarp()
+: <a class="el" href="lin_8h.html#a27a7a4a2cc3183bb1cd639efaade2265">lin.h</a>
+</li>
 <li>linx2p()
 : <a class="el" href="lin_8h.html#a5490027e9699680dfefe370c28691243">lin.h</a>
 </li>
@@ -116,7 +119,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_m.html b/html/globals_func_m.html
index dc10b9f..a534759 100644
--- a/html/globals_func_m.html
+++ b/html/globals_func_m.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_p.html b/html/globals_func_p.html
index f44734e..77817fa 100644
--- a/html/globals_func_p.html
+++ b/html/globals_func_p.html
@@ -122,7 +122,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_q.html b/html/globals_func_q.html
index 6335079..480f263 100644
--- a/html/globals_func_q.html
+++ b/html/globals_func_q.html
@@ -92,7 +92,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_s.html b/html/globals_func_s.html
index 8fcb28c..058de59 100644
--- a/html/globals_func_s.html
+++ b/html/globals_func_s.html
@@ -188,7 +188,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_t.html b/html/globals_func_t.html
index e015b43..03a1331 100644
--- a/html/globals_func_t.html
+++ b/html/globals_func_t.html
@@ -155,7 +155,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_u.html b/html/globals_func_u.html
index e6fbdef..d68d157 100644
--- a/html/globals_func_u.html
+++ b/html/globals_func_u.html
@@ -86,7 +86,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_v.html b/html/globals_func_v.html
index 240c45f..82d5588 100644
--- a/html/globals_func_v.html
+++ b/html/globals_func_v.html
@@ -101,7 +101,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_w.html b/html/globals_func_w.html
index cb66ec1..4ea9fec 100644
--- a/html/globals_func_w.html
+++ b/html/globals_func_w.html
@@ -254,7 +254,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_x.html b/html/globals_func_x.html
index b715463..470b77b 100644
--- a/html/globals_func_x.html
+++ b/html/globals_func_x.html
@@ -92,7 +92,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_func_z.html b/html/globals_func_z.html
index 624dbb2..7a3b2f9 100644
--- a/html/globals_func_z.html
+++ b/html/globals_func_z.html
@@ -104,7 +104,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_h.html b/html/globals_h.html
index 371fc3a..8ea28f4 100644
--- a/html/globals_h.html
+++ b/html/globals_h.html
@@ -99,7 +99,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_i.html b/html/globals_i.html
index 35558db..87642e5 100644
--- a/html/globals_i.html
+++ b/html/globals_i.html
@@ -90,7 +90,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_k.html b/html/globals_k.html
index 376bba4..d67a897 100644
--- a/html/globals_k.html
+++ b/html/globals_k.html
@@ -93,7 +93,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_l.html b/html/globals_l.html
index 78eb1cf..746aba7 100644
--- a/html/globals_l.html
+++ b/html/globals_l.html
@@ -155,6 +155,9 @@
 <li>linset_errmsg
 : <a class="el" href="lin_8h.html#aa78f202b20674909aab523018106546e">lin.h</a>
 </li>
+<li>linwarp()
+: <a class="el" href="lin_8h.html#a27a7a4a2cc3183bb1cd639efaade2265">lin.h</a>
+</li>
 <li>linx2p()
 : <a class="el" href="lin_8h.html#a5490027e9699680dfefe370c28691243">lin.h</a>
 </li>
@@ -192,7 +195,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_m.html b/html/globals_m.html
index e40a10c..84fb9a9 100644
--- a/html/globals_m.html
+++ b/html/globals_m.html
@@ -108,7 +108,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_n.html b/html/globals_n.html
index 0178633..71f7b00 100644
--- a/html/globals_n.html
+++ b/html/globals_n.html
@@ -90,7 +90,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_p.html b/html/globals_p.html
index 2948830..955a10d 100644
--- a/html/globals_p.html
+++ b/html/globals_p.html
@@ -192,7 +192,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_q.html b/html/globals_q.html
index 7838bac..bb90f67 100644
--- a/html/globals_q.html
+++ b/html/globals_q.html
@@ -99,7 +99,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_r.html b/html/globals_r.html
index 5b72942..f4979b3 100644
--- a/html/globals_r.html
+++ b/html/globals_r.html
@@ -90,7 +90,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_s.html b/html/globals_s.html
index 4d6db17..e584285 100644
--- a/html/globals_s.html
+++ b/html/globals_s.html
@@ -267,7 +267,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_t.html b/html/globals_t.html
index b4e132c..f5789f5 100644
--- a/html/globals_t.html
+++ b/html/globals_t.html
@@ -207,7 +207,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_type.html b/html/globals_type.html
index 787c03f..145dfff 100644
--- a/html/globals_type.html
+++ b/html/globals_type.html
@@ -62,7 +62,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_u.html b/html/globals_u.html
index ccd7e4a..02cb607 100644
--- a/html/globals_u.html
+++ b/html/globals_u.html
@@ -138,7 +138,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_v.html b/html/globals_v.html
index 7690c5b..f669a32 100644
--- a/html/globals_v.html
+++ b/html/globals_v.html
@@ -105,7 +105,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_vars.html b/html/globals_vars.html
index ad0c97d..725d8e3 100644
--- a/html/globals_vars.html
+++ b/html/globals_vars.html
@@ -137,7 +137,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_w.html b/html/globals_w.html
index 1766b2e..2b96237 100644
--- a/html/globals_w.html
+++ b/html/globals_w.html
@@ -573,7 +573,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_x.html b/html/globals_x.html
index 4af7985..a769f6c 100644
--- a/html/globals_x.html
+++ b/html/globals_x.html
@@ -96,7 +96,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/globals_z.html b/html/globals_z.html
index 2f48cf2..ca39faf 100644
--- a/html/globals_z.html
+++ b/html/globals_z.html
@@ -111,7 +111,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:34 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/index.html b/html/index.html
index dc26a91..5617491 100644
--- a/html/index.html
+++ b/html/index.html
@@ -4,7 +4,7 @@
 <meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
 <meta http-equiv="X-UA-Compatible" content="IE=9"/>
 <meta name="generator" content="Doxygen 1.8.9.1"/>
-<title>WCSLIB: WCSLIB 5.0 and PGSBOX 5.0</title>
+<title>WCSLIB: WCSLIB 5.1 and PGSBOX 5.1</title>
 <link href="tabs.css" rel="stylesheet" type="text/css"/>
 <script type="text/javascript" src="jquery.js"></script>
 <script type="text/javascript" src="dynsections.js"></script>
@@ -38,7 +38,7 @@
 </div><!-- top -->
 <div class="header">
   <div class="headertitle">
-<div class="title">WCSLIB 5.0 and PGSBOX 5.0 </div>  </div>
+<div class="title">WCSLIB 5.1 and PGSBOX 5.1 </div>  </div>
 </div><!--header-->
 <div class="contents">
 <div class="textblock"><div class="image">
@@ -62,7 +62,7 @@ Contents</h1>
 </ul>
 <h1><a class="anchor" id="copyright"></a>
 Copyright</h1>
-<pre class="fragment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+<pre class="fragment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   WCSLIB is free software: you can redistribute it and/or modify it under the
@@ -82,11 +82,11 @@ Copyright</h1>
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: mainpage.dox,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: mainpage.dox,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 </pre> </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/intro.html b/html/intro.html
index b6f3d0c..5710b49 100644
--- a/html/intro.html
+++ b/html/intro.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -63,7 +63,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/lin_8h.html b/html/lin_8h.html
index 7285962..5dd5059 100644
--- a/html/lin_8h.html
+++ b/html/lin_8h.html
@@ -137,6 +137,9 @@ Functions</h2></td></tr>
 <tr class="memitem:a5490027e9699680dfefe370c28691243"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="lin_8h.html#a5490027e9699680dfefe370c28691243">linx2p</a> (struct <a class="el" href="structlinprm.html">linprm</a> *lin, int ncoord, int nelem, const double imgcrd[], double pixcrd[])</td></tr>
 <tr class="memdesc:a5490027e9699680dfefe370c28691243"><td class="mdescLeft"> </td><td class="mdescRight">World-to-pixel linear transformation.  <a href="#a5490027e9699680dfefe370c28691243">More...</a><br /></td></tr>
 <tr class="separator:a5490027e9699680dfefe370c28691243"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a27a7a4a2cc3183bb1cd639efaade2265"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="lin_8h.html#a27a7a4a2cc3183bb1cd639efaade2265">linwarp</a> (struct <a class="el" href="structlinprm.html">linprm</a> *lin, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot)</td></tr>
+<tr class="memdesc:a27a7a4a2cc3183bb1cd639efaade2265"><td class="mdescLeft"> </td><td class="mdescRight">Compute measures of distortion.  <a href="#a27a7a4a2cc3183bb1cd639efaade2265">More...</a><br /></td></tr>
+<tr class="separator:a27a7a4a2cc3183bb1cd639efaade2265"><td class="memSeparator" colspan="2"> </td></tr>
 <tr class="memitem:acc7d26efba3ca08d36047253a9315dcc"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="lin_8h.html#acc7d26efba3ca08d36047253a9315dcc">matinv</a> (int n, const double mat[], double inv[])</td></tr>
 <tr class="memdesc:acc7d26efba3ca08d36047253a9315dcc"><td class="mdescLeft"> </td><td class="mdescRight">Matrix inversion.  <a href="#acc7d26efba3ca08d36047253a9315dcc">More...</a><br /></td></tr>
 <tr class="separator:acc7d26efba3ca08d36047253a9315dcc"><td class="memSeparator" colspan="2"> </td></tr>
@@ -153,6 +156,7 @@ Variables</h2></td></tr>
 <p><a class="el" href="lin_8h.html#a7bdde709fac889f1c386e9c8993d74f7" title="Print error messages from a linprm struct. ">linperr()</a> prints the error message(s) (if any) stored in a <a class="el" href="structlinprm.html" title="Linear transformation parameters. ">linprm</a> struct, and the disprm structs that it may contain.</p>
 <p>A setup routine, <a class="el" href="lin_8h.html#a5c01c0991c8d0c4437581a7c1453b09a" title="Setup routine for the linprm struct. ">linset()</a>, computes intermediate values in the <a class="el" href="structlinprm.html" title="Linear transformation parameters. ">linprm</a> struct from parameters in it that were supplied by the user. The struct always needs to be set up by <a class="el" href="lin_8h.html#a5c01c0991c8d0c4437581a7c1453b09a" title="Setup routine for the linprm struct. ">li [...]
 <p><a class="el" href="lin_8h.html#ae4947608476c198ad27759d1e562d655" title="Pixel-to-world linear transformation. ">linp2x()</a> and <a class="el" href="lin_8h.html#a5490027e9699680dfefe370c28691243" title="World-to-pixel linear transformation. ">linx2p()</a> implement the WCS linear transformations.</p>
+<p>An auxiliary routine, <a class="el" href="lin_8h.html#a27a7a4a2cc3183bb1cd639efaade2265" title="Compute measures of distortion. ">linwarp()</a>, computes various measures of the distortion over a specified range of pixel coordinates.</p>
 <p>An auxiliary matrix inversion routine, <a class="el" href="lin_8h.html#acc7d26efba3ca08d36047253a9315dcc" title="Matrix inversion. ">matinv()</a>, is included. It uses LU-triangular factorization with scaled partial pivoting. </p>
 </div><h2 class="groupheader">Macro Definition Documentation</h2>
 <a class="anchor" id="afce62bec193631f6e6b58c5b786cd660"></a>
@@ -686,6 +690,121 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 
 </div>
 </div>
+<a class="anchor" id="a27a7a4a2cc3183bb1cd639efaade2265"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int linwarp </td>
+          <td>(</td>
+          <td class="paramtype">struct <a class="el" href="structlinprm.html">linprm</a> * </td>
+          <td class="paramname"><em>lin</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const double </td>
+          <td class="paramname"><em>pixblc</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const double </td>
+          <td class="paramname"><em>pixtrc</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const double </td>
+          <td class="paramname"><em>pixsamp</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int * </td>
+          <td class="paramname"><em>nsamp</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double </td>
+          <td class="paramname"><em>maxdis</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double * </td>
+          <td class="paramname"><em>maxtot</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double </td>
+          <td class="paramname"><em>avgdis</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double * </td>
+          <td class="paramname"><em>avgtot</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double </td>
+          <td class="paramname"><em>rmsdis</em>[], </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double * </td>
+          <td class="paramname"><em>rmstot</em> </td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p><b>linwarp</b>() computes various measures of the distortion over the specified range of pixel coordinates.</p>
+<p>All distortion measures are specified as an offset in pixel coordinates, as given directly by prior distortions. The offset in intermediate pixel coordinates given by sequent distortions is translated back to pixel coordinates by applying the inverse of the linear transformation matrix (<code><b>PC</b>i<b>_</b>ja</code> or <code><b>CD</b>i<b>_</b>ja</code>). The difference may be significant if the matrix introduced a scaling.</p>
+<p>If all distortions are prior, then <b>linwarp</b>() uses <a class="el" href="dis_8h.html#a91fa2d34c30be042516a0246d393b116" title="Compute measures of distortion. ">diswarp()</a>, q.v.</p>
+<dl class="params"><dt>Parameters</dt><dd>
+  <table class="params">
+    <tr><td class="paramdir">[in,out]</td><td class="paramname">lin</td><td>Linear transformation parameters plus distortions.</td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">pixblc</td><td>Start of the range of pixel coordinates (i.e. "bottom left-hand corner" in the conventional FITS image display orientation). May be specified as a NULL pointer which is interpreted as (1,1,...). </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">pixtrc</td><td>End of the range of pixel coordinates (i.e. "top right-hand corner" in the conventional FITS image display orientation). </td></tr>
+    <tr><td class="paramdir">[in]</td><td class="paramname">pixsamp</td><td>If positive or zero, the increment on the particular axis, starting at pixblc[]. Zero is interpreted as a unit increment. pixsamp may also be specified as a NULL pointer which is interpreted as all zeroes, i.e. unit increments on all axes. <br />
+ If negative, the grid size on the particular axis (the absolute value being rounded to the nearest integer). For example, if pixsamp is (-128.0,-128.0,...) then each axis will be sampled at 128 points between pixblc[] and pixtrc[] inclusive. Use caution when using this option on non-square images.</td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">nsamp</td><td>The number of pixel coordinates sampled. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">maxdis</td><td>For each individual distortion function, the maximum absolute value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">maxtot</td><td>For the combination of all distortion functions, the maximum absolute value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">avgdis</td><td>For each individual distortion function, the mean value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">avgtot</td><td>For the combination of all distortion functions, the mean value of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">rmsdis</td><td>For each individual distortion function, the root mean square deviation of the distortion. <br />
+ Can be specified as a NULL pointer if not required. </td></tr>
+    <tr><td class="paramdir">[out]</td><td class="paramname">rmstot</td><td>For the combination of all distortion functions, the root mean square deviation of the distortion. <br />
+ Can be specified as a NULL pointer if not required.</td></tr>
+  </table>
+  </dd>
+</dl>
+<dl class="section return"><dt>Returns</dt><dd>Status return value:<ul>
+<li>0: Success.</li>
+<li>1: Null <a class="el" href="structlinprm.html" title="Linear transformation parameters. ">linprm</a> pointer passed.</li>
+<li>2: Memory allocation failed.</li>
+<li>3: Invalid parameter.</li>
+<li>4: Distort error. </li>
+</ul>
+</dd></dl>
+
+</div>
+</div>
 <a class="anchor" id="acc7d26efba3ca08d36047253a9315dcc"></a>
 <div class="memitem">
 <div class="memproto">
@@ -750,7 +869,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/lin_8h_source.html b/html/lin_8h_source.html
index 249eb78..627bbb4 100644
--- a/html/lin_8h_source.html
+++ b/html/lin_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="lin_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: lin.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: lin.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -109,578 +109,680 @@
 <div class="line"><a name="l00056"></a><span class="lineno">   56</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00057"></a><span class="lineno">   57</span> <span class="comment">* linp2x() and linx2p() implement the WCS linear transformations.</span></div>
 <div class="line"><a name="l00058"></a><span class="lineno">   58</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00059"></a><span class="lineno">   59</span> <span class="comment">* An auxiliary matrix inversion routine, matinv(), is included.  It uses</span></div>
-<div class="line"><a name="l00060"></a><span class="lineno">   60</span> <span class="comment">* LU-triangular factorization with scaled partial pivoting.</span></div>
+<div class="line"><a name="l00059"></a><span class="lineno">   59</span> <span class="comment">* An auxiliary routine, linwarp(), computes various measures of the distortion</span></div>
+<div class="line"><a name="l00060"></a><span class="lineno">   60</span> <span class="comment">* over a specified range of pixel coordinates.</span></div>
 <div class="line"><a name="l00061"></a><span class="lineno">   61</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00062"></a><span class="lineno">   62</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00063"></a><span class="lineno">   63</span> <span class="comment">* linini() - Default constructor for the linprm struct</span></div>
-<div class="line"><a name="l00064"></a><span class="lineno">   64</span> <span class="comment">* ----------------------------------------------------</span></div>
-<div class="line"><a name="l00065"></a><span class="lineno">   65</span> <span class="comment">* linini() allocates memory for arrays in a linprm struct and sets all members</span></div>
-<div class="line"><a name="l00066"></a><span class="lineno">   66</span> <span class="comment">* of the struct to default values.</span></div>
-<div class="line"><a name="l00067"></a><span class="lineno">   67</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00068"></a><span class="lineno">   68</span> <span class="comment">* PLEASE NOTE: every linprm struct must be initialized by linini(), possibly</span></div>
-<div class="line"><a name="l00069"></a><span class="lineno">   69</span> <span class="comment">* repeatedly.  On the first invokation, and only the first invokation,</span></div>
-<div class="line"><a name="l00070"></a><span class="lineno">   70</span> <span class="comment">* linprm::flag must be set to -1 to initialize memory management, regardless</span></div>
-<div class="line"><a name="l00071"></a><span class="lineno">   71</span> <span class="comment">* of whether linini() will actually be used to allocate memory.</span></div>
-<div class="line"><a name="l00072"></a><span class="lineno">   72</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00073"></a><span class="lineno">   73</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00074"></a><span class="lineno">   74</span> <span class="comment">*   alloc     int       If true, allocate memory unconditionally for arrays in</span></div>
-<div class="line"><a name="l00075"></a><span class="lineno">   75</span> <span class="comment">*                       the linprm struct.</span></div>
-<div class="line"><a name="l00076"></a><span class="lineno">   76</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00077"></a><span class="lineno">   77</span> <span class="comment">*                       If false, it is assumed that pointers to these arrays</span></div>
-<div class="line"><a name="l00078"></a><span class="lineno">   78</span> <span class="comment">*                       have been set by the user except if they are null</span></div>
-<div class="line"><a name="l00079"></a><span class="lineno">   79</span> <span class="comment">*                       pointers in which case memory will be allocated for</span></div>
-<div class="line"><a name="l00080"></a><span class="lineno">   80</span> <span class="comment">*                       them regardless.  (In other words, setting alloc true</span></div>
-<div class="line"><a name="l00081"></a><span class="lineno">   81</span> <span class="comment">*                       saves having to initalize these pointers to zero.)</span></div>
-<div class="line"><a name="l00082"></a><span class="lineno">   82</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00083"></a><span class="lineno">   83</span> <span class="comment">*   naxis     int       The number of world coordinate axes, used to determine</span></div>
-<div class="line"><a name="l00084"></a><span class="lineno">   84</span> <span class="comment">*                       array sizes.</span></div>
+<div class="line"><a name="l00062"></a><span class="lineno">   62</span> <span class="comment">* An auxiliary matrix inversion routine, matinv(), is included.  It uses</span></div>
+<div class="line"><a name="l00063"></a><span class="lineno">   63</span> <span class="comment">* LU-triangular factorization with scaled partial pivoting.</span></div>
+<div class="line"><a name="l00064"></a><span class="lineno">   64</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00065"></a><span class="lineno">   65</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00066"></a><span class="lineno">   66</span> <span class="comment">* linini() - Default constructor for the linprm struct</span></div>
+<div class="line"><a name="l00067"></a><span class="lineno">   67</span> <span class="comment">* ----------------------------------------------------</span></div>
+<div class="line"><a name="l00068"></a><span class="lineno">   68</span> <span class="comment">* linini() allocates memory for arrays in a linprm struct and sets all members</span></div>
+<div class="line"><a name="l00069"></a><span class="lineno">   69</span> <span class="comment">* of the struct to default values.</span></div>
+<div class="line"><a name="l00070"></a><span class="lineno">   70</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00071"></a><span class="lineno">   71</span> <span class="comment">* PLEASE NOTE: every linprm struct must be initialized by linini(), possibly</span></div>
+<div class="line"><a name="l00072"></a><span class="lineno">   72</span> <span class="comment">* repeatedly.  On the first invokation, and only the first invokation,</span></div>
+<div class="line"><a name="l00073"></a><span class="lineno">   73</span> <span class="comment">* linprm::flag must be set to -1 to initialize memory management, regardless</span></div>
+<div class="line"><a name="l00074"></a><span class="lineno">   74</span> <span class="comment">* of whether linini() will actually be used to allocate memory.</span></div>
+<div class="line"><a name="l00075"></a><span class="lineno">   75</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00076"></a><span class="lineno">   76</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00077"></a><span class="lineno">   77</span> <span class="comment">*   alloc     int       If true, allocate memory unconditionally for arrays in</span></div>
+<div class="line"><a name="l00078"></a><span class="lineno">   78</span> <span class="comment">*                       the linprm struct.</span></div>
+<div class="line"><a name="l00079"></a><span class="lineno">   79</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00080"></a><span class="lineno">   80</span> <span class="comment">*                       If false, it is assumed that pointers to these arrays</span></div>
+<div class="line"><a name="l00081"></a><span class="lineno">   81</span> <span class="comment">*                       have been set by the user except if they are null</span></div>
+<div class="line"><a name="l00082"></a><span class="lineno">   82</span> <span class="comment">*                       pointers in which case memory will be allocated for</span></div>
+<div class="line"><a name="l00083"></a><span class="lineno">   83</span> <span class="comment">*                       them regardless.  (In other words, setting alloc true</span></div>
+<div class="line"><a name="l00084"></a><span class="lineno">   84</span> <span class="comment">*                       saves having to initalize these pointers to zero.)</span></div>
 <div class="line"><a name="l00085"></a><span class="lineno">   85</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00086"></a><span class="lineno">   86</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00087"></a><span class="lineno">   87</span> <span class="comment">*   lin       struct linprm*</span></div>
-<div class="line"><a name="l00088"></a><span class="lineno">   88</span> <span class="comment">*                       Linear transformation parameters.  Note that, in order</span></div>
-<div class="line"><a name="l00089"></a><span class="lineno">   89</span> <span class="comment">*                       to initialize memory management linprm::flag should be</span></div>
-<div class="line"><a name="l00090"></a><span class="lineno">   90</span> <span class="comment">*                       set to -1 when lin is initialized for the first time</span></div>
-<div class="line"><a name="l00091"></a><span class="lineno">   91</span> <span class="comment">*                       (memory leaks may result if it had already been</span></div>
-<div class="line"><a name="l00092"></a><span class="lineno">   92</span> <span class="comment">*                       initialized).</span></div>
-<div class="line"><a name="l00093"></a><span class="lineno">   93</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00094"></a><span class="lineno">   94</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00095"></a><span class="lineno">   95</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00096"></a><span class="lineno">   96</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00097"></a><span class="lineno">   97</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00098"></a><span class="lineno">   98</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00099"></a><span class="lineno">   99</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00100"></a><span class="lineno">  100</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00101"></a><span class="lineno">  101</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00086"></a><span class="lineno">   86</span> <span class="comment">*   naxis     int       The number of world coordinate axes, used to determine</span></div>
+<div class="line"><a name="l00087"></a><span class="lineno">   87</span> <span class="comment">*                       array sizes.</span></div>
+<div class="line"><a name="l00088"></a><span class="lineno">   88</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00089"></a><span class="lineno">   89</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00090"></a><span class="lineno">   90</span> <span class="comment">*   lin       struct linprm*</span></div>
+<div class="line"><a name="l00091"></a><span class="lineno">   91</span> <span class="comment">*                       Linear transformation parameters.  Note that, in order</span></div>
+<div class="line"><a name="l00092"></a><span class="lineno">   92</span> <span class="comment">*                       to initialize memory management linprm::flag should be</span></div>
+<div class="line"><a name="l00093"></a><span class="lineno">   93</span> <span class="comment">*                       set to -1 when lin is initialized for the first time</span></div>
+<div class="line"><a name="l00094"></a><span class="lineno">   94</span> <span class="comment">*                       (memory leaks may result if it had already been</span></div>
+<div class="line"><a name="l00095"></a><span class="lineno">   95</span> <span class="comment">*                       initialized).</span></div>
+<div class="line"><a name="l00096"></a><span class="lineno">   96</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00097"></a><span class="lineno">   97</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00098"></a><span class="lineno">   98</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00099"></a><span class="lineno">   99</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00100"></a><span class="lineno">  100</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00101"></a><span class="lineno">  101</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
 <div class="line"><a name="l00102"></a><span class="lineno">  102</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00103"></a><span class="lineno">  103</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00104"></a><span class="lineno">  104</span> <span class="comment">* lindis() - Assign a distortion to a linprm struct</span></div>
-<div class="line"><a name="l00105"></a><span class="lineno">  105</span> <span class="comment">* -------------------------------------------------</span></div>
-<div class="line"><a name="l00106"></a><span class="lineno">  106</span> <span class="comment">* lindis() may be used to assign the address of a disprm struct to</span></div>
-<div class="line"><a name="l00107"></a><span class="lineno">  107</span> <span class="comment">* linprm::dispre or linprm::disseq.  The linprm struct must already have been</span></div>
-<div class="line"><a name="l00108"></a><span class="lineno">  108</span> <span class="comment">* initialized by linini().</span></div>
-<div class="line"><a name="l00109"></a><span class="lineno">  109</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00110"></a><span class="lineno">  110</span> <span class="comment">* The disprm struct must have been allocated from the heap (e.g. using</span></div>
-<div class="line"><a name="l00111"></a><span class="lineno">  111</span> <span class="comment">* malloc(), calloc(), etc.).  lindis() will immediately initialize it via a</span></div>
-<div class="line"><a name="l00112"></a><span class="lineno">  112</span> <span class="comment">* call to disini() using the value of linprm::naxis.  Subsequently, it will be</span></div>
-<div class="line"><a name="l00113"></a><span class="lineno">  113</span> <span class="comment">* reinitialized by calls to linini(), and freed by linfree(), neither of which</span></div>
-<div class="line"><a name="l00114"></a><span class="lineno">  114</span> <span class="comment">* would happen if the disprm struct was assigned directly.</span></div>
-<div class="line"><a name="l00115"></a><span class="lineno">  115</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00116"></a><span class="lineno">  116</span> <span class="comment">* If the disprm struct had previously been assigned via lindis(), it will be</span></div>
-<div class="line"><a name="l00117"></a><span class="lineno">  117</span> <span class="comment">* freed before reassignment.  It is also permissable for a null disprm pointer</span></div>
-<div class="line"><a name="l00118"></a><span class="lineno">  118</span> <span class="comment">* to be assigned to disable the distortion correction.</span></div>
-<div class="line"><a name="l00119"></a><span class="lineno">  119</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00120"></a><span class="lineno">  120</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00121"></a><span class="lineno">  121</span> <span class="comment">*   sequence  int       Is it a prior or sequent distortion?</span></div>
-<div class="line"><a name="l00122"></a><span class="lineno">  122</span> <span class="comment">*                         1: Prior,   the assignment is to linprm::dispre.</span></div>
-<div class="line"><a name="l00123"></a><span class="lineno">  123</span> <span class="comment">*                         2: Sequent, the assignment is to linprm::disseq.</span></div>
-<div class="line"><a name="l00124"></a><span class="lineno">  124</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00125"></a><span class="lineno">  125</span> <span class="comment">*                       Anything else is an error.</span></div>
-<div class="line"><a name="l00126"></a><span class="lineno">  126</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00127"></a><span class="lineno">  127</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00128"></a><span class="lineno">  128</span> <span class="comment">*   lin       struct linprm*</span></div>
-<div class="line"><a name="l00129"></a><span class="lineno">  129</span> <span class="comment">*                       Linear transformation parameters.</span></div>
-<div class="line"><a name="l00130"></a><span class="lineno">  130</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00131"></a><span class="lineno">  131</span> <span class="comment">*   dis       struct disprm*</span></div>
-<div class="line"><a name="l00132"></a><span class="lineno">  132</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00103"></a><span class="lineno">  103</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00104"></a><span class="lineno">  104</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00105"></a><span class="lineno">  105</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00106"></a><span class="lineno">  106</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00107"></a><span class="lineno">  107</span> <span class="comment">* lindis() - Assign a distortion to a linprm struct</span></div>
+<div class="line"><a name="l00108"></a><span class="lineno">  108</span> <span class="comment">* -------------------------------------------------</span></div>
+<div class="line"><a name="l00109"></a><span class="lineno">  109</span> <span class="comment">* lindis() may be used to assign the address of a disprm struct to</span></div>
+<div class="line"><a name="l00110"></a><span class="lineno">  110</span> <span class="comment">* linprm::dispre or linprm::disseq.  The linprm struct must already have been</span></div>
+<div class="line"><a name="l00111"></a><span class="lineno">  111</span> <span class="comment">* initialized by linini().</span></div>
+<div class="line"><a name="l00112"></a><span class="lineno">  112</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00113"></a><span class="lineno">  113</span> <span class="comment">* The disprm struct must have been allocated from the heap (e.g. using</span></div>
+<div class="line"><a name="l00114"></a><span class="lineno">  114</span> <span class="comment">* malloc(), calloc(), etc.).  lindis() will immediately initialize it via a</span></div>
+<div class="line"><a name="l00115"></a><span class="lineno">  115</span> <span class="comment">* call to disini() using the value of linprm::naxis.  Subsequently, it will be</span></div>
+<div class="line"><a name="l00116"></a><span class="lineno">  116</span> <span class="comment">* reinitialized by calls to linini(), and freed by linfree(), neither of which</span></div>
+<div class="line"><a name="l00117"></a><span class="lineno">  117</span> <span class="comment">* would happen if the disprm struct was assigned directly.</span></div>
+<div class="line"><a name="l00118"></a><span class="lineno">  118</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00119"></a><span class="lineno">  119</span> <span class="comment">* If the disprm struct had previously been assigned via lindis(), it will be</span></div>
+<div class="line"><a name="l00120"></a><span class="lineno">  120</span> <span class="comment">* freed before reassignment.  It is also permissable for a null disprm pointer</span></div>
+<div class="line"><a name="l00121"></a><span class="lineno">  121</span> <span class="comment">* to be assigned to disable the distortion correction.</span></div>
+<div class="line"><a name="l00122"></a><span class="lineno">  122</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00123"></a><span class="lineno">  123</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00124"></a><span class="lineno">  124</span> <span class="comment">*   sequence  int       Is it a prior or sequent distortion?</span></div>
+<div class="line"><a name="l00125"></a><span class="lineno">  125</span> <span class="comment">*                         1: Prior,   the assignment is to linprm::dispre.</span></div>
+<div class="line"><a name="l00126"></a><span class="lineno">  126</span> <span class="comment">*                         2: Sequent, the assignment is to linprm::disseq.</span></div>
+<div class="line"><a name="l00127"></a><span class="lineno">  127</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00128"></a><span class="lineno">  128</span> <span class="comment">*                       Anything else is an error.</span></div>
+<div class="line"><a name="l00129"></a><span class="lineno">  129</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00130"></a><span class="lineno">  130</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00131"></a><span class="lineno">  131</span> <span class="comment">*   lin       struct linprm*</span></div>
+<div class="line"><a name="l00132"></a><span class="lineno">  132</span> <span class="comment">*                       Linear transformation parameters.</span></div>
 <div class="line"><a name="l00133"></a><span class="lineno">  133</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00134"></a><span class="lineno">  134</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00135"></a><span class="lineno">  135</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00136"></a><span class="lineno">  136</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00137"></a><span class="lineno">  137</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00138"></a><span class="lineno">  138</span> <span class="comment">*                         4: Invalid sequence.</span></div>
-<div class="line"><a name="l00139"></a><span class="lineno">  139</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00140"></a><span class="lineno">  140</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00141"></a><span class="lineno">  141</span> <span class="comment">* lincpy() - Copy routine for the linprm struct</span></div>
-<div class="line"><a name="l00142"></a><span class="lineno">  142</span> <span class="comment">* ---------------------------------------------</span></div>
-<div class="line"><a name="l00143"></a><span class="lineno">  143</span> <span class="comment">* lincpy() does a deep copy of one linprm struct to another, using linini() to</span></div>
-<div class="line"><a name="l00144"></a><span class="lineno">  144</span> <span class="comment">* allocate memory for its arrays if required.  Only the "information to be</span></div>
-<div class="line"><a name="l00145"></a><span class="lineno">  145</span> <span class="comment">* provided" part of the struct is copied; a call to linset() is required to</span></div>
-<div class="line"><a name="l00146"></a><span class="lineno">  146</span> <span class="comment">* initialize the remainder.</span></div>
-<div class="line"><a name="l00147"></a><span class="lineno">  147</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00148"></a><span class="lineno">  148</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00149"></a><span class="lineno">  149</span> <span class="comment">*   alloc     int       If true, allocate memory for the crpix, pc, and cdelt</span></div>
-<div class="line"><a name="l00150"></a><span class="lineno">  150</span> <span class="comment">*                       arrays in the destination.  Otherwise, it is assumed</span></div>
-<div class="line"><a name="l00151"></a><span class="lineno">  151</span> <span class="comment">*                       that pointers to these arrays have been set by the</span></div>
-<div class="line"><a name="l00152"></a><span class="lineno">  152</span> <span class="comment">*                       user except if they are null pointers in which case</span></div>
-<div class="line"><a name="l00153"></a><span class="lineno">  153</span> <span class="comment">*                       memory will be allocated for them regardless.</span></div>
-<div class="line"><a name="l00154"></a><span class="lineno">  154</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00155"></a><span class="lineno">  155</span> <span class="comment">*   linsrc    const struct linprm*</span></div>
-<div class="line"><a name="l00156"></a><span class="lineno">  156</span> <span class="comment">*                       Struct to copy from.</span></div>
+<div class="line"><a name="l00134"></a><span class="lineno">  134</span> <span class="comment">*   dis       struct disprm*</span></div>
+<div class="line"><a name="l00135"></a><span class="lineno">  135</span> <span class="comment">*                       Distortion function parameters.</span></div>
+<div class="line"><a name="l00136"></a><span class="lineno">  136</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00137"></a><span class="lineno">  137</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00138"></a><span class="lineno">  138</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00139"></a><span class="lineno">  139</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00140"></a><span class="lineno">  140</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00141"></a><span class="lineno">  141</span> <span class="comment">*                         4: Invalid sequence.</span></div>
+<div class="line"><a name="l00142"></a><span class="lineno">  142</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00143"></a><span class="lineno">  143</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00144"></a><span class="lineno">  144</span> <span class="comment">* lincpy() - Copy routine for the linprm struct</span></div>
+<div class="line"><a name="l00145"></a><span class="lineno">  145</span> <span class="comment">* ---------------------------------------------</span></div>
+<div class="line"><a name="l00146"></a><span class="lineno">  146</span> <span class="comment">* lincpy() does a deep copy of one linprm struct to another, using linini() to</span></div>
+<div class="line"><a name="l00147"></a><span class="lineno">  147</span> <span class="comment">* allocate memory for its arrays if required.  Only the "information to be</span></div>
+<div class="line"><a name="l00148"></a><span class="lineno">  148</span> <span class="comment">* provided" part of the struct is copied; a call to linset() is required to</span></div>
+<div class="line"><a name="l00149"></a><span class="lineno">  149</span> <span class="comment">* initialize the remainder.</span></div>
+<div class="line"><a name="l00150"></a><span class="lineno">  150</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00151"></a><span class="lineno">  151</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00152"></a><span class="lineno">  152</span> <span class="comment">*   alloc     int       If true, allocate memory for the crpix, pc, and cdelt</span></div>
+<div class="line"><a name="l00153"></a><span class="lineno">  153</span> <span class="comment">*                       arrays in the destination.  Otherwise, it is assumed</span></div>
+<div class="line"><a name="l00154"></a><span class="lineno">  154</span> <span class="comment">*                       that pointers to these arrays have been set by the</span></div>
+<div class="line"><a name="l00155"></a><span class="lineno">  155</span> <span class="comment">*                       user except if they are null pointers in which case</span></div>
+<div class="line"><a name="l00156"></a><span class="lineno">  156</span> <span class="comment">*                       memory will be allocated for them regardless.</span></div>
 <div class="line"><a name="l00157"></a><span class="lineno">  157</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00158"></a><span class="lineno">  158</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00159"></a><span class="lineno">  159</span> <span class="comment">*   lindst    struct linprm*</span></div>
-<div class="line"><a name="l00160"></a><span class="lineno">  160</span> <span class="comment">*                       Struct to copy to.  linprm::flag should be set to -1</span></div>
-<div class="line"><a name="l00161"></a><span class="lineno">  161</span> <span class="comment">*                       if lindst was not previously initialized (memory leaks</span></div>
-<div class="line"><a name="l00162"></a><span class="lineno">  162</span> <span class="comment">*                       may result if it was previously initialized).</span></div>
-<div class="line"><a name="l00163"></a><span class="lineno">  163</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00164"></a><span class="lineno">  164</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00165"></a><span class="lineno">  165</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00166"></a><span class="lineno">  166</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00167"></a><span class="lineno">  167</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00168"></a><span class="lineno">  168</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00169"></a><span class="lineno">  169</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00170"></a><span class="lineno">  170</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00171"></a><span class="lineno">  171</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00158"></a><span class="lineno">  158</span> <span class="comment">*   linsrc    const struct linprm*</span></div>
+<div class="line"><a name="l00159"></a><span class="lineno">  159</span> <span class="comment">*                       Struct to copy from.</span></div>
+<div class="line"><a name="l00160"></a><span class="lineno">  160</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00161"></a><span class="lineno">  161</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00162"></a><span class="lineno">  162</span> <span class="comment">*   lindst    struct linprm*</span></div>
+<div class="line"><a name="l00163"></a><span class="lineno">  163</span> <span class="comment">*                       Struct to copy to.  linprm::flag should be set to -1</span></div>
+<div class="line"><a name="l00164"></a><span class="lineno">  164</span> <span class="comment">*                       if lindst was not previously initialized (memory leaks</span></div>
+<div class="line"><a name="l00165"></a><span class="lineno">  165</span> <span class="comment">*                       may result if it was previously initialized).</span></div>
+<div class="line"><a name="l00166"></a><span class="lineno">  166</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00167"></a><span class="lineno">  167</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00168"></a><span class="lineno">  168</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00169"></a><span class="lineno">  169</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00170"></a><span class="lineno">  170</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00171"></a><span class="lineno">  171</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
 <div class="line"><a name="l00172"></a><span class="lineno">  172</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00173"></a><span class="lineno">  173</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00174"></a><span class="lineno">  174</span> <span class="comment">* linfree() - Destructor for the linprm struct</span></div>
-<div class="line"><a name="l00175"></a><span class="lineno">  175</span> <span class="comment">* --------------------------------------------</span></div>
-<div class="line"><a name="l00176"></a><span class="lineno">  176</span> <span class="comment">* linfree() frees memory allocated for the linprm arrays by linini() and/or</span></div>
-<div class="line"><a name="l00177"></a><span class="lineno">  177</span> <span class="comment">* linset().  linini() keeps a record of the memory it allocates and linfree()</span></div>
-<div class="line"><a name="l00178"></a><span class="lineno">  178</span> <span class="comment">* will only attempt to free this.</span></div>
-<div class="line"><a name="l00179"></a><span class="lineno">  179</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00180"></a><span class="lineno">  180</span> <span class="comment">* PLEASE NOTE: linfree() must not be invoked on a linprm struct that was not</span></div>
-<div class="line"><a name="l00181"></a><span class="lineno">  181</span> <span class="comment">* initialized by linini().</span></div>
+<div class="line"><a name="l00173"></a><span class="lineno">  173</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00174"></a><span class="lineno">  174</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00175"></a><span class="lineno">  175</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00176"></a><span class="lineno">  176</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00177"></a><span class="lineno">  177</span> <span class="comment">* linfree() - Destructor for the linprm struct</span></div>
+<div class="line"><a name="l00178"></a><span class="lineno">  178</span> <span class="comment">* --------------------------------------------</span></div>
+<div class="line"><a name="l00179"></a><span class="lineno">  179</span> <span class="comment">* linfree() frees memory allocated for the linprm arrays by linini() and/or</span></div>
+<div class="line"><a name="l00180"></a><span class="lineno">  180</span> <span class="comment">* linset().  linini() keeps a record of the memory it allocates and linfree()</span></div>
+<div class="line"><a name="l00181"></a><span class="lineno">  181</span> <span class="comment">* will only attempt to free this.</span></div>
 <div class="line"><a name="l00182"></a><span class="lineno">  182</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00183"></a><span class="lineno">  183</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00184"></a><span class="lineno">  184</span> <span class="comment">*   lin       struct linprm*</span></div>
-<div class="line"><a name="l00185"></a><span class="lineno">  185</span> <span class="comment">*                       Linear transformation parameters.</span></div>
-<div class="line"><a name="l00186"></a><span class="lineno">  186</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00187"></a><span class="lineno">  187</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00188"></a><span class="lineno">  188</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00189"></a><span class="lineno">  189</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00190"></a><span class="lineno">  190</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00191"></a><span class="lineno">  191</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00192"></a><span class="lineno">  192</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00193"></a><span class="lineno">  193</span> <span class="comment">* linprt() - Print routine for the linprm struct</span></div>
-<div class="line"><a name="l00194"></a><span class="lineno">  194</span> <span class="comment">* ----------------------------------------------</span></div>
-<div class="line"><a name="l00195"></a><span class="lineno">  195</span> <span class="comment">* linprt() prints the contents of a linprm struct using wcsprintf().  Mainly</span></div>
-<div class="line"><a name="l00196"></a><span class="lineno">  196</span> <span class="comment">* intended for diagnostic purposes.</span></div>
-<div class="line"><a name="l00197"></a><span class="lineno">  197</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00198"></a><span class="lineno">  198</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00199"></a><span class="lineno">  199</span> <span class="comment">*   lin       const struct linprm*</span></div>
-<div class="line"><a name="l00200"></a><span class="lineno">  200</span> <span class="comment">*                       Linear transformation parameters.</span></div>
-<div class="line"><a name="l00201"></a><span class="lineno">  201</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00202"></a><span class="lineno">  202</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00203"></a><span class="lineno">  203</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00204"></a><span class="lineno">  204</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00205"></a><span class="lineno">  205</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00206"></a><span class="lineno">  206</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00207"></a><span class="lineno">  207</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00208"></a><span class="lineno">  208</span> <span class="comment">* linperr() - Print error messages from a linprm struct</span></div>
-<div class="line"><a name="l00209"></a><span class="lineno">  209</span> <span class="comment">* -----------------------------------------------------</span></div>
-<div class="line"><a name="l00210"></a><span class="lineno">  210</span> <span class="comment">* linperr() prints the error message(s) (if any) stored in a linprm struct,</span></div>
-<div class="line"><a name="l00211"></a><span class="lineno">  211</span> <span class="comment">* and the disprm structs that it may contain.  If there are no errors then</span></div>
-<div class="line"><a name="l00212"></a><span class="lineno">  212</span> <span class="comment">* nothing is printed.  It uses wcserr_prt(), q.v.</span></div>
-<div class="line"><a name="l00213"></a><span class="lineno">  213</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00214"></a><span class="lineno">  214</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00215"></a><span class="lineno">  215</span> <span class="comment">*   lin       const struct linprm*</span></div>
-<div class="line"><a name="l00216"></a><span class="lineno">  216</span> <span class="comment">*                       Coordinate transformation parameters.</span></div>
-<div class="line"><a name="l00217"></a><span class="lineno">  217</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00218"></a><span class="lineno">  218</span> <span class="comment">*   prefix    const char *</span></div>
-<div class="line"><a name="l00219"></a><span class="lineno">  219</span> <span class="comment">*                       If non-NULL, each output line will be prefixed with</span></div>
-<div class="line"><a name="l00220"></a><span class="lineno">  220</span> <span class="comment">*                       this string.</span></div>
-<div class="line"><a name="l00221"></a><span class="lineno">  221</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00222"></a><span class="lineno">  222</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00223"></a><span class="lineno">  223</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00224"></a><span class="lineno">  224</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00225"></a><span class="lineno">  225</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00226"></a><span class="lineno">  226</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00227"></a><span class="lineno">  227</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00228"></a><span class="lineno">  228</span> <span class="comment">* linset() - Setup routine for the linprm struct</span></div>
-<div class="line"><a name="l00229"></a><span class="lineno">  229</span> <span class="comment">* ----------------------------------------------</span></div>
-<div class="line"><a name="l00230"></a><span class="lineno">  230</span> <span class="comment">* linset(), if necessary, allocates memory for the linprm::piximg and</span></div>
-<div class="line"><a name="l00231"></a><span class="lineno">  231</span> <span class="comment">* linprm::imgpix arrays and sets up the linprm struct according to information</span></div>
-<div class="line"><a name="l00232"></a><span class="lineno">  232</span> <span class="comment">* supplied within it - refer to the explanation of linprm::flag.</span></div>
-<div class="line"><a name="l00233"></a><span class="lineno">  233</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00234"></a><span class="lineno">  234</span> <span class="comment">* Note that this routine need not be called directly; it will be invoked by</span></div>
-<div class="line"><a name="l00235"></a><span class="lineno">  235</span> <span class="comment">* linp2x() and linx2p() if the linprm::flag is anything other than a</span></div>
-<div class="line"><a name="l00236"></a><span class="lineno">  236</span> <span class="comment">* predefined magic value.</span></div>
-<div class="line"><a name="l00237"></a><span class="lineno">  237</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00238"></a><span class="lineno">  238</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00239"></a><span class="lineno">  239</span> <span class="comment">*   lin       struct linprm*</span></div>
-<div class="line"><a name="l00240"></a><span class="lineno">  240</span> <span class="comment">*                       Linear transformation parameters.</span></div>
-<div class="line"><a name="l00241"></a><span class="lineno">  241</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00242"></a><span class="lineno">  242</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00243"></a><span class="lineno">  243</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00244"></a><span class="lineno">  244</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00245"></a><span class="lineno">  245</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00246"></a><span class="lineno">  246</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00247"></a><span class="lineno">  247</span> <span class="comment">*                         3: PCi_ja matrix is singular.</span></div>
-<div class="line"><a name="l00248"></a><span class="lineno">  248</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00249"></a><span class="lineno">  249</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00250"></a><span class="lineno">  250</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00183"></a><span class="lineno">  183</span> <span class="comment">* PLEASE NOTE: linfree() must not be invoked on a linprm struct that was not</span></div>
+<div class="line"><a name="l00184"></a><span class="lineno">  184</span> <span class="comment">* initialized by linini().</span></div>
+<div class="line"><a name="l00185"></a><span class="lineno">  185</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00186"></a><span class="lineno">  186</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00187"></a><span class="lineno">  187</span> <span class="comment">*   lin       struct linprm*</span></div>
+<div class="line"><a name="l00188"></a><span class="lineno">  188</span> <span class="comment">*                       Linear transformation parameters.</span></div>
+<div class="line"><a name="l00189"></a><span class="lineno">  189</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00190"></a><span class="lineno">  190</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00191"></a><span class="lineno">  191</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00192"></a><span class="lineno">  192</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00193"></a><span class="lineno">  193</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00194"></a><span class="lineno">  194</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00195"></a><span class="lineno">  195</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00196"></a><span class="lineno">  196</span> <span class="comment">* linprt() - Print routine for the linprm struct</span></div>
+<div class="line"><a name="l00197"></a><span class="lineno">  197</span> <span class="comment">* ----------------------------------------------</span></div>
+<div class="line"><a name="l00198"></a><span class="lineno">  198</span> <span class="comment">* linprt() prints the contents of a linprm struct using wcsprintf().  Mainly</span></div>
+<div class="line"><a name="l00199"></a><span class="lineno">  199</span> <span class="comment">* intended for diagnostic purposes.</span></div>
+<div class="line"><a name="l00200"></a><span class="lineno">  200</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00201"></a><span class="lineno">  201</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00202"></a><span class="lineno">  202</span> <span class="comment">*   lin       const struct linprm*</span></div>
+<div class="line"><a name="l00203"></a><span class="lineno">  203</span> <span class="comment">*                       Linear transformation parameters.</span></div>
+<div class="line"><a name="l00204"></a><span class="lineno">  204</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00205"></a><span class="lineno">  205</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00206"></a><span class="lineno">  206</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00207"></a><span class="lineno">  207</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00208"></a><span class="lineno">  208</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00209"></a><span class="lineno">  209</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00210"></a><span class="lineno">  210</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00211"></a><span class="lineno">  211</span> <span class="comment">* linperr() - Print error messages from a linprm struct</span></div>
+<div class="line"><a name="l00212"></a><span class="lineno">  212</span> <span class="comment">* -----------------------------------------------------</span></div>
+<div class="line"><a name="l00213"></a><span class="lineno">  213</span> <span class="comment">* linperr() prints the error message(s) (if any) stored in a linprm struct,</span></div>
+<div class="line"><a name="l00214"></a><span class="lineno">  214</span> <span class="comment">* and the disprm structs that it may contain.  If there are no errors then</span></div>
+<div class="line"><a name="l00215"></a><span class="lineno">  215</span> <span class="comment">* nothing is printed.  It uses wcserr_prt(), q.v.</span></div>
+<div class="line"><a name="l00216"></a><span class="lineno">  216</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00217"></a><span class="lineno">  217</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00218"></a><span class="lineno">  218</span> <span class="comment">*   lin       const struct linprm*</span></div>
+<div class="line"><a name="l00219"></a><span class="lineno">  219</span> <span class="comment">*                       Coordinate transformation parameters.</span></div>
+<div class="line"><a name="l00220"></a><span class="lineno">  220</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00221"></a><span class="lineno">  221</span> <span class="comment">*   prefix    const char *</span></div>
+<div class="line"><a name="l00222"></a><span class="lineno">  222</span> <span class="comment">*                       If non-NULL, each output line will be prefixed with</span></div>
+<div class="line"><a name="l00223"></a><span class="lineno">  223</span> <span class="comment">*                       this string.</span></div>
+<div class="line"><a name="l00224"></a><span class="lineno">  224</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00225"></a><span class="lineno">  225</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00226"></a><span class="lineno">  226</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00227"></a><span class="lineno">  227</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00228"></a><span class="lineno">  228</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00229"></a><span class="lineno">  229</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00230"></a><span class="lineno">  230</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00231"></a><span class="lineno">  231</span> <span class="comment">* linset() - Setup routine for the linprm struct</span></div>
+<div class="line"><a name="l00232"></a><span class="lineno">  232</span> <span class="comment">* ----------------------------------------------</span></div>
+<div class="line"><a name="l00233"></a><span class="lineno">  233</span> <span class="comment">* linset(), if necessary, allocates memory for the linprm::piximg and</span></div>
+<div class="line"><a name="l00234"></a><span class="lineno">  234</span> <span class="comment">* linprm::imgpix arrays and sets up the linprm struct according to information</span></div>
+<div class="line"><a name="l00235"></a><span class="lineno">  235</span> <span class="comment">* supplied within it - refer to the explanation of linprm::flag.</span></div>
+<div class="line"><a name="l00236"></a><span class="lineno">  236</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00237"></a><span class="lineno">  237</span> <span class="comment">* Note that this routine need not be called directly; it will be invoked by</span></div>
+<div class="line"><a name="l00238"></a><span class="lineno">  238</span> <span class="comment">* linp2x() and linx2p() if the linprm::flag is anything other than a</span></div>
+<div class="line"><a name="l00239"></a><span class="lineno">  239</span> <span class="comment">* predefined magic value.</span></div>
+<div class="line"><a name="l00240"></a><span class="lineno">  240</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00241"></a><span class="lineno">  241</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00242"></a><span class="lineno">  242</span> <span class="comment">*   lin       struct linprm*</span></div>
+<div class="line"><a name="l00243"></a><span class="lineno">  243</span> <span class="comment">*                       Linear transformation parameters.</span></div>
+<div class="line"><a name="l00244"></a><span class="lineno">  244</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00245"></a><span class="lineno">  245</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00246"></a><span class="lineno">  246</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00247"></a><span class="lineno">  247</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00248"></a><span class="lineno">  248</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00249"></a><span class="lineno">  249</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00250"></a><span class="lineno">  250</span> <span class="comment">*                         3: PCi_ja matrix is singular.</span></div>
 <div class="line"><a name="l00251"></a><span class="lineno">  251</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00252"></a><span class="lineno">  252</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00253"></a><span class="lineno">  253</span> <span class="comment">* linp2x() - Pixel-to-world linear transformation</span></div>
-<div class="line"><a name="l00254"></a><span class="lineno">  254</span> <span class="comment">* -----------------------------------------------</span></div>
-<div class="line"><a name="l00255"></a><span class="lineno">  255</span> <span class="comment">* linp2x() transforms pixel coordinates to intermediate world coordinates.</span></div>
-<div class="line"><a name="l00256"></a><span class="lineno">  256</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00257"></a><span class="lineno">  257</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00258"></a><span class="lineno">  258</span> <span class="comment">*   lin       struct linprm*</span></div>
-<div class="line"><a name="l00259"></a><span class="lineno">  259</span> <span class="comment">*                       Linear transformation parameters.</span></div>
-<div class="line"><a name="l00260"></a><span class="lineno">  260</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00261"></a><span class="lineno">  261</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00262"></a><span class="lineno">  262</span> <span class="comment">*   ncoord,</span></div>
-<div class="line"><a name="l00263"></a><span class="lineno">  263</span> <span class="comment">*   nelem     int       The number of coordinates, each of vector length nelem</span></div>
-<div class="line"><a name="l00264"></a><span class="lineno">  264</span> <span class="comment">*                       but containing lin.naxis coordinate elements.</span></div>
-<div class="line"><a name="l00265"></a><span class="lineno">  265</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00266"></a><span class="lineno">  266</span> <span class="comment">*   pixcrd    const double[ncoord][nelem]</span></div>
-<div class="line"><a name="l00267"></a><span class="lineno">  267</span> <span class="comment">*                       Array of pixel coordinates.</span></div>
+<div class="line"><a name="l00252"></a><span class="lineno">  252</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00253"></a><span class="lineno">  253</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00254"></a><span class="lineno">  254</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00255"></a><span class="lineno">  255</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00256"></a><span class="lineno">  256</span> <span class="comment">* linp2x() - Pixel-to-world linear transformation</span></div>
+<div class="line"><a name="l00257"></a><span class="lineno">  257</span> <span class="comment">* -----------------------------------------------</span></div>
+<div class="line"><a name="l00258"></a><span class="lineno">  258</span> <span class="comment">* linp2x() transforms pixel coordinates to intermediate world coordinates.</span></div>
+<div class="line"><a name="l00259"></a><span class="lineno">  259</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00260"></a><span class="lineno">  260</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00261"></a><span class="lineno">  261</span> <span class="comment">*   lin       struct linprm*</span></div>
+<div class="line"><a name="l00262"></a><span class="lineno">  262</span> <span class="comment">*                       Linear transformation parameters.</span></div>
+<div class="line"><a name="l00263"></a><span class="lineno">  263</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00264"></a><span class="lineno">  264</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00265"></a><span class="lineno">  265</span> <span class="comment">*   ncoord,</span></div>
+<div class="line"><a name="l00266"></a><span class="lineno">  266</span> <span class="comment">*   nelem     int       The number of coordinates, each of vector length nelem</span></div>
+<div class="line"><a name="l00267"></a><span class="lineno">  267</span> <span class="comment">*                       but containing lin.naxis coordinate elements.</span></div>
 <div class="line"><a name="l00268"></a><span class="lineno">  268</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00269"></a><span class="lineno">  269</span> <span class="comment">* Returned:</span></div>
-<div class="line"><a name="l00270"></a><span class="lineno">  270</span> <span class="comment">*   imgcrd    double[ncoord][nelem]</span></div>
-<div class="line"><a name="l00271"></a><span class="lineno">  271</span> <span class="comment">*                       Array of intermediate world coordinates.</span></div>
-<div class="line"><a name="l00272"></a><span class="lineno">  272</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00273"></a><span class="lineno">  273</span> <span class="comment">* Function return value:</span></div>
-<div class="line"><a name="l00274"></a><span class="lineno">  274</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00275"></a><span class="lineno">  275</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00276"></a><span class="lineno">  276</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00277"></a><span class="lineno">  277</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00278"></a><span class="lineno">  278</span> <span class="comment">*                         3: PCi_ja matrix is singular.</span></div>
-<div class="line"><a name="l00279"></a><span class="lineno">  279</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00280"></a><span class="lineno">  280</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00281"></a><span class="lineno">  281</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00269"></a><span class="lineno">  269</span> <span class="comment">*   pixcrd    const double[ncoord][nelem]</span></div>
+<div class="line"><a name="l00270"></a><span class="lineno">  270</span> <span class="comment">*                       Array of pixel coordinates.</span></div>
+<div class="line"><a name="l00271"></a><span class="lineno">  271</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00272"></a><span class="lineno">  272</span> <span class="comment">* Returned:</span></div>
+<div class="line"><a name="l00273"></a><span class="lineno">  273</span> <span class="comment">*   imgcrd    double[ncoord][nelem]</span></div>
+<div class="line"><a name="l00274"></a><span class="lineno">  274</span> <span class="comment">*                       Array of intermediate world coordinates.</span></div>
+<div class="line"><a name="l00275"></a><span class="lineno">  275</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00276"></a><span class="lineno">  276</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00277"></a><span class="lineno">  277</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00278"></a><span class="lineno">  278</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00279"></a><span class="lineno">  279</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00280"></a><span class="lineno">  280</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00281"></a><span class="lineno">  281</span> <span class="comment">*                         3: PCi_ja matrix is singular.</span></div>
 <div class="line"><a name="l00282"></a><span class="lineno">  282</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00283"></a><span class="lineno">  283</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00284"></a><span class="lineno">  284</span> <span class="comment">* linx2p() - World-to-pixel linear transformation</span></div>
-<div class="line"><a name="l00285"></a><span class="lineno">  285</span> <span class="comment">* -----------------------------------------------</span></div>
-<div class="line"><a name="l00286"></a><span class="lineno">  286</span> <span class="comment">* linx2p() transforms intermediate world coordinates to pixel coordinates.</span></div>
-<div class="line"><a name="l00287"></a><span class="lineno">  287</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00288"></a><span class="lineno">  288</span> <span class="comment">* Given and returned:</span></div>
-<div class="line"><a name="l00289"></a><span class="lineno">  289</span> <span class="comment">*   lin       struct linprm*</span></div>
-<div class="line"><a name="l00290"></a><span class="lineno">  290</span> <span class="comment">*                       Linear transformation parameters.</span></div>
-<div class="line"><a name="l00291"></a><span class="lineno">  291</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00292"></a><span class="lineno">  292</span> <span class="comment">* Given:</span></div>
-<div class="line"><a name="l00293"></a><span class="lineno">  293</span> <span class="comment">*   ncoord,</span></div>
-<div class="line"><a name="l00294"></a><span class="lineno">  294</span> <span class="comment">*   nelem     int       The number of coordinates, each of vector length nelem</span></div>
-<div class="line"><a name="l00295"></a><span class="lineno">  295</span> <span class="comment">*                       but containing lin.naxis coordinate elements.</span></div>
-<div class="line"><a name="l00296"></a><span class="lineno">  296</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00297"></a><span class="lineno">  297</span> <span class="comment">*   imgcrd   const double[ncoord][nelem]</span></div>
-<div class="line"><a name="l00298"></a><span class="lineno">  298</span> <span class="comment">*                       Array of intermediate world coordinates.</span></div>
+<div class="line"><a name="l00283"></a><span class="lineno">  283</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00284"></a><span class="lineno">  284</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00285"></a><span class="lineno">  285</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00286"></a><span class="lineno">  286</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00287"></a><span class="lineno">  287</span> <span class="comment">* linx2p() - World-to-pixel linear transformation</span></div>
+<div class="line"><a name="l00288"></a><span class="lineno">  288</span> <span class="comment">* -----------------------------------------------</span></div>
+<div class="line"><a name="l00289"></a><span class="lineno">  289</span> <span class="comment">* linx2p() transforms intermediate world coordinates to pixel coordinates.</span></div>
+<div class="line"><a name="l00290"></a><span class="lineno">  290</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00291"></a><span class="lineno">  291</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00292"></a><span class="lineno">  292</span> <span class="comment">*   lin       struct linprm*</span></div>
+<div class="line"><a name="l00293"></a><span class="lineno">  293</span> <span class="comment">*                       Linear transformation parameters.</span></div>
+<div class="line"><a name="l00294"></a><span class="lineno">  294</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00295"></a><span class="lineno">  295</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00296"></a><span class="lineno">  296</span> <span class="comment">*   ncoord,</span></div>
+<div class="line"><a name="l00297"></a><span class="lineno">  297</span> <span class="comment">*   nelem     int       The number of coordinates, each of vector length nelem</span></div>
+<div class="line"><a name="l00298"></a><span class="lineno">  298</span> <span class="comment">*                       but containing lin.naxis coordinate elements.</span></div>
 <div class="line"><a name="l00299"></a><span class="lineno">  299</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00300"></a><span class="lineno">  300</span> <span class="comment">* Returned:</span></div>
-<div class="line"><a name="l00301"></a><span class="lineno">  301</span> <span class="comment">*   pixcrd    double[ncoord][nelem]</span></div>
-<div class="line"><a name="l00302"></a><span class="lineno">  302</span> <span class="comment">*                       Array of pixel coordinates.</span></div>
-<div class="line"><a name="l00303"></a><span class="lineno">  303</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00304"></a><span class="lineno">  304</span> <span class="comment">*             int       Status return value:</span></div>
-<div class="line"><a name="l00305"></a><span class="lineno">  305</span> <span class="comment">*                         0: Success.</span></div>
-<div class="line"><a name="l00306"></a><span class="lineno">  306</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
-<div class="line"><a name="l00307"></a><span class="lineno">  307</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
-<div class="line"><a name="l00308"></a><span class="lineno">  308</span> <span class="comment">*                         3: PCi_ja matrix is singular.</span></div>
-<div class="line"><a name="l00309"></a><span class="lineno">  309</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00310"></a><span class="lineno">  310</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
-<div class="line"><a name="l00311"></a><span class="lineno">  311</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00300"></a><span class="lineno">  300</span> <span class="comment">*   imgcrd   const double[ncoord][nelem]</span></div>
+<div class="line"><a name="l00301"></a><span class="lineno">  301</span> <span class="comment">*                       Array of intermediate world coordinates.</span></div>
+<div class="line"><a name="l00302"></a><span class="lineno">  302</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00303"></a><span class="lineno">  303</span> <span class="comment">* Returned:</span></div>
+<div class="line"><a name="l00304"></a><span class="lineno">  304</span> <span class="comment">*   pixcrd    double[ncoord][nelem]</span></div>
+<div class="line"><a name="l00305"></a><span class="lineno">  305</span> <span class="comment">*                       Array of pixel coordinates.</span></div>
+<div class="line"><a name="l00306"></a><span class="lineno">  306</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00307"></a><span class="lineno">  307</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00308"></a><span class="lineno">  308</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00309"></a><span class="lineno">  309</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00310"></a><span class="lineno">  310</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00311"></a><span class="lineno">  311</span> <span class="comment">*                         3: PCi_ja matrix is singular.</span></div>
 <div class="line"><a name="l00312"></a><span class="lineno">  312</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00313"></a><span class="lineno">  313</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00314"></a><span class="lineno">  314</span> <span class="comment">* linprm struct - Linear transformation parameters</span></div>
-<div class="line"><a name="l00315"></a><span class="lineno">  315</span> <span class="comment">* ------------------------------------------------</span></div>
-<div class="line"><a name="l00316"></a><span class="lineno">  316</span> <span class="comment">* The linprm struct contains all of the information required to perform a</span></div>
-<div class="line"><a name="l00317"></a><span class="lineno">  317</span> <span class="comment">* linear transformation.  It consists of certain members that must be set by</span></div>
-<div class="line"><a name="l00318"></a><span class="lineno">  318</span> <span class="comment">* the user ("given") and others that are set by the WCSLIB routines</span></div>
-<div class="line"><a name="l00319"></a><span class="lineno">  319</span> <span class="comment">* ("returned").</span></div>
-<div class="line"><a name="l00320"></a><span class="lineno">  320</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00321"></a><span class="lineno">  321</span> <span class="comment">*   int flag</span></div>
-<div class="line"><a name="l00322"></a><span class="lineno">  322</span> <span class="comment">*     (Given and returned) This flag must be set to zero whenever any of the</span></div>
-<div class="line"><a name="l00323"></a><span class="lineno">  323</span> <span class="comment">*     following members of the linprm struct are set or modified:</span></div>
-<div class="line"><a name="l00324"></a><span class="lineno">  324</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00325"></a><span class="lineno">  325</span> <span class="comment">*       - linprm::naxis (q.v., not normally set by the user),</span></div>
-<div class="line"><a name="l00326"></a><span class="lineno">  326</span> <span class="comment">*       - linprm::pc,</span></div>
-<div class="line"><a name="l00327"></a><span class="lineno">  327</span> <span class="comment">*       - linprm::cdelt,</span></div>
-<div class="line"><a name="l00328"></a><span class="lineno">  328</span> <span class="comment">*       - linprm::dispre.</span></div>
-<div class="line"><a name="l00329"></a><span class="lineno">  329</span> <span class="comment">*       - linprm::disseq.</span></div>
+<div class="line"><a name="l00313"></a><span class="lineno">  313</span> <span class="comment">*                       For returns > 1, a detailed error message is set in</span></div>
+<div class="line"><a name="l00314"></a><span class="lineno">  314</span> <span class="comment">*                       linprm::err if enabled, see wcserr_enable().</span></div>
+<div class="line"><a name="l00315"></a><span class="lineno">  315</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00316"></a><span class="lineno">  316</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00317"></a><span class="lineno">  317</span> <span class="comment">* linwarp() - Compute measures of distortion</span></div>
+<div class="line"><a name="l00318"></a><span class="lineno">  318</span> <span class="comment">* ------------------------------------------</span></div>
+<div class="line"><a name="l00319"></a><span class="lineno">  319</span> <span class="comment">* linwarp() computes various measures of the distortion over the specified</span></div>
+<div class="line"><a name="l00320"></a><span class="lineno">  320</span> <span class="comment">* range of pixel coordinates.</span></div>
+<div class="line"><a name="l00321"></a><span class="lineno">  321</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00322"></a><span class="lineno">  322</span> <span class="comment">* All distortion measures are specified as an offset in pixel coordinates,</span></div>
+<div class="line"><a name="l00323"></a><span class="lineno">  323</span> <span class="comment">* as given directly by prior distortions.  The offset in intermediate pixel</span></div>
+<div class="line"><a name="l00324"></a><span class="lineno">  324</span> <span class="comment">* coordinates given by sequent distortions is translated back to pixel</span></div>
+<div class="line"><a name="l00325"></a><span class="lineno">  325</span> <span class="comment">* coordinates by applying the inverse of the linear transformation matrix</span></div>
+<div class="line"><a name="l00326"></a><span class="lineno">  326</span> <span class="comment">* (PCi_ja or CDi_ja).  The difference may be significant if the matrix</span></div>
+<div class="line"><a name="l00327"></a><span class="lineno">  327</span> <span class="comment">* introduced a scaling.</span></div>
+<div class="line"><a name="l00328"></a><span class="lineno">  328</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00329"></a><span class="lineno">  329</span> <span class="comment">* If all distortions are prior, then linwarp() uses diswarp(), q.v.</span></div>
 <div class="line"><a name="l00330"></a><span class="lineno">  330</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00331"></a><span class="lineno">  331</span> <span class="comment">*     This signals the initialization routine, linset(), to recompute the</span></div>
-<div class="line"><a name="l00332"></a><span class="lineno">  332</span> <span class="comment">*     returned members of the linprm struct.  linset() will reset flag to</span></div>
-<div class="line"><a name="l00333"></a><span class="lineno">  333</span> <span class="comment">*     indicate that this has been done.</span></div>
+<div class="line"><a name="l00331"></a><span class="lineno">  331</span> <span class="comment">* Given and returned:</span></div>
+<div class="line"><a name="l00332"></a><span class="lineno">  332</span> <span class="comment">*   lin       struct linprm*</span></div>
+<div class="line"><a name="l00333"></a><span class="lineno">  333</span> <span class="comment">*                       Linear transformation parameters plus distortions.</span></div>
 <div class="line"><a name="l00334"></a><span class="lineno">  334</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00335"></a><span class="lineno">  335</span> <span class="comment">*     PLEASE NOTE: flag should be set to -1 when linini() is called for the</span></div>
-<div class="line"><a name="l00336"></a><span class="lineno">  336</span> <span class="comment">*     first time for a particular linprm struct in order to initialize memory</span></div>
-<div class="line"><a name="l00337"></a><span class="lineno">  337</span> <span class="comment">*     management.  It must ONLY be used on the first initialization otherwise</span></div>
-<div class="line"><a name="l00338"></a><span class="lineno">  338</span> <span class="comment">*     memory leaks may result.</span></div>
-<div class="line"><a name="l00339"></a><span class="lineno">  339</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00340"></a><span class="lineno">  340</span> <span class="comment">*   int naxis</span></div>
-<div class="line"><a name="l00341"></a><span class="lineno">  341</span> <span class="comment">*     (Given or returned) Number of pixel and world coordinate elements.</span></div>
-<div class="line"><a name="l00342"></a><span class="lineno">  342</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00343"></a><span class="lineno">  343</span> <span class="comment">*     If linini() is used to initialize the linprm struct (as would normally</span></div>
-<div class="line"><a name="l00344"></a><span class="lineno">  344</span> <span class="comment">*     be the case) then it will set naxis from the value passed to it as a</span></div>
-<div class="line"><a name="l00345"></a><span class="lineno">  345</span> <span class="comment">*     function argument.  The user should not subsequently modify it.</span></div>
+<div class="line"><a name="l00335"></a><span class="lineno">  335</span> <span class="comment">* Given:</span></div>
+<div class="line"><a name="l00336"></a><span class="lineno">  336</span> <span class="comment">*   pixblc    const double[naxis]</span></div>
+<div class="line"><a name="l00337"></a><span class="lineno">  337</span> <span class="comment">*                       Start of the range of pixel coordinates (i.e. "bottom</span></div>
+<div class="line"><a name="l00338"></a><span class="lineno">  338</span> <span class="comment">*                       left-hand corner" in the conventional FITS image</span></div>
+<div class="line"><a name="l00339"></a><span class="lineno">  339</span> <span class="comment">*                       display orientation).  May be specified as a NULL</span></div>
+<div class="line"><a name="l00340"></a><span class="lineno">  340</span> <span class="comment">*                       pointer which is interpreted as (1,1,...).</span></div>
+<div class="line"><a name="l00341"></a><span class="lineno">  341</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00342"></a><span class="lineno">  342</span> <span class="comment">*   pixtrc    const double[naxis]</span></div>
+<div class="line"><a name="l00343"></a><span class="lineno">  343</span> <span class="comment">*                       End of the range of pixel coordinates (i.e. "top</span></div>
+<div class="line"><a name="l00344"></a><span class="lineno">  344</span> <span class="comment">*                       right-hand corner" in the conventional FITS image</span></div>
+<div class="line"><a name="l00345"></a><span class="lineno">  345</span> <span class="comment">*                       display orientation).</span></div>
 <div class="line"><a name="l00346"></a><span class="lineno">  346</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00347"></a><span class="lineno">  347</span> <span class="comment">*   double *crpix</span></div>
-<div class="line"><a name="l00348"></a><span class="lineno">  348</span> <span class="comment">*     (Given) Pointer to the first element of an array of double containing</span></div>
-<div class="line"><a name="l00349"></a><span class="lineno">  349</span> <span class="comment">*     the coordinate reference pixel, CRPIXja.</span></div>
-<div class="line"><a name="l00350"></a><span class="lineno">  350</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00351"></a><span class="lineno">  351</span> <span class="comment">*     It is not necessary to reset the linprm struct (via linset()) when</span></div>
-<div class="line"><a name="l00352"></a><span class="lineno">  352</span> <span class="comment">*     linprm::crpix is changed.</span></div>
+<div class="line"><a name="l00347"></a><span class="lineno">  347</span> <span class="comment">*   pixsamp   const double[naxis]</span></div>
+<div class="line"><a name="l00348"></a><span class="lineno">  348</span> <span class="comment">*                       If positive or zero, the increment on the particular</span></div>
+<div class="line"><a name="l00349"></a><span class="lineno">  349</span> <span class="comment">*                       axis, starting at pixblc[].  Zero is interpreted as a</span></div>
+<div class="line"><a name="l00350"></a><span class="lineno">  350</span> <span class="comment">*                       unit increment.  pixsamp may also be specified as a</span></div>
+<div class="line"><a name="l00351"></a><span class="lineno">  351</span> <span class="comment">*                       NULL pointer which is interpreted as all zeroes, i.e.</span></div>
+<div class="line"><a name="l00352"></a><span class="lineno">  352</span> <span class="comment">*                       unit increments on all axes.</span></div>
 <div class="line"><a name="l00353"></a><span class="lineno">  353</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00354"></a><span class="lineno">  354</span> <span class="comment">*   double *pc</span></div>
-<div class="line"><a name="l00355"></a><span class="lineno">  355</span> <span class="comment">*     (Given) Pointer to the first element of the PCi_ja (pixel coordinate)</span></div>
-<div class="line"><a name="l00356"></a><span class="lineno">  356</span> <span class="comment">*     transformation matrix.  The expected order is</span></div>
-<div class="line"><a name="l00357"></a><span class="lineno">  357</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00358"></a><span class="lineno">  358</span> <span class="comment">=       struct linprm lin;</span></div>
-<div class="line"><a name="l00359"></a><span class="lineno">  359</span> <span class="comment">=       lin.pc = {PC1_1, PC1_2, PC2_1, PC2_2};</span></div>
+<div class="line"><a name="l00354"></a><span class="lineno">  354</span> <span class="comment">*                       If negative, the grid size on the particular axis (the</span></div>
+<div class="line"><a name="l00355"></a><span class="lineno">  355</span> <span class="comment">*                       absolute value being rounded to the nearest integer).</span></div>
+<div class="line"><a name="l00356"></a><span class="lineno">  356</span> <span class="comment">*                       For example, if pixsamp is (-128.0,-128.0,...) then</span></div>
+<div class="line"><a name="l00357"></a><span class="lineno">  357</span> <span class="comment">*                       each axis will be sampled at 128 points between</span></div>
+<div class="line"><a name="l00358"></a><span class="lineno">  358</span> <span class="comment">*                       pixblc[] and pixtrc[] inclusive.  Use caution when</span></div>
+<div class="line"><a name="l00359"></a><span class="lineno">  359</span> <span class="comment">*                       using this option on non-square images.</span></div>
 <div class="line"><a name="l00360"></a><span class="lineno">  360</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00361"></a><span class="lineno">  361</span> <span class="comment">*     This may be constructed conveniently from a 2-D array via</span></div>
-<div class="line"><a name="l00362"></a><span class="lineno">  362</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00363"></a><span class="lineno">  363</span> <span class="comment">=       double m[2][2] = {{PC1_1, PC1_2},</span></div>
-<div class="line"><a name="l00364"></a><span class="lineno">  364</span> <span class="comment">=                         {PC2_1, PC2_2}};</span></div>
+<div class="line"><a name="l00361"></a><span class="lineno">  361</span> <span class="comment">* Returned:</span></div>
+<div class="line"><a name="l00362"></a><span class="lineno">  362</span> <span class="comment">*   nsamp     int*      The number of pixel coordinates sampled.</span></div>
+<div class="line"><a name="l00363"></a><span class="lineno">  363</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00364"></a><span class="lineno">  364</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
 <div class="line"><a name="l00365"></a><span class="lineno">  365</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00366"></a><span class="lineno">  366</span> <span class="comment">*     which is equivalent to</span></div>
-<div class="line"><a name="l00367"></a><span class="lineno">  367</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00368"></a><span class="lineno">  368</span> <span class="comment">=       double m[2][2];</span></div>
-<div class="line"><a name="l00369"></a><span class="lineno">  369</span> <span class="comment">=       m[0][0] = PC1_1;</span></div>
-<div class="line"><a name="l00370"></a><span class="lineno">  370</span> <span class="comment">=       m[0][1] = PC1_2;</span></div>
-<div class="line"><a name="l00371"></a><span class="lineno">  371</span> <span class="comment">=       m[1][0] = PC2_1;</span></div>
-<div class="line"><a name="l00372"></a><span class="lineno">  372</span> <span class="comment">=       m[1][1] = PC2_2;</span></div>
-<div class="line"><a name="l00373"></a><span class="lineno">  373</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00374"></a><span class="lineno">  374</span> <span class="comment">*     The storage order for this 2-D array is the same as for the 1-D array,</span></div>
-<div class="line"><a name="l00375"></a><span class="lineno">  375</span> <span class="comment">*     whence</span></div>
+<div class="line"><a name="l00366"></a><span class="lineno">  366</span> <span class="comment">*   maxdis    double[naxis]</span></div>
+<div class="line"><a name="l00367"></a><span class="lineno">  367</span> <span class="comment">*                       For each individual distortion function, the</span></div>
+<div class="line"><a name="l00368"></a><span class="lineno">  368</span> <span class="comment">*                       maximum absolute value of the distortion.</span></div>
+<div class="line"><a name="l00369"></a><span class="lineno">  369</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00370"></a><span class="lineno">  370</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00371"></a><span class="lineno">  371</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00372"></a><span class="lineno">  372</span> <span class="comment">*   maxtot    double*   For the combination of all distortion functions, the</span></div>
+<div class="line"><a name="l00373"></a><span class="lineno">  373</span> <span class="comment">*                       maximum absolute value of the distortion.</span></div>
+<div class="line"><a name="l00374"></a><span class="lineno">  374</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00375"></a><span class="lineno">  375</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
 <div class="line"><a name="l00376"></a><span class="lineno">  376</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00377"></a><span class="lineno">  377</span> <span class="comment">=       lin.pc = *m;</span></div>
-<div class="line"><a name="l00378"></a><span class="lineno">  378</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00379"></a><span class="lineno">  379</span> <span class="comment">*     would be legitimate.</span></div>
+<div class="line"><a name="l00377"></a><span class="lineno">  377</span> <span class="comment">*   avgdis    double[naxis]</span></div>
+<div class="line"><a name="l00378"></a><span class="lineno">  378</span> <span class="comment">*                       For each individual distortion function, the</span></div>
+<div class="line"><a name="l00379"></a><span class="lineno">  379</span> <span class="comment">*                       mean value of the distortion.</span></div>
 <div class="line"><a name="l00380"></a><span class="lineno">  380</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00381"></a><span class="lineno">  381</span> <span class="comment">*   double *cdelt</span></div>
-<div class="line"><a name="l00382"></a><span class="lineno">  382</span> <span class="comment">*     (Given) Pointer to the first element of an array of double containing</span></div>
-<div class="line"><a name="l00383"></a><span class="lineno">  383</span> <span class="comment">*     the coordinate increments, CDELTia.</span></div>
-<div class="line"><a name="l00384"></a><span class="lineno">  384</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00385"></a><span class="lineno">  385</span> <span class="comment">*   struct disprm *dispre</span></div>
-<div class="line"><a name="l00386"></a><span class="lineno">  386</span> <span class="comment">*     (Given) Pointer to a disprm struct holding parameters for prior</span></div>
-<div class="line"><a name="l00387"></a><span class="lineno">  387</span> <span class="comment">*     distortion functions, or a null (0x0) pointer if there are none.</span></div>
-<div class="line"><a name="l00388"></a><span class="lineno">  388</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00389"></a><span class="lineno">  389</span> <span class="comment">*     Function lindis() may be used to assign a disprm pointer to a linprm</span></div>
-<div class="line"><a name="l00390"></a><span class="lineno">  390</span> <span class="comment">*     struct, allowing it to take control of any memory allocated for it, as</span></div>
-<div class="line"><a name="l00391"></a><span class="lineno">  391</span> <span class="comment">*     in the following example:</span></div>
-<div class="line"><a name="l00392"></a><span class="lineno">  392</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00393"></a><span class="lineno">  393</span> <span class="comment">=       void add_distortion(struct linprm *lin)</span></div>
-<div class="line"><a name="l00394"></a><span class="lineno">  394</span> <span class="comment">=       {</span></div>
-<div class="line"><a name="l00395"></a><span class="lineno">  395</span> <span class="comment">=         struct disprm *dispre;</span></div>
-<div class="line"><a name="l00396"></a><span class="lineno">  396</span> <span class="comment">=</span></div>
-<div class="line"><a name="l00397"></a><span class="lineno">  397</span> <span class="comment">=         dispre = malloc(sizeof(struct disprm);</span></div>
-<div class="line"><a name="l00398"></a><span class="lineno">  398</span> <span class="comment">=         dispre->flag = -1;</span></div>
-<div class="line"><a name="l00399"></a><span class="lineno">  399</span> <span class="comment">=         lindis(1, lin, dispre);</span></div>
-<div class="line"><a name="l00400"></a><span class="lineno">  400</span> <span class="comment">=           :</span></div>
-<div class="line"><a name="l00401"></a><span class="lineno">  401</span> <span class="comment">=          (Set up dispre.)</span></div>
-<div class="line"><a name="l00402"></a><span class="lineno">  402</span> <span class="comment">=           :</span></div>
-<div class="line"><a name="l00403"></a><span class="lineno">  403</span> <span class="comment">=</span></div>
-<div class="line"><a name="l00404"></a><span class="lineno">  404</span> <span class="comment">=         return;</span></div>
-<div class="line"><a name="l00405"></a><span class="lineno">  405</span> <span class="comment">=       }</span></div>
+<div class="line"><a name="l00381"></a><span class="lineno">  381</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00382"></a><span class="lineno">  382</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00383"></a><span class="lineno">  383</span> <span class="comment">*   avgtot    double*   For the combination of all distortion functions, the</span></div>
+<div class="line"><a name="l00384"></a><span class="lineno">  384</span> <span class="comment">*                       mean value of the distortion.</span></div>
+<div class="line"><a name="l00385"></a><span class="lineno">  385</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00386"></a><span class="lineno">  386</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00387"></a><span class="lineno">  387</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00388"></a><span class="lineno">  388</span> <span class="comment">*   rmsdis    double[naxis]</span></div>
+<div class="line"><a name="l00389"></a><span class="lineno">  389</span> <span class="comment">*                       For each individual distortion function, the</span></div>
+<div class="line"><a name="l00390"></a><span class="lineno">  390</span> <span class="comment">*                       root mean square deviation of the distortion.</span></div>
+<div class="line"><a name="l00391"></a><span class="lineno">  391</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00392"></a><span class="lineno">  392</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00393"></a><span class="lineno">  393</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00394"></a><span class="lineno">  394</span> <span class="comment">*   rmstot    double*   For the combination of all distortion functions, the</span></div>
+<div class="line"><a name="l00395"></a><span class="lineno">  395</span> <span class="comment">*                       root mean square deviation of the distortion.</span></div>
+<div class="line"><a name="l00396"></a><span class="lineno">  396</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00397"></a><span class="lineno">  397</span> <span class="comment">*                       Can be specified as a NULL pointer if not required.</span></div>
+<div class="line"><a name="l00398"></a><span class="lineno">  398</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00399"></a><span class="lineno">  399</span> <span class="comment">* Function return value:</span></div>
+<div class="line"><a name="l00400"></a><span class="lineno">  400</span> <span class="comment">*             int       Status return value:</span></div>
+<div class="line"><a name="l00401"></a><span class="lineno">  401</span> <span class="comment">*                         0: Success.</span></div>
+<div class="line"><a name="l00402"></a><span class="lineno">  402</span> <span class="comment">*                         1: Null linprm pointer passed.</span></div>
+<div class="line"><a name="l00403"></a><span class="lineno">  403</span> <span class="comment">*                         2: Memory allocation failed.</span></div>
+<div class="line"><a name="l00404"></a><span class="lineno">  404</span> <span class="comment">*                         3: Invalid parameter.</span></div>
+<div class="line"><a name="l00405"></a><span class="lineno">  405</span> <span class="comment">*                         4: Distort error.</span></div>
 <div class="line"><a name="l00406"></a><span class="lineno">  406</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00407"></a><span class="lineno">  407</span> <span class="comment">*     Here, after the distortion function parameters etc. are copied into</span></div>
-<div class="line"><a name="l00408"></a><span class="lineno">  408</span> <span class="comment">*     dispre, dispre is assigned using lindis() which takes control of the</span></div>
-<div class="line"><a name="l00409"></a><span class="lineno">  409</span> <span class="comment">*     allocated memory.  It will be free'd later when linfree() is invoked on</span></div>
-<div class="line"><a name="l00410"></a><span class="lineno">  410</span> <span class="comment">*     the linprm struct.</span></div>
-<div class="line"><a name="l00411"></a><span class="lineno">  411</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00412"></a><span class="lineno">  412</span> <span class="comment">*     Consider also the following erroneous code:</span></div>
-<div class="line"><a name="l00413"></a><span class="lineno">  413</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00414"></a><span class="lineno">  414</span> <span class="comment">=       void bad_code(struct linprm *lin)</span></div>
-<div class="line"><a name="l00415"></a><span class="lineno">  415</span> <span class="comment">=       {</span></div>
-<div class="line"><a name="l00416"></a><span class="lineno">  416</span> <span class="comment">=         struct disprm dispre;</span></div>
-<div class="line"><a name="l00417"></a><span class="lineno">  417</span> <span class="comment">=</span></div>
-<div class="line"><a name="l00418"></a><span class="lineno">  418</span> <span class="comment">=         dispre.flag = -1;</span></div>
-<div class="line"><a name="l00419"></a><span class="lineno">  419</span> <span class="comment">=         lindis(1, lin, &dispre);   // WRONG.</span></div>
-<div class="line"><a name="l00420"></a><span class="lineno">  420</span> <span class="comment">=           :</span></div>
-<div class="line"><a name="l00421"></a><span class="lineno">  421</span> <span class="comment">=</span></div>
-<div class="line"><a name="l00422"></a><span class="lineno">  422</span> <span class="comment">=         return;</span></div>
-<div class="line"><a name="l00423"></a><span class="lineno">  423</span> <span class="comment">=       }</span></div>
+<div class="line"><a name="l00407"></a><span class="lineno">  407</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00408"></a><span class="lineno">  408</span> <span class="comment">* linprm struct - Linear transformation parameters</span></div>
+<div class="line"><a name="l00409"></a><span class="lineno">  409</span> <span class="comment">* ------------------------------------------------</span></div>
+<div class="line"><a name="l00410"></a><span class="lineno">  410</span> <span class="comment">* The linprm struct contains all of the information required to perform a</span></div>
+<div class="line"><a name="l00411"></a><span class="lineno">  411</span> <span class="comment">* linear transformation.  It consists of certain members that must be set by</span></div>
+<div class="line"><a name="l00412"></a><span class="lineno">  412</span> <span class="comment">* the user ("given") and others that are set by the WCSLIB routines</span></div>
+<div class="line"><a name="l00413"></a><span class="lineno">  413</span> <span class="comment">* ("returned").</span></div>
+<div class="line"><a name="l00414"></a><span class="lineno">  414</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00415"></a><span class="lineno">  415</span> <span class="comment">*   int flag</span></div>
+<div class="line"><a name="l00416"></a><span class="lineno">  416</span> <span class="comment">*     (Given and returned) This flag must be set to zero whenever any of the</span></div>
+<div class="line"><a name="l00417"></a><span class="lineno">  417</span> <span class="comment">*     following members of the linprm struct are set or modified:</span></div>
+<div class="line"><a name="l00418"></a><span class="lineno">  418</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00419"></a><span class="lineno">  419</span> <span class="comment">*       - linprm::naxis (q.v., not normally set by the user),</span></div>
+<div class="line"><a name="l00420"></a><span class="lineno">  420</span> <span class="comment">*       - linprm::pc,</span></div>
+<div class="line"><a name="l00421"></a><span class="lineno">  421</span> <span class="comment">*       - linprm::cdelt,</span></div>
+<div class="line"><a name="l00422"></a><span class="lineno">  422</span> <span class="comment">*       - linprm::dispre.</span></div>
+<div class="line"><a name="l00423"></a><span class="lineno">  423</span> <span class="comment">*       - linprm::disseq.</span></div>
 <div class="line"><a name="l00424"></a><span class="lineno">  424</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00425"></a><span class="lineno">  425</span> <span class="comment">*     Here, dispre is declared as a struct, rather than a pointer.  When the</span></div>
-<div class="line"><a name="l00426"></a><span class="lineno">  426</span> <span class="comment">*     function returns, dispre will go out of scope and its memory will most</span></div>
-<div class="line"><a name="l00427"></a><span class="lineno">  427</span> <span class="comment">*     likely be reused, thereby trashing its contents.  Later, a segfault will</span></div>
-<div class="line"><a name="l00428"></a><span class="lineno">  428</span> <span class="comment">*     occur when linfree() tries to free dispre's stale address.</span></div>
-<div class="line"><a name="l00429"></a><span class="lineno">  429</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00430"></a><span class="lineno">  430</span> <span class="comment">*   struct disprm *disseq</span></div>
-<div class="line"><a name="l00431"></a><span class="lineno">  431</span> <span class="comment">*     (Given) Pointer to a disprm struct holding parameters for sequent</span></div>
-<div class="line"><a name="l00432"></a><span class="lineno">  432</span> <span class="comment">*     distortion functions, or a null (0x0) pointer if there are none.</span></div>
+<div class="line"><a name="l00425"></a><span class="lineno">  425</span> <span class="comment">*     This signals the initialization routine, linset(), to recompute the</span></div>
+<div class="line"><a name="l00426"></a><span class="lineno">  426</span> <span class="comment">*     returned members of the linprm struct.  linset() will reset flag to</span></div>
+<div class="line"><a name="l00427"></a><span class="lineno">  427</span> <span class="comment">*     indicate that this has been done.</span></div>
+<div class="line"><a name="l00428"></a><span class="lineno">  428</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00429"></a><span class="lineno">  429</span> <span class="comment">*     PLEASE NOTE: flag should be set to -1 when linini() is called for the</span></div>
+<div class="line"><a name="l00430"></a><span class="lineno">  430</span> <span class="comment">*     first time for a particular linprm struct in order to initialize memory</span></div>
+<div class="line"><a name="l00431"></a><span class="lineno">  431</span> <span class="comment">*     management.  It must ONLY be used on the first initialization otherwise</span></div>
+<div class="line"><a name="l00432"></a><span class="lineno">  432</span> <span class="comment">*     memory leaks may result.</span></div>
 <div class="line"><a name="l00433"></a><span class="lineno">  433</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00434"></a><span class="lineno">  434</span> <span class="comment">*     Refer to the comments and examples given for disprm::dispre.</span></div>
-<div class="line"><a name="l00435"></a><span class="lineno">  435</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00436"></a><span class="lineno">  436</span> <span class="comment">*   double *piximg</span></div>
-<div class="line"><a name="l00437"></a><span class="lineno">  437</span> <span class="comment">*     (Returned) Pointer to the first element of the matrix containing the</span></div>
-<div class="line"><a name="l00438"></a><span class="lineno">  438</span> <span class="comment">*     product of the CDELTia diagonal matrix and the PCi_ja matrix.</span></div>
-<div class="line"><a name="l00439"></a><span class="lineno">  439</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00440"></a><span class="lineno">  440</span> <span class="comment">*   double *imgpix</span></div>
-<div class="line"><a name="l00441"></a><span class="lineno">  441</span> <span class="comment">*     (Returned) Pointer to the first element of the inverse of the</span></div>
-<div class="line"><a name="l00442"></a><span class="lineno">  442</span> <span class="comment">*     linprm::piximg matrix.</span></div>
-<div class="line"><a name="l00443"></a><span class="lineno">  443</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00444"></a><span class="lineno">  444</span> <span class="comment">*   int i_naxis</span></div>
-<div class="line"><a name="l00445"></a><span class="lineno">  445</span> <span class="comment">*     (Returned) The dimension of linprm::piximg and linprm::imgpix (normally</span></div>
-<div class="line"><a name="l00446"></a><span class="lineno">  446</span> <span class="comment">*     equal to naxis).</span></div>
+<div class="line"><a name="l00434"></a><span class="lineno">  434</span> <span class="comment">*   int naxis</span></div>
+<div class="line"><a name="l00435"></a><span class="lineno">  435</span> <span class="comment">*     (Given or returned) Number of pixel and world coordinate elements.</span></div>
+<div class="line"><a name="l00436"></a><span class="lineno">  436</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00437"></a><span class="lineno">  437</span> <span class="comment">*     If linini() is used to initialize the linprm struct (as would normally</span></div>
+<div class="line"><a name="l00438"></a><span class="lineno">  438</span> <span class="comment">*     be the case) then it will set naxis from the value passed to it as a</span></div>
+<div class="line"><a name="l00439"></a><span class="lineno">  439</span> <span class="comment">*     function argument.  The user should not subsequently modify it.</span></div>
+<div class="line"><a name="l00440"></a><span class="lineno">  440</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00441"></a><span class="lineno">  441</span> <span class="comment">*   double *crpix</span></div>
+<div class="line"><a name="l00442"></a><span class="lineno">  442</span> <span class="comment">*     (Given) Pointer to the first element of an array of double containing</span></div>
+<div class="line"><a name="l00443"></a><span class="lineno">  443</span> <span class="comment">*     the coordinate reference pixel, CRPIXja.</span></div>
+<div class="line"><a name="l00444"></a><span class="lineno">  444</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00445"></a><span class="lineno">  445</span> <span class="comment">*     It is not necessary to reset the linprm struct (via linset()) when</span></div>
+<div class="line"><a name="l00446"></a><span class="lineno">  446</span> <span class="comment">*     linprm::crpix is changed.</span></div>
 <div class="line"><a name="l00447"></a><span class="lineno">  447</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00448"></a><span class="lineno">  448</span> <span class="comment">*   int unity</span></div>
-<div class="line"><a name="l00449"></a><span class="lineno">  449</span> <span class="comment">*     (Returned) True if the linear transformation matrix is unity.</span></div>
-<div class="line"><a name="l00450"></a><span class="lineno">  450</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00451"></a><span class="lineno">  451</span> <span class="comment">*   int affine</span></div>
-<div class="line"><a name="l00452"></a><span class="lineno">  452</span> <span class="comment">*     (Returned) True if there are no distortions.</span></div>
-<div class="line"><a name="l00453"></a><span class="lineno">  453</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00454"></a><span class="lineno">  454</span> <span class="comment">*   int simple</span></div>
-<div class="line"><a name="l00455"></a><span class="lineno">  455</span> <span class="comment">*     (Returned) True if unity and no distortions.</span></div>
+<div class="line"><a name="l00448"></a><span class="lineno">  448</span> <span class="comment">*   double *pc</span></div>
+<div class="line"><a name="l00449"></a><span class="lineno">  449</span> <span class="comment">*     (Given) Pointer to the first element of the PCi_ja (pixel coordinate)</span></div>
+<div class="line"><a name="l00450"></a><span class="lineno">  450</span> <span class="comment">*     transformation matrix.  The expected order is</span></div>
+<div class="line"><a name="l00451"></a><span class="lineno">  451</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00452"></a><span class="lineno">  452</span> <span class="comment">=       struct linprm lin;</span></div>
+<div class="line"><a name="l00453"></a><span class="lineno">  453</span> <span class="comment">=       lin.pc = {PC1_1, PC1_2, PC2_1, PC2_2};</span></div>
+<div class="line"><a name="l00454"></a><span class="lineno">  454</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00455"></a><span class="lineno">  455</span> <span class="comment">*     This may be constructed conveniently from a 2-D array via</span></div>
 <div class="line"><a name="l00456"></a><span class="lineno">  456</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00457"></a><span class="lineno">  457</span> <span class="comment">*   struct wcserr *err</span></div>
-<div class="line"><a name="l00458"></a><span class="lineno">  458</span> <span class="comment">*     (Returned) If enabled, when an error status is returned, this struct</span></div>
-<div class="line"><a name="l00459"></a><span class="lineno">  459</span> <span class="comment">*     contains detailed information about the error, see wcserr_enable().</span></div>
-<div class="line"><a name="l00460"></a><span class="lineno">  460</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00461"></a><span class="lineno">  461</span> <span class="comment">*   double *tmpcrd</span></div>
-<div class="line"><a name="l00462"></a><span class="lineno">  462</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00463"></a><span class="lineno">  463</span> <span class="comment">*   int m_flag</span></div>
-<div class="line"><a name="l00464"></a><span class="lineno">  464</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00465"></a><span class="lineno">  465</span> <span class="comment">*   int m_naxis</span></div>
-<div class="line"><a name="l00466"></a><span class="lineno">  466</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00467"></a><span class="lineno">  467</span> <span class="comment">*   double *m_crpix</span></div>
-<div class="line"><a name="l00468"></a><span class="lineno">  468</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00469"></a><span class="lineno">  469</span> <span class="comment">*   double *m_pc</span></div>
-<div class="line"><a name="l00470"></a><span class="lineno">  470</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00471"></a><span class="lineno">  471</span> <span class="comment">*   double *m_cdelt</span></div>
-<div class="line"><a name="l00472"></a><span class="lineno">  472</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00473"></a><span class="lineno">  473</span> <span class="comment">*   struct disprm *m_dispre</span></div>
-<div class="line"><a name="l00474"></a><span class="lineno">  474</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00475"></a><span class="lineno">  475</span> <span class="comment">*   struct disprm *m_disseq</span></div>
-<div class="line"><a name="l00476"></a><span class="lineno">  476</span> <span class="comment">*     (For internal use only.)</span></div>
-<div class="line"><a name="l00477"></a><span class="lineno">  477</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00457"></a><span class="lineno">  457</span> <span class="comment">=       double m[2][2] = {{PC1_1, PC1_2},</span></div>
+<div class="line"><a name="l00458"></a><span class="lineno">  458</span> <span class="comment">=                         {PC2_1, PC2_2}};</span></div>
+<div class="line"><a name="l00459"></a><span class="lineno">  459</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00460"></a><span class="lineno">  460</span> <span class="comment">*     which is equivalent to</span></div>
+<div class="line"><a name="l00461"></a><span class="lineno">  461</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00462"></a><span class="lineno">  462</span> <span class="comment">=       double m[2][2];</span></div>
+<div class="line"><a name="l00463"></a><span class="lineno">  463</span> <span class="comment">=       m[0][0] = PC1_1;</span></div>
+<div class="line"><a name="l00464"></a><span class="lineno">  464</span> <span class="comment">=       m[0][1] = PC1_2;</span></div>
+<div class="line"><a name="l00465"></a><span class="lineno">  465</span> <span class="comment">=       m[1][0] = PC2_1;</span></div>
+<div class="line"><a name="l00466"></a><span class="lineno">  466</span> <span class="comment">=       m[1][1] = PC2_2;</span></div>
+<div class="line"><a name="l00467"></a><span class="lineno">  467</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00468"></a><span class="lineno">  468</span> <span class="comment">*     The storage order for this 2-D array is the same as for the 1-D array,</span></div>
+<div class="line"><a name="l00469"></a><span class="lineno">  469</span> <span class="comment">*     whence</span></div>
+<div class="line"><a name="l00470"></a><span class="lineno">  470</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00471"></a><span class="lineno">  471</span> <span class="comment">=       lin.pc = *m;</span></div>
+<div class="line"><a name="l00472"></a><span class="lineno">  472</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00473"></a><span class="lineno">  473</span> <span class="comment">*     would be legitimate.</span></div>
+<div class="line"><a name="l00474"></a><span class="lineno">  474</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00475"></a><span class="lineno">  475</span> <span class="comment">*   double *cdelt</span></div>
+<div class="line"><a name="l00476"></a><span class="lineno">  476</span> <span class="comment">*     (Given) Pointer to the first element of an array of double containing</span></div>
+<div class="line"><a name="l00477"></a><span class="lineno">  477</span> <span class="comment">*     the coordinate increments, CDELTia.</span></div>
 <div class="line"><a name="l00478"></a><span class="lineno">  478</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00479"></a><span class="lineno">  479</span> <span class="comment">* Global variable: const char *lin_errmsg[] - Status return messages</span></div>
-<div class="line"><a name="l00480"></a><span class="lineno">  480</span> <span class="comment">* ------------------------------------------------------------------</span></div>
-<div class="line"><a name="l00481"></a><span class="lineno">  481</span> <span class="comment">* Error messages to match the status value returned from each function.</span></div>
+<div class="line"><a name="l00479"></a><span class="lineno">  479</span> <span class="comment">*   struct disprm *dispre</span></div>
+<div class="line"><a name="l00480"></a><span class="lineno">  480</span> <span class="comment">*     (Given) Pointer to a disprm struct holding parameters for prior</span></div>
+<div class="line"><a name="l00481"></a><span class="lineno">  481</span> <span class="comment">*     distortion functions, or a null (0x0) pointer if there are none.</span></div>
 <div class="line"><a name="l00482"></a><span class="lineno">  482</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00483"></a><span class="lineno">  483</span> <span class="comment">*===========================================================================*/</span></div>
-<div class="line"><a name="l00484"></a><span class="lineno">  484</span> </div>
-<div class="line"><a name="l00485"></a><span class="lineno">  485</span> <span class="preprocessor">#ifndef WCSLIB_LIN</span></div>
-<div class="line"><a name="l00486"></a><span class="lineno">  486</span> <span class="preprocessor">#define WCSLIB_LIN</span></div>
-<div class="line"><a name="l00487"></a><span class="lineno">  487</span> </div>
-<div class="line"><a name="l00488"></a><span class="lineno">  488</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
-<div class="line"><a name="l00489"></a><span class="lineno">  489</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
-<div class="line"><a name="l00490"></a><span class="lineno">  490</span> <span class="preprocessor">#endif</span></div>
-<div class="line"><a name="l00491"></a><span class="lineno">  491</span> </div>
-<div class="line"><a name="l00492"></a><span class="lineno">  492</span> </div>
-<div class="line"><a name="l00493"></a><span class="lineno">  493</span> <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="lin_8h.html#a7bdf034bd750df1e518db9feeebf7a79">lin_errmsg</a>[];</div>
-<div class="line"><a name="l00494"></a><span class="lineno">  494</span> </div>
-<div class="line"><a name="l00495"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1f">  495</a></span> <span class="keyword">enum</span> <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1f">lin_errmsg_enum</a> {</div>
-<div class="line"><a name="l00496"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb">  496</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb">LINERR_SUCCESS</a>      = 0,      <span class="comment">/* Success. */</span></div>
-<div class="line"><a name="l00497"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513">  497</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513">LINERR_NULL_POINTER</a> = 1,      <span class="comment">/* Null linprm pointer passed. */</span></div>
-<div class="line"><a name="l00498"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d">  498</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d">LINERR_MEMORY</a>       = 2,      <span class="comment">/* Memory allocation failed. */</span></div>
-<div class="line"><a name="l00499"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8">  499</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8">LINERR_SINGULAR_MTX</a> = 3,      <span class="comment">/* PCi_ja matrix is singular. */</span></div>
-<div class="line"><a name="l00500"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7">  500</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7">LINERR_DISTORT_INIT</a> = 4,      <span class="comment">/* Failed to initialise distortions. */</span></div>
-<div class="line"><a name="l00501"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2">  501</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2">LINERR_DISTORT</a>      = 5,      <span class="comment">/* Distort error. */</span></div>
-<div class="line"><a name="l00502"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9">  502</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9">LINERR_DEDISTORT</a>    = 6       <span class="comment">/* De-distort error. */</span></div>
-<div class="line"><a name="l00503"></a><span class="lineno">  503</span> };</div>
-<div class="line"><a name="l00504"></a><span class="lineno">  504</span> </div>
-<div class="line"><a name="l00505"></a><span class="lineno"><a class="line" href="structlinprm.html">  505</a></span> <span class="keyword">struct </span><a class="code" href="structlinprm.html">linprm</a> {</div>
-<div class="line"><a name="l00506"></a><span class="lineno">  506</span>   <span class="comment">/* Initialization flag (see the prologue above).                          */</span></div>
-<div class="line"><a name="l00507"></a><span class="lineno">  507</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00508"></a><span class="lineno"><a class="line" href="structlinprm.html#a5bb0b2b2ce1f160a8a70f6437a893eea">  508</a></span>   <span class="keywordtype">int</span> <a class="code" href="structlinprm.html#a5bb0b2b2ce1f160a8a70f6437a893eea">flag</a>;                     <span class="comment">/* Set to zero to force initialization.     */</span></div>
-<div class="line"><a name="l00509"></a><span class="lineno">  509</span> </div>
-<div class="line"><a name="l00510"></a><span class="lineno">  510</span>   <span class="comment">/* Parameters to be provided (see the prologue above).                    */</span></div>
-<div class="line"><a name="l00511"></a><span class="lineno">  511</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00512"></a><span class="lineno"><a class="line" href="structlinprm.html#ae281f0f7ebeaf5038cc13c13946641b1">  512</a></span>   <span class="keywordtype">int</span> <a class="code" href="structlinprm.html#ae281f0f7ebeaf5038cc13c13946641b1">naxis</a>;                    <span class="comment">/* The number of axes, given by NAXIS.      */</span></div>
-<div class="line"><a name="l00513"></a><span class="lineno"><a class="line" href="structlinprm.html#a3691ff3f40a0ba087637d30ffc87e6d0">  513</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a3691ff3f40a0ba087637d30ffc87e6d0">crpix</a>;                <span class="comment">/* CRPIXja keywords for each pixel axis.    */</span></div>
-<div class="line"><a name="l00514"></a><span class="lineno"><a class="line" href="structlinprm.html#a4c40bec32ec40035b8c1ef13db652270">  514</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a4c40bec32ec40035b8c1ef13db652270">pc</a>;                   <span class="comment">/* PCi_ja  linear transformation matrix.    */</span></div>
-<div class="line"><a name="l00515"></a><span class="lineno"><a class="line" href="structlinprm.html#a162762d02eaade6a53d63d70b8827caa">  515</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a162762d02eaade6a53d63d70b8827caa">cdelt</a>;                <span class="comment">/* CDELTia keywords for each coord axis.    */</span></div>
-<div class="line"><a name="l00516"></a><span class="lineno"><a class="line" href="structlinprm.html#a7d951475b1c16f94703fba9e04ec24d2">  516</a></span>   <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> *<a class="code" href="structlinprm.html#a7d951475b1c16f94703fba9e04ec24d2">dispre</a>;        <span class="comment">/* Prior   distortion parameters, if any.   */</span></div>
-<div class="line"><a name="l00517"></a><span class="lineno"><a class="line" href="structlinprm.html#a2c21e35f61f428ed14ca2b60bccc10c8">  517</a></span>   <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> *<a class="code" href="structlinprm.html#a2c21e35f61f428ed14ca2b60bccc10c8">disseq</a>;        <span class="comment">/* Sequent distortion parameters, if any.   */</span></div>
-<div class="line"><a name="l00518"></a><span class="lineno">  518</span> </div>
-<div class="line"><a name="l00519"></a><span class="lineno">  519</span>   <span class="comment">/* Information derived from the parameters supplied.                      */</span></div>
-<div class="line"><a name="l00520"></a><span class="lineno">  520</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00521"></a><span class="lineno"><a class="line" href="structlinprm.html#aeaaf26fd243da58fee173b075bed1de7">  521</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#aeaaf26fd243da58fee173b075bed1de7">piximg</a>;               <span class="comment">/* Product of CDELTia and PCi_ja matrices.  */</span></div>
-<div class="line"><a name="l00522"></a><span class="lineno"><a class="line" href="structlinprm.html#a28a705f744a32cd05dd3aa86ca58998b">  522</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a28a705f744a32cd05dd3aa86ca58998b">imgpix</a>;               <span class="comment">/* Inverse of the piximg matrix.            */</span></div>
-<div class="line"><a name="l00523"></a><span class="lineno"><a class="line" href="structlinprm.html#a596f68ff17fce142f36530d72dd838c4">  523</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#a596f68ff17fce142f36530d72dd838c4">i_naxis</a>;               <span class="comment">/* Dimension of piximg and imgpix.          */</span></div>
-<div class="line"><a name="l00524"></a><span class="lineno"><a class="line" href="structlinprm.html#af0a5cac7b1d2d3a0feb6905c05b122c2">  524</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#af0a5cac7b1d2d3a0feb6905c05b122c2">unity</a>;                 <span class="comment">/* True if the PCi_ja matrix is unity.      */</span></div>
-<div class="line"><a name="l00525"></a><span class="lineno"><a class="line" href="structlinprm.html#a499a66528c3dcb9d1a9bea67b5afaa0d">  525</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#a499a66528c3dcb9d1a9bea67b5afaa0d">affine</a>;                <span class="comment">/* True if there are no distortions.        */</span></div>
-<div class="line"><a name="l00526"></a><span class="lineno"><a class="line" href="structlinprm.html#af3a8524b6c3c11315e4048d4bd6864c8">  526</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#af3a8524b6c3c11315e4048d4bd6864c8">simple</a>;                <span class="comment">/* True if unity and no distortions.        */</span></div>
-<div class="line"><a name="l00527"></a><span class="lineno">  527</span> </div>
-<div class="line"><a name="l00528"></a><span class="lineno">  528</span>   <span class="comment">/* Error handling, if enabled.                                            */</span></div>
-<div class="line"><a name="l00529"></a><span class="lineno">  529</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00530"></a><span class="lineno"><a class="line" href="structlinprm.html#a2975830d4214bb6b35cb1ca922875057">  530</a></span>   <span class="keyword">struct </span><a class="code" href="structwcserr.html">wcserr</a> *<a class="code" href="structlinprm.html#a2975830d4214bb6b35cb1ca922875057">err</a>;</div>
-<div class="line"><a name="l00531"></a><span class="lineno">  531</span> </div>
-<div class="line"><a name="l00532"></a><span class="lineno">  532</span>   <span class="comment">/* Private - the remainder are for internal use.                          */</span></div>
-<div class="line"><a name="l00533"></a><span class="lineno">  533</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
-<div class="line"><a name="l00534"></a><span class="lineno"><a class="line" href="structlinprm.html#adf299a3f7750599a48373ce370fde9da">  534</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#adf299a3f7750599a48373ce370fde9da">tmpcrd</a>;</div>
-<div class="line"><a name="l00535"></a><span class="lineno">  535</span> </div>
-<div class="line"><a name="l00536"></a><span class="lineno"><a class="line" href="structlinprm.html#aeefcacedf2989970f0df2c246d84bfb7">  536</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#a5ef7cce6307f640aca1080d0d5ad9ba1">m_flag</a>, <a class="code" href="structlinprm.html#aeefcacedf2989970f0df2c246d84bfb7">m_naxis</a>;</div>
-<div class="line"><a name="l00537"></a><span class="lineno"><a class="line" href="structlinprm.html#a7036b8527bc8b220ad8a863442631f48">  537</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a091103ceb860eeed1a280effa0df28df">m_crpix</a>, *<a class="code" href="structlinprm.html#a7036b8527bc8b220ad8a863442631f48">m_pc</a>, *<a class="code" href="structlinprm.html#a5ac85757a7a46247e353a089374eb128">m_cdelt</a>;</div>
-<div class="line"><a name="l00538"></a><span class="lineno"><a class="line" href="structlinprm.html#a7ecd987ea3b41b7d0a1c4489e882c1f4">  538</a></span>   <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> *<a class="code" href="structlinprm.html#a9c5dae1285df5adbc684bb650a84b74a">m_dispre</a>, *<a class="code" href="structlinprm.html#a7ecd987ea3b41b7d0a1c4489e882c1f4">m_disseq</a>;</div>
-<div class="line"><a name="l00539"></a><span class="lineno">  539</span> };</div>
-<div class="line"><a name="l00540"></a><span class="lineno">  540</span> </div>
-<div class="line"><a name="l00541"></a><span class="lineno">  541</span> <span class="comment">/* Size of the linprm struct in int units, used by the Fortran wrappers. */</span></div>
-<div class="line"><a name="l00542"></a><span class="lineno"><a class="line" href="lin_8h.html#afce62bec193631f6e6b58c5b786cd660">  542</a></span> <span class="preprocessor">#define LINLEN (sizeof(struct linprm)/sizeof(int))</span></div>
-<div class="line"><a name="l00543"></a><span class="lineno">  543</span> </div>
-<div class="line"><a name="l00544"></a><span class="lineno">  544</span> </div>
-<div class="line"><a name="l00545"></a><span class="lineno">  545</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a7ddea28768d99f01c6be1c71a4d8fe58">linini</a>(<span class="keywordtype">int</span> alloc, <span class="keywordtype">int</span> <a class="code" href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">naxis</a>, <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
-<div class="line"><a name="l00546"></a><span class="lineno">  546</span> </div>
-<div class="line"><a name="l00547"></a><span class="lineno">  547</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#ad68df60cc9fa6f86e2c6e6943dc74cdb">lindis</a>(<span class="keywordtype">int</span> sequence, <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
-<div class="line"><a name="l00548"></a><span class="lineno">  548</span> </div>
-<div class="line"><a name="l00549"></a><span class="lineno">  549</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#ab8fc0ef6b34eb3327b13a00de78232b1">lincpy</a>(<span class="keywordtype">int</span> alloc, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *linsrc, <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lindst);</div>
-<div class="line"><a name="l00550"></a><span class="lineno">  550</span> </div>
-<div class="line"><a name="l00551"></a><span class="lineno">  551</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#aef9ead7c6ea6ab08f3ba3fc6a1c30303">linfree</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
-<div class="line"><a name="l00552"></a><span class="lineno">  552</span> </div>
-<div class="line"><a name="l00553"></a><span class="lineno">  553</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a946005b038f5c584691630b5d39369e3">linprt</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
-<div class="line"><a name="l00554"></a><span class="lineno">  554</span> </div>
-<div class="line"><a name="l00555"></a><span class="lineno">  555</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a7bdde709fac889f1c386e9c8993d74f7">linperr</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keyword">const</span> <span class="keywordtype">char</span> *prefix);</div>
-<div class="line"><a name="l00556"></a><span class="lineno">  556</span> </div>
-<div class="line"><a name="l00557"></a><span class="lineno">  557</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a5c01c0991c8d0c4437581a7c1453b09a">linset</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
-<div class="line"><a name="l00558"></a><span class="lineno">  558</span> </div>
-<div class="line"><a name="l00559"></a><span class="lineno">  559</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#ae4947608476c198ad27759d1e562d655">linp2x</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keywordtype">int</span> ncoord, <span class="keywordtype">int</span> nelem, <span class="keyword">const</span> <span class="keywordtype">double</span> pixcrd[],</div>
-<div class="line"><a name="l00560"></a><span class="lineno">  560</span>            <span class="keywordtype">double</span> imgcrd[]);</div>
-<div class="line"><a name="l00561"></a><span class="lineno">  561</span> </div>
-<div class="line"><a name="l00562"></a><span class="lineno">  562</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a5490027e9699680dfefe370c28691243">linx2p</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keywordtype">int</span> ncoord, <span class="keywordtype">int</span> nelem, <span class="keyword">const</span> <span class="keywordtype">double</span> imgcrd[],</div>
-<div class="line"><a name="l00563"></a><span class="lineno">  563</span>            <span class="keywordtype">double</span> pixcrd[]);</div>
-<div class="line"><a name="l00564"></a><span class="lineno">  564</span> </div>
-<div class="line"><a name="l00565"></a><span class="lineno">  565</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#acc7d26efba3ca08d36047253a9315dcc">matinv</a>(<span class="keywordtype">int</span> n, <span class="keyword">const</span> <span class="keywordtype">double</span> mat[], <span class="keywordtype">double</span> inv[]);</div>
-<div class="line"><a name="l00566"></a><span class="lineno">  566</span> </div>
-<div class="line"><a name="l00567"></a><span class="lineno">  567</span> </div>
-<div class="line"><a name="l00568"></a><span class="lineno">  568</span> <span class="comment">/* Deprecated. */</span></div>
-<div class="line"><a name="l00569"></a><span class="lineno"><a class="line" href="lin_8h.html#affec8a2c0650ebd2168d7772b2ecec19">  569</a></span> <span class="preprocessor">#define linini_errmsg lin_errmsg</span></div>
-<div class="line"><a name="l00570"></a><span class="lineno"><a class="line" href="lin_8h.html#a58c2822debf5b36daa18fe8711d724f2">  570</a></span> <span class="preprocessor">#define lincpy_errmsg lin_errmsg</span></div>
-<div class="line"><a name="l00571"></a><span class="lineno"><a class="line" href="lin_8h.html#aa6d3f59059c532b0217f570f2b4f50df">  571</a></span> <span class="preprocessor">#define linfree_errmsg lin_errmsg</span></div>
-<div class="line"><a name="l00572"></a><span class="lineno"><a class="line" href="lin_8h.html#a8970e09d61fde987211f8e64061e1fa1">  572</a></span> <span class="preprocessor">#define linprt_errmsg lin_errmsg</span></div>
-<div class="line"><a name="l00573"></a><span class="lineno"><a class="line" href="lin_8h.html#aa78f202b20674909aab523018106546e">  573</a></span> <span class="preprocessor">#define linset_errmsg lin_errmsg</span></div>
-<div class="line"><a name="l00574"></a><span class="lineno"><a class="line" href="lin_8h.html#acb8c02645d7cc3d42e3db6ebf74de192">  574</a></span> <span class="preprocessor">#define linp2x_errmsg lin_errmsg</span></div>
-<div class="line"><a name="l00575"></a><span class="lineno"><a class="line" href="lin_8h.html#a7232df93295216e063c438671652c2b4">  575</a></span> <span class="preprocessor">#define linx2p_errmsg lin_errmsg</span></div>
-<div class="line"><a name="l00576"></a><span class="lineno">  576</span> </div>
-<div class="line"><a name="l00577"></a><span class="lineno">  577</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
-<div class="line"><a name="l00578"></a><span class="lineno">  578</span> }</div>
-<div class="line"><a name="l00579"></a><span class="lineno">  579</span> <span class="preprocessor">#endif</span></div>
-<div class="line"><a name="l00580"></a><span class="lineno">  580</span> </div>
-<div class="line"><a name="l00581"></a><span class="lineno">  581</span> <span class="preprocessor">#endif </span><span class="comment">/* WCSLIB_LIN */</span><span class="preprocessor"></span></div>
-<div class="ttc" id="structlinprm_html_a7036b8527bc8b220ad8a863442631f48"><div class="ttname"><a href="structlinprm.html#a7036b8527bc8b220ad8a863442631f48">linprm::m_pc</a></div><div class="ttdeci">double * m_pc</div><div class="ttdef"><b>Definition:</b> lin.h:537</div></div>
+<div class="line"><a name="l00483"></a><span class="lineno">  483</span> <span class="comment">*     Function lindis() may be used to assign a disprm pointer to a linprm</span></div>
+<div class="line"><a name="l00484"></a><span class="lineno">  484</span> <span class="comment">*     struct, allowing it to take control of any memory allocated for it, as</span></div>
+<div class="line"><a name="l00485"></a><span class="lineno">  485</span> <span class="comment">*     in the following example:</span></div>
+<div class="line"><a name="l00486"></a><span class="lineno">  486</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00487"></a><span class="lineno">  487</span> <span class="comment">=       void add_distortion(struct linprm *lin)</span></div>
+<div class="line"><a name="l00488"></a><span class="lineno">  488</span> <span class="comment">=       {</span></div>
+<div class="line"><a name="l00489"></a><span class="lineno">  489</span> <span class="comment">=         struct disprm *dispre;</span></div>
+<div class="line"><a name="l00490"></a><span class="lineno">  490</span> <span class="comment">=</span></div>
+<div class="line"><a name="l00491"></a><span class="lineno">  491</span> <span class="comment">=         dispre = malloc(sizeof(struct disprm);</span></div>
+<div class="line"><a name="l00492"></a><span class="lineno">  492</span> <span class="comment">=         dispre->flag = -1;</span></div>
+<div class="line"><a name="l00493"></a><span class="lineno">  493</span> <span class="comment">=         lindis(1, lin, dispre);</span></div>
+<div class="line"><a name="l00494"></a><span class="lineno">  494</span> <span class="comment">=           :</span></div>
+<div class="line"><a name="l00495"></a><span class="lineno">  495</span> <span class="comment">=          (Set up dispre.)</span></div>
+<div class="line"><a name="l00496"></a><span class="lineno">  496</span> <span class="comment">=           :</span></div>
+<div class="line"><a name="l00497"></a><span class="lineno">  497</span> <span class="comment">=</span></div>
+<div class="line"><a name="l00498"></a><span class="lineno">  498</span> <span class="comment">=         return;</span></div>
+<div class="line"><a name="l00499"></a><span class="lineno">  499</span> <span class="comment">=       }</span></div>
+<div class="line"><a name="l00500"></a><span class="lineno">  500</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00501"></a><span class="lineno">  501</span> <span class="comment">*     Here, after the distortion function parameters etc. are copied into</span></div>
+<div class="line"><a name="l00502"></a><span class="lineno">  502</span> <span class="comment">*     dispre, dispre is assigned using lindis() which takes control of the</span></div>
+<div class="line"><a name="l00503"></a><span class="lineno">  503</span> <span class="comment">*     allocated memory.  It will be free'd later when linfree() is invoked on</span></div>
+<div class="line"><a name="l00504"></a><span class="lineno">  504</span> <span class="comment">*     the linprm struct.</span></div>
+<div class="line"><a name="l00505"></a><span class="lineno">  505</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00506"></a><span class="lineno">  506</span> <span class="comment">*     Consider also the following erroneous code:</span></div>
+<div class="line"><a name="l00507"></a><span class="lineno">  507</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00508"></a><span class="lineno">  508</span> <span class="comment">=       void bad_code(struct linprm *lin)</span></div>
+<div class="line"><a name="l00509"></a><span class="lineno">  509</span> <span class="comment">=       {</span></div>
+<div class="line"><a name="l00510"></a><span class="lineno">  510</span> <span class="comment">=         struct disprm dispre;</span></div>
+<div class="line"><a name="l00511"></a><span class="lineno">  511</span> <span class="comment">=</span></div>
+<div class="line"><a name="l00512"></a><span class="lineno">  512</span> <span class="comment">=         dispre.flag = -1;</span></div>
+<div class="line"><a name="l00513"></a><span class="lineno">  513</span> <span class="comment">=         lindis(1, lin, &dispre);   // WRONG.</span></div>
+<div class="line"><a name="l00514"></a><span class="lineno">  514</span> <span class="comment">=           :</span></div>
+<div class="line"><a name="l00515"></a><span class="lineno">  515</span> <span class="comment">=</span></div>
+<div class="line"><a name="l00516"></a><span class="lineno">  516</span> <span class="comment">=         return;</span></div>
+<div class="line"><a name="l00517"></a><span class="lineno">  517</span> <span class="comment">=       }</span></div>
+<div class="line"><a name="l00518"></a><span class="lineno">  518</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00519"></a><span class="lineno">  519</span> <span class="comment">*     Here, dispre is declared as a struct, rather than a pointer.  When the</span></div>
+<div class="line"><a name="l00520"></a><span class="lineno">  520</span> <span class="comment">*     function returns, dispre will go out of scope and its memory will most</span></div>
+<div class="line"><a name="l00521"></a><span class="lineno">  521</span> <span class="comment">*     likely be reused, thereby trashing its contents.  Later, a segfault will</span></div>
+<div class="line"><a name="l00522"></a><span class="lineno">  522</span> <span class="comment">*     occur when linfree() tries to free dispre's stale address.</span></div>
+<div class="line"><a name="l00523"></a><span class="lineno">  523</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00524"></a><span class="lineno">  524</span> <span class="comment">*   struct disprm *disseq</span></div>
+<div class="line"><a name="l00525"></a><span class="lineno">  525</span> <span class="comment">*     (Given) Pointer to a disprm struct holding parameters for sequent</span></div>
+<div class="line"><a name="l00526"></a><span class="lineno">  526</span> <span class="comment">*     distortion functions, or a null (0x0) pointer if there are none.</span></div>
+<div class="line"><a name="l00527"></a><span class="lineno">  527</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00528"></a><span class="lineno">  528</span> <span class="comment">*     Refer to the comments and examples given for disprm::dispre.</span></div>
+<div class="line"><a name="l00529"></a><span class="lineno">  529</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00530"></a><span class="lineno">  530</span> <span class="comment">*   double *piximg</span></div>
+<div class="line"><a name="l00531"></a><span class="lineno">  531</span> <span class="comment">*     (Returned) Pointer to the first element of the matrix containing the</span></div>
+<div class="line"><a name="l00532"></a><span class="lineno">  532</span> <span class="comment">*     product of the CDELTia diagonal matrix and the PCi_ja matrix.</span></div>
+<div class="line"><a name="l00533"></a><span class="lineno">  533</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00534"></a><span class="lineno">  534</span> <span class="comment">*   double *imgpix</span></div>
+<div class="line"><a name="l00535"></a><span class="lineno">  535</span> <span class="comment">*     (Returned) Pointer to the first element of the inverse of the</span></div>
+<div class="line"><a name="l00536"></a><span class="lineno">  536</span> <span class="comment">*     linprm::piximg matrix.</span></div>
+<div class="line"><a name="l00537"></a><span class="lineno">  537</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00538"></a><span class="lineno">  538</span> <span class="comment">*   int i_naxis</span></div>
+<div class="line"><a name="l00539"></a><span class="lineno">  539</span> <span class="comment">*     (Returned) The dimension of linprm::piximg and linprm::imgpix (normally</span></div>
+<div class="line"><a name="l00540"></a><span class="lineno">  540</span> <span class="comment">*     equal to naxis).</span></div>
+<div class="line"><a name="l00541"></a><span class="lineno">  541</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00542"></a><span class="lineno">  542</span> <span class="comment">*   int unity</span></div>
+<div class="line"><a name="l00543"></a><span class="lineno">  543</span> <span class="comment">*     (Returned) True if the linear transformation matrix is unity.</span></div>
+<div class="line"><a name="l00544"></a><span class="lineno">  544</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00545"></a><span class="lineno">  545</span> <span class="comment">*   int affine</span></div>
+<div class="line"><a name="l00546"></a><span class="lineno">  546</span> <span class="comment">*     (Returned) True if there are no distortions.</span></div>
+<div class="line"><a name="l00547"></a><span class="lineno">  547</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00548"></a><span class="lineno">  548</span> <span class="comment">*   int simple</span></div>
+<div class="line"><a name="l00549"></a><span class="lineno">  549</span> <span class="comment">*     (Returned) True if unity and no distortions.</span></div>
+<div class="line"><a name="l00550"></a><span class="lineno">  550</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00551"></a><span class="lineno">  551</span> <span class="comment">*   struct wcserr *err</span></div>
+<div class="line"><a name="l00552"></a><span class="lineno">  552</span> <span class="comment">*     (Returned) If enabled, when an error status is returned, this struct</span></div>
+<div class="line"><a name="l00553"></a><span class="lineno">  553</span> <span class="comment">*     contains detailed information about the error, see wcserr_enable().</span></div>
+<div class="line"><a name="l00554"></a><span class="lineno">  554</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00555"></a><span class="lineno">  555</span> <span class="comment">*   double *tmpcrd</span></div>
+<div class="line"><a name="l00556"></a><span class="lineno">  556</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00557"></a><span class="lineno">  557</span> <span class="comment">*   int m_flag</span></div>
+<div class="line"><a name="l00558"></a><span class="lineno">  558</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00559"></a><span class="lineno">  559</span> <span class="comment">*   int m_naxis</span></div>
+<div class="line"><a name="l00560"></a><span class="lineno">  560</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00561"></a><span class="lineno">  561</span> <span class="comment">*   double *m_crpix</span></div>
+<div class="line"><a name="l00562"></a><span class="lineno">  562</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00563"></a><span class="lineno">  563</span> <span class="comment">*   double *m_pc</span></div>
+<div class="line"><a name="l00564"></a><span class="lineno">  564</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00565"></a><span class="lineno">  565</span> <span class="comment">*   double *m_cdelt</span></div>
+<div class="line"><a name="l00566"></a><span class="lineno">  566</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00567"></a><span class="lineno">  567</span> <span class="comment">*   struct disprm *m_dispre</span></div>
+<div class="line"><a name="l00568"></a><span class="lineno">  568</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00569"></a><span class="lineno">  569</span> <span class="comment">*   struct disprm *m_disseq</span></div>
+<div class="line"><a name="l00570"></a><span class="lineno">  570</span> <span class="comment">*     (For internal use only.)</span></div>
+<div class="line"><a name="l00571"></a><span class="lineno">  571</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00572"></a><span class="lineno">  572</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00573"></a><span class="lineno">  573</span> <span class="comment">* Global variable: const char *lin_errmsg[] - Status return messages</span></div>
+<div class="line"><a name="l00574"></a><span class="lineno">  574</span> <span class="comment">* ------------------------------------------------------------------</span></div>
+<div class="line"><a name="l00575"></a><span class="lineno">  575</span> <span class="comment">* Error messages to match the status value returned from each function.</span></div>
+<div class="line"><a name="l00576"></a><span class="lineno">  576</span> <span class="comment">*</span></div>
+<div class="line"><a name="l00577"></a><span class="lineno">  577</span> <span class="comment">*===========================================================================*/</span></div>
+<div class="line"><a name="l00578"></a><span class="lineno">  578</span> </div>
+<div class="line"><a name="l00579"></a><span class="lineno">  579</span> <span class="preprocessor">#ifndef WCSLIB_LIN</span></div>
+<div class="line"><a name="l00580"></a><span class="lineno">  580</span> <span class="preprocessor">#define WCSLIB_LIN</span></div>
+<div class="line"><a name="l00581"></a><span class="lineno">  581</span> </div>
+<div class="line"><a name="l00582"></a><span class="lineno">  582</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a name="l00583"></a><span class="lineno">  583</span> <span class="keyword">extern</span> <span class="stringliteral">"C"</span> {</div>
+<div class="line"><a name="l00584"></a><span class="lineno">  584</span> <span class="preprocessor">#endif</span></div>
+<div class="line"><a name="l00585"></a><span class="lineno">  585</span> </div>
+<div class="line"><a name="l00586"></a><span class="lineno">  586</span> </div>
+<div class="line"><a name="l00587"></a><span class="lineno">  587</span> <span class="keyword">extern</span> <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="lin_8h.html#a7bdf034bd750df1e518db9feeebf7a79">lin_errmsg</a>[];</div>
+<div class="line"><a name="l00588"></a><span class="lineno">  588</span> </div>
+<div class="line"><a name="l00589"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1f">  589</a></span> <span class="keyword">enum</span> <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1f">lin_errmsg_enum</a> {</div>
+<div class="line"><a name="l00590"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb">  590</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb">LINERR_SUCCESS</a>      = 0,      <span class="comment">/* Success. */</span></div>
+<div class="line"><a name="l00591"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513">  591</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513">LINERR_NULL_POINTER</a> = 1,      <span class="comment">/* Null linprm pointer passed. */</span></div>
+<div class="line"><a name="l00592"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d">  592</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d">LINERR_MEMORY</a>       = 2,      <span class="comment">/* Memory allocation failed. */</span></div>
+<div class="line"><a name="l00593"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8">  593</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8">LINERR_SINGULAR_MTX</a> = 3,      <span class="comment">/* PCi_ja matrix is singular. */</span></div>
+<div class="line"><a name="l00594"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7">  594</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7">LINERR_DISTORT_INIT</a> = 4,      <span class="comment">/* Failed to initialise distortions. */</span></div>
+<div class="line"><a name="l00595"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2">  595</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2">LINERR_DISTORT</a>      = 5,      <span class="comment">/* Distort error. */</span></div>
+<div class="line"><a name="l00596"></a><span class="lineno"><a class="line" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9">  596</a></span>   <a class="code" href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9">LINERR_DEDISTORT</a>    = 6       <span class="comment">/* De-distort error. */</span></div>
+<div class="line"><a name="l00597"></a><span class="lineno">  597</span> };</div>
+<div class="line"><a name="l00598"></a><span class="lineno">  598</span> </div>
+<div class="line"><a name="l00599"></a><span class="lineno"><a class="line" href="structlinprm.html">  599</a></span> <span class="keyword">struct </span><a class="code" href="structlinprm.html">linprm</a> {</div>
+<div class="line"><a name="l00600"></a><span class="lineno">  600</span>   <span class="comment">/* Initialization flag (see the prologue above).                          */</span></div>
+<div class="line"><a name="l00601"></a><span class="lineno">  601</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00602"></a><span class="lineno"><a class="line" href="structlinprm.html#a5bb0b2b2ce1f160a8a70f6437a893eea">  602</a></span>   <span class="keywordtype">int</span> <a class="code" href="structlinprm.html#a5bb0b2b2ce1f160a8a70f6437a893eea">flag</a>;                     <span class="comment">/* Set to zero to force initialization.     */</span></div>
+<div class="line"><a name="l00603"></a><span class="lineno">  603</span> </div>
+<div class="line"><a name="l00604"></a><span class="lineno">  604</span>   <span class="comment">/* Parameters to be provided (see the prologue above).                    */</span></div>
+<div class="line"><a name="l00605"></a><span class="lineno">  605</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00606"></a><span class="lineno"><a class="line" href="structlinprm.html#ae281f0f7ebeaf5038cc13c13946641b1">  606</a></span>   <span class="keywordtype">int</span> <a class="code" href="structlinprm.html#ae281f0f7ebeaf5038cc13c13946641b1">naxis</a>;                    <span class="comment">/* The number of axes, given by NAXIS.      */</span></div>
+<div class="line"><a name="l00607"></a><span class="lineno"><a class="line" href="structlinprm.html#a3691ff3f40a0ba087637d30ffc87e6d0">  607</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a3691ff3f40a0ba087637d30ffc87e6d0">crpix</a>;                <span class="comment">/* CRPIXja keywords for each pixel axis.    */</span></div>
+<div class="line"><a name="l00608"></a><span class="lineno"><a class="line" href="structlinprm.html#a4c40bec32ec40035b8c1ef13db652270">  608</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a4c40bec32ec40035b8c1ef13db652270">pc</a>;                   <span class="comment">/* PCi_ja  linear transformation matrix.    */</span></div>
+<div class="line"><a name="l00609"></a><span class="lineno"><a class="line" href="structlinprm.html#a162762d02eaade6a53d63d70b8827caa">  609</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a162762d02eaade6a53d63d70b8827caa">cdelt</a>;                <span class="comment">/* CDELTia keywords for each coord axis.    */</span></div>
+<div class="line"><a name="l00610"></a><span class="lineno"><a class="line" href="structlinprm.html#a7d951475b1c16f94703fba9e04ec24d2">  610</a></span>   <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> *<a class="code" href="structlinprm.html#a7d951475b1c16f94703fba9e04ec24d2">dispre</a>;        <span class="comment">/* Prior   distortion parameters, if any.   */</span></div>
+<div class="line"><a name="l00611"></a><span class="lineno"><a class="line" href="structlinprm.html#a2c21e35f61f428ed14ca2b60bccc10c8">  611</a></span>   <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> *<a class="code" href="structlinprm.html#a2c21e35f61f428ed14ca2b60bccc10c8">disseq</a>;        <span class="comment">/* Sequent distortion parameters, if any.   */</span></div>
+<div class="line"><a name="l00612"></a><span class="lineno">  612</span> </div>
+<div class="line"><a name="l00613"></a><span class="lineno">  613</span>   <span class="comment">/* Information derived from the parameters supplied.                      */</span></div>
+<div class="line"><a name="l00614"></a><span class="lineno">  614</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00615"></a><span class="lineno"><a class="line" href="structlinprm.html#aeaaf26fd243da58fee173b075bed1de7">  615</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#aeaaf26fd243da58fee173b075bed1de7">piximg</a>;               <span class="comment">/* Product of CDELTia and PCi_ja matrices.  */</span></div>
+<div class="line"><a name="l00616"></a><span class="lineno"><a class="line" href="structlinprm.html#a28a705f744a32cd05dd3aa86ca58998b">  616</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a28a705f744a32cd05dd3aa86ca58998b">imgpix</a>;               <span class="comment">/* Inverse of the piximg matrix.            */</span></div>
+<div class="line"><a name="l00617"></a><span class="lineno"><a class="line" href="structlinprm.html#a596f68ff17fce142f36530d72dd838c4">  617</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#a596f68ff17fce142f36530d72dd838c4">i_naxis</a>;               <span class="comment">/* Dimension of piximg and imgpix.          */</span></div>
+<div class="line"><a name="l00618"></a><span class="lineno"><a class="line" href="structlinprm.html#af0a5cac7b1d2d3a0feb6905c05b122c2">  618</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#af0a5cac7b1d2d3a0feb6905c05b122c2">unity</a>;                 <span class="comment">/* True if the PCi_ja matrix is unity.      */</span></div>
+<div class="line"><a name="l00619"></a><span class="lineno"><a class="line" href="structlinprm.html#a499a66528c3dcb9d1a9bea67b5afaa0d">  619</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#a499a66528c3dcb9d1a9bea67b5afaa0d">affine</a>;                <span class="comment">/* True if there are no distortions.        */</span></div>
+<div class="line"><a name="l00620"></a><span class="lineno"><a class="line" href="structlinprm.html#af3a8524b6c3c11315e4048d4bd6864c8">  620</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#af3a8524b6c3c11315e4048d4bd6864c8">simple</a>;                <span class="comment">/* True if unity and no distortions.        */</span></div>
+<div class="line"><a name="l00621"></a><span class="lineno">  621</span> </div>
+<div class="line"><a name="l00622"></a><span class="lineno">  622</span>   <span class="comment">/* Error handling, if enabled.                                            */</span></div>
+<div class="line"><a name="l00623"></a><span class="lineno">  623</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00624"></a><span class="lineno"><a class="line" href="structlinprm.html#a2975830d4214bb6b35cb1ca922875057">  624</a></span>   <span class="keyword">struct </span><a class="code" href="structwcserr.html">wcserr</a> *<a class="code" href="structlinprm.html#a2975830d4214bb6b35cb1ca922875057">err</a>;</div>
+<div class="line"><a name="l00625"></a><span class="lineno">  625</span> </div>
+<div class="line"><a name="l00626"></a><span class="lineno">  626</span>   <span class="comment">/* Private - the remainder are for internal use.                          */</span></div>
+<div class="line"><a name="l00627"></a><span class="lineno">  627</span>   <span class="comment">/*------------------------------------------------------------------------*/</span></div>
+<div class="line"><a name="l00628"></a><span class="lineno"><a class="line" href="structlinprm.html#adf299a3f7750599a48373ce370fde9da">  628</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#adf299a3f7750599a48373ce370fde9da">tmpcrd</a>;</div>
+<div class="line"><a name="l00629"></a><span class="lineno">  629</span> </div>
+<div class="line"><a name="l00630"></a><span class="lineno"><a class="line" href="structlinprm.html#aeefcacedf2989970f0df2c246d84bfb7">  630</a></span>   <span class="keywordtype">int</span>    <a class="code" href="structlinprm.html#a5ef7cce6307f640aca1080d0d5ad9ba1">m_flag</a>, <a class="code" href="structlinprm.html#aeefcacedf2989970f0df2c246d84bfb7">m_naxis</a>;</div>
+<div class="line"><a name="l00631"></a><span class="lineno"><a class="line" href="structlinprm.html#a7036b8527bc8b220ad8a863442631f48">  631</a></span>   <span class="keywordtype">double</span> *<a class="code" href="structlinprm.html#a091103ceb860eeed1a280effa0df28df">m_crpix</a>, *<a class="code" href="structlinprm.html#a7036b8527bc8b220ad8a863442631f48">m_pc</a>, *<a class="code" href="structlinprm.html#a5ac85757a7a46247e353a089374eb128">m_cdelt</a>;</div>
+<div class="line"><a name="l00632"></a><span class="lineno"><a class="line" href="structlinprm.html#a7ecd987ea3b41b7d0a1c4489e882c1f4">  632</a></span>   <span class="keyword">struct </span><a class="code" href="structdisprm.html">disprm</a> *<a class="code" href="structlinprm.html#a9c5dae1285df5adbc684bb650a84b74a">m_dispre</a>, *<a class="code" href="structlinprm.html#a7ecd987ea3b41b7d0a1c4489e882c1f4">m_disseq</a>;</div>
+<div class="line"><a name="l00633"></a><span class="lineno">  633</span> };</div>
+<div class="line"><a name="l00634"></a><span class="lineno">  634</span> </div>
+<div class="line"><a name="l00635"></a><span class="lineno">  635</span> <span class="comment">/* Size of the linprm struct in int units, used by the Fortran wrappers. */</span></div>
+<div class="line"><a name="l00636"></a><span class="lineno"><a class="line" href="lin_8h.html#afce62bec193631f6e6b58c5b786cd660">  636</a></span> <span class="preprocessor">#define LINLEN (sizeof(struct linprm)/sizeof(int))</span></div>
+<div class="line"><a name="l00637"></a><span class="lineno">  637</span> </div>
+<div class="line"><a name="l00638"></a><span class="lineno">  638</span> </div>
+<div class="line"><a name="l00639"></a><span class="lineno">  639</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a7ddea28768d99f01c6be1c71a4d8fe58">linini</a>(<span class="keywordtype">int</span> alloc, <span class="keywordtype">int</span> <a class="code" href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">naxis</a>, <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
+<div class="line"><a name="l00640"></a><span class="lineno">  640</span> </div>
+<div class="line"><a name="l00641"></a><span class="lineno">  641</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#ad68df60cc9fa6f86e2c6e6943dc74cdb">lindis</a>(<span class="keywordtype">int</span> sequence, <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keyword">struct</span> <a class="code" href="structdisprm.html">disprm</a> *dis);</div>
+<div class="line"><a name="l00642"></a><span class="lineno">  642</span> </div>
+<div class="line"><a name="l00643"></a><span class="lineno">  643</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#ab8fc0ef6b34eb3327b13a00de78232b1">lincpy</a>(<span class="keywordtype">int</span> alloc, <span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *linsrc, <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lindst);</div>
+<div class="line"><a name="l00644"></a><span class="lineno">  644</span> </div>
+<div class="line"><a name="l00645"></a><span class="lineno">  645</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#aef9ead7c6ea6ab08f3ba3fc6a1c30303">linfree</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
+<div class="line"><a name="l00646"></a><span class="lineno">  646</span> </div>
+<div class="line"><a name="l00647"></a><span class="lineno">  647</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a946005b038f5c584691630b5d39369e3">linprt</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
+<div class="line"><a name="l00648"></a><span class="lineno">  648</span> </div>
+<div class="line"><a name="l00649"></a><span class="lineno">  649</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a7bdde709fac889f1c386e9c8993d74f7">linperr</a>(<span class="keyword">const</span> <span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keyword">const</span> <span class="keywordtype">char</span> *prefix);</div>
+<div class="line"><a name="l00650"></a><span class="lineno">  650</span> </div>
+<div class="line"><a name="l00651"></a><span class="lineno">  651</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a5c01c0991c8d0c4437581a7c1453b09a">linset</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin);</div>
+<div class="line"><a name="l00652"></a><span class="lineno">  652</span> </div>
+<div class="line"><a name="l00653"></a><span class="lineno">  653</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#ae4947608476c198ad27759d1e562d655">linp2x</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keywordtype">int</span> ncoord, <span class="keywordtype">int</span> nelem, <span class="keyword">const</span> <span class="keywordtype">double</span> pixcrd[],</div>
+<div class="line"><a name="l00654"></a><span class="lineno">  654</span>            <span class="keywordtype">double</span> imgcrd[]);</div>
+<div class="line"><a name="l00655"></a><span class="lineno">  655</span> </div>
+<div class="line"><a name="l00656"></a><span class="lineno">  656</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a5490027e9699680dfefe370c28691243">linx2p</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keywordtype">int</span> ncoord, <span class="keywordtype">int</span> nelem, <span class="keyword">const</span> <span class="keywordtype">double</span> imgcrd[],</div>
+<div class="line"><a name="l00657"></a><span class="lineno">  657</span>            <span class="keywordtype">double</span> pixcrd[]);</div>
+<div class="line"><a name="l00658"></a><span class="lineno">  658</span> </div>
+<div class="line"><a name="l00659"></a><span class="lineno">  659</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#a27a7a4a2cc3183bb1cd639efaade2265">linwarp</a>(<span class="keyword">struct</span> <a class="code" href="structlinprm.html">linprm</a> *lin, <span class="keyword">const</span> <span class="keywordtype">double</span> pixblc[], <span class="keyword">const</span> <span class="keywordtype">double</span> pixtrc[],</div>
+<div class="line"><a name="l00660"></a><span class="lineno">  660</span>             <span class="keyword">const</span> <span class="keywordtype">double</span> pixsamp[], <span class="keywordtype">int</span> *nsamp,</div>
+<div class="line"><a name="l00661"></a><span class="lineno">  661</span>             <span class="keywordtype">double</span> <a class="code" href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">maxdis</a>[], <span class="keywordtype">double</span> *maxtot,</div>
+<div class="line"><a name="l00662"></a><span class="lineno">  662</span>             <span class="keywordtype">double</span> avgdis[], <span class="keywordtype">double</span> *avgtot,</div>
+<div class="line"><a name="l00663"></a><span class="lineno">  663</span>             <span class="keywordtype">double</span> rmsdis[], <span class="keywordtype">double</span> *rmstot);</div>
+<div class="line"><a name="l00664"></a><span class="lineno">  664</span> </div>
+<div class="line"><a name="l00665"></a><span class="lineno">  665</span> <span class="keywordtype">int</span> <a class="code" href="lin_8h.html#acc7d26efba3ca08d36047253a9315dcc">matinv</a>(<span class="keywordtype">int</span> n, <span class="keyword">const</span> <span class="keywordtype">double</span> mat[], <span class="keywordtype">double</span> inv[]);</div>
+<div class="line"><a name="l00666"></a><span class="lineno">  666</span> </div>
+<div class="line"><a name="l00667"></a><span class="lineno">  667</span> </div>
+<div class="line"><a name="l00668"></a><span class="lineno">  668</span> <span class="comment">/* Deprecated. */</span></div>
+<div class="line"><a name="l00669"></a><span class="lineno"><a class="line" href="lin_8h.html#affec8a2c0650ebd2168d7772b2ecec19">  669</a></span> <span class="preprocessor">#define linini_errmsg lin_errmsg</span></div>
+<div class="line"><a name="l00670"></a><span class="lineno"><a class="line" href="lin_8h.html#a58c2822debf5b36daa18fe8711d724f2">  670</a></span> <span class="preprocessor">#define lincpy_errmsg lin_errmsg</span></div>
+<div class="line"><a name="l00671"></a><span class="lineno"><a class="line" href="lin_8h.html#aa6d3f59059c532b0217f570f2b4f50df">  671</a></span> <span class="preprocessor">#define linfree_errmsg lin_errmsg</span></div>
+<div class="line"><a name="l00672"></a><span class="lineno"><a class="line" href="lin_8h.html#a8970e09d61fde987211f8e64061e1fa1">  672</a></span> <span class="preprocessor">#define linprt_errmsg lin_errmsg</span></div>
+<div class="line"><a name="l00673"></a><span class="lineno"><a class="line" href="lin_8h.html#aa78f202b20674909aab523018106546e">  673</a></span> <span class="preprocessor">#define linset_errmsg lin_errmsg</span></div>
+<div class="line"><a name="l00674"></a><span class="lineno"><a class="line" href="lin_8h.html#acb8c02645d7cc3d42e3db6ebf74de192">  674</a></span> <span class="preprocessor">#define linp2x_errmsg lin_errmsg</span></div>
+<div class="line"><a name="l00675"></a><span class="lineno"><a class="line" href="lin_8h.html#a7232df93295216e063c438671652c2b4">  675</a></span> <span class="preprocessor">#define linx2p_errmsg lin_errmsg</span></div>
+<div class="line"><a name="l00676"></a><span class="lineno">  676</span> </div>
+<div class="line"><a name="l00677"></a><span class="lineno">  677</span> <span class="preprocessor">#ifdef __cplusplus</span></div>
+<div class="line"><a name="l00678"></a><span class="lineno">  678</span> }</div>
+<div class="line"><a name="l00679"></a><span class="lineno">  679</span> <span class="preprocessor">#endif</span></div>
+<div class="line"><a name="l00680"></a><span class="lineno">  680</span> </div>
+<div class="line"><a name="l00681"></a><span class="lineno">  681</span> <span class="preprocessor">#endif </span><span class="comment">/* WCSLIB_LIN */</span><span class="preprocessor"></span></div>
+<div class="ttc" id="structlinprm_html_a7036b8527bc8b220ad8a863442631f48"><div class="ttname"><a href="structlinprm.html#a7036b8527bc8b220ad8a863442631f48">linprm::m_pc</a></div><div class="ttdeci">double * m_pc</div><div class="ttdef"><b>Definition:</b> lin.h:631</div></div>
 <div class="ttc" id="lin_8h_html_ae4947608476c198ad27759d1e562d655"><div class="ttname"><a href="lin_8h.html#ae4947608476c198ad27759d1e562d655">linp2x</a></div><div class="ttdeci">int linp2x(struct linprm *lin, int ncoord, int nelem, const double pixcrd[], double imgcrd[])</div><div class="ttdoc">Pixel-to-world linear transformation. </div></div>
-<div class="ttc" id="structlinprm_html_a7d951475b1c16f94703fba9e04ec24d2"><div class="ttname"><a href="structlinprm.html#a7d951475b1c16f94703fba9e04ec24d2">linprm::dispre</a></div><div class="ttdeci">struct disprm * dispre</div><div class="ttdef"><b>Definition:</b> lin.h:516</div></div>
-<div class="ttc" id="structlinprm_html_adf299a3f7750599a48373ce370fde9da"><div class="ttname"><a href="structlinprm.html#adf299a3f7750599a48373ce370fde9da">linprm::tmpcrd</a></div><div class="ttdeci">double * tmpcrd</div><div class="ttdef"><b>Definition:</b> lin.h:534</div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9">LINERR_DEDISTORT</a></div><div class="ttdef"><b>Definition:</b> lin.h:502</div></div>
-<div class="ttc" id="structlinprm_html_ae281f0f7ebeaf5038cc13c13946641b1"><div class="ttname"><a href="structlinprm.html#ae281f0f7ebeaf5038cc13c13946641b1">linprm::naxis</a></div><div class="ttdeci">int naxis</div><div class="ttdef"><b>Definition:</b> lin.h:512</div></div>
-<div class="ttc" id="structlinprm_html_a3691ff3f40a0ba087637d30ffc87e6d0"><div class="ttname"><a href="structlinprm.html#a3691ff3f40a0ba087637d30ffc87e6d0">linprm::crpix</a></div><div class="ttdeci">double * crpix</div><div class="ttdef"><b>Definition:</b> lin.h:513</div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d">LINERR_MEMORY</a></div><div class="ttdef"><b>Definition:</b> lin.h:498</div></div>
-<div class="ttc" id="structlinprm_html_a5ef7cce6307f640aca1080d0d5ad9ba1"><div class="ttname"><a href="structlinprm.html#a5ef7cce6307f640aca1080d0d5ad9ba1">linprm::m_flag</a></div><div class="ttdeci">int m_flag</div><div class="ttdef"><b>Definition:</b> lin.h:536</div></div>
-<div class="ttc" id="structlinprm_html_af0a5cac7b1d2d3a0feb6905c05b122c2"><div class="ttname"><a href="structlinprm.html#af0a5cac7b1d2d3a0feb6905c05b122c2">linprm::unity</a></div><div class="ttdeci">int unity</div><div class="ttdef"><b>Definition:</b> lin.h:524</div></div>
-<div class="ttc" id="structlinprm_html_a9c5dae1285df5adbc684bb650a84b74a"><div class="ttname"><a href="structlinprm.html#a9c5dae1285df5adbc684bb650a84b74a">linprm::m_dispre</a></div><div class="ttdeci">struct disprm * m_dispre</div><div class="ttdef"><b>Definition:</b> lin.h:538</div></div>
+<div class="ttc" id="structlinprm_html_a7d951475b1c16f94703fba9e04ec24d2"><div class="ttname"><a href="structlinprm.html#a7d951475b1c16f94703fba9e04ec24d2">linprm::dispre</a></div><div class="ttdeci">struct disprm * dispre</div><div class="ttdef"><b>Definition:</b> lin.h:610</div></div>
+<div class="ttc" id="structlinprm_html_adf299a3f7750599a48373ce370fde9da"><div class="ttname"><a href="structlinprm.html#adf299a3f7750599a48373ce370fde9da">linprm::tmpcrd</a></div><div class="ttdeci">double * tmpcrd</div><div class="ttdef"><b>Definition:</b> lin.h:628</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa36fc93e3c5e2d1a1de01d399232a03d9">LINERR_DEDISTORT</a></div><div class="ttdef"><b>Definition:</b> lin.h:596</div></div>
+<div class="ttc" id="structlinprm_html_ae281f0f7ebeaf5038cc13c13946641b1"><div class="ttname"><a href="structlinprm.html#ae281f0f7ebeaf5038cc13c13946641b1">linprm::naxis</a></div><div class="ttdeci">int naxis</div><div class="ttdef"><b>Definition:</b> lin.h:606</div></div>
+<div class="ttc" id="structlinprm_html_a3691ff3f40a0ba087637d30ffc87e6d0"><div class="ttname"><a href="structlinprm.html#a3691ff3f40a0ba087637d30ffc87e6d0">linprm::crpix</a></div><div class="ttdeci">double * crpix</div><div class="ttdef"><b>Definition:</b> lin.h:607</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa28004da63d882a7df754d49047ea7f2d">LINERR_MEMORY</a></div><div class="ttdef"><b>Definition:</b> lin.h:592</div></div>
+<div class="ttc" id="structlinprm_html_a5ef7cce6307f640aca1080d0d5ad9ba1"><div class="ttname"><a href="structlinprm.html#a5ef7cce6307f640aca1080d0d5ad9ba1">linprm::m_flag</a></div><div class="ttdeci">int m_flag</div><div class="ttdef"><b>Definition:</b> lin.h:630</div></div>
+<div class="ttc" id="structlinprm_html_af0a5cac7b1d2d3a0feb6905c05b122c2"><div class="ttname"><a href="structlinprm.html#af0a5cac7b1d2d3a0feb6905c05b122c2">linprm::unity</a></div><div class="ttdeci">int unity</div><div class="ttdef"><b>Definition:</b> lin.h:618</div></div>
+<div class="ttc" id="structlinprm_html_a9c5dae1285df5adbc684bb650a84b74a"><div class="ttname"><a href="structlinprm.html#a9c5dae1285df5adbc684bb650a84b74a">linprm::m_dispre</a></div><div class="ttdeci">struct disprm * m_dispre</div><div class="ttdef"><b>Definition:</b> lin.h:632</div></div>
 <div class="ttc" id="structwcserr_html"><div class="ttname"><a href="structwcserr.html">wcserr</a></div><div class="ttdoc">Error message handling. </div><div class="ttdef"><b>Definition:</b> wcserr.h:221</div></div>
-<div class="ttc" id="structlinprm_html_aeefcacedf2989970f0df2c246d84bfb7"><div class="ttname"><a href="structlinprm.html#aeefcacedf2989970f0df2c246d84bfb7">linprm::m_naxis</a></div><div class="ttdeci">int m_naxis</div><div class="ttdef"><b>Definition:</b> lin.h:536</div></div>
-<div class="ttc" id="structlinprm_html_a2975830d4214bb6b35cb1ca922875057"><div class="ttname"><a href="structlinprm.html#a2975830d4214bb6b35cb1ca922875057">linprm::err</a></div><div class="ttdeci">struct wcserr * err</div><div class="ttdef"><b>Definition:</b> lin.h:530</div></div>
-<div class="ttc" id="structdisprm_html_a201bc2948f326bbed9a0e1f818720ef9"><div class="ttname"><a href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">disprm::naxis</a></div><div class="ttdeci">int naxis</div><div class="ttdef"><b>Definition:</b> dis.h:501</div></div>
+<div class="ttc" id="structlinprm_html_aeefcacedf2989970f0df2c246d84bfb7"><div class="ttname"><a href="structlinprm.html#aeefcacedf2989970f0df2c246d84bfb7">linprm::m_naxis</a></div><div class="ttdeci">int m_naxis</div><div class="ttdef"><b>Definition:</b> lin.h:630</div></div>
+<div class="ttc" id="structlinprm_html_a2975830d4214bb6b35cb1ca922875057"><div class="ttname"><a href="structlinprm.html#a2975830d4214bb6b35cb1ca922875057">linprm::err</a></div><div class="ttdeci">struct wcserr * err</div><div class="ttdef"><b>Definition:</b> lin.h:624</div></div>
+<div class="ttc" id="structdisprm_html_a201bc2948f326bbed9a0e1f818720ef9"><div class="ttname"><a href="structdisprm.html#a201bc2948f326bbed9a0e1f818720ef9">disprm::naxis</a></div><div class="ttdeci">int naxis</div><div class="ttdef"><b>Definition:</b> dis.h:606</div></div>
 <div class="ttc" id="lin_8h_html_acc7d26efba3ca08d36047253a9315dcc"><div class="ttname"><a href="lin_8h.html#acc7d26efba3ca08d36047253a9315dcc">matinv</a></div><div class="ttdeci">int matinv(int n, const double mat[], double inv[])</div><div class="ttdoc">Matrix inversion. </div></div>
-<div class="ttc" id="structlinprm_html"><div class="ttname"><a href="structlinprm.html">linprm</a></div><div class="ttdoc">Linear transformation parameters. </div><div class="ttdef"><b>Definition:</b> lin.h:505</div></div>
+<div class="ttc" id="structlinprm_html"><div class="ttname"><a href="structlinprm.html">linprm</a></div><div class="ttdoc">Linear transformation parameters. </div><div class="ttdef"><b>Definition:</b> lin.h:599</div></div>
 <div class="ttc" id="lin_8h_html_a7bdf034bd750df1e518db9feeebf7a79"><div class="ttname"><a href="lin_8h.html#a7bdf034bd750df1e518db9feeebf7a79">lin_errmsg</a></div><div class="ttdeci">const char * lin_errmsg[]</div><div class="ttdoc">Status return messages. </div></div>
-<div class="ttc" id="structdisprm_html"><div class="ttname"><a href="structdisprm.html">disprm</a></div><div class="ttdoc">Distortion parameters. </div><div class="ttdef"><b>Definition:</b> dis.h:494</div></div>
+<div class="ttc" id="lin_8h_html_a27a7a4a2cc3183bb1cd639efaade2265"><div class="ttname"><a href="lin_8h.html#a27a7a4a2cc3183bb1cd639efaade2265">linwarp</a></div><div class="ttdeci">int linwarp(struct linprm *lin, const double pixblc[], const double pixtrc[], const double pixsamp[], int *nsamp, double maxdis[], double *maxtot, double avgdis[], double *avgtot, double rmsdis[], double *rmstot)</div><div class="ttdoc">Compute measures of distortion. </div></div>
+<div class="ttc" id="structdisprm_html"><div class="ttname"><a href="structdisprm.html">disprm</a></div><div class="ttdoc">Distortion parameters. </div><div class="ttdef"><b>Definition:</b> dis.h:599</div></div>
 <div class="ttc" id="lin_8h_html_a7bdde709fac889f1c386e9c8993d74f7"><div class="ttname"><a href="lin_8h.html#a7bdde709fac889f1c386e9c8993d74f7">linperr</a></div><div class="ttdeci">int linperr(const struct linprm *lin, const char *prefix)</div><div class="ttdoc">Print error messages from a linprm struct. </div></div>
-<div class="ttc" id="structlinprm_html_aeaaf26fd243da58fee173b075bed1de7"><div class="ttname"><a href="structlinprm.html#aeaaf26fd243da58fee173b075bed1de7">linprm::piximg</a></div><div class="ttdeci">double * piximg</div><div class="ttdef"><b>Definition:</b> lin.h:521</div></div>
-<div class="ttc" id="structlinprm_html_af3a8524b6c3c11315e4048d4bd6864c8"><div class="ttname"><a href="structlinprm.html#af3a8524b6c3c11315e4048d4bd6864c8">linprm::simple</a></div><div class="ttdeci">int simple</div><div class="ttdef"><b>Definition:</b> lin.h:526</div></div>
-<div class="ttc" id="structlinprm_html_a596f68ff17fce142f36530d72dd838c4"><div class="ttname"><a href="structlinprm.html#a596f68ff17fce142f36530d72dd838c4">linprm::i_naxis</a></div><div class="ttdeci">int i_naxis</div><div class="ttdef"><b>Definition:</b> lin.h:523</div></div>
-<div class="ttc" id="structlinprm_html_a091103ceb860eeed1a280effa0df28df"><div class="ttname"><a href="structlinprm.html#a091103ceb860eeed1a280effa0df28df">linprm::m_crpix</a></div><div class="ttdeci">double * m_crpix</div><div class="ttdef"><b>Definition:</b> lin.h:537</div></div>
-<div class="ttc" id="structlinprm_html_a7ecd987ea3b41b7d0a1c4489e882c1f4"><div class="ttname"><a href="structlinprm.html#a7ecd987ea3b41b7d0a1c4489e882c1f4">linprm::m_disseq</a></div><div class="ttdeci">struct disprm * m_disseq</div><div class="ttdef"><b>Definition:</b> lin.h:538</div></div>
+<div class="ttc" id="structlinprm_html_aeaaf26fd243da58fee173b075bed1de7"><div class="ttname"><a href="structlinprm.html#aeaaf26fd243da58fee173b075bed1de7">linprm::piximg</a></div><div class="ttdeci">double * piximg</div><div class="ttdef"><b>Definition:</b> lin.h:615</div></div>
+<div class="ttc" id="structlinprm_html_af3a8524b6c3c11315e4048d4bd6864c8"><div class="ttname"><a href="structlinprm.html#af3a8524b6c3c11315e4048d4bd6864c8">linprm::simple</a></div><div class="ttdeci">int simple</div><div class="ttdef"><b>Definition:</b> lin.h:620</div></div>
+<div class="ttc" id="structlinprm_html_a596f68ff17fce142f36530d72dd838c4"><div class="ttname"><a href="structlinprm.html#a596f68ff17fce142f36530d72dd838c4">linprm::i_naxis</a></div><div class="ttdeci">int i_naxis</div><div class="ttdef"><b>Definition:</b> lin.h:617</div></div>
+<div class="ttc" id="structlinprm_html_a091103ceb860eeed1a280effa0df28df"><div class="ttname"><a href="structlinprm.html#a091103ceb860eeed1a280effa0df28df">linprm::m_crpix</a></div><div class="ttdeci">double * m_crpix</div><div class="ttdef"><b>Definition:</b> lin.h:631</div></div>
+<div class="ttc" id="structlinprm_html_a7ecd987ea3b41b7d0a1c4489e882c1f4"><div class="ttname"><a href="structlinprm.html#a7ecd987ea3b41b7d0a1c4489e882c1f4">linprm::m_disseq</a></div><div class="ttdeci">struct disprm * m_disseq</div><div class="ttdef"><b>Definition:</b> lin.h:632</div></div>
+<div class="ttc" id="structdisprm_html_ac107b9b4c645a461036476290a87ab22"><div class="ttname"><a href="structdisprm.html#ac107b9b4c645a461036476290a87ab22">disprm::maxdis</a></div><div class="ttdeci">double * maxdis</div><div class="ttdef"><b>Definition:</b> dis.h:616</div></div>
 <div class="ttc" id="lin_8h_html_aef9ead7c6ea6ab08f3ba3fc6a1c30303"><div class="ttname"><a href="lin_8h.html#aef9ead7c6ea6ab08f3ba3fc6a1c30303">linfree</a></div><div class="ttdeci">int linfree(struct linprm *lin)</div><div class="ttdoc">Destructor for the linprm struct. </div></div>
 <div class="ttc" id="lin_8h_html_a5c01c0991c8d0c4437581a7c1453b09a"><div class="ttname"><a href="lin_8h.html#a5c01c0991c8d0c4437581a7c1453b09a">linset</a></div><div class="ttdeci">int linset(struct linprm *lin)</div><div class="ttdoc">Setup routine for the linprm struct. </div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb">LINERR_SUCCESS</a></div><div class="ttdef"><b>Definition:</b> lin.h:496</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa2544660be2086b8225623e8a7b534dfb">LINERR_SUCCESS</a></div><div class="ttdef"><b>Definition:</b> lin.h:590</div></div>
 <div class="ttc" id="lin_8h_html_a7ddea28768d99f01c6be1c71a4d8fe58"><div class="ttname"><a href="lin_8h.html#a7ddea28768d99f01c6be1c71a4d8fe58">linini</a></div><div class="ttdeci">int linini(int alloc, int naxis, struct linprm *lin)</div><div class="ttdoc">Default constructor for the linprm struct. </div></div>
-<div class="ttc" id="structlinprm_html_a162762d02eaade6a53d63d70b8827caa"><div class="ttname"><a href="structlinprm.html#a162762d02eaade6a53d63d70b8827caa">linprm::cdelt</a></div><div class="ttdeci">double * cdelt</div><div class="ttdef"><b>Definition:</b> lin.h:515</div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1f"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1f">lin_errmsg_enum</a></div><div class="ttdeci">lin_errmsg_enum</div><div class="ttdef"><b>Definition:</b> lin.h:495</div></div>
-<div class="ttc" id="structlinprm_html_a5bb0b2b2ce1f160a8a70f6437a893eea"><div class="ttname"><a href="structlinprm.html#a5bb0b2b2ce1f160a8a70f6437a893eea">linprm::flag</a></div><div class="ttdeci">int flag</div><div class="ttdef"><b>Definition:</b> lin.h:508</div></div>
-<div class="ttc" id="structlinprm_html_a499a66528c3dcb9d1a9bea67b5afaa0d"><div class="ttname"><a href="structlinprm.html#a499a66528c3dcb9d1a9bea67b5afaa0d">linprm::affine</a></div><div class="ttdeci">int affine</div><div class="ttdef"><b>Definition:</b> lin.h:525</div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7">LINERR_DISTORT_INIT</a></div><div class="ttdef"><b>Definition:</b> lin.h:500</div></div>
+<div class="ttc" id="structlinprm_html_a162762d02eaade6a53d63d70b8827caa"><div class="ttname"><a href="structlinprm.html#a162762d02eaade6a53d63d70b8827caa">linprm::cdelt</a></div><div class="ttdeci">double * cdelt</div><div class="ttdef"><b>Definition:</b> lin.h:609</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1f"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1f">lin_errmsg_enum</a></div><div class="ttdeci">lin_errmsg_enum</div><div class="ttdef"><b>Definition:</b> lin.h:589</div></div>
+<div class="ttc" id="structlinprm_html_a5bb0b2b2ce1f160a8a70f6437a893eea"><div class="ttname"><a href="structlinprm.html#a5bb0b2b2ce1f160a8a70f6437a893eea">linprm::flag</a></div><div class="ttdeci">int flag</div><div class="ttdef"><b>Definition:</b> lin.h:602</div></div>
+<div class="ttc" id="structlinprm_html_a499a66528c3dcb9d1a9bea67b5afaa0d"><div class="ttname"><a href="structlinprm.html#a499a66528c3dcb9d1a9bea67b5afaa0d">linprm::affine</a></div><div class="ttdeci">int affine</div><div class="ttdef"><b>Definition:</b> lin.h:619</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fabf345caedf5c1dd97c44f38b34ca2da7">LINERR_DISTORT_INIT</a></div><div class="ttdef"><b>Definition:</b> lin.h:594</div></div>
 <div class="ttc" id="lin_8h_html_ab8fc0ef6b34eb3327b13a00de78232b1"><div class="ttname"><a href="lin_8h.html#ab8fc0ef6b34eb3327b13a00de78232b1">lincpy</a></div><div class="ttdeci">int lincpy(int alloc, const struct linprm *linsrc, struct linprm *lindst)</div><div class="ttdoc">Copy routine for the linprm struct. </div></div>
-<div class="ttc" id="structlinprm_html_a4c40bec32ec40035b8c1ef13db652270"><div class="ttname"><a href="structlinprm.html#a4c40bec32ec40035b8c1ef13db652270">linprm::pc</a></div><div class="ttdeci">double * pc</div><div class="ttdef"><b>Definition:</b> lin.h:514</div></div>
+<div class="ttc" id="structlinprm_html_a4c40bec32ec40035b8c1ef13db652270"><div class="ttname"><a href="structlinprm.html#a4c40bec32ec40035b8c1ef13db652270">linprm::pc</a></div><div class="ttdeci">double * pc</div><div class="ttdef"><b>Definition:</b> lin.h:608</div></div>
 <div class="ttc" id="lin_8h_html_a5490027e9699680dfefe370c28691243"><div class="ttname"><a href="lin_8h.html#a5490027e9699680dfefe370c28691243">linx2p</a></div><div class="ttdeci">int linx2p(struct linprm *lin, int ncoord, int nelem, const double imgcrd[], double pixcrd[])</div><div class="ttdoc">World-to-pixel linear transformation. </div></div>
 <div class="ttc" id="lin_8h_html_ad68df60cc9fa6f86e2c6e6943dc74cdb"><div class="ttname"><a href="lin_8h.html#ad68df60cc9fa6f86e2c6e6943dc74cdb">lindis</a></div><div class="ttdeci">int lindis(int sequence, struct linprm *lin, struct disprm *dis)</div><div class="ttdoc">Assign a distortion to a linprm struct. </div></div>
-<div class="ttc" id="structlinprm_html_a2c21e35f61f428ed14ca2b60bccc10c8"><div class="ttname"><a href="structlinprm.html#a2c21e35f61f428ed14ca2b60bccc10c8">linprm::disseq</a></div><div class="ttdeci">struct disprm * disseq</div><div class="ttdef"><b>Definition:</b> lin.h:517</div></div>
-<div class="ttc" id="structlinprm_html_a28a705f744a32cd05dd3aa86ca58998b"><div class="ttname"><a href="structlinprm.html#a28a705f744a32cd05dd3aa86ca58998b">linprm::imgpix</a></div><div class="ttdeci">double * imgpix</div><div class="ttdef"><b>Definition:</b> lin.h:522</div></div>
-<div class="ttc" id="structlinprm_html_a5ac85757a7a46247e353a089374eb128"><div class="ttname"><a href="structlinprm.html#a5ac85757a7a46247e353a089374eb128">linprm::m_cdelt</a></div><div class="ttdeci">double * m_cdelt</div><div class="ttdef"><b>Definition:</b> lin.h:537</div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8">LINERR_SINGULAR_MTX</a></div><div class="ttdef"><b>Definition:</b> lin.h:499</div></div>
+<div class="ttc" id="structlinprm_html_a2c21e35f61f428ed14ca2b60bccc10c8"><div class="ttname"><a href="structlinprm.html#a2c21e35f61f428ed14ca2b60bccc10c8">linprm::disseq</a></div><div class="ttdeci">struct disprm * disseq</div><div class="ttdef"><b>Definition:</b> lin.h:611</div></div>
+<div class="ttc" id="structlinprm_html_a28a705f744a32cd05dd3aa86ca58998b"><div class="ttname"><a href="structlinprm.html#a28a705f744a32cd05dd3aa86ca58998b">linprm::imgpix</a></div><div class="ttdeci">double * imgpix</div><div class="ttdef"><b>Definition:</b> lin.h:616</div></div>
+<div class="ttc" id="structlinprm_html_a5ac85757a7a46247e353a089374eb128"><div class="ttname"><a href="structlinprm.html#a5ac85757a7a46247e353a089374eb128">linprm::m_cdelt</a></div><div class="ttdeci">double * m_cdelt</div><div class="ttdef"><b>Definition:</b> lin.h:631</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fad2248fa36c9d85c91187179ae95207e8">LINERR_SINGULAR_MTX</a></div><div class="ttdef"><b>Definition:</b> lin.h:593</div></div>
 <div class="ttc" id="lin_8h_html_a946005b038f5c584691630b5d39369e3"><div class="ttname"><a href="lin_8h.html#a946005b038f5c584691630b5d39369e3">linprt</a></div><div class="ttdeci">int linprt(const struct linprm *lin)</div><div class="ttdoc">Print routine for the linprm struct. </div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2">LINERR_DISTORT</a></div><div class="ttdef"><b>Definition:</b> lin.h:501</div></div>
-<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513">LINERR_NULL_POINTER</a></div><div class="ttdef"><b>Definition:</b> lin.h:497</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa3e2bbcacb84e47b393daa1ff8c3e70a2">LINERR_DISTORT</a></div><div class="ttdef"><b>Definition:</b> lin.h:595</div></div>
+<div class="ttc" id="lin_8h_html_a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513"><div class="ttname"><a href="lin_8h.html#a6690044d47c6784a4cc0ccf6f52bfc1fa84e4dcf5e518ba3dce985ef7c9687513">LINERR_NULL_POINTER</a></div><div class="ttdef"><b>Definition:</b> lin.h:591</div></div>
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/log_8h.html b/html/log_8h.html
index 5217fc7..ac8e253 100644
--- a/html/log_8h.html
+++ b/html/log_8h.html
@@ -292,7 +292,7 @@ No warranty is given for the accuracy of these routines (refer to the copyright
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/log_8h_source.html b/html/log_8h_source.html
index a93b663..bac4439 100644
--- a/html/log_8h_source.html
+++ b/html/log_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="log_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: log.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: log.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement logarithmic coordinate systems as</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement logarithmic coordinate systems as</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* defined by the FITS World Coordinate System (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -229,7 +229,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/memory.html b/html/memory.html
index 8776278..d75d50d 100644
--- a/html/memory.html
+++ b/html/memory.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -58,7 +58,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/overview.html b/html/overview.html
index 2055a6a..c2bf174 100644
--- a/html/overview.html
+++ b/html/overview.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -114,7 +114,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/pages.html b/html/pages.html
index 356dfdf..13f80c6 100644
--- a/html/pages.html
+++ b/html/pages.html
@@ -49,7 +49,7 @@
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:19:12 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:57:33 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/pgsbox.html b/html/pgsbox.html
index 38486a4..bdfc7c6 100644
--- a/html/pgsbox.html
+++ b/html/pgsbox.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -54,7 +54,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/prj_8h.html b/html/prj_8h.html
index 9985bbc..c9cfdf9 100644
--- a/html/prj_8h.html
+++ b/html/prj_8h.html
@@ -2597,7 +2597,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/prj_8h_source.html b/html/prj_8h_source.html
index 021b050..71270be 100644
--- a/html/prj_8h_source.html
+++ b/html/prj_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="prj_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: prj.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: prj.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the spherical map projections</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the spherical map projections</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* recognized by the FITS World Coordinate System (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -1009,7 +1009,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/software.html b/html/software.html
index 6bf8bc3..5786104 100644
--- a/html/software.html
+++ b/html/software.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -91,7 +91,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/spc_8h.html b/html/spc_8h.html
index d9db335..a427600 100644
--- a/html/spc_8h.html
+++ b/html/spc_8h.html
@@ -1302,7 +1302,7 @@ For an AIPS '<code><b>VELO</b></code>' axis, a radio convention velocity (VRAD)
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/spc_8h_source.html b/html/spc_8h_source.html
index e097911..5b83184 100644
--- a/html/spc_8h_source.html
+++ b/html/spc_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="spc_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: spc.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: spc.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the spectral coordinate systems</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the spectral coordinate systems</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* recognized by the FITS World Coordinate System (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -980,7 +980,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/sph_8h.html b/html/sph_8h.html
index 8a7a60b..7fec9d5 100644
--- a/html/sph_8h.html
+++ b/html/sph_8h.html
@@ -412,7 +412,7 @@ Functions</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/sph_8h_source.html b/html/sph_8h_source.html
index 396cddc..5a3a4bd 100644
--- a/html/sph_8h_source.html
+++ b/html/sph_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="sph_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: sph.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: sph.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the spherical coordinate</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the spherical coordinate</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* transformations used by the FITS World Coordinate System (WCS) standard.</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">* Refer to</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*</span></div>
@@ -309,7 +309,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/spx_8h.html b/html/spx_8h.html
index 61c3e81..89954de 100644
--- a/html/spx_8h.html
+++ b/html/spx_8h.html
@@ -926,7 +926,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/spx_8h_source.html b/html/spx_8h_source.html
index 4386255..da27445 100644
--- a/html/spx_8h_source.html
+++ b/html/spx_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="spx_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: spx.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: spx.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the spectral coordinate systems</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the spectral coordinate systems</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* recognized by the FITS World Coordinate System (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -669,7 +669,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structcelprm.html b/html/structcelprm.html
index 3fea823..a1a1a95 100644
--- a/html/structcelprm.html
+++ b/html/structcelprm.html
@@ -267,7 +267,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structdisprm.html b/html/structdisprm.html
index ec99fb8..dc25ddd 100644
--- a/html/structdisprm.html
+++ b/html/structdisprm.html
@@ -77,6 +77,10 @@ Data Fields</h2></td></tr>
 <tr class="separator:ac107b9b4c645a461036476290a87ab22"><td class="memSeparator" colspan="2"> </td></tr>
 <tr class="memitem:a10a16217368a5cdd34d802fff442f383"><td class="memItemLeft" align="right" valign="top">double </td><td class="memItemRight" valign="bottom"><a class="el" href="structdisprm.html#a10a16217368a5cdd34d802fff442f383">totdis</a></td></tr>
 <tr class="separator:a10a16217368a5cdd34d802fff442f383"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a7fae0b75ba71ee0eaafaa1d3a20cc6af"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structdisprm.html#a7fae0b75ba71ee0eaafaa1d3a20cc6af">ndis</a></td></tr>
+<tr class="separator:a7fae0b75ba71ee0eaafaa1d3a20cc6af"><td class="memSeparator" colspan="2"> </td></tr>
+<tr class="memitem:a813473ae9d7c62ff0fd265d96832d539"><td class="memItemLeft" align="right" valign="top">int </td><td class="memItemRight" valign="bottom"><a class="el" href="structdisprm.html#a813473ae9d7c62ff0fd265d96832d539">padding</a></td></tr>
+<tr class="separator:a813473ae9d7c62ff0fd265d96832d539"><td class="memSeparator" colspan="2"> </td></tr>
 <tr class="memitem:a40a81085335f9d9aa617eb9605ae9421"><td class="memItemLeft" align="right" valign="top">struct <a class="el" href="structwcserr.html">wcserr</a> * </td><td class="memItemRight" valign="bottom"><a class="el" href="structdisprm.html#a40a81085335f9d9aa617eb9605ae9421">err</a></td></tr>
 <tr class="separator:a40a81085335f9d9aa617eb9605ae9421"><td class="memSeparator" colspan="2"> </td></tr>
 <tr class="memitem:a43a6e8d5c70b82c5eb573de7e0d2fbfa"><td class="memItemLeft" align="right" valign="top">int(** </td><td class="memItemRight" valign="bottom"><a class="el" href="structdisprm.html#a43a6e8d5c70b82c5eb573de7e0d2fbfa">disp2x</a> )(<a class="el" href="dis_8h.html#a23068602f42552a4257462b2875d8c51">DISP2X_ARGS</a>)</td></tr>
@@ -279,6 +283,32 @@ Data Fields</h2></td></tr>
 
 </div>
 </div>
+<a class="anchor" id="a7fae0b75ba71ee0eaafaa1d3a20cc6af"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int disprm::ndis</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p>(<em>Returned</em>) The number of distortion functions. </p>
+
+</div>
+</div>
+<a class="anchor" id="a813473ae9d7c62ff0fd265d96832d539"></a>
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int disprm::padding</td>
+        </tr>
+      </table>
+</div><div class="memdoc">
+<p>(An unused variable inserted for alignment purposes only.) </p>
+
+</div>
+</div>
 <a class="anchor" id="a40a81085335f9d9aa617eb9605ae9421"></a>
 <div class="memitem">
 <div class="memproto">
@@ -501,7 +531,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structfitskey.html b/html/structfitskey.html
index d5b75bc..d01f19d 100644
--- a/html/structfitskey.html
+++ b/html/structfitskey.html
@@ -374,7 +374,7 @@ Continued strings are not reconstructed, they remain split over successive <b>fi
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structfitskeyid.html b/html/structfitskeyid.html
index cd33a98..847f69b 100644
--- a/html/structfitskeyid.html
+++ b/html/structfitskeyid.html
@@ -111,7 +111,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structlinprm.html b/html/structlinprm.html
index 0190624..08cd36e 100644
--- a/html/structlinprm.html
+++ b/html/structlinprm.html
@@ -446,7 +446,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structprjprm.html b/html/structprjprm.html
index 11ea997..24a9821 100644
--- a/html/structprjprm.html
+++ b/html/structprjprm.html
@@ -470,7 +470,7 @@ HEALPIX. </li>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structpscard.html b/html/structpscard.html
index c8bbe84..098c4a0 100644
--- a/html/structpscard.html
+++ b/html/structpscard.html
@@ -110,7 +110,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structpvcard.html b/html/structpvcard.html
index 4deb48b..35d2519 100644
--- a/html/structpvcard.html
+++ b/html/structpvcard.html
@@ -110,7 +110,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structs.html b/html/structs.html
index ef8b568..1548ae2 100644
--- a/html/structs.html
+++ b/html/structs.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -59,7 +59,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structspcprm.html b/html/structspcprm.html
index ff10aef..beefbec 100644
--- a/html/structspcprm.html
+++ b/html/structspcprm.html
@@ -350,7 +350,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structspxprm.html b/html/structspxprm.html
index 87d0712..e2654ae 100644
--- a/html/structspxprm.html
+++ b/html/structspxprm.html
@@ -712,7 +712,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structtabprm.html b/html/structtabprm.html
index 6d49a43..7f8d607 100644
--- a/html/structtabprm.html
+++ b/html/structtabprm.html
@@ -449,7 +449,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structwcserr.html b/html/structwcserr.html
index 4ac9339..5e24ce8 100644
--- a/html/structwcserr.html
+++ b/html/structwcserr.html
@@ -139,7 +139,7 @@ Data Fields</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:32 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structwcsprm.html b/html/structwcsprm.html
index bdcee5f..fa32735 100644
--- a/html/structwcsprm.html
+++ b/html/structwcsprm.html
@@ -1414,7 +1414,7 @@ For lookup tables: the axis number in a multidimensional table. </li>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:32 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/structwtbarr.html b/html/structwtbarr.html
index a281c15..f61d3a4 100644
--- a/html/structwtbarr.html
+++ b/html/structwtbarr.html
@@ -235,7 +235,7 @@ i: index vector. </li>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:32 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/tab_8h.html b/html/tab_8h.html
index d6fa9d8..e53b827 100644
--- a/html/tab_8h.html
+++ b/html/tab_8h.html
@@ -726,7 +726,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/tab_8h_source.html b/html/tab_8h_source.html
index cebaacd..bc959c0 100644
--- a/html/tab_8h_source.html
+++ b/html/tab_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="tab_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: tab.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: tab.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement tabular coordinate systems as</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement tabular coordinate systems as</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* defined by the FITS World Coordinate System (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -708,7 +708,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/testing.html b/html/testing.html
index 6f903b4..40242a1 100644
--- a/html/testing.html
+++ b/html/testing.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -76,7 +76,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/threads.html b/html/threads.html
index 94197fe..b486886 100644
--- a/html/threads.html
+++ b/html/threads.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -45,7 +45,7 @@
 <div class="title">Thread-safety </div>  </div>
 </div><!--header-->
 <div class="contents">
-<div class="textblock"><p>With the following exceptions WCSLIB 5.0 is thread-safe:</p>
+<div class="textblock"><p>With the following exceptions WCSLIB 5.1 is thread-safe:</p>
 <ul>
 <li>The C code generated by Flex is not re-entrant. Flex does have the capacity for producing re-entrant scanners but they have a different API. This may be handled by a compile-time option in future but in the meantime calls to the header parsers should be serialized via a mutex.</li>
 <li>The low-level functions <a class="el" href="wcs_8h.html#a42b2578d76ace7ca6114d82b7ae46a89" title="Memory allocation for PVi_ma. ">wcsnpv()</a> and <a class="el" href="wcs_8h.html#ae790c9ce6c9b7a4845cf1c3c97b1e97a" title="Memory allocation for PSi_ma. ">wcsnps()</a> are not thread-safe but within the library itself they are only used by the Flex scanners <a class="el" href="wcshdr_8h.html#ac75623ee805ab7d43b0bba684c719a60" title="FITS WCS parser routine for image headers. ">wcspih()</ [...]
@@ -55,7 +55,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/vector.html b/html/vector.html
index 0563c9c..b7a67f6 100644
--- a/html/vector.html
+++ b/html/vector.html
@@ -37,7 +37,7 @@
   </div>
 <div id="nav-path" class="navpath">
   <ul>
-<li class="navelem"><a class="el" href="index.html">WCSLIB 5.0 and PGSBOX 5.0</a></li>  </ul>
+<li class="navelem"><a class="el" href="index.html">WCSLIB 5.1 and PGSBOX 5.1</a></li>  </ul>
 </div>
 </div><!-- top -->
 <div class="header">
@@ -108,7 +108,7 @@ Vector strides</h1>
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcs_8h.html b/html/wcs_8h.html
index 7a6f4b9..e941764 100644
--- a/html/wcs_8h.html
+++ b/html/wcs_8h.html
@@ -1385,7 +1385,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcs_8h_source.html b/html/wcs_8h_source.html
index fdb46a7..c9302e6 100644
--- a/html/wcs_8h_source.html
+++ b/html/wcs_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcs_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcs.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcs.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -1825,7 +1825,7 @@
 <div class="ttc" id="wcs_8h_html_a158615aa1622d8feedd228795ff9a25fafe9ed842ea8f525c7b8fed2f60015dd9"><div class="ttname"><a href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25fafe9ed842ea8f525c7b8fed2f60015dd9">WCSERR_BAD_PARAM</a></div><div class="ttdef"><b>Definition:</b> wcs.h:1508</div></div>
 <div class="ttc" id="structwcsprm_html_ae09d5bf005e3bd7ee880353e8816ceb8"><div class="ttname"><a href="structwcsprm.html#ae09d5bf005e3bd7ee880353e8816ceb8">wcsprm::m_tab</a></div><div class="ttdeci">struct tabprm * m_tab</div><div class="ttdef"><b>Definition:</b> wcs.h:1661</div></div>
 <div class="ttc" id="structcelprm_html"><div class="ttname"><a href="structcelprm.html">celprm</a></div><div class="ttdoc">Celestial transformation parameters. </div><div class="ttdef"><b>Definition:</b> cel.h:392</div></div>
-<div class="ttc" id="structlinprm_html"><div class="ttname"><a href="structlinprm.html">linprm</a></div><div class="ttdoc">Linear transformation parameters. </div><div class="ttdef"><b>Definition:</b> lin.h:505</div></div>
+<div class="ttc" id="structlinprm_html"><div class="ttname"><a href="structlinprm.html">linprm</a></div><div class="ttdoc">Linear transformation parameters. </div><div class="ttdef"><b>Definition:</b> lin.h:599</div></div>
 <div class="ttc" id="wcs_8h_html_a158615aa1622d8feedd228795ff9a25f"><div class="ttname"><a href="wcs_8h.html#a158615aa1622d8feedd228795ff9a25f">wcs_errmsg_enum</a></div><div class="ttdeci">wcs_errmsg_enum</div><div class="ttdef"><b>Definition:</b> wcs.h:1500</div></div>
 <div class="ttc" id="structwcsprm_html_a042875def8cab8354c5b2c40ab9fa374"><div class="ttname"><a href="structwcsprm.html#a042875def8cab8354c5b2c40ab9fa374">wcsprm::m_ps</a></div><div class="ttdeci">struct pscard * m_ps</div><div class="ttdef"><b>Definition:</b> wcs.h:1656</div></div>
 <div class="ttc" id="wcs_8h_html_ab9aeb8cf1afb1bfb22e989580d90fca8"><div class="ttname"><a href="wcs_8h.html#ab9aeb8cf1afb1bfb22e989580d90fca8">wcsprt</a></div><div class="ttdeci">int wcsprt(const struct wcsprm *wcs)</div><div class="ttdoc">Print routine for the wcsprm struct. </div></div>
@@ -1917,7 +1917,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcserr_8h.html b/html/wcserr_8h.html
index ae76731..e246c35 100644
--- a/html/wcserr_8h.html
+++ b/html/wcserr_8h.html
@@ -355,7 +355,7 @@ Functions</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcserr_8h_source.html b/html/wcserr_8h_source.html
index 00f63ec..dc6a0be 100644
--- a/html/wcserr_8h_source.html
+++ b/html/wcserr_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcserr_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -76,7 +76,7 @@
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  Module author: Michael Droettboom</span></div>
 <div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">  $Id: wcserr.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">  $Id: wcserr.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* Summary of the wcserr routines</span></div>
@@ -318,7 +318,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsfix_8h.html b/html/wcsfix_8h.html
index d6a5d04..64d687a 100644
--- a/html/wcsfix_8h.html
+++ b/html/wcsfix_8h.html
@@ -669,7 +669,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsfix_8h_source.html b/html/wcsfix_8h_source.html
index 43d2cd9..df70ce4 100644
--- a/html/wcsfix_8h_source.html
+++ b/html/wcsfix_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcsfix_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsfix.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsfix.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -482,7 +482,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcshdr_8h.html b/html/wcshdr_8h.html
index d8bc41a..9721ec4 100644
--- a/html/wcshdr_8h.html
+++ b/html/wcshdr_8h.html
@@ -1639,7 +1639,7 @@ For returns > 1, a detailed error message is set in <a class="el" href="struc
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcshdr_8h_source.html b/html/wcshdr_8h_source.html
index 10db2a6..e7c8de1 100644
--- a/html/wcshdr_8h_source.html
+++ b/html/wcshdr_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcshdr_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcshdr.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcshdr.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -1245,7 +1245,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcslib_8h.html b/html/wcslib_8h.html
index d8835c7..7f50af1 100644
--- a/html/wcslib_8h.html
+++ b/html/wcslib_8h.html
@@ -73,7 +73,7 @@
 </div></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcslib_8h_source.html b/html/wcslib_8h_source.html
index 3870be0..e0f24a3 100644
--- a/html/wcslib_8h_source.html
+++ b/html/wcslib_8h_source.html
@@ -49,7 +49,7 @@
 <div class="contents">
 <a href="wcslib_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -71,10 +71,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcslib.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcslib.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">* Summary of wcslib.h</span></div>
@@ -109,49 +109,49 @@
 <div class="line"><a name="l00060"></a><span class="lineno">   60</span> </div>
 <div class="line"><a name="l00061"></a><span class="lineno">   61</span> <span class="preprocessor">#endif </span><span class="comment">/* WCSLIB_WCSLIB */</span><span class="preprocessor"></span></div>
 <div class="line"><a name="l00062"></a><span class="lineno">   62</span> </div>
-<div class="line"><a name="l02632"></a><span class="lineno"> 2632</span>   <a class="code" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53">wcserr_enable</a>(1);</div>
-<div class="line"><a name="l02633"></a><span class="lineno"> 2633</span>   <a class="code" href="wcsprintf_8h.html#a5c6f91916a0b8f8c2d85274c0ba130f6">wcsprintf_set</a>(stderr);</div>
-<div class="line"><a name="l02634"></a><span class="lineno"> 2634</span> </div>
-<div class="line"><a name="l02635"></a><span class="lineno"> 2635</span>   ...</div>
-<div class="line"><a name="l02636"></a><span class="lineno"> 2636</span> </div>
-<div class="line"><a name="l02637"></a><span class="lineno"> 2637</span>   <span class="keywordflow">if</span> (<a class="code" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91">wcsset</a>(&wcs) {</div>
-<div class="line"><a name="l02638"></a><span class="lineno"> 2638</span>     <a class="code" href="wcs_8h.html#a8fe5dcd9927240dc0348b850ee662367">wcsperr</a>(&wcs);</div>
-<div class="line"><a name="l02639"></a><span class="lineno"> 2639</span>     <span class="keywordflow">return</span> wcs.err->status;</div>
-<div class="line"><a name="l02640"></a><span class="lineno"> 2640</span>   }</div>
-<div class="line"><a name="l02641"></a><span class="lineno"> 2641</span> <span class="keyword">@end</span>verbatim</div>
-<div class="line"><a name="l02642"></a><span class="lineno"> 2642</span> In <span class="keyword">this</span> example, <span class="keywordflow">if</span> an error was generated in one of the <a class="code" href="prj_8h.html#ad43dbc765c63162d0af2b9285b8a434f">prjset</a>() functions,</div>
-<div class="line"><a name="l02643"></a><span class="lineno"> 2643</span> <a class="code" href="wcs_8h.html#a8fe5dcd9927240dc0348b850ee662367">wcsperr</a>() would print an error traceback starting with <a class="code" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91">wcsset</a>(), then</div>
-<div class="line"><a name="l02644"></a><span class="lineno"> 2644</span> <a class="code" href="cel_8h.html#ab0f67d1727750616f71c7bfcb3a037b6">celset</a>(), and finally the particular projection-setting function that</div>
-<div class="line"><a name="l02645"></a><span class="lineno"> 2645</span> generated the error.  For each of them it would print the status return value,</div>
-<div class="line"><a name="l02646"></a><span class="lineno"> 2646</span> function name, source file, line number, and an error message which may be</div>
-<div class="line"><a name="l02647"></a><span class="lineno"> 2647</span> more specific and informative than the general error messages reported in the</div>
-<div class="line"><a name="l02648"></a><span class="lineno"> 2648</span> first example.  For example, in response to a deliberately generated error,</div>
-<div class="line"><a name="l02649"></a><span class="lineno"> 2649</span> the @c twcs test program, which tests <a class="code" href="structwcserr.html">wcserr</a> among other things, produces a</div>
-<div class="line"><a name="l02650"></a><span class="lineno"> 2650</span> traceback similar to this:</div>
-<div class="line"><a name="l02651"></a><span class="lineno"> 2651</span> @verbatim</div>
-<div class="line"><a name="l02652"></a><span class="lineno"> 2652</span> ERROR 5 in wcsset() at line 1564 of file wcs.c:</div>
-<div class="line"><a name="l02653"></a><span class="lineno"> 2653</span>   Invalid parameter value.</div>
-<div class="line"><a name="l02654"></a><span class="lineno"> 2654</span> ERROR 2 in celset() at line 196 of file cel.c:</div>
-<div class="line"><a name="l02655"></a><span class="lineno"> 2655</span>   Invalid projection parameters.</div>
-<div class="line"><a name="l02656"></a><span class="lineno"> 2656</span> ERROR 2 in <a class="code" href="prj_8h.html#aaec02a8e47d68e126983e9bb07a0c0aa">bonset</a>() at line 5727 of file prj.c:</div>
-<div class="line"><a name="l02657"></a><span class="lineno"> 2657</span>   Invalid parameters for Bonne's projection.</div>
-<div class="line"><a name="l02658"></a><span class="lineno"> 2658</span> @endverbatim</div>
-<div class="line"><a name="l02659"></a><span class="lineno"> 2659</span> </div>
-<div class="line"><a name="l02660"></a><span class="lineno"> 2660</span> Each of the @ref structs "structs" in @ref overview "WCSLIB" includes a</div>
-<div class="line"><a name="l02661"></a><span class="lineno"> 2661</span> pointer, called @a err, to a <a class="code" href="structwcserr.html">wcserr</a> struct.  When an error occurs, a struct is</div>
-<div class="line"><a name="l02662"></a><span class="lineno"> 2662</span> allocated and error information stored in it.  The <a class="code" href="structwcserr.html">wcserr</a> pointers and the</div>
-<div class="line"><a name="l02663"></a><span class="lineno"> 2663</span> @ref memory "memory" allocated for them are managed by the routines that</div>
-<div class="line"><a name="l02664"></a><span class="lineno"> 2664</span> manage the various structs such as <a class="code" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45">wcsini</a>() and <a class="code" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1">wcsfree</a>().</div>
-<div class="line"><a name="l02665"></a><span class="lineno"> 2665</span> </div>
-<div class="line"><a name="l02666"></a><span class="lineno"> 2666</span> <a class="code" href="structwcserr.html">wcserr</a> messaging is an opt-in system enabled via <a class="code" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53">wcserr_enable</a>(), as in the</div>
-<div class="line"><a name="l02667"></a><span class="lineno"> 2667</span> example above.  If enabled, when an error occurs it is the user's</div>
-<div class="line"><a name="l02668"></a><span class="lineno"> 2668</span> responsibility to free the memory allocated for the error message using</div>
-<div class="line"><a name="l02669"></a><span class="lineno"> 2669</span> <a class="code" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1">wcsfree</a>(), <a class="code" href="cel_8h.html#a39bb7bf8e545c200191d51884ecfb89b">celfree</a>(), <a class="code" href="prj_8h.html#a50db1538981df162709b81be0b2961ab">prjfree</a>(), etc.  Failure to do so before the struct goes</div>
-<div class="line"><a name="l02670"></a><span class="lineno"> 2670</span> out of scope will result in memory leaks (if execution continues beyond the</div>
-<div class="line"><a name="l02671"></a><span class="lineno"> 2671</span> error).</div>
-<div class="line"><a name="l02672"></a><span class="lineno"> 2672</span> */</div>
-<div class="line"><a name="l02673"></a><span class="lineno"> 2673</span> </div>
-<div class="line"><a name="l02674"></a><span class="lineno"> 2674</span> </div>
+<div class="line"><a name="l02822"></a><span class="lineno"> 2822</span>   <a class="code" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53">wcserr_enable</a>(1);</div>
+<div class="line"><a name="l02823"></a><span class="lineno"> 2823</span>   <a class="code" href="wcsprintf_8h.html#a5c6f91916a0b8f8c2d85274c0ba130f6">wcsprintf_set</a>(stderr);</div>
+<div class="line"><a name="l02824"></a><span class="lineno"> 2824</span> </div>
+<div class="line"><a name="l02825"></a><span class="lineno"> 2825</span>   ...</div>
+<div class="line"><a name="l02826"></a><span class="lineno"> 2826</span> </div>
+<div class="line"><a name="l02827"></a><span class="lineno"> 2827</span>   <span class="keywordflow">if</span> (<a class="code" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91">wcsset</a>(&wcs) {</div>
+<div class="line"><a name="l02828"></a><span class="lineno"> 2828</span>     <a class="code" href="wcs_8h.html#a8fe5dcd9927240dc0348b850ee662367">wcsperr</a>(&wcs);</div>
+<div class="line"><a name="l02829"></a><span class="lineno"> 2829</span>     <span class="keywordflow">return</span> wcs.err->status;</div>
+<div class="line"><a name="l02830"></a><span class="lineno"> 2830</span>   }</div>
+<div class="line"><a name="l02831"></a><span class="lineno"> 2831</span> <span class="keyword">@end</span>verbatim</div>
+<div class="line"><a name="l02832"></a><span class="lineno"> 2832</span> In <span class="keyword">this</span> example, <span class="keywordflow">if</span> an error was generated in one of the <a class="code" href="prj_8h.html#ad43dbc765c63162d0af2b9285b8a434f">prjset</a>() functions,</div>
+<div class="line"><a name="l02833"></a><span class="lineno"> 2833</span> <a class="code" href="wcs_8h.html#a8fe5dcd9927240dc0348b850ee662367">wcsperr</a>() would print an error traceback starting with <a class="code" href="wcs_8h.html#ae5cc3f5d249755583403cdf54d2ebb91">wcsset</a>(), then</div>
+<div class="line"><a name="l02834"></a><span class="lineno"> 2834</span> <a class="code" href="cel_8h.html#ab0f67d1727750616f71c7bfcb3a037b6">celset</a>(), and finally the particular projection-setting function that</div>
+<div class="line"><a name="l02835"></a><span class="lineno"> 2835</span> generated the error.  For each of them it would print the status return value,</div>
+<div class="line"><a name="l02836"></a><span class="lineno"> 2836</span> function name, source file, line number, and an error message which may be</div>
+<div class="line"><a name="l02837"></a><span class="lineno"> 2837</span> more specific and informative than the general error messages reported in the</div>
+<div class="line"><a name="l02838"></a><span class="lineno"> 2838</span> first example.  For example, in response to a deliberately generated error,</div>
+<div class="line"><a name="l02839"></a><span class="lineno"> 2839</span> the @c twcs test program, which tests <a class="code" href="structwcserr.html">wcserr</a> among other things, produces a</div>
+<div class="line"><a name="l02840"></a><span class="lineno"> 2840</span> traceback similar to this:</div>
+<div class="line"><a name="l02841"></a><span class="lineno"> 2841</span> @verbatim</div>
+<div class="line"><a name="l02842"></a><span class="lineno"> 2842</span> ERROR 5 in wcsset() at line 1564 of file wcs.c:</div>
+<div class="line"><a name="l02843"></a><span class="lineno"> 2843</span>   Invalid parameter value.</div>
+<div class="line"><a name="l02844"></a><span class="lineno"> 2844</span> ERROR 2 in celset() at line 196 of file cel.c:</div>
+<div class="line"><a name="l02845"></a><span class="lineno"> 2845</span>   Invalid projection parameters.</div>
+<div class="line"><a name="l02846"></a><span class="lineno"> 2846</span> ERROR 2 in <a class="code" href="prj_8h.html#aaec02a8e47d68e126983e9bb07a0c0aa">bonset</a>() at line 5727 of file prj.c:</div>
+<div class="line"><a name="l02847"></a><span class="lineno"> 2847</span>   Invalid parameters for Bonne's projection.</div>
+<div class="line"><a name="l02848"></a><span class="lineno"> 2848</span> @endverbatim</div>
+<div class="line"><a name="l02849"></a><span class="lineno"> 2849</span> </div>
+<div class="line"><a name="l02850"></a><span class="lineno"> 2850</span> Each of the @ref structs "structs" in @ref overview "WCSLIB" includes a</div>
+<div class="line"><a name="l02851"></a><span class="lineno"> 2851</span> pointer, called @a err, to a <a class="code" href="structwcserr.html">wcserr</a> struct.  When an error occurs, a struct is</div>
+<div class="line"><a name="l02852"></a><span class="lineno"> 2852</span> allocated and error information stored in it.  The <a class="code" href="structwcserr.html">wcserr</a> pointers and the</div>
+<div class="line"><a name="l02853"></a><span class="lineno"> 2853</span> @ref memory "memory" allocated for them are managed by the routines that</div>
+<div class="line"><a name="l02854"></a><span class="lineno"> 2854</span> manage the various structs such as <a class="code" href="wcs_8h.html#a2afc8255fde0965dddaa374463666d45">wcsini</a>() and <a class="code" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1">wcsfree</a>().</div>
+<div class="line"><a name="l02855"></a><span class="lineno"> 2855</span> </div>
+<div class="line"><a name="l02856"></a><span class="lineno"> 2856</span> <a class="code" href="structwcserr.html">wcserr</a> messaging is an opt-in system enabled via <a class="code" href="wcserr_8h.html#a1691b8bd184d40ca6fda255be078fa53">wcserr_enable</a>(), as in the</div>
+<div class="line"><a name="l02857"></a><span class="lineno"> 2857</span> example above.  If enabled, when an error occurs it is the user's</div>
+<div class="line"><a name="l02858"></a><span class="lineno"> 2858</span> responsibility to free the memory allocated for the error message using</div>
+<div class="line"><a name="l02859"></a><span class="lineno"> 2859</span> <a class="code" href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1">wcsfree</a>(), <a class="code" href="cel_8h.html#a39bb7bf8e545c200191d51884ecfb89b">celfree</a>(), <a class="code" href="prj_8h.html#a50db1538981df162709b81be0b2961ab">prjfree</a>(), etc.  Failure to do so before the struct goes</div>
+<div class="line"><a name="l02860"></a><span class="lineno"> 2860</span> out of scope will result in memory leaks (if execution continues beyond the</div>
+<div class="line"><a name="l02861"></a><span class="lineno"> 2861</span> error).</div>
+<div class="line"><a name="l02862"></a><span class="lineno"> 2862</span> */</div>
+<div class="line"><a name="l02863"></a><span class="lineno"> 2863</span> </div>
+<div class="line"><a name="l02864"></a><span class="lineno"> 2864</span> </div>
 <div class="ttc" id="wcs_8h_html_a4ab38bc642c4656f62c43acf84a849f1"><div class="ttname"><a href="wcs_8h.html#a4ab38bc642c4656f62c43acf84a849f1">wcsfree</a></div><div class="ttdeci">int wcsfree(struct wcsprm *wcs)</div><div class="ttdoc">Destructor for the wcsprm struct. </div></div>
 <div class="ttc" id="dis_8h_html"><div class="ttname"><a href="dis_8h.html">dis.h</a></div></div>
 <div class="ttc" id="wcshdr_8h_html"><div class="ttname"><a href="wcshdr_8h.html">wcshdr.h</a></div></div>
@@ -186,7 +186,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsmath_8h.html b/html/wcsmath_8h.html
index 68b8dfc..805caa7 100644
--- a/html/wcsmath_8h.html
+++ b/html/wcsmath_8h.html
@@ -177,7 +177,7 @@ Macros</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsmath_8h_source.html b/html/wcsmath_8h_source.html
index 32292f4..d625fde 100644
--- a/html/wcsmath_8h_source.html
+++ b/html/wcsmath_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcsmath_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,7 +75,7 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsmath.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsmath.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* Summary of wcsmath.h</span></div>
@@ -124,7 +124,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsprintf_8h.html b/html/wcsprintf_8h.html
index 7504bc9..932d58d 100644
--- a/html/wcsprintf_8h.html
+++ b/html/wcsprintf_8h.html
@@ -249,7 +249,7 @@ Functions</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsprintf_8h_source.html b/html/wcsprintf_8h_source.html
index e98a1a7..10c9df1 100644
--- a/html/wcsprintf_8h_source.html
+++ b/html/wcsprintf_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcsprintf_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsprintf.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsprintf.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">* Summary of the wcsprintf routines</span></div>
@@ -208,7 +208,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcstrig_8h.html b/html/wcstrig_8h.html
index 0768e4a..02a11fb 100644
--- a/html/wcstrig_8h.html
+++ b/html/wcstrig_8h.html
@@ -354,7 +354,7 @@ Functions</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcstrig_8h_source.html b/html/wcstrig_8h_source.html
index 477b134..65dda36 100644
--- a/html/wcstrig_8h_source.html
+++ b/html/wcstrig_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcstrig_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,7 +75,7 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcstrig.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcstrig.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* Summary of the wcstrig routines</span></div>
@@ -275,7 +275,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsunits_8h.html b/html/wcsunits_8h.html
index 8b26948..f894b26 100644
--- a/html/wcsunits_8h.html
+++ b/html/wcsunits_8h.html
@@ -896,7 +896,7 @@ Function types log(), ln() and exp() may only occur at the start of the units sp
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsunits_8h_source.html b/html/wcsunits_8h_source.html
index 5fe6c27..5b6919a 100644
--- a/html/wcsunits_8h_source.html
+++ b/html/wcsunits_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcsunits_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,10 +75,10 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsunits.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsunits.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
-<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.0 - C routines that implement the FITS World Coordinate System</span></div>
+<div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* WCSLIB 5.1 - C routines that implement the FITS World Coordinate System</span></div>
 <div class="line"><a name="l00029"></a><span class="lineno">   29</span> <span class="comment">* (WCS) standard.  Refer to</span></div>
 <div class="line"><a name="l00030"></a><span class="lineno">   30</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00031"></a><span class="lineno">   31</span> <span class="comment">*   "Representations of world coordinates in FITS",</span></div>
@@ -490,7 +490,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsutil_8h.html b/html/wcsutil_8h.html
index cf70496..3bcf768 100644
--- a/html/wcsutil_8h.html
+++ b/html/wcsutil_8h.html
@@ -644,7 +644,7 @@ Functions</h2></td></tr>
 </div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:53 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/html/wcsutil_8h_source.html b/html/wcsutil_8h_source.html
index 4969adb..efda6a1 100644
--- a/html/wcsutil_8h_source.html
+++ b/html/wcsutil_8h_source.html
@@ -53,7 +53,7 @@
 <div class="contents">
 <a href="wcsutil_8h.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span> <span class="comment">/*============================================================================</span></div>
 <div class="line"><a name="l00002"></a><span class="lineno">    2</span> <span class="comment"></span></div>
-<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.0 - an implementation of the FITS WCS standard.</span></div>
+<div class="line"><a name="l00003"></a><span class="lineno">    3</span> <span class="comment">  WCSLIB 5.1 - an implementation of the FITS WCS standard.</span></div>
 <div class="line"><a name="l00004"></a><span class="lineno">    4</span> <span class="comment">  Copyright (C) 1995-2015, Mark Calabretta</span></div>
 <div class="line"><a name="l00005"></a><span class="lineno">    5</span> <span class="comment"></span></div>
 <div class="line"><a name="l00006"></a><span class="lineno">    6</span> <span class="comment">  This file is part of WCSLIB.</span></div>
@@ -75,7 +75,7 @@
 <div class="line"><a name="l00022"></a><span class="lineno">   22</span> <span class="comment"></span></div>
 <div class="line"><a name="l00023"></a><span class="lineno">   23</span> <span class="comment">  Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.</span></div>
 <div class="line"><a name="l00024"></a><span class="lineno">   24</span> <span class="comment">  http://www.atnf.csiro.au/people/Mark.Calabretta</span></div>
-<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsutil.h,v 5.0 2015/04/05 09:18:13 mcalabre Exp $</span></div>
+<div class="line"><a name="l00025"></a><span class="lineno">   25</span> <span class="comment">  $Id: wcsutil.h,v 5.1 2015/04/07 10:56:36 mcalabre Exp $</span></div>
 <div class="line"><a name="l00026"></a><span class="lineno">   26</span> <span class="comment">*=============================================================================</span></div>
 <div class="line"><a name="l00027"></a><span class="lineno">   27</span> <span class="comment">*</span></div>
 <div class="line"><a name="l00028"></a><span class="lineno">   28</span> <span class="comment">* Summary of the wcsutil routines</span></div>
@@ -412,7 +412,7 @@
 </div><!-- fragment --></div><!-- contents -->
 <!-- start footer part -->
 <hr class="footer"/><address class="footer"><small>
-Generated on Sun Apr 5 2015 19:18:31 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
+Generated on Tue Apr 7 2015 20:56:52 for WCSLIB by  <a href="http://www.doxygen.org/index.html">
 <img class="footer" src="doxygen.png" alt="doxygen"/>
 </a> 1.8.9.1
 </small></address>
diff --git a/makedefs.in b/makedefs.in
index 1249c9e..ca97eff 100644
--- a/makedefs.in
+++ b/makedefs.in
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# GNU makefile definitions for building WCSLIB 5.0
+# GNU makefile definitions for building WCSLIB 5.1
 #
 # makedefs is generated from makedefs.in by configure.  It contains variable
 # definitions and some general-purpose rules for building WCSLIB.
@@ -39,11 +39,11 @@
 #      compiled separately without this option.
 #
 #      The shared library will be installed with version number, e.g. as
-#      libwcs.so.5.0 or libwcs.5.0.dylib with or without the symlink
+#      libwcs.so.5.1 or libwcs.5.1.dylib with or without the symlink
 #      required to make it visible to the linker (controlled by the SHRLN
 #      variable).  On Macs it is deliberately not created because its very
 #      existence precludes static linking with the cctools linker.  You can
-#      still link dynamically by using -lwcs.5.0.
+#      still link dynamically by using -lwcs.5.1.
 #
 #   4) PGPLOT is Tim Pearson's Fortran graphics library with separate C
 #      interface available from astro.caltech.edu.  It is only required by
@@ -74,7 +74,7 @@
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: makedefs.in,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+# $Id: makedefs.in,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 #-----------------------------------------------------------------------------
 # Version.
   LIBVER    := @LIBVER@
@@ -89,7 +89,7 @@
 
 # C preprocessor and options.
   CPP      := @CPP@
-  CPPFLAGS := @DEFS@
+  CPPFLAGS := @CPPFLAGS@ @DEFS@
   WCSTRIG  := WRAPPER
 
 # C compiler and options.
diff --git a/pgsbox/GNUmakefile b/pgsbox/GNUmakefile
index 4cd1688..52ad7d1 100644
--- a/pgsbox/GNUmakefile
+++ b/pgsbox/GNUmakefile
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# GNU makefile for building PGSBOX 5.0
+# GNU makefile for building PGSBOX 5.1
 #
 # Summary of the main targets
 # ---------------------------
@@ -26,12 +26,12 @@
 #      instead and re-run configure.
 #
 #   2) In compiling the test programs, this makefile assumes that the
-#      WCSLIB 5.0 sources reside in ../C and ../Fortran (as in the
+#      WCSLIB 5.1 sources reside in ../C and ../Fortran (as in the
 #      distribution kit).
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: GNUmakefile,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+# $Id: GNUmakefile,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
diff --git a/pgsbox/cpgsbox.c b/pgsbox/cpgsbox.c
index cf0d42d..0da7fd8 100644
--- a/pgsbox/cpgsbox.c
+++ b/pgsbox/cpgsbox.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+  PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
   Copyright (C) 1997-2015, Mark Calabretta
 
   This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: cpgsbox.c,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: cpgsbox.c,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *===========================================================================*/
 
 #include <string.h>
diff --git a/pgsbox/cpgsbox.h b/pgsbox/cpgsbox.h
index 6d8e65e..76709e6 100644
--- a/pgsbox/cpgsbox.h
+++ b/pgsbox/cpgsbox.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+  PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
   Copyright (C) 1997-2015, Mark Calabretta
 
   This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: cpgsbox.h,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: cpgsbox.h,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 *
 * cpgsbox() and cpglbox() are C wrappers for PGSBOX and PGLBOX.  Refer to the
diff --git a/pgsbox/cpgtest.c b/pgsbox/cpgtest.c
index e0e9281..ab043d7 100644
--- a/pgsbox/cpgtest.c
+++ b/pgsbox/cpgtest.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+  PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
   Copyright (C) 1997-2015, Mark Calabretta
 
   This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: cpgtest.c,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: cpgtest.c,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 *
 *   cpgtest
diff --git a/pgsbox/fscan.f b/pgsbox/fscan.f
index d719d30..9caed3f 100644
--- a/pgsbox/fscan.f
+++ b/pgsbox/fscan.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+* PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
 * Copyright (C) 1997-2015, Mark Calabretta
 *
 * This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: fscan.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: fscan.f,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=======================================================================
 *
 * FSCAN defines an azimuth/frequency coordinate system for PGSBOX.
diff --git a/pgsbox/lngvel.f b/pgsbox/lngvel.f
index c5f0d45..17fba9c 100644
--- a/pgsbox/lngvel.f
+++ b/pgsbox/lngvel.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+* PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
 * Copyright (C) 1997-2015, Mark Calabretta
 *
 * This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: lngvel.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: lngvel.f,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=======================================================================
 *
 * LNGVEL defines a longitude/velocity coordinate system for PGSBOX.
diff --git a/pgsbox/pgcrfn.f b/pgsbox/pgcrfn.f
index 00ba7f1..49134ab 100644
--- a/pgsbox/pgcrfn.f
+++ b/pgsbox/pgcrfn.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+* PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
 * Copyright (C) 1997-2015, Mark Calabretta
 *
 * This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: pgcrfn.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: pgcrfn.f,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=======================================================================
 *
 * PGCRFN defines separable pairs of non-linear coordinate systems for
diff --git a/pgsbox/pgcrvl.f b/pgsbox/pgcrvl.f
index 32d00c5..7fb9335 100644
--- a/pgsbox/pgcrvl.f
+++ b/pgsbox/pgcrvl.f
@@ -1,5 +1,5 @@
 *=======================================================================
-*                              PGSBOX 5.0
+*                              PGSBOX 5.1
 *-----------------------------------------------------------------------
 *
 * ATTENTION!
@@ -21,7 +21,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: pgcrvl.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: pgcrvl.f,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=======================================================================
       SUBROUTINE PGCRVL (AXEN, IDENTS, OPT, LABCTL, LABDEN, CI, GCODE,
      :   TIKLEN, NG1, GRID1, NG2, GRID2, DOEQ, NLFUNC, NLC, NLI, NLD,
diff --git a/pgsbox/pgsbox.f b/pgsbox/pgsbox.f
index 3ed3774..ad51b5b 100644
--- a/pgsbox/pgsbox.f
+++ b/pgsbox/pgsbox.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+* PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
 * Copyright (C) 1997-2015, Mark Calabretta
 *
 * This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: pgsbox.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: pgsbox.f,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=======================================================================
 *
 * PGSBOX draws and labels a curvilinear coordinate grid.  The caller
diff --git a/pgsbox/pgtest.f b/pgsbox/pgtest.f
index 5d96e20..31b1c0a 100644
--- a/pgsbox/pgtest.f
+++ b/pgsbox/pgtest.f
@@ -1,6 +1,6 @@
 *=======================================================================
 *
-* PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+* PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
 * Copyright (C) 1997-2015, Mark Calabretta
 *
 * This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: pgtest.f,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: pgtest.f,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=======================================================================
       PROGRAM PGTEST
 *=======================================================================
diff --git a/pgsbox/pgwcsl.c b/pgsbox/pgwcsl.c
index d8b5193..7c9aa37 100644
--- a/pgsbox/pgwcsl.c
+++ b/pgsbox/pgwcsl.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+  PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
   Copyright (C) 1997-2015, Mark Calabretta
 
   This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: pgwcsl.c,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: pgwcsl.c,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *===========================================================================*/
 
 #include <math.h>
diff --git a/pgsbox/pgwcsl.h b/pgsbox/pgwcsl.h
index fed6ad1..25b7599 100644
--- a/pgsbox/pgwcsl.h
+++ b/pgsbox/pgwcsl.h
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  PGSBOX 5.0 - draw curvilinear coordinate axes for PGPLOT.
+  PGSBOX 5.1 - draw curvilinear coordinate axes for PGPLOT.
   Copyright (C) 1997-2015, Mark Calabretta
 
   This file is part of PGSBOX.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: pgwcsl.h,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+  $Id: pgwcsl.h,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 *
 *   pgwcsl_() is an NLFUNC for PGSBOX that defines curvilinear celestial
diff --git a/utils/GNUmakefile b/utils/GNUmakefile
index 5a642ec..a93b377 100644
--- a/utils/GNUmakefile
+++ b/utils/GNUmakefile
@@ -1,5 +1,5 @@
 #-----------------------------------------------------------------------------
-# GNU makefile for WCSLIB 5.0 utilities: fitshdr, HPXcvt, wcsgrid and wcsware.
+# GNU makefile for WCSLIB 5.1 utilities: fitshdr, HPXcvt, wcsgrid and wcsware.
 #
 # Summary of the main targets
 # ---------------------------
@@ -12,12 +12,12 @@
 #   1: If you need to make changes then preferably modify ../makedefs.in
 #      instead and re-run configure.
 #
-#   2: In compiling these utilities, this makefile assumes that the WCSLIB 5.0
+#   2: In compiling these utilities, this makefile assumes that the WCSLIB 5.1
 #      sources reside in ../{pgsbox,C} (as in the distribution kit).
 #
 # Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 # http://www.atnf.csiro.au/people/Mark.Calabretta
-# $Id: GNUmakefile,v 5.0 2015/04/05 09:18:17 mcalabre Exp $
+# $Id: GNUmakefile,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 #-----------------------------------------------------------------------------
 # Get configure settings.
 include ../makedefs
diff --git a/utils/HPXcvt.1 b/utils/HPXcvt.1
index d7c0e10..69eb2de 100644
--- a/utils/HPXcvt.1
+++ b/utils/HPXcvt.1
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH HPXCVT "1" "April 2015" "HPXcvt 5.0" "User Commands"
+.TH HPXCVT "1" "April 2015" "HPXcvt 5.1" "User Commands"
 .SH NAME
 HPXcvt \- Reorganise HEALPix data into a 2-D FITS image
 .SH SYNOPSIS
diff --git a/utils/HPXcvt.c b/utils/HPXcvt.c
index f631eec..2e1d2cf 100644
--- a/utils/HPXcvt.c
+++ b/utils/HPXcvt.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: HPXcvt.c,v 5.0 2015/04/05 09:18:17 mcalabre Exp $
+  $Id: HPXcvt.c,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 *
 * HPXcvt reorganises HEALPix data into a 2-D FITS image.  Refer to the usage
diff --git a/utils/fitshdr.1 b/utils/fitshdr.1
index 1f8f8f3..309099c 100644
--- a/utils/fitshdr.1
+++ b/utils/fitshdr.1
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH FITSHDR "1" "April 2015" "fitshdr 5.0" "User Commands"
+.TH FITSHDR "1" "April 2015" "fitshdr 5.1" "User Commands"
 .SH NAME
 fitshdr \- List headers from a FITS file
 .SH SYNOPSIS
diff --git a/utils/fitshdr.c b/utils/fitshdr.c
index 4c1ebb5..f44e926 100644
--- a/utils/fitshdr.c
+++ b/utils/fitshdr.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: fitshdr.c,v 5.0 2015/04/05 09:18:17 mcalabre Exp $
+  $Id: fitshdr.c,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 * Usage: fitshdr [infile]
 *-----------------------------------------------------------------------------
diff --git a/utils/wcsgrid.1 b/utils/wcsgrid.1
index a8ce07f..c30084b 100644
--- a/utils/wcsgrid.1
+++ b/utils/wcsgrid.1
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH WCSGRID "1" "April 2015" "wcsgrid 5.0" "User Commands"
+.TH WCSGRID "1" "April 2015" "wcsgrid 5.1" "User Commands"
 .SH NAME
 wcsgrid \- Extract FITS WCS keywords and plot graticule
 .SH SYNOPSIS
diff --git a/utils/wcsgrid.c b/utils/wcsgrid.c
index 15632d5..16d8218 100644
--- a/utils/wcsgrid.c
+++ b/utils/wcsgrid.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsgrid.c,v 5.0 2015/04/05 09:18:17 mcalabre Exp $
+  $Id: wcsgrid.c,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 *
 * wcsgrid extracts the WCS keywords for an image from the specified FITS file
diff --git a/utils/wcsware.1 b/utils/wcsware.1
index 7888e45..610d481 100644
--- a/utils/wcsware.1
+++ b/utils/wcsware.1
@@ -1,5 +1,5 @@
 .\" DO NOT MODIFY THIS FILE!  It was generated by help2man 1.40.4.
-.TH WCSWARE "1" "April 2015" "wcsware 5.0" "User Commands"
+.TH WCSWARE "1" "April 2015" "wcsware 5.1" "User Commands"
 .SH NAME
 wcsware \- Extract FITS WCS keywords for an image
 .SH SYNOPSIS
diff --git a/utils/wcsware.c b/utils/wcsware.c
index 36ff83f..4e967b6 100644
--- a/utils/wcsware.c
+++ b/utils/wcsware.c
@@ -1,6 +1,6 @@
 /*============================================================================
 
-  WCSLIB 5.0 - an implementation of the FITS WCS standard.
+  WCSLIB 5.1 - an implementation of the FITS WCS standard.
   Copyright (C) 1995-2015, Mark Calabretta
 
   This file is part of WCSLIB.
@@ -22,7 +22,7 @@
 
   Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
   http://www.atnf.csiro.au/people/Mark.Calabretta
-  $Id: wcsware.c,v 5.0 2015/04/05 09:18:17 mcalabre Exp $
+  $Id: wcsware.c,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *=============================================================================
 * wcsware extracts the WCS keywords for an image from the specified FITS file,
 * constructs wcsprm structs for each coordinate representation found and
diff --git a/wcsconfig.h.in b/wcsconfig.h.in
index 3193fd7..77d8eba 100644
--- a/wcsconfig.h.in
+++ b/wcsconfig.h.in
@@ -1,13 +1,16 @@
 /*============================================================================
 *
 * wcsconfig.h is generated from wcsconfig.h.in by 'configure'.  It contains
-* C preprocessor macro definitions for compiling WCSLIB 5.0
+* C preprocessor macro definitions for compiling WCSLIB 5.1
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsconfig.h.in,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: wcsconfig.h.in,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *===========================================================================*/
 
+/* wcslib_version() is available (as of 5.0). */
+#define HAVE_WCSLIB_VERSION
+
 /* WCSLIB library version number. */
 #undef WCSLIB_VERSION
 
diff --git a/wcsconfig_f77.h.in b/wcsconfig_f77.h.in
index f3cfe67..e984a60 100644
--- a/wcsconfig_f77.h.in
+++ b/wcsconfig_f77.h.in
@@ -1,12 +1,12 @@
 /*============================================================================
 *
 * wcsconfig_f77.h is generated from wcsconfig_f77.h.in by 'configure'.  It
-* contains C preprocessor definitions for building the WCSLIB 5.0 Fortran
+* contains C preprocessor definitions for building the WCSLIB 5.1 Fortran
 * wrappers.
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsconfig_f77.h.in,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: wcsconfig_f77.h.in,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *===========================================================================*/
 
 /* Integer array type large enough to hold an address.  Set here to int[2] for
diff --git a/wcsconfig_tests.h.in b/wcsconfig_tests.h.in
index c73f309..11b1f94 100644
--- a/wcsconfig_tests.h.in
+++ b/wcsconfig_tests.h.in
@@ -1,12 +1,12 @@
 /*============================================================================
 *
 * wcsconfig_test.h is generated from wcsconfig_test.h.in by 'configure'.  It
-* contains C preprocessor definitions for compiling the WCSLIB 5.0 test/demo
+* contains C preprocessor definitions for compiling the WCSLIB 5.1 test/demo
 * programs.
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsconfig_tests.h.in,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: wcsconfig_tests.h.in,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *===========================================================================*/
 
 #include <wcsconfig.h>
diff --git a/wcsconfig_utils.h.in b/wcsconfig_utils.h.in
index af5eea0..3f39b60 100644
--- a/wcsconfig_utils.h.in
+++ b/wcsconfig_utils.h.in
@@ -1,12 +1,12 @@
 /*============================================================================
 *
 * wcsconfig_utils.h is generated from wcsconfig_utils.h.in by 'configure'.
-* It contains C preprocessor macro definitions for compiling the WCSLIB 5.0
+* It contains C preprocessor macro definitions for compiling the WCSLIB 5.1
 * utilities.
 *
 * Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
 * http://www.atnf.csiro.au/people/Mark.Calabretta
-* $Id: wcsconfig_utils.h.in,v 5.0 2015/04/05 09:18:16 mcalabre Exp $
+* $Id: wcsconfig_utils.h.in,v 5.1 2015/04/07 10:56:39 mcalabre Exp $
 *===========================================================================*/
 
 #include <wcsconfig.h>
diff --git a/wcslib.pdf b/wcslib.pdf
index 3de58ad..614ce31 100644
Binary files a/wcslib.pdf and b/wcslib.pdf differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-astro/packages/wcslib.git



More information about the debian-science-commits mailing list