From 40e5a5811c6ffce9b0974e93cdd927cbcf60c157 Mon Sep 17 00:00:00 2001 From: Joe Hunkeler Date: Tue, 11 Aug 2015 16:51:37 -0400 Subject: Repatch (from linux) of OSX IRAF --- pkg/tbtables/cfitsio/wcsutil.c | 72 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 pkg/tbtables/cfitsio/wcsutil.c (limited to 'pkg/tbtables/cfitsio/wcsutil.c') diff --git a/pkg/tbtables/cfitsio/wcsutil.c b/pkg/tbtables/cfitsio/wcsutil.c new file mode 100644 index 00000000..95d93c3c --- /dev/null +++ b/pkg/tbtables/cfitsio/wcsutil.c @@ -0,0 +1,72 @@ +#include +#include +#include +#include "fitsio2.h" + +/* ====================================================================== +This file contains stubs for the AIPS WCS routines that are +contained in the source file wcsutil.c. The routines in wcsutil.c +should only be used by software that adheres to the terms of +the GNU General Public License. Users who want to use CFITSIO but are +unwilling to release their code under the terms of the GNU General +Public License should replace the wcsutil.c file with this current +file before building the CFITSIO library. This alternate version of +CFITSIO will behave the same as the standard version, except that it +will not support the ffwldp and ffxypx routines that calculate +image coordinate transformation from pixel coordinates to world +coordinates (e.g. Right Ascension and Declination) and vise versa. +======================================================================== */ + +int ffgics(fitsfile *fptr, + double *xrval, + double *yrval, + double *xrpix, + double *yrpix, + double *xinc, + double *yinc, + double *rot, + char *type, + int *status) { + return(*status = NO_WCS_KEY); +} + +int ffgtcs(fitsfile *fptr, + int xcol, + int ycol, + double *xrval, + double *yrval, + double *xrpix, + double *yrpix, + double *xinc, + double *yinc, + double *rot, + char *type, + int *status) { + return(*status = NO_WCS_KEY); +} + + +/*--------------------------------------------------------------------------*/ +int ffwldp(double xpix, double ypix, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, double rot, + char *type, double *xpos, double *ypos, int *status) +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support"); + ffpmsg(" celestial coordinate transformations."); + return(*status = 503); +} +/*--------------------------------------------------------------------------*/ +int ffxypx(double xpos, double ypos, double xref, double yref, + double xrefpix, double yrefpix, double xinc, double yinc, double rot, + char *type, double *xpix, double *ypix, int *status) +{ + if (*status > 0) + return(*status); + + ffpmsg("This non-GNU version of CFITSIO does not support"); + ffpmsg(" celestial coordinate transformations."); + return(*status = 503); +} -- cgit