Skip to content

Commit

Permalink
Update WCSLIB to version 8.2.2
Browse files Browse the repository at this point in the history
  • Loading branch information
mcara committed Dec 30, 2023
1 parent 6568d90 commit d68167a
Show file tree
Hide file tree
Showing 67 changed files with 604 additions and 531 deletions.
2 changes: 1 addition & 1 deletion astropy/wcs/setup_package.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
from extension_helpers import get_compiler, import_file, pkg_config, write_if_different

WCSROOT = os.path.relpath(os.path.dirname(__file__))
WCSVERSION = "8.1"
WCSVERSION = "8.2.2"


def b(s):
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/GNUmakefile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
#-----------------------------------------------------------------------------
# GNU makefile for building WCSLIB 8.1 and its test suite.
# GNU makefile for building WCSLIB 8.2 and its test suite.
#
# Summary of the main targets
# ---------------------------
Expand Down Expand Up @@ -31,7 +31,7 @@
#
# Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
# http://www.atnf.csiro.au/people/Mark.Calabretta
# $Id: GNUmakefile,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
# $Id: GNUmakefile,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
#-----------------------------------------------------------------------------
# Get configure settings.
SUBDIR := C
Expand Down
8 changes: 4 additions & 4 deletions cextern/wcslib/C/cel.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,7 +19,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: cel.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: cel.c,v 8.2.1.2 2023/11/29 07:35:56 mcalabre Exp mcalabre $
*===========================================================================*/

#include <math.h>
Expand All @@ -33,8 +33,6 @@
#include "sph.h"
#include "cel.h"

const int CELSET = 137;

// Map status return value to message.
const char *cel_errmsg[] = {
"Success",
Expand All @@ -54,6 +52,8 @@ const int cel_prjerr[] = {
CELERR_BAD_WORLD // 4: PRJERR_BAD_WORLD
};

static const int CELSET = 137;

// Convenience macro for invoking wcserr_set().
#define CEL_ERRMSG(status) WCSERR_SET(status), cel_errmsg[status]

Expand Down
6 changes: 3 additions & 3 deletions cextern/wcslib/C/cel.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,10 +19,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: cel.h,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: cel.h,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*=============================================================================
*
* WCSLIB 8.1 - C routines that implement the FITS World Coordinate System
* WCSLIB 8.2 - C routines that implement the FITS World Coordinate System
* (WCS) standard. Refer to the README file provided with WCSLIB for an
* overview of the library.
*
Expand Down
20 changes: 10 additions & 10 deletions cextern/wcslib/C/dis.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,7 +19,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: dis.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: dis.c,v 8.2.1.2 2023/11/29 07:43:49 mcalabre Exp mcalabre $
*===========================================================================*/

#include <math.h>
Expand All @@ -32,12 +32,6 @@
#include "wcsutil.h"
#include "dis.h"

const int DISSET = 137;

const int DIS_TPD = 1;
const int DIS_POLYNOMIAL = 2;
const int DIS_DOTPD = 1024;

// Maximum number of DPja or DQia keywords.
int NDPMAX = 256;

Expand All @@ -50,8 +44,11 @@ const char *dis_errmsg[] = {
"Distort error",
"De-distort error"};

// Convenience macro for invoking wcserr_set().
#define DIS_ERRMSG(status) WCSERR_SET(status), dis_errmsg[status]
static const int DISSET = 137;

static const int DIS_TPD = 1;
static const int DIS_POLYNOMIAL = 2;
static const int DIS_DOTPD = 1024;

// Internal helper functions, not for general use.
static int polyset(int j, struct disprm *dis);
Expand Down Expand Up @@ -81,6 +78,9 @@ static int tpd9(DISP2X_ARGS);
#define I_NIPARM 1 // Full (allocated) length of iparm[].
#define I_NDPARM 2 // No. of parameters in dparm[], excl. work space.

// Convenience macro for invoking wcserr_set().
#define DIS_ERRMSG(status) WCSERR_SET(status), dis_errmsg[status]

//----------------------------------------------------------------------------

int disndp(int ndpmax) { if (ndpmax >= 0) NDPMAX = ndpmax; return NDPMAX; }
Expand Down
6 changes: 3 additions & 3 deletions cextern/wcslib/C/dis.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,10 +19,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: dis.h,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: dis.h,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*=============================================================================
*
* WCSLIB 8.1 - C routines that implement the FITS World Coordinate System
* WCSLIB 8.2 - C routines that implement the FITS World Coordinate System
* (WCS) standard. Refer to the README file provided with WCSLIB for an
* overview of the library.
*
Expand Down
6 changes: 3 additions & 3 deletions cextern/wcslib/C/fitshdr.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,10 +19,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: fitshdr.h,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: fitshdr.h,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*=============================================================================
*
* WCSLIB 8.1 - C routines that implement the FITS World Coordinate System
* WCSLIB 8.2 - C routines that implement the FITS World Coordinate System
* (WCS) standard. Refer to the README file provided with WCSLIB for an
* overview of the library.
*
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/fitshdr.l
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,7 +19,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: fitshdr.l,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: fitshdr.l,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*=============================================================================
*
* fitshdr.l is a Flex description file containing a lexical scanner
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/flexed/fitshdr.c
Original file line number Diff line number Diff line change
Expand Up @@ -10233,7 +10233,7 @@ static const yy_state_type yy_NUL_trans[551] =
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "fitshdr.l"
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta

This file is part of WCSLIB.
Expand All @@ -10253,7 +10253,7 @@ static const yy_state_type yy_NUL_trans[551] =

Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: fitshdr.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: fitshdr.c,v 8.2.1.1 2023/11/16 10:05:58 mcalabre Exp mcalabre $
*=============================================================================
*
* fitshdr.l is a Flex description file containing a lexical scanner
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/flexed/wcsbth.c
Original file line number Diff line number Diff line change
Expand Up @@ -26123,7 +26123,7 @@ static const yy_state_type yy_NUL_trans[1458] =
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "wcsbth.l"
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta

This file is part of WCSLIB.
Expand All @@ -26143,7 +26143,7 @@ static const yy_state_type yy_NUL_trans[1458] =

Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: wcsbth.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: wcsbth.c,v 8.2.1.1 2023/11/16 10:05:58 mcalabre Exp mcalabre $
*=============================================================================
*
* wcsbth.l is a Flex description file containing the definition of a lexical
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/flexed/wcspih.c
Original file line number Diff line number Diff line change
Expand Up @@ -21444,7 +21444,7 @@ static const yy_state_type yy_NUL_trans[1191] =
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "wcspih.l"
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta

This file is part of WCSLIB.
Expand All @@ -21464,7 +21464,7 @@ static const yy_state_type yy_NUL_trans[1191] =

Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: wcspih.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: wcspih.c,v 8.2.1.1 2023/11/16 10:05:58 mcalabre Exp mcalabre $
*=============================================================================
*
* wcspih.l is a Flex description file containing the definition of a lexical
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/flexed/wcsulex.c
Original file line number Diff line number Diff line change
Expand Up @@ -7150,7 +7150,7 @@ static const yy_state_type yy_NUL_trans[375] =
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "wcsulex.l"
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -7170,7 +7170,7 @@ static const yy_state_type yy_NUL_trans[375] =
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: wcsulex.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: wcsulex.c,v 8.2.1.1 2023/11/16 10:05:58 mcalabre Exp mcalabre $
*=============================================================================
*
* wcsulex.l is a Flex description file containing the definition of a
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/flexed/wcsutrn.c
Original file line number Diff line number Diff line change
Expand Up @@ -4382,7 +4382,7 @@ static const yy_state_type yy_NUL_trans[217] =
#define YY_RESTORE_YY_MORE_OFFSET
#line 1 "wcsutrn.l"
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -4402,7 +4402,7 @@ static const yy_state_type yy_NUL_trans[217] =
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: wcsutrn.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: wcsutrn.c,v 8.2.1.1 2023/11/16 10:05:58 mcalabre Exp mcalabre $
*=============================================================================
*
* wcsutrn.l is a Flex description file containing the definition of a lexical
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/getwcstab.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,7 +19,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: getwcstab.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: getwcstab.c,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*===========================================================================*/

#include <stdlib.h>
Expand Down
6 changes: 3 additions & 3 deletions cextern/wcslib/C/getwcstab.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,10 +19,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: getwcstab.h,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: getwcstab.h,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*=============================================================================
*
* WCSLIB 8.1 - C routines that implement the FITS World Coordinate System
* WCSLIB 8.2 - C routines that implement the FITS World Coordinate System
* (WCS) standard. Refer to the README file provided with WCSLIB for an
* overview of the library.
*
Expand Down
8 changes: 4 additions & 4 deletions cextern/wcslib/C/lin.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,7 +19,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: lin.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: lin.c,v 8.2.1.2 2023/11/29 07:36:19 mcalabre Exp mcalabre $
*===========================================================================*/

#include <math.h>
Expand All @@ -32,8 +32,6 @@
#include "lin.h"
#include "dis.h"

const int LINSET = 137;

// Map status return value to message.
const char *lin_errmsg[] = {
"Success",
Expand All @@ -54,6 +52,8 @@ const int lin_diserr[] = {
LINERR_DEDISTORT // 5: DISERR_DEDISTORT
};

static const int LINSET = 137;

// Convenience macro for invoking wcserr_set().
#define LIN_ERRMSG(status) WCSERR_SET(status), lin_errmsg[status]

Expand Down
6 changes: 3 additions & 3 deletions cextern/wcslib/C/lin.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,10 +19,10 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: lin.h,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: lin.h,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*=============================================================================
*
* WCSLIB 8.1 - C routines that implement the FITS World Coordinate System
* WCSLIB 8.2 - C routines that implement the FITS World Coordinate System
* (WCS) standard. Refer to the README file provided with WCSLIB for an
* overview of the library.
*
Expand Down
4 changes: 2 additions & 2 deletions cextern/wcslib/C/log.c
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/*============================================================================
WCSLIB 8.1 - an implementation of the FITS WCS standard.
WCSLIB 8.2 - an implementation of the FITS WCS standard.
Copyright (C) 1995-2023, Mark Calabretta
This file is part of WCSLIB.
Expand All @@ -19,7 +19,7 @@
Author: Mark Calabretta, Australia Telescope National Facility, CSIRO.
http://www.atnf.csiro.au/people/Mark.Calabretta
$Id: log.c,v 8.1 2023/07/05 17:12:07 mcalabre Exp $
$Id: log.c,v 8.2.1.1 2023/11/16 10:05:57 mcalabre Exp mcalabre $
*===========================================================================*/

#include <math.h>
Expand Down
Loading

0 comments on commit d68167a

Please sign in to comment.