/* ----------------------------------------------------------------------------
 * This file was automatically generated by SWIG (http://www.swig.org).
 * Version 4.0.2
 *
 * This file is not intended to be easily readable and contains a number of
 * coding conventions designed to improve portability and efficiency. Do not make
 * changes to this file unless you know what you are doing--modify the SWIG
 * interface file instead.
 * ----------------------------------------------------------------------------- */


#ifndef SWIGPYTHON
#define SWIGPYTHON
#endif

#define SWIG_PYTHON_DIRECTOR_NO_VTABLE

/* -----------------------------------------------------------------------------
 *  This section contains generic SWIG labels for method/variable
 *  declarations/attributes, and other compiler dependent labels.
 * ----------------------------------------------------------------------------- */

/* template workaround for compilers that cannot correctly implement the C++ standard */
#ifndef SWIGTEMPLATEDISAMBIGUATOR
# if defined(__SUNPRO_CC) && (__SUNPRO_CC <= 0x560)
#  define SWIGTEMPLATEDISAMBIGUATOR template
# elif defined(__HP_aCC)
/* Needed even with `aCC -AA' when `aCC -V' reports HP ANSI C++ B3910B A.03.55 */
/* If we find a maximum version that requires this, the test would be __HP_aCC <= 35500 for A.03.55 */
#  define SWIGTEMPLATEDISAMBIGUATOR template
# else
#  define SWIGTEMPLATEDISAMBIGUATOR
# endif
#endif

/* inline attribute */
#ifndef SWIGINLINE
# if defined(__cplusplus) || (defined(__GNUC__) && !defined(__STRICT_ANSI__))
#   define SWIGINLINE inline
# else
#   define SWIGINLINE
# endif
#endif

/* attribute recognised by some compilers to avoid 'unused' warnings */
#ifndef SWIGUNUSED
# if defined(__GNUC__)
#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
#     define SWIGUNUSED __attribute__ ((__unused__))
#   else
#     define SWIGUNUSED
#   endif
# elif defined(__ICC)
#   define SWIGUNUSED __attribute__ ((__unused__))
# else
#   define SWIGUNUSED
# endif
#endif

#ifndef SWIG_MSC_UNSUPPRESS_4505
# if defined(_MSC_VER)
#   pragma warning(disable : 4505) /* unreferenced local function has been removed */
# endif
#endif

#ifndef SWIGUNUSEDPARM
# ifdef __cplusplus
#   define SWIGUNUSEDPARM(p)
# else
#   define SWIGUNUSEDPARM(p) p SWIGUNUSED
# endif
#endif

/* internal SWIG method */
#ifndef SWIGINTERN
# define SWIGINTERN static SWIGUNUSED
#endif

/* internal inline SWIG method */
#ifndef SWIGINTERNINLINE
# define SWIGINTERNINLINE SWIGINTERN SWIGINLINE
#endif

/* exporting methods */
#if defined(__GNUC__)
#  if (__GNUC__ >= 4) || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4)
#    ifndef GCC_HASCLASSVISIBILITY
#      define GCC_HASCLASSVISIBILITY
#    endif
#  endif
#endif

#ifndef SWIGEXPORT
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   if defined(STATIC_LINKED)
#     define SWIGEXPORT
#   else
#     define SWIGEXPORT __declspec(dllexport)
#   endif
# else
#   if defined(__GNUC__) && defined(GCC_HASCLASSVISIBILITY)
#     define SWIGEXPORT __attribute__ ((visibility("default")))
#   else
#     define SWIGEXPORT
#   endif
# endif
#endif

/* calling conventions for Windows */
#ifndef SWIGSTDCALL
# if defined(_WIN32) || defined(__WIN32__) || defined(__CYGWIN__)
#   define SWIGSTDCALL __stdcall
# else
#   define SWIGSTDCALL
# endif
#endif

/* Deal with Microsoft's attempt at deprecating C standard runtime functions */
#if !defined(SWIG_NO_CRT_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_CRT_SECURE_NO_DEPRECATE)
# define _CRT_SECURE_NO_DEPRECATE
#endif

/* Deal with Microsoft's attempt at deprecating methods in the standard C++ library */
#if !defined(SWIG_NO_SCL_SECURE_NO_DEPRECATE) && defined(_MSC_VER) && !defined(_SCL_SECURE_NO_DEPRECATE)
# define _SCL_SECURE_NO_DEPRECATE
#endif

/* Deal with Apple's deprecated 'AssertMacros.h' from Carbon-framework */
#if defined(__APPLE__) && !defined(__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES)
# define __ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORES 0
#endif

/* Intel's compiler complains if a variable which was never initialised is
 * cast to void, which is a common idiom which we use to indicate that we
 * are aware a variable isn't used.  So we just silence that warning.
 * See: https://github.com/swig/swig/issues/192 for more discussion.
 */
#ifdef __INTEL_COMPILER
# pragma warning disable 592
#endif


#if defined(__GNUC__) && defined(_WIN32) && !defined(SWIG_PYTHON_NO_HYPOT_WORKAROUND)
/* Workaround for '::hypot' has not been declared', see https://bugs.python.org/issue11566 */
# include <math.h>
#endif

#if defined(_DEBUG) && defined(SWIG_PYTHON_INTERPRETER_NO_DEBUG)
/* Use debug wrappers with the Python release dll */
# undef _DEBUG
# include <Python.h>
# define _DEBUG 1
#else
# include <Python.h>
#endif

/* -----------------------------------------------------------------------------
 * swigrun.swg
 *
 * This file contains generic C API SWIG runtime support for pointer
 * type checking.
 * ----------------------------------------------------------------------------- */

/* This should only be incremented when either the layout of swig_type_info changes,
   or for whatever reason, the runtime changes incompatibly */
#define SWIG_RUNTIME_VERSION "4"

/* define SWIG_TYPE_TABLE_NAME as "SWIG_TYPE_TABLE" */
#ifdef SWIG_TYPE_TABLE
# define SWIG_QUOTE_STRING(x) #x
# define SWIG_EXPAND_AND_QUOTE_STRING(x) SWIG_QUOTE_STRING(x)
# define SWIG_TYPE_TABLE_NAME SWIG_EXPAND_AND_QUOTE_STRING(SWIG_TYPE_TABLE)
#else
# define SWIG_TYPE_TABLE_NAME
#endif

/*
  You can use the SWIGRUNTIME and SWIGRUNTIMEINLINE macros for
  creating a static or dynamic library from the SWIG runtime code.
  In 99.9% of the cases, SWIG just needs to declare them as 'static'.

  But only do this if strictly necessary, ie, if you have problems
  with your compiler or suchlike.
*/

#ifndef SWIGRUNTIME
# define SWIGRUNTIME SWIGINTERN
#endif

#ifndef SWIGRUNTIMEINLINE
# define SWIGRUNTIMEINLINE SWIGRUNTIME SWIGINLINE
#endif

/*  Generic buffer size */
#ifndef SWIG_BUFFER_SIZE
# define SWIG_BUFFER_SIZE 1024
#endif

/* Flags for pointer conversions */
#define SWIG_POINTER_DISOWN        0x1
#define SWIG_CAST_NEW_MEMORY       0x2
#define SWIG_POINTER_NO_NULL       0x4

/* Flags for new pointer objects */
#define SWIG_POINTER_OWN           0x1


/*
   Flags/methods for returning states.

   The SWIG conversion methods, as ConvertPtr, return an integer
   that tells if the conversion was successful or not. And if not,
   an error code can be returned (see swigerrors.swg for the codes).

   Use the following macros/flags to set or process the returning
   states.

   In old versions of SWIG, code such as the following was usually written:

     if (SWIG_ConvertPtr(obj,vptr,ty.flags) != -1) {
       // success code
     } else {
       //fail code
     }

   Now you can be more explicit:

    int res = SWIG_ConvertPtr(obj,vptr,ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
    } else {
      // fail code
    }

   which is the same really, but now you can also do

    Type *ptr;
    int res = SWIG_ConvertPtr(obj,(void **)(&ptr),ty.flags);
    if (SWIG_IsOK(res)) {
      // success code
      if (SWIG_IsNewObj(res) {
        ...
	delete *ptr;
      } else {
        ...
      }
    } else {
      // fail code
    }

   I.e., now SWIG_ConvertPtr can return new objects and you can
   identify the case and take care of the deallocation. Of course that
   also requires SWIG_ConvertPtr to return new result values, such as

      int SWIG_ConvertPtr(obj, ptr,...) {
        if (<obj is ok>) {
          if (<need new object>) {
            *ptr = <ptr to new allocated object>;
            return SWIG_NEWOBJ;
          } else {
            *ptr = <ptr to old object>;
            return SWIG_OLDOBJ;
          }
        } else {
          return SWIG_BADOBJ;
        }
      }

   Of course, returning the plain '0(success)/-1(fail)' still works, but you can be
   more explicit by returning SWIG_BADOBJ, SWIG_ERROR or any of the
   SWIG errors code.

   Finally, if the SWIG_CASTRANK_MODE is enabled, the result code
   allows to return the 'cast rank', for example, if you have this

       int food(double)
       int fooi(int);

   and you call

      food(1)   // cast rank '1'  (1 -> 1.0)
      fooi(1)   // cast rank '0'

   just use the SWIG_AddCast()/SWIG_CheckState()
*/

#define SWIG_OK                    (0)
#define SWIG_ERROR                 (-1)
#define SWIG_IsOK(r)               (r >= 0)
#define SWIG_ArgError(r)           ((r != SWIG_ERROR) ? r : SWIG_TypeError)

/* The CastRankLimit says how many bits are used for the cast rank */
#define SWIG_CASTRANKLIMIT         (1 << 8)
/* The NewMask denotes the object was created (using new/malloc) */
#define SWIG_NEWOBJMASK            (SWIG_CASTRANKLIMIT  << 1)
/* The TmpMask is for in/out typemaps that use temporal objects */
#define SWIG_TMPOBJMASK            (SWIG_NEWOBJMASK << 1)
/* Simple returning values */
#define SWIG_BADOBJ                (SWIG_ERROR)
#define SWIG_OLDOBJ                (SWIG_OK)
#define SWIG_NEWOBJ                (SWIG_OK | SWIG_NEWOBJMASK)
#define SWIG_TMPOBJ                (SWIG_OK | SWIG_TMPOBJMASK)
/* Check, add and del mask methods */
#define SWIG_AddNewMask(r)         (SWIG_IsOK(r) ? (r | SWIG_NEWOBJMASK) : r)
#define SWIG_DelNewMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_NEWOBJMASK) : r)
#define SWIG_IsNewObj(r)           (SWIG_IsOK(r) && (r & SWIG_NEWOBJMASK))
#define SWIG_AddTmpMask(r)         (SWIG_IsOK(r) ? (r | SWIG_TMPOBJMASK) : r)
#define SWIG_DelTmpMask(r)         (SWIG_IsOK(r) ? (r & ~SWIG_TMPOBJMASK) : r)
#define SWIG_IsTmpObj(r)           (SWIG_IsOK(r) && (r & SWIG_TMPOBJMASK))

/* Cast-Rank Mode */
#if defined(SWIG_CASTRANK_MODE)
#  ifndef SWIG_TypeRank
#    define SWIG_TypeRank             unsigned long
#  endif
#  ifndef SWIG_MAXCASTRANK            /* Default cast allowed */
#    define SWIG_MAXCASTRANK          (2)
#  endif
#  define SWIG_CASTRANKMASK          ((SWIG_CASTRANKLIMIT) -1)
#  define SWIG_CastRank(r)           (r & SWIG_CASTRANKMASK)
SWIGINTERNINLINE int SWIG_AddCast(int r) {
  return SWIG_IsOK(r) ? ((SWIG_CastRank(r) < SWIG_MAXCASTRANK) ? (r + 1) : SWIG_ERROR) : r;
}
SWIGINTERNINLINE int SWIG_CheckState(int r) {
  return SWIG_IsOK(r) ? SWIG_CastRank(r) + 1 : 0;
}
#else /* no cast-rank mode */
#  define SWIG_AddCast(r) (r)
#  define SWIG_CheckState(r) (SWIG_IsOK(r) ? 1 : 0)
#endif


#include <string.h>

#ifdef __cplusplus
extern "C" {
#endif

typedef void *(*swig_converter_func)(void *, int *);
typedef struct swig_type_info *(*swig_dycast_func)(void **);

/* Structure to store information on one type */
typedef struct swig_type_info {
  const char             *name;			/* mangled name of this type */
  const char             *str;			/* human readable name of this type */
  swig_dycast_func        dcast;		/* dynamic cast function down a hierarchy */
  struct swig_cast_info  *cast;			/* linked list of types that can cast into this type */
  void                   *clientdata;		/* language specific type data */
  int                    owndata;		/* flag if the structure owns the clientdata */
} swig_type_info;

/* Structure to store a type and conversion function used for casting */
typedef struct swig_cast_info {
  swig_type_info         *type;			/* pointer to type that is equivalent to this type */
  swig_converter_func     converter;		/* function to cast the void pointers */
  struct swig_cast_info  *next;			/* pointer to next cast in linked list */
  struct swig_cast_info  *prev;			/* pointer to the previous cast */
} swig_cast_info;

/* Structure used to store module information
 * Each module generates one structure like this, and the runtime collects
 * all of these structures and stores them in a circularly linked list.*/
typedef struct swig_module_info {
  swig_type_info         **types;		/* Array of pointers to swig_type_info structures that are in this module */
  size_t                 size;		        /* Number of types in this module */
  struct swig_module_info *next;		/* Pointer to next element in circularly linked list */
  swig_type_info         **type_initial;	/* Array of initially generated type structures */
  swig_cast_info         **cast_initial;	/* Array of initially generated casting structures */
  void                    *clientdata;		/* Language specific module data */
} swig_module_info;

/*
  Compare two type names skipping the space characters, therefore
  "char*" == "char *" and "Class<int>" == "Class<int >", etc.

  Return 0 when the two name types are equivalent, as in
  strncmp, but skipping ' '.
*/
SWIGRUNTIME int
SWIG_TypeNameComp(const char *f1, const char *l1,
		  const char *f2, const char *l2) {
  for (;(f1 != l1) && (f2 != l2); ++f1, ++f2) {
    while ((*f1 == ' ') && (f1 != l1)) ++f1;
    while ((*f2 == ' ') && (f2 != l2)) ++f2;
    if (*f1 != *f2) return (*f1 > *f2) ? 1 : -1;
  }
  return (int)((l1 - f1) - (l2 - f2));
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if equal, -1 if nb < tb, 1 if nb > tb
*/
SWIGRUNTIME int
SWIG_TypeCmp(const char *nb, const char *tb) {
  int equiv = 1;
  const char* te = tb + strlen(tb);
  const char* ne = nb;
  while (equiv != 0 && *ne) {
    for (nb = ne; *ne; ++ne) {
      if (*ne == '|') break;
    }
    equiv = SWIG_TypeNameComp(nb, ne, tb, te);
    if (*ne) ++ne;
  }
  return equiv;
}

/*
  Check type equivalence in a name list like <name1>|<name2>|...
  Return 0 if not equal, 1 if equal
*/
SWIGRUNTIME int
SWIG_TypeEquiv(const char *nb, const char *tb) {
  return SWIG_TypeCmp(nb, tb) == 0 ? 1 : 0;
}

/*
  Check the typename
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheck(const char *c, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (strcmp(iter->type->name, c) == 0) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Identical to SWIG_TypeCheck, except strcmp is replaced with a pointer comparison
*/
SWIGRUNTIME swig_cast_info *
SWIG_TypeCheckStruct(swig_type_info *from, swig_type_info *ty) {
  if (ty) {
    swig_cast_info *iter = ty->cast;
    while (iter) {
      if (iter->type == from) {
        if (iter == ty->cast)
          return iter;
        /* Move iter to the top of the linked list */
        iter->prev->next = iter->next;
        if (iter->next)
          iter->next->prev = iter->prev;
        iter->next = ty->cast;
        iter->prev = 0;
        if (ty->cast) ty->cast->prev = iter;
        ty->cast = iter;
        return iter;
      }
      iter = iter->next;
    }
  }
  return 0;
}

/*
  Cast a pointer up an inheritance hierarchy
*/
SWIGRUNTIMEINLINE void *
SWIG_TypeCast(swig_cast_info *ty, void *ptr, int *newmemory) {
  return ((!ty) || (!ty->converter)) ? ptr : (*ty->converter)(ptr, newmemory);
}

/*
   Dynamic pointer casting. Down an inheritance hierarchy
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeDynamicCast(swig_type_info *ty, void **ptr) {
  swig_type_info *lastty = ty;
  if (!ty || !ty->dcast) return ty;
  while (ty && (ty->dcast)) {
    ty = (*ty->dcast)(ptr);
    if (ty) lastty = ty;
  }
  return lastty;
}

/*
  Return the name associated with this type
*/
SWIGRUNTIMEINLINE const char *
SWIG_TypeName(const swig_type_info *ty) {
  return ty->name;
}

/*
  Return the pretty name associated with this type,
  that is an unmangled type name in a form presentable to the user.
*/
SWIGRUNTIME const char *
SWIG_TypePrettyName(const swig_type_info *type) {
  /* The "str" field contains the equivalent pretty names of the
     type, separated by vertical-bar characters.  We choose
     to print the last name, as it is often (?) the most
     specific. */
  if (!type) return NULL;
  if (type->str != NULL) {
    const char *last_name = type->str;
    const char *s;
    for (s = type->str; *s; s++)
      if (*s == '|') last_name = s+1;
    return last_name;
  }
  else
    return type->name;
}

/*
   Set the clientdata field for a type
*/
SWIGRUNTIME void
SWIG_TypeClientData(swig_type_info *ti, void *clientdata) {
  swig_cast_info *cast = ti->cast;
  /* if (ti->clientdata == clientdata) return; */
  ti->clientdata = clientdata;

  while (cast) {
    if (!cast->converter) {
      swig_type_info *tc = cast->type;
      if (!tc->clientdata) {
	SWIG_TypeClientData(tc, clientdata);
      }
    }
    cast = cast->next;
  }
}
SWIGRUNTIME void
SWIG_TypeNewClientData(swig_type_info *ti, void *clientdata) {
  SWIG_TypeClientData(ti, clientdata);
  ti->owndata = 1;
}

/*
  Search for a swig_type_info structure only by mangled name
  Search is a O(log #types)

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_MangledTypeQueryModule(swig_module_info *start,
                            swig_module_info *end,
		            const char *name) {
  swig_module_info *iter = start;
  do {
    if (iter->size) {
      size_t l = 0;
      size_t r = iter->size - 1;
      do {
	/* since l+r >= 0, we can (>> 1) instead (/ 2) */
	size_t i = (l + r) >> 1;
	const char *iname = iter->types[i]->name;
	if (iname) {
	  int compare = strcmp(name, iname);
	  if (compare == 0) {
	    return iter->types[i];
	  } else if (compare < 0) {
	    if (i) {
	      r = i - 1;
	    } else {
	      break;
	    }
	  } else if (compare > 0) {
	    l = i + 1;
	  }
	} else {
	  break; /* should never happen */
	}
      } while (l <= r);
    }
    iter = iter->next;
  } while (iter != end);
  return 0;
}

/*
  Search for a swig_type_info structure for either a mangled name or a human readable name.
  It first searches the mangled names of the types, which is a O(log #types)
  If a type is not found it then searches the human readable names, which is O(#types).

  We start searching at module start, and finish searching when start == end.
  Note: if start == end at the beginning of the function, we go all the way around
  the circular list.
*/
SWIGRUNTIME swig_type_info *
SWIG_TypeQueryModule(swig_module_info *start,
                     swig_module_info *end,
		     const char *name) {
  /* STEP 1: Search the name field using binary search */
  swig_type_info *ret = SWIG_MangledTypeQueryModule(start, end, name);
  if (ret) {
    return ret;
  } else {
    /* STEP 2: If the type hasn't been found, do a complete search
       of the str field (the human readable name) */
    swig_module_info *iter = start;
    do {
      size_t i = 0;
      for (; i < iter->size; ++i) {
	if (iter->types[i]->str && (SWIG_TypeEquiv(iter->types[i]->str, name)))
	  return iter->types[i];
      }
      iter = iter->next;
    } while (iter != end);
  }

  /* neither found a match */
  return 0;
}

/*
   Pack binary data into a string
*/
SWIGRUNTIME char *
SWIG_PackData(char *c, void *ptr, size_t sz) {
  static const char hex[17] = "0123456789abcdef";
  const unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu =  u + sz;
  for (; u != eu; ++u) {
    unsigned char uu = *u;
    *(c++) = hex[(uu & 0xf0) >> 4];
    *(c++) = hex[uu & 0xf];
  }
  return c;
}

/*
   Unpack binary data from a string
*/
SWIGRUNTIME const char *
SWIG_UnpackData(const char *c, void *ptr, size_t sz) {
  unsigned char *u = (unsigned char *) ptr;
  const unsigned char *eu = u + sz;
  for (; u != eu; ++u) {
    char d = *(c++);
    unsigned char uu;
    if ((d >= '0') && (d <= '9'))
      uu = (unsigned char)((d - '0') << 4);
    else if ((d >= 'a') && (d <= 'f'))
      uu = (unsigned char)((d - ('a'-10)) << 4);
    else
      return (char *) 0;
    d = *(c++);
    if ((d >= '0') && (d <= '9'))
      uu |= (unsigned char)(d - '0');
    else if ((d >= 'a') && (d <= 'f'))
      uu |= (unsigned char)(d - ('a'-10));
    else
      return (char *) 0;
    *u = uu;
  }
  return c;
}

/*
   Pack 'void *' into a string buffer.
*/
SWIGRUNTIME char *
SWIG_PackVoidPtr(char *buff, void *ptr, const char *name, size_t bsz) {
  char *r = buff;
  if ((2*sizeof(void *) + 2) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,&ptr,sizeof(void *));
  if (strlen(name) + 1 > (bsz - (r - buff))) return 0;
  strcpy(r,name);
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackVoidPtr(const char *c, void **ptr, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      *ptr = (void *) 0;
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sizeof(void *));
}

SWIGRUNTIME char *
SWIG_PackDataName(char *buff, void *ptr, size_t sz, const char *name, size_t bsz) {
  char *r = buff;
  size_t lname = (name ? strlen(name) : 0);
  if ((2*sz + 2 + lname) > bsz) return 0;
  *(r++) = '_';
  r = SWIG_PackData(r,ptr,sz);
  if (lname) {
    strncpy(r,name,lname+1);
  } else {
    *r = 0;
  }
  return buff;
}

SWIGRUNTIME const char *
SWIG_UnpackDataName(const char *c, void *ptr, size_t sz, const char *name) {
  if (*c != '_') {
    if (strcmp(c,"NULL") == 0) {
      memset(ptr,0,sz);
      return name;
    } else {
      return 0;
    }
  }
  return SWIG_UnpackData(++c,ptr,sz);
}

#ifdef __cplusplus
}
#endif

/*  Errors in SWIG */
#define  SWIG_UnknownError    	   -1
#define  SWIG_IOError        	   -2
#define  SWIG_RuntimeError   	   -3
#define  SWIG_IndexError     	   -4
#define  SWIG_TypeError      	   -5
#define  SWIG_DivisionByZero 	   -6
#define  SWIG_OverflowError  	   -7
#define  SWIG_SyntaxError    	   -8
#define  SWIG_ValueError     	   -9
#define  SWIG_SystemError    	   -10
#define  SWIG_AttributeError 	   -11
#define  SWIG_MemoryError    	   -12
#define  SWIG_NullReferenceError   -13



/* Compatibility macros for Python 3 */
#if PY_VERSION_HEX >= 0x03000000

#define PyClass_Check(obj) PyObject_IsInstance(obj, (PyObject *)&PyType_Type)
#define PyInt_Check(x) PyLong_Check(x)
#define PyInt_AsLong(x) PyLong_AsLong(x)
#define PyInt_FromLong(x) PyLong_FromLong(x)
#define PyInt_FromSize_t(x) PyLong_FromSize_t(x)
#define PyString_Check(name) PyBytes_Check(name)
#define PyString_FromString(x) PyUnicode_FromString(x)
#define PyString_Format(fmt, args)  PyUnicode_Format(fmt, args)
#define PyString_AsString(str) PyBytes_AsString(str)
#define PyString_Size(str) PyBytes_Size(str)	
#define PyString_InternFromString(key) PyUnicode_InternFromString(key)
#define Py_TPFLAGS_HAVE_CLASS Py_TPFLAGS_BASETYPE
#define PyString_AS_STRING(x) PyUnicode_AS_STRING(x)
#define _PyLong_FromSsize_t(x) PyLong_FromSsize_t(x)

#endif

#ifndef Py_TYPE
#  define Py_TYPE(op) ((op)->ob_type)
#endif

/* SWIG APIs for compatibility of both Python 2 & 3 */

#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_Python_str_FromFormat PyUnicode_FromFormat
#else
#  define SWIG_Python_str_FromFormat PyString_FromFormat
#endif


/* Warning: This function will allocate a new string in Python 3,
 * so please call SWIG_Python_str_DelForPy3(x) to free the space.
 */
SWIGINTERN char*
SWIG_Python_str_AsChar(PyObject *str)
{
#if PY_VERSION_HEX >= 0x03030000
  return (char *)PyUnicode_AsUTF8(str);
#elif PY_VERSION_HEX >= 0x03000000
  char *newstr = 0;
  str = PyUnicode_AsUTF8String(str);
  if (str) {
    char *cstr;
    Py_ssize_t len;
    if (PyBytes_AsStringAndSize(str, &cstr, &len) != -1) {
      newstr = (char *) malloc(len+1);
      if (newstr)
        memcpy(newstr, cstr, len+1);
    }
    Py_XDECREF(str);
  }
  return newstr;
#else
  return PyString_AsString(str);
#endif
}

#if PY_VERSION_HEX >= 0x03030000 || PY_VERSION_HEX < 0x03000000
#  define SWIG_Python_str_DelForPy3(x)
#else
#  define SWIG_Python_str_DelForPy3(x) free( (void*) (x) )
#endif


SWIGINTERN PyObject*
SWIG_Python_str_FromChar(const char *c)
{
#if PY_VERSION_HEX >= 0x03000000
  return PyUnicode_FromString(c); 
#else
  return PyString_FromString(c);
#endif
}

#ifndef PyObject_DEL
# define PyObject_DEL PyObject_Del
#endif

// SWIGPY_USE_CAPSULE is no longer used within SWIG itself, but some user
// interface files check for it.
# define SWIGPY_USE_CAPSULE
# define SWIGPY_CAPSULE_NAME ("swig_runtime_data" SWIG_RUNTIME_VERSION ".type_pointer_capsule" SWIG_TYPE_TABLE_NAME)

#if PY_VERSION_HEX < 0x03020000
#define PyDescr_TYPE(x) (((PyDescrObject *)(x))->d_type)
#define PyDescr_NAME(x) (((PyDescrObject *)(x))->d_name)
#define Py_hash_t long
#endif

/* -----------------------------------------------------------------------------
 * error manipulation
 * ----------------------------------------------------------------------------- */

SWIGRUNTIME PyObject*
SWIG_Python_ErrorType(int code) {
  PyObject* type = 0;
  switch(code) {
  case SWIG_MemoryError:
    type = PyExc_MemoryError;
    break;
  case SWIG_IOError:
    type = PyExc_IOError;
    break;
  case SWIG_RuntimeError:
    type = PyExc_RuntimeError;
    break;
  case SWIG_IndexError:
    type = PyExc_IndexError;
    break;
  case SWIG_TypeError:
    type = PyExc_TypeError;
    break;
  case SWIG_DivisionByZero:
    type = PyExc_ZeroDivisionError;
    break;
  case SWIG_OverflowError:
    type = PyExc_OverflowError;
    break;
  case SWIG_SyntaxError:
    type = PyExc_SyntaxError;
    break;
  case SWIG_ValueError:
    type = PyExc_ValueError;
    break;
  case SWIG_SystemError:
    type = PyExc_SystemError;
    break;
  case SWIG_AttributeError:
    type = PyExc_AttributeError;
    break;
  default:
    type = PyExc_RuntimeError;
  }
  return type;
}


SWIGRUNTIME void
SWIG_Python_AddErrorMsg(const char* mesg)
{
  PyObject *type = 0;
  PyObject *value = 0;
  PyObject *traceback = 0;

  if (PyErr_Occurred())
    PyErr_Fetch(&type, &value, &traceback);
  if (value) {
    PyObject *old_str = PyObject_Str(value);
    const char *tmp = SWIG_Python_str_AsChar(old_str);
    PyErr_Clear();
    Py_XINCREF(type);
    if (tmp)
      PyErr_Format(type, "%s %s", tmp, mesg);
    else
      PyErr_Format(type, "%s", mesg);
    SWIG_Python_str_DelForPy3(tmp);
    Py_DECREF(old_str);
    Py_DECREF(value);
  } else {
    PyErr_SetString(PyExc_RuntimeError, mesg);
  }
}

SWIGRUNTIME int
SWIG_Python_TypeErrorOccurred(PyObject *obj)
{
  PyObject *error;
  if (obj)
    return 0;
  error = PyErr_Occurred();
  return error && PyErr_GivenExceptionMatches(error, PyExc_TypeError);
}

SWIGRUNTIME void
SWIG_Python_RaiseOrModifyTypeError(const char *message)
{
  if (SWIG_Python_TypeErrorOccurred(NULL)) {
    /* Use existing TypeError to preserve stacktrace and enhance with given message */
    PyObject *newvalue;
    PyObject *type = NULL, *value = NULL, *traceback = NULL;
    PyErr_Fetch(&type, &value, &traceback);
#if PY_VERSION_HEX >= 0x03000000
    newvalue = PyUnicode_FromFormat("%S\nAdditional information:\n%s", value, message);
#else
    newvalue = PyString_FromFormat("%s\nAdditional information:\n%s", PyString_AsString(value), message);
#endif
    Py_XDECREF(value);
    PyErr_Restore(type, newvalue, traceback);
  } else {
    /* Raise TypeError using given message */
    PyErr_SetString(PyExc_TypeError, message);
  }
}

#if defined(SWIG_PYTHON_NO_THREADS)
#  if defined(SWIG_PYTHON_THREADS)
#    undef SWIG_PYTHON_THREADS
#  endif
#endif
#if defined(SWIG_PYTHON_THREADS) /* Threading support is enabled */
#  if !defined(SWIG_PYTHON_USE_GIL) && !defined(SWIG_PYTHON_NO_USE_GIL)
#    define SWIG_PYTHON_USE_GIL
#  endif
#  if defined(SWIG_PYTHON_USE_GIL) /* Use PyGILState threads calls */
#    ifndef SWIG_PYTHON_INITIALIZE_THREADS
#     define SWIG_PYTHON_INITIALIZE_THREADS  PyEval_InitThreads() 
#    endif
#    ifdef __cplusplus /* C++ code */
       class SWIG_Python_Thread_Block {
         bool status;
         PyGILState_STATE state;
       public:
         void end() { if (status) { PyGILState_Release(state); status = false;} }
         SWIG_Python_Thread_Block() : status(true), state(PyGILState_Ensure()) {}
         ~SWIG_Python_Thread_Block() { end(); }
       };
       class SWIG_Python_Thread_Allow {
         bool status;
         PyThreadState *save;
       public:
         void end() { if (status) { PyEval_RestoreThread(save); status = false; }}
         SWIG_Python_Thread_Allow() : status(true), save(PyEval_SaveThread()) {}
         ~SWIG_Python_Thread_Allow() { end(); }
       };
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   SWIG_Python_Thread_Block _swig_thread_block
#      define SWIG_PYTHON_THREAD_END_BLOCK     _swig_thread_block.end()
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   SWIG_Python_Thread_Allow _swig_thread_allow
#      define SWIG_PYTHON_THREAD_END_ALLOW     _swig_thread_allow.end()
#    else /* C code */
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK   PyGILState_STATE _swig_thread_block = PyGILState_Ensure()
#      define SWIG_PYTHON_THREAD_END_BLOCK     PyGILState_Release(_swig_thread_block)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW   PyThreadState *_swig_thread_allow = PyEval_SaveThread()
#      define SWIG_PYTHON_THREAD_END_ALLOW     PyEval_RestoreThread(_swig_thread_allow)
#    endif
#  else /* Old thread way, not implemented, user must provide it */
#    if !defined(SWIG_PYTHON_INITIALIZE_THREADS)
#      define SWIG_PYTHON_INITIALIZE_THREADS
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_BLOCK)
#      define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_BLOCK)
#      define SWIG_PYTHON_THREAD_END_BLOCK
#    endif
#    if !defined(SWIG_PYTHON_THREAD_BEGIN_ALLOW)
#      define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#    endif
#    if !defined(SWIG_PYTHON_THREAD_END_ALLOW)
#      define SWIG_PYTHON_THREAD_END_ALLOW
#    endif
#  endif
#else /* No thread support */
#  define SWIG_PYTHON_INITIALIZE_THREADS
#  define SWIG_PYTHON_THREAD_BEGIN_BLOCK
#  define SWIG_PYTHON_THREAD_END_BLOCK
#  define SWIG_PYTHON_THREAD_BEGIN_ALLOW
#  define SWIG_PYTHON_THREAD_END_ALLOW
#endif

/* -----------------------------------------------------------------------------
 * Python API portion that goes into the runtime
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#endif

/* -----------------------------------------------------------------------------
 * Constant declarations
 * ----------------------------------------------------------------------------- */

/* Constant Types */
#define SWIG_PY_POINTER 4
#define SWIG_PY_BINARY  5

/* Constant information structure */
typedef struct swig_const_info {
  int type;
  const char *name;
  long lvalue;
  double dvalue;
  void   *pvalue;
  swig_type_info **ptype;
} swig_const_info;

#ifdef __cplusplus
}
#endif


/* -----------------------------------------------------------------------------
 * pyrun.swg
 *
 * This file contains the runtime support for Python modules
 * and includes code for managing global variables and pointer
 * type checking.
 *
 * ----------------------------------------------------------------------------- */

#if PY_VERSION_HEX < 0x02070000 /* 2.7.0 */
# error "This version of SWIG only supports Python >= 2.7"
#endif

#if PY_VERSION_HEX >= 0x03000000 && PY_VERSION_HEX < 0x03020000
# error "This version of SWIG only supports Python 3 >= 3.2"
#endif

/* Common SWIG API */

/* for raw pointers */
#define SWIG_Python_ConvertPtr(obj, pptr, type, flags)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, 0)
#define SWIG_ConvertPtr(obj, pptr, type, flags)         SWIG_Python_ConvertPtr(obj, pptr, type, flags)
#define SWIG_ConvertPtrAndOwn(obj,pptr,type,flags,own)  SWIG_Python_ConvertPtrAndOwn(obj, pptr, type, flags, own)

#ifdef SWIGPYTHON_BUILTIN
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(self, ptr, type, flags)
#else
#define SWIG_NewPointerObj(ptr, type, flags)            SWIG_Python_NewPointerObj(NULL, ptr, type, flags)
#endif

#define SWIG_InternalNewPointerObj(ptr, type, flags)	SWIG_Python_NewPointerObj(NULL, ptr, type, flags)

#define SWIG_CheckImplicit(ty)                          SWIG_Python_CheckImplicit(ty) 
#define SWIG_AcquirePtr(ptr, src)                       SWIG_Python_AcquirePtr(ptr, src)
#define swig_owntype                                    int

/* for raw packed data */
#define SWIG_ConvertPacked(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewPackedObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)

/* for class or struct pointers */
#define SWIG_ConvertInstance(obj, pptr, type, flags)    SWIG_ConvertPtr(obj, pptr, type, flags)
#define SWIG_NewInstanceObj(ptr, type, flags)           SWIG_NewPointerObj(ptr, type, flags)

/* for C or C++ function pointers */
#define SWIG_ConvertFunctionPtr(obj, pptr, type)        SWIG_Python_ConvertFunctionPtr(obj, pptr, type)
#define SWIG_NewFunctionPtrObj(ptr, type)               SWIG_Python_NewPointerObj(NULL, ptr, type, 0)

/* for C++ member pointers, ie, member methods */
#define SWIG_ConvertMember(obj, ptr, sz, ty)            SWIG_Python_ConvertPacked(obj, ptr, sz, ty)
#define SWIG_NewMemberObj(ptr, sz, type)                SWIG_Python_NewPackedObj(ptr, sz, type)


/* Runtime API */

#define SWIG_GetModule(clientdata)                      SWIG_Python_GetModule(clientdata)
#define SWIG_SetModule(clientdata, pointer)             SWIG_Python_SetModule(pointer)
#define SWIG_NewClientData(obj)                         SwigPyClientData_New(obj)

#define SWIG_SetErrorObj                                SWIG_Python_SetErrorObj                            
#define SWIG_SetErrorMsg                        	SWIG_Python_SetErrorMsg				   
#define SWIG_ErrorType(code)                    	SWIG_Python_ErrorType(code)                        
#define SWIG_Error(code, msg)            		SWIG_Python_SetErrorMsg(SWIG_ErrorType(code), msg) 
#define SWIG_fail                        		goto fail					   


/* Runtime API implementation */

/* Error manipulation */

SWIGINTERN void 
SWIG_Python_SetErrorObj(PyObject *errtype, PyObject *obj) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK; 
  PyErr_SetObject(errtype, obj);
  Py_DECREF(obj);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

SWIGINTERN void 
SWIG_Python_SetErrorMsg(PyObject *errtype, const char *msg) {
  SWIG_PYTHON_THREAD_BEGIN_BLOCK;
  PyErr_SetString(errtype, msg);
  SWIG_PYTHON_THREAD_END_BLOCK;
}

#define SWIG_Python_Raise(obj, type, desc)  SWIG_Python_SetErrorObj(SWIG_Python_ExceptionType(desc), obj)

/* Set a constant value */

#if defined(SWIGPYTHON_BUILTIN)

SWIGINTERN void
SwigPyBuiltin_AddPublicSymbol(PyObject *seq, const char *key) {
  PyObject *s = PyString_InternFromString(key);
  PyList_Append(seq, s);
  Py_DECREF(s);
}

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, PyObject *public_interface, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, name, obj);
  Py_DECREF(obj);
  if (public_interface)
    SwigPyBuiltin_AddPublicSymbol(public_interface, name);
}

#else

SWIGINTERN void
SWIG_Python_SetConstant(PyObject *d, const char *name, PyObject *obj) {   
  PyDict_SetItemString(d, name, obj);
  Py_DECREF(obj);                            
}

#endif

/* Append a value to the result obj */

SWIGINTERN PyObject*
SWIG_Python_AppendOutput(PyObject* result, PyObject* obj) {
  if (!result) {
    result = obj;
  } else if (result == Py_None) {
    Py_DECREF(result);
    result = obj;
  } else {
    if (!PyList_Check(result)) {
      PyObject *o2 = result;
      result = PyList_New(1);
      PyList_SetItem(result, 0, o2);
    }
    PyList_Append(result,obj);
    Py_DECREF(obj);
  }
  return result;
}

/* Unpack the argument tuple */

SWIGINTERN Py_ssize_t
SWIG_Python_UnpackTuple(PyObject *args, const char *name, Py_ssize_t min, Py_ssize_t max, PyObject **objs)
{
  if (!args) {
    if (!min && !max) {
      return 1;
    } else {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got none", 
		   name, (min == max ? "" : "at least "), (int)min);
      return 0;
    }
  }  
  if (!PyTuple_Check(args)) {
    if (min <= 1 && max >= 1) {
      Py_ssize_t i;
      objs[0] = args;
      for (i = 1; i < max; ++i) {
	objs[i] = 0;
      }
      return 2;
    }
    PyErr_SetString(PyExc_SystemError, "UnpackTuple() argument list is not a tuple");
    return 0;
  } else {
    Py_ssize_t l = PyTuple_GET_SIZE(args);
    if (l < min) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at least "), (int)min, (int)l);
      return 0;
    } else if (l > max) {
      PyErr_Format(PyExc_TypeError, "%s expected %s%d arguments, got %d", 
		   name, (min == max ? "" : "at most "), (int)max, (int)l);
      return 0;
    } else {
      Py_ssize_t i;
      for (i = 0; i < l; ++i) {
	objs[i] = PyTuple_GET_ITEM(args, i);
      }
      for (; l < max; ++l) {
	objs[l] = 0;
      }
      return i + 1;
    }    
  }
}

SWIGINTERN int
SWIG_Python_CheckNoKeywords(PyObject *kwargs, const char *name) {
  int no_kwargs = 1;
  if (kwargs) {
    assert(PyDict_Check(kwargs));
    if (PyDict_Size(kwargs) > 0) {
      PyErr_Format(PyExc_TypeError, "%s() does not take keyword arguments", name);
      no_kwargs = 0;
    }
  }
  return no_kwargs;
}

/* A functor is a function object with one single object argument */
#define SWIG_Python_CallFunctor(functor, obj)	        PyObject_CallFunctionObjArgs(functor, obj, NULL);

/*
  Helper for static pointer initialization for both C and C++ code, for example
  static PyObject *SWIG_STATIC_POINTER(MyVar) = NewSomething(...);
*/
#ifdef __cplusplus
#define SWIG_STATIC_POINTER(var)  var
#else
#define SWIG_STATIC_POINTER(var)  var = 0; if (!var) var
#endif

/* -----------------------------------------------------------------------------
 * Pointer declarations
 * ----------------------------------------------------------------------------- */

/* Flags for new pointer objects */
#define SWIG_POINTER_NOSHADOW       (SWIG_POINTER_OWN      << 1)
#define SWIG_POINTER_NEW            (SWIG_POINTER_NOSHADOW | SWIG_POINTER_OWN)

#define SWIG_POINTER_IMPLICIT_CONV  (SWIG_POINTER_DISOWN   << 1)

#define SWIG_BUILTIN_TP_INIT	    (SWIG_POINTER_OWN << 2)
#define SWIG_BUILTIN_INIT	    (SWIG_BUILTIN_TP_INIT | SWIG_POINTER_OWN)

#ifdef __cplusplus
extern "C" {
#endif

/* The python void return value */

SWIGRUNTIMEINLINE PyObject * 
SWIG_Py_Void(void)
{
  PyObject *none = Py_None;
  Py_INCREF(none);
  return none;
}

/* SwigPyClientData */

typedef struct {
  PyObject *klass;
  PyObject *newraw;
  PyObject *newargs;
  PyObject *destroy;
  int delargs;
  int implicitconv;
  PyTypeObject *pytype;
} SwigPyClientData;

SWIGRUNTIMEINLINE int 
SWIG_Python_CheckImplicit(swig_type_info *ty)
{
  SwigPyClientData *data = (SwigPyClientData *)ty->clientdata;
  int fail = data ? data->implicitconv : 0;
  if (fail)
    PyErr_SetString(PyExc_TypeError, "Implicit conversion is prohibited for explicit constructors.");
  return fail;
}

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_ExceptionType(swig_type_info *desc) {
  SwigPyClientData *data = desc ? (SwigPyClientData *) desc->clientdata : 0;
  PyObject *klass = data ? data->klass : 0;
  return (klass ? klass : PyExc_RuntimeError);
}


SWIGRUNTIME SwigPyClientData * 
SwigPyClientData_New(PyObject* obj)
{
  if (!obj) {
    return 0;
  } else {
    SwigPyClientData *data = (SwigPyClientData *)malloc(sizeof(SwigPyClientData));
    /* the klass element */
    data->klass = obj;
    Py_INCREF(data->klass);
    /* the newraw method and newargs arguments used to create a new raw instance */
    if (PyClass_Check(obj)) {
      data->newraw = 0;
      data->newargs = obj;
      Py_INCREF(obj);
    } else {
      data->newraw = PyObject_GetAttrString(data->klass, "__new__");
      if (data->newraw) {
	Py_INCREF(data->newraw);
	data->newargs = PyTuple_New(1);
	PyTuple_SetItem(data->newargs, 0, obj);
      } else {
	data->newargs = obj;
      }
      Py_INCREF(data->newargs);
    }
    /* the destroy method, aka as the C++ delete method */
    data->destroy = PyObject_GetAttrString(data->klass, "__swig_destroy__");
    if (PyErr_Occurred()) {
      PyErr_Clear();
      data->destroy = 0;
    }
    if (data->destroy) {
      int flags;
      Py_INCREF(data->destroy);
      flags = PyCFunction_GET_FLAGS(data->destroy);
      data->delargs = !(flags & (METH_O));
    } else {
      data->delargs = 0;
    }
    data->implicitconv = 0;
    data->pytype = 0;
    return data;
  }
}

SWIGRUNTIME void 
SwigPyClientData_Del(SwigPyClientData *data) {
  Py_XDECREF(data->newraw);
  Py_XDECREF(data->newargs);
  Py_XDECREF(data->destroy);
}

/* =============== SwigPyObject =====================*/

typedef struct {
  PyObject_HEAD
  void *ptr;
  swig_type_info *ty;
  int own;
  PyObject *next;
#ifdef SWIGPYTHON_BUILTIN
  PyObject *dict;
#endif
} SwigPyObject;


#ifdef SWIGPYTHON_BUILTIN

SWIGRUNTIME PyObject *
SwigPyObject_get___dict__(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;

  if (!sobj->dict)
    sobj->dict = PyDict_New();

  Py_INCREF(sobj->dict);
  return sobj->dict;
}

#endif

SWIGRUNTIME PyObject *
SwigPyObject_long(SwigPyObject *v)
{
  return PyLong_FromVoidPtr(v->ptr);
}

SWIGRUNTIME PyObject *
SwigPyObject_format(const char* fmt, SwigPyObject *v)
{
  PyObject *res = NULL;
  PyObject *args = PyTuple_New(1);
  if (args) {
    if (PyTuple_SetItem(args, 0, SwigPyObject_long(v)) == 0) {
      PyObject *ofmt = SWIG_Python_str_FromChar(fmt);
      if (ofmt) {
#if PY_VERSION_HEX >= 0x03000000
	res = PyUnicode_Format(ofmt,args);
#else
	res = PyString_Format(ofmt,args);
#endif
	Py_DECREF(ofmt);
      }
      Py_DECREF(args);
    }
  }
  return res;
}

SWIGRUNTIME PyObject *
SwigPyObject_oct(SwigPyObject *v)
{
  return SwigPyObject_format("%o",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_hex(SwigPyObject *v)
{
  return SwigPyObject_format("%x",v);
}

SWIGRUNTIME PyObject *
SwigPyObject_repr(SwigPyObject *v)
{
  const char *name = SWIG_TypePrettyName(v->ty);
  PyObject *repr = SWIG_Python_str_FromFormat("<Swig Object of type '%s' at %p>", (name ? name : "unknown"), (void *)v);
  if (v->next) {
    PyObject *nrep = SwigPyObject_repr((SwigPyObject *)v->next);
# if PY_VERSION_HEX >= 0x03000000
    PyObject *joined = PyUnicode_Concat(repr, nrep);
    Py_DecRef(repr);
    Py_DecRef(nrep);
    repr = joined;
# else
    PyString_ConcatAndDel(&repr,nrep);
# endif
  }
  return repr;  
}

/* We need a version taking two PyObject* parameters so it's a valid
 * PyCFunction to use in swigobject_methods[]. */
SWIGRUNTIME PyObject *
SwigPyObject_repr2(PyObject *v, PyObject *SWIGUNUSEDPARM(args))
{
  return SwigPyObject_repr((SwigPyObject*)v);
}

SWIGRUNTIME int
SwigPyObject_compare(SwigPyObject *v, SwigPyObject *w)
{
  void *i = v->ptr;
  void *j = w->ptr;
  return (i < j) ? -1 : ((i > j) ? 1 : 0);
}

/* Added for Python 3.x, would it also be useful for Python 2.x? */
SWIGRUNTIME PyObject*
SwigPyObject_richcompare(SwigPyObject *v, SwigPyObject *w, int op)
{
  PyObject* res;
  if( op != Py_EQ && op != Py_NE ) {
    Py_INCREF(Py_NotImplemented);
    return Py_NotImplemented;
  }
  res = PyBool_FromLong( (SwigPyObject_compare(v, w)==0) == (op == Py_EQ) ? 1 : 0);
  return res;  
}


SWIGRUNTIME PyTypeObject* SwigPyObject_TypeOnce(void);

#ifdef SWIGPYTHON_BUILTIN
static swig_type_info *SwigPyObject_stype = 0;
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
    SwigPyClientData *cd;
    assert(SwigPyObject_stype);
    cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
    assert(cd);
    assert(cd->pytype);
    return cd->pytype;
}
#else
SWIGRUNTIME PyTypeObject*
SwigPyObject_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyObject_TypeOnce();
  return type;
}
#endif

SWIGRUNTIMEINLINE int
SwigPyObject_Check(PyObject *op) {
#ifdef SWIGPYTHON_BUILTIN
  PyTypeObject *target_tp = SwigPyObject_type();
  if (PyType_IsSubtype(op->ob_type, target_tp))
    return 1;
  return (strcmp(op->ob_type->tp_name, "SwigPyObject") == 0);
#else
  return (Py_TYPE(op) == SwigPyObject_type())
    || (strcmp(Py_TYPE(op)->tp_name,"SwigPyObject") == 0);
#endif
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own);

SWIGRUNTIME void
SwigPyObject_dealloc(PyObject *v)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  PyObject *next = sobj->next;
  if (sobj->own == SWIG_POINTER_OWN) {
    swig_type_info *ty = sobj->ty;
    SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
    PyObject *destroy = data ? data->destroy : 0;
    if (destroy) {
      /* destroy is always a VARARGS method */
      PyObject *res;

      /* PyObject_CallFunction() has the potential to silently drop
         the active exception.  In cases of unnamed temporary
         variable or where we just finished iterating over a generator
         StopIteration will be active right now, and this needs to
         remain true upon return from SwigPyObject_dealloc.  So save
         and restore. */
      
      PyObject *type = NULL, *value = NULL, *traceback = NULL;
      PyErr_Fetch(&type, &value, &traceback);

      if (data->delargs) {
        /* we need to create a temporary object to carry the destroy operation */
        PyObject *tmp = SwigPyObject_New(sobj->ptr, ty, 0);
        res = SWIG_Python_CallFunctor(destroy, tmp);
        Py_DECREF(tmp);
      } else {
        PyCFunction meth = PyCFunction_GET_FUNCTION(destroy);
        PyObject *mself = PyCFunction_GET_SELF(destroy);
        res = ((*meth)(mself, v));
      }
      if (!res)
        PyErr_WriteUnraisable(destroy);

      PyErr_Restore(type, value, traceback);

      Py_XDECREF(res);
    } 
#if !defined(SWIG_PYTHON_SILENT_MEMLEAK)
    else {
      const char *name = SWIG_TypePrettyName(ty);
      printf("swig/python detected a memory leak of type '%s', no destructor found.\n", (name ? name : "unknown"));
    }
#endif
  } 
  Py_XDECREF(next);
  PyObject_DEL(v);
}

SWIGRUNTIME PyObject* 
SwigPyObject_append(PyObject* v, PyObject* next)
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (!SwigPyObject_Check(next)) {
    PyErr_SetString(PyExc_TypeError, "Attempt to append a non SwigPyObject");
    return NULL;
  }
  sobj->next = next;
  Py_INCREF(next);
  return SWIG_Py_Void();
}

SWIGRUNTIME PyObject* 
SwigPyObject_next(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *) v;
  if (sobj->next) {    
    Py_INCREF(sobj->next);
    return sobj->next;
  } else {
    return SWIG_Py_Void();
  }
}

SWIGINTERN PyObject*
SwigPyObject_disown(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = 0;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_acquire(PyObject* v, PyObject *SWIGUNUSEDPARM(args))
{
  SwigPyObject *sobj = (SwigPyObject *)v;
  sobj->own = SWIG_POINTER_OWN;
  return SWIG_Py_Void();
}

SWIGINTERN PyObject*
SwigPyObject_own(PyObject *v, PyObject *args)
{
  PyObject *val = 0;
  if (!PyArg_UnpackTuple(args, "own", 0, 1, &val)) {
    return NULL;
  } else {
    SwigPyObject *sobj = (SwigPyObject *)v;
    PyObject *obj = PyBool_FromLong(sobj->own);
    if (val) {
      if (PyObject_IsTrue(val)) {
        SwigPyObject_acquire(v,args);
      } else {
        SwigPyObject_disown(v,args);
      }
    } 
    return obj;
  }
}

static PyMethodDef
swigobject_methods[] = {
  {"disown",  SwigPyObject_disown,  METH_NOARGS,  "releases ownership of the pointer"},
  {"acquire", SwigPyObject_acquire, METH_NOARGS,  "acquires ownership of the pointer"},
  {"own",     SwigPyObject_own,     METH_VARARGS, "returns/sets ownership of the pointer"},
  {"append",  SwigPyObject_append,  METH_O,       "appends another 'this' object"},
  {"next",    SwigPyObject_next,    METH_NOARGS,  "returns the next 'this' object"},
  {"__repr__",SwigPyObject_repr2,   METH_NOARGS,  "returns object representation"},
  {0, 0, 0, 0}  
};

SWIGRUNTIME PyTypeObject*
SwigPyObject_TypeOnce(void) {
  static char swigobject_doc[] = "Swig object carries a C/C++ instance pointer";

  static PyNumberMethods SwigPyObject_as_number = {
    (binaryfunc)0, /*nb_add*/
    (binaryfunc)0, /*nb_subtract*/
    (binaryfunc)0, /*nb_multiply*/
    /* nb_divide removed in Python 3 */
#if PY_VERSION_HEX < 0x03000000
    (binaryfunc)0, /*nb_divide*/
#endif
    (binaryfunc)0, /*nb_remainder*/
    (binaryfunc)0, /*nb_divmod*/
    (ternaryfunc)0,/*nb_power*/
    (unaryfunc)0,  /*nb_negative*/
    (unaryfunc)0,  /*nb_positive*/
    (unaryfunc)0,  /*nb_absolute*/
    (inquiry)0,    /*nb_nonzero*/
    0,		   /*nb_invert*/
    0,		   /*nb_lshift*/
    0,		   /*nb_rshift*/
    0,		   /*nb_and*/
    0,		   /*nb_xor*/
    0,		   /*nb_or*/
#if PY_VERSION_HEX < 0x03000000
    0,   /*nb_coerce*/
#endif
    (unaryfunc)SwigPyObject_long, /*nb_int*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_long, /*nb_long*/
#else
    0, /*nb_reserved*/
#endif
    (unaryfunc)0,                 /*nb_float*/
#if PY_VERSION_HEX < 0x03000000
    (unaryfunc)SwigPyObject_oct,  /*nb_oct*/
    (unaryfunc)SwigPyObject_hex,  /*nb_hex*/
#endif
#if PY_VERSION_HEX >= 0x03050000 /* 3.5 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_inplace_matrix_multiply */
#elif PY_VERSION_HEX >= 0x03000000 /* 3.0 */
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index, nb_inplace_divide removed */
#else
    0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 /* nb_inplace_add -> nb_index */
#endif
  };

  static PyTypeObject swigpyobject_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyObject",                       /* tp_name */
      sizeof(SwigPyObject),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyObject_dealloc,     /* tp_dealloc */
      0,                                    /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX >= 0x03000000
      0, /* tp_reserved in 3.0.1, tp_compare in 3.0.0 but not used */
#else
      (cmpfunc)SwigPyObject_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyObject_repr,          /* tp_repr */
      &SwigPyObject_as_number,              /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      0,                                    /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigobject_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      (richcmpfunc)SwigPyObject_richcompare,/* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      swigobject_methods,                   /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpyobject_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpyobject_type) < 0)
      return NULL;
  }
  return &swigpyobject_type;
}

SWIGRUNTIME PyObject *
SwigPyObject_New(void *ptr, swig_type_info *ty, int own)
{
  SwigPyObject *sobj = PyObject_NEW(SwigPyObject, SwigPyObject_type());
  if (sobj) {
    sobj->ptr  = ptr;
    sobj->ty   = ty;
    sobj->own  = own;
    sobj->next = 0;
  }
  return (PyObject *)sobj;
}

/* -----------------------------------------------------------------------------
 * Implements a simple Swig Packed type, and use it instead of string
 * ----------------------------------------------------------------------------- */

typedef struct {
  PyObject_HEAD
  void *pack;
  swig_type_info *ty;
  size_t size;
} SwigPyPacked;

SWIGRUNTIME PyObject *
SwigPyPacked_repr(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))) {
    return SWIG_Python_str_FromFormat("<Swig Packed at %s%s>", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromFormat("<Swig Packed %s>", v->ty->name);
  }  
}

SWIGRUNTIME PyObject *
SwigPyPacked_str(SwigPyPacked *v)
{
  char result[SWIG_BUFFER_SIZE];
  if (SWIG_PackDataName(result, v->pack, v->size, 0, sizeof(result))){
    return SWIG_Python_str_FromFormat("%s%s", result, v->ty->name);
  } else {
    return SWIG_Python_str_FromChar(v->ty->name);
  }  
}

SWIGRUNTIME int
SwigPyPacked_compare(SwigPyPacked *v, SwigPyPacked *w)
{
  size_t i = v->size;
  size_t j = w->size;
  int s = (i < j) ? -1 : ((i > j) ? 1 : 0);
  return s ? s : strncmp((const char *)v->pack, (const char *)w->pack, 2*v->size);
}

SWIGRUNTIME PyTypeObject* SwigPyPacked_TypeOnce(void);

SWIGRUNTIME PyTypeObject*
SwigPyPacked_type(void) {
  static PyTypeObject *SWIG_STATIC_POINTER(type) = SwigPyPacked_TypeOnce();
  return type;
}

SWIGRUNTIMEINLINE int
SwigPyPacked_Check(PyObject *op) {
  return ((op)->ob_type == SwigPyPacked_TypeOnce()) 
    || (strcmp((op)->ob_type->tp_name,"SwigPyPacked") == 0);
}

SWIGRUNTIME void
SwigPyPacked_dealloc(PyObject *v)
{
  if (SwigPyPacked_Check(v)) {
    SwigPyPacked *sobj = (SwigPyPacked *) v;
    free(sobj->pack);
  }
  PyObject_DEL(v);
}

SWIGRUNTIME PyTypeObject*
SwigPyPacked_TypeOnce(void) {
  static char swigpacked_doc[] = "Swig object carries a C/C++ instance pointer";
  static PyTypeObject swigpypacked_type;
  static int type_init = 0;
  if (!type_init) {
    const PyTypeObject tmp = {
#if PY_VERSION_HEX>=0x03000000
      PyVarObject_HEAD_INIT(NULL, 0)
#else
      PyObject_HEAD_INIT(NULL)
      0,                                    /* ob_size */
#endif
      "SwigPyPacked",                       /* tp_name */
      sizeof(SwigPyPacked),                 /* tp_basicsize */
      0,                                    /* tp_itemsize */
      (destructor)SwigPyPacked_dealloc,     /* tp_dealloc */
      0,                                    /* tp_print */
      (getattrfunc)0,                       /* tp_getattr */
      (setattrfunc)0,                       /* tp_setattr */
#if PY_VERSION_HEX>=0x03000000
      0, /* tp_reserved in 3.0.1 */
#else
      (cmpfunc)SwigPyPacked_compare,        /* tp_compare */
#endif
      (reprfunc)SwigPyPacked_repr,          /* tp_repr */
      0,                                    /* tp_as_number */
      0,                                    /* tp_as_sequence */
      0,                                    /* tp_as_mapping */
      (hashfunc)0,                          /* tp_hash */
      (ternaryfunc)0,                       /* tp_call */
      (reprfunc)SwigPyPacked_str,           /* tp_str */
      PyObject_GenericGetAttr,              /* tp_getattro */
      0,                                    /* tp_setattro */
      0,                                    /* tp_as_buffer */
      Py_TPFLAGS_DEFAULT,                   /* tp_flags */
      swigpacked_doc,                       /* tp_doc */
      0,                                    /* tp_traverse */
      0,                                    /* tp_clear */
      0,                                    /* tp_richcompare */
      0,                                    /* tp_weaklistoffset */
      0,                                    /* tp_iter */
      0,                                    /* tp_iternext */
      0,                                    /* tp_methods */
      0,                                    /* tp_members */
      0,                                    /* tp_getset */
      0,                                    /* tp_base */
      0,                                    /* tp_dict */
      0,                                    /* tp_descr_get */
      0,                                    /* tp_descr_set */
      0,                                    /* tp_dictoffset */
      0,                                    /* tp_init */
      0,                                    /* tp_alloc */
      0,                                    /* tp_new */
      0,                                    /* tp_free */
      0,                                    /* tp_is_gc */
      0,                                    /* tp_bases */
      0,                                    /* tp_mro */
      0,                                    /* tp_cache */
      0,                                    /* tp_subclasses */
      0,                                    /* tp_weaklist */
      0,                                    /* tp_del */
      0,                                    /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
      0,                                    /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
      0,                                    /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
      0,                                    /* tp_print */
#endif
#ifdef COUNT_ALLOCS
      0,                                    /* tp_allocs */
      0,                                    /* tp_frees */
      0,                                    /* tp_maxalloc */
      0,                                    /* tp_prev */
      0                                     /* tp_next */
#endif
    };
    swigpypacked_type = tmp;
    type_init = 1;
    if (PyType_Ready(&swigpypacked_type) < 0)
      return NULL;
  }
  return &swigpypacked_type;
}

SWIGRUNTIME PyObject *
SwigPyPacked_New(void *ptr, size_t size, swig_type_info *ty)
{
  SwigPyPacked *sobj = PyObject_NEW(SwigPyPacked, SwigPyPacked_type());
  if (sobj) {
    void *pack = malloc(size);
    if (pack) {
      memcpy(pack, ptr, size);
      sobj->pack = pack;
      sobj->ty   = ty;
      sobj->size = size;
    } else {
      PyObject_DEL((PyObject *) sobj);
      sobj = 0;
    }
  }
  return (PyObject *) sobj;
}

SWIGRUNTIME swig_type_info *
SwigPyPacked_UnpackData(PyObject *obj, void *ptr, size_t size)
{
  if (SwigPyPacked_Check(obj)) {
    SwigPyPacked *sobj = (SwigPyPacked *)obj;
    if (sobj->size != size) return 0;
    memcpy(ptr, sobj->pack, size);
    return sobj->ty;
  } else {
    return 0;
  }
}

/* -----------------------------------------------------------------------------
 * pointers/data manipulation
 * ----------------------------------------------------------------------------- */

static PyObject *Swig_This_global = NULL;

SWIGRUNTIME PyObject *
SWIG_This(void)
{
  if (Swig_This_global == NULL)
    Swig_This_global = SWIG_Python_str_FromChar("this");
  return Swig_This_global;
}

/* #define SWIG_PYTHON_SLOW_GETSET_THIS */

/* TODO: I don't know how to implement the fast getset in Python 3 right now */
#if PY_VERSION_HEX>=0x03000000
#define SWIG_PYTHON_SLOW_GETSET_THIS 
#endif

SWIGRUNTIME SwigPyObject *
SWIG_Python_GetSwigThis(PyObject *pyobj) 
{
  PyObject *obj;

  if (SwigPyObject_Check(pyobj))
    return (SwigPyObject *) pyobj;

#ifdef SWIGPYTHON_BUILTIN
  (void)obj;
# ifdef PyWeakref_CheckProxy
  if (PyWeakref_CheckProxy(pyobj)) {
    pyobj = PyWeakref_GET_OBJECT(pyobj);
    if (pyobj && SwigPyObject_Check(pyobj))
      return (SwigPyObject*) pyobj;
  }
# endif
  return NULL;
#else

  obj = 0;

#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  if (PyInstance_Check(pyobj)) {
    obj = _PyInstance_Lookup(pyobj, SWIG_This());      
  } else {
    PyObject **dictptr = _PyObject_GetDictPtr(pyobj);
    if (dictptr != NULL) {
      PyObject *dict = *dictptr;
      obj = dict ? PyDict_GetItem(dict, SWIG_This()) : 0;
    } else {
#ifdef PyWeakref_CheckProxy
      if (PyWeakref_CheckProxy(pyobj)) {
	PyObject *wobj = PyWeakref_GET_OBJECT(pyobj);
	return wobj ? SWIG_Python_GetSwigThis(wobj) : 0;
      }
#endif
      obj = PyObject_GetAttr(pyobj,SWIG_This());
      if (obj) {
	Py_DECREF(obj);
      } else {
	if (PyErr_Occurred()) PyErr_Clear();
	return 0;
      }
    }
  }
#else
  obj = PyObject_GetAttr(pyobj,SWIG_This());
  if (obj) {
    Py_DECREF(obj);
  } else {
    if (PyErr_Occurred()) PyErr_Clear();
    return 0;
  }
#endif
  if (obj && !SwigPyObject_Check(obj)) {
    /* a PyObject is called 'this', try to get the 'real this'
       SwigPyObject from it */ 
    return SWIG_Python_GetSwigThis(obj);
  }
  return (SwigPyObject *)obj;
#endif
}

/* Acquire a pointer value */

SWIGRUNTIME int
SWIG_Python_AcquirePtr(PyObject *obj, int own) {
  if (own == SWIG_POINTER_OWN) {
    SwigPyObject *sobj = SWIG_Python_GetSwigThis(obj);
    if (sobj) {
      int oldown = sobj->own;
      sobj->own = own;
      return oldown;
    }
  }
  return 0;
}

/* Convert a pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPtrAndOwn(PyObject *obj, void **ptr, swig_type_info *ty, int flags, int *own) {
  int res;
  SwigPyObject *sobj;
  int implicit_conv = (flags & SWIG_POINTER_IMPLICIT_CONV) != 0;

  if (!obj)
    return SWIG_ERROR;
  if (obj == Py_None && !implicit_conv) {
    if (ptr)
      *ptr = 0;
    return (flags & SWIG_POINTER_NO_NULL) ? SWIG_NullReferenceError : SWIG_OK;
  }

  res = SWIG_ERROR;

  sobj = SWIG_Python_GetSwigThis(obj);
  if (own)
    *own = 0;
  while (sobj) {
    void *vptr = sobj->ptr;
    if (ty) {
      swig_type_info *to = sobj->ty;
      if (to == ty) {
        /* no type cast needed */
        if (ptr) *ptr = vptr;
        break;
      } else {
        swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
        if (!tc) {
          sobj = (SwigPyObject *)sobj->next;
        } else {
          if (ptr) {
            int newmemory = 0;
            *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
            if (newmemory == SWIG_CAST_NEW_MEMORY) {
              assert(own); /* badly formed typemap which will lead to a memory leak - it must set and use own to delete *ptr */
              if (own)
                *own = *own | SWIG_CAST_NEW_MEMORY;
            }
          }
          break;
        }
      }
    } else {
      if (ptr) *ptr = vptr;
      break;
    }
  }
  if (sobj) {
    if (own)
      *own = *own | sobj->own;
    if (flags & SWIG_POINTER_DISOWN) {
      sobj->own = 0;
    }
    res = SWIG_OK;
  } else {
    if (implicit_conv) {
      SwigPyClientData *data = ty ? (SwigPyClientData *) ty->clientdata : 0;
      if (data && !data->implicitconv) {
        PyObject *klass = data->klass;
        if (klass) {
          PyObject *impconv;
          data->implicitconv = 1; /* avoid recursion and call 'explicit' constructors*/
          impconv = SWIG_Python_CallFunctor(klass, obj);
          data->implicitconv = 0;
          if (PyErr_Occurred()) {
            PyErr_Clear();
            impconv = 0;
          }
          if (impconv) {
            SwigPyObject *iobj = SWIG_Python_GetSwigThis(impconv);
            if (iobj) {
              void *vptr;
              res = SWIG_Python_ConvertPtrAndOwn((PyObject*)iobj, &vptr, ty, 0, 0);
              if (SWIG_IsOK(res)) {
                if (ptr) {
                  *ptr = vptr;
                  /* transfer the ownership to 'ptr' */
                  iobj->own = 0;
                  res = SWIG_AddCast(res);
                  res = SWIG_AddNewMask(res);
                } else {
                  res = SWIG_AddCast(res);		    
                }
              }
            }
            Py_DECREF(impconv);
          }
        }
      }
      if (!SWIG_IsOK(res) && obj == Py_None) {
        if (ptr)
          *ptr = 0;
        if (PyErr_Occurred())
          PyErr_Clear();
        res = SWIG_OK;
      }
    }
  }
  return res;
}

/* Convert a function ptr value */

SWIGRUNTIME int
SWIG_Python_ConvertFunctionPtr(PyObject *obj, void **ptr, swig_type_info *ty) {
  if (!PyCFunction_Check(obj)) {
    return SWIG_ConvertPtr(obj, ptr, ty, 0);
  } else {
    void *vptr = 0;
    swig_cast_info *tc;

    /* here we get the method pointer for callbacks */
    const char *doc = (((PyCFunctionObject *)obj) -> m_ml -> ml_doc);
    const char *desc = doc ? strstr(doc, "swig_ptr: ") : 0;
    if (desc)
      desc = ty ? SWIG_UnpackVoidPtr(desc + 10, &vptr, ty->name) : 0;
    if (!desc)
      return SWIG_ERROR;
    tc = SWIG_TypeCheck(desc,ty);
    if (tc) {
      int newmemory = 0;
      *ptr = SWIG_TypeCast(tc,vptr,&newmemory);
      assert(!newmemory); /* newmemory handling not yet implemented */
    } else {
      return SWIG_ERROR;
    }
    return SWIG_OK;
  }
}

/* Convert a packed pointer value */

SWIGRUNTIME int
SWIG_Python_ConvertPacked(PyObject *obj, void *ptr, size_t sz, swig_type_info *ty) {
  swig_type_info *to = SwigPyPacked_UnpackData(obj, ptr, sz);
  if (!to) return SWIG_ERROR;
  if (ty) {
    if (to != ty) {
      /* check type cast? */
      swig_cast_info *tc = SWIG_TypeCheck(to->name,ty);
      if (!tc) return SWIG_ERROR;
    }
  }
  return SWIG_OK;
}  

/* -----------------------------------------------------------------------------
 * Create a new pointer object
 * ----------------------------------------------------------------------------- */

/*
  Create a new instance object, without calling __init__, and set the
  'this' attribute.
*/

SWIGRUNTIME PyObject* 
SWIG_Python_NewShadowInstance(SwigPyClientData *data, PyObject *swig_this)
{
  PyObject *inst = 0;
  PyObject *newraw = data->newraw;
  if (newraw) {
    inst = PyObject_Call(newraw, data->newargs, NULL);
    if (inst) {
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
      PyObject **dictptr = _PyObject_GetDictPtr(inst);
      if (dictptr != NULL) {
	PyObject *dict = *dictptr;
	if (dict == NULL) {
	  dict = PyDict_New();
	  *dictptr = dict;
	  PyDict_SetItem(dict, SWIG_This(), swig_this);
	}
      }
#else
      if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
        Py_DECREF(inst);
        inst = 0;
      }
#endif
    }
  } else {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *empty_args = PyTuple_New(0);
    if (empty_args) {
      PyObject *empty_kwargs = PyDict_New();
      if (empty_kwargs) {
        inst = ((PyTypeObject *)data->newargs)->tp_new((PyTypeObject *)data->newargs, empty_args, empty_kwargs);
        Py_DECREF(empty_kwargs);
        if (inst) {
          if (PyObject_SetAttr(inst, SWIG_This(), swig_this) == -1) {
            Py_DECREF(inst);
            inst = 0;
          } else {
            Py_TYPE(inst)->tp_flags &= ~Py_TPFLAGS_VALID_VERSION_TAG;
          }
        }
      }
      Py_DECREF(empty_args);
    }
#else
    PyObject *dict = PyDict_New();
    if (dict) {
      PyDict_SetItem(dict, SWIG_This(), swig_this);
      inst = PyInstance_NewRaw(data->newargs, dict);
      Py_DECREF(dict);
    }
#endif
  }
  return inst;
}

SWIGRUNTIME int
SWIG_Python_SetSwigThis(PyObject *inst, PyObject *swig_this)
{
#if !defined(SWIG_PYTHON_SLOW_GETSET_THIS)
  PyObject **dictptr = _PyObject_GetDictPtr(inst);
  if (dictptr != NULL) {
    PyObject *dict = *dictptr;
    if (dict == NULL) {
      dict = PyDict_New();
      *dictptr = dict;
    }
    return PyDict_SetItem(dict, SWIG_This(), swig_this);
  }
#endif
  return PyObject_SetAttr(inst, SWIG_This(), swig_this);
} 


SWIGINTERN PyObject *
SWIG_Python_InitShadowInstance(PyObject *args) {
  PyObject *obj[2];
  if (!SWIG_Python_UnpackTuple(args, "swiginit", 2, 2, obj)) {
    return NULL;
  } else {
    SwigPyObject *sthis = SWIG_Python_GetSwigThis(obj[0]);
    if (sthis) {
      SwigPyObject_append((PyObject*) sthis, obj[1]);
    } else {
      if (SWIG_Python_SetSwigThis(obj[0], obj[1]) != 0)
        return NULL;
    }
    return SWIG_Py_Void();
  }
}

/* Create a new pointer object */

SWIGRUNTIME PyObject *
SWIG_Python_NewPointerObj(PyObject *self, void *ptr, swig_type_info *type, int flags) {
  SwigPyClientData *clientdata;
  PyObject * robj;
  int own;

  if (!ptr)
    return SWIG_Py_Void();

  clientdata = type ? (SwigPyClientData *)(type->clientdata) : 0;
  own = (flags & SWIG_POINTER_OWN) ? SWIG_POINTER_OWN : 0;
  if (clientdata && clientdata->pytype) {
    SwigPyObject *newobj;
    if (flags & SWIG_BUILTIN_TP_INIT) {
      newobj = (SwigPyObject*) self;
      if (newobj->ptr) {
        PyObject *next_self = clientdata->pytype->tp_alloc(clientdata->pytype, 0);
        while (newobj->next)
	  newobj = (SwigPyObject *) newobj->next;
        newobj->next = next_self;
        newobj = (SwigPyObject *)next_self;
#ifdef SWIGPYTHON_BUILTIN
        newobj->dict = 0;
#endif
      }
    } else {
      newobj = PyObject_New(SwigPyObject, clientdata->pytype);
#ifdef SWIGPYTHON_BUILTIN
      newobj->dict = 0;
#endif
    }
    if (newobj) {
      newobj->ptr = ptr;
      newobj->ty = type;
      newobj->own = own;
      newobj->next = 0;
      return (PyObject*) newobj;
    }
    return SWIG_Py_Void();
  }

  assert(!(flags & SWIG_BUILTIN_TP_INIT));

  robj = SwigPyObject_New(ptr, type, own);
  if (robj && clientdata && !(flags & SWIG_POINTER_NOSHADOW)) {
    PyObject *inst = SWIG_Python_NewShadowInstance(clientdata, robj);
    Py_DECREF(robj);
    robj = inst;
  }
  return robj;
}

/* Create a new packed object */

SWIGRUNTIMEINLINE PyObject *
SWIG_Python_NewPackedObj(void *ptr, size_t sz, swig_type_info *type) {
  return ptr ? SwigPyPacked_New((void *) ptr, sz, type) : SWIG_Py_Void();
}

/* -----------------------------------------------------------------------------*
 *  Get type list 
 * -----------------------------------------------------------------------------*/

#ifdef SWIG_LINK_RUNTIME
void *SWIG_ReturnGlobalTypeList(void *);
#endif

SWIGRUNTIME swig_module_info *
SWIG_Python_GetModule(void *SWIGUNUSEDPARM(clientdata)) {
  static void *type_pointer = (void *)0;
  /* first check if module already created */
  if (!type_pointer) {
#ifdef SWIG_LINK_RUNTIME
    type_pointer = SWIG_ReturnGlobalTypeList((void *)0);
#else
    type_pointer = PyCapsule_Import(SWIGPY_CAPSULE_NAME, 0);
    if (PyErr_Occurred()) {
      PyErr_Clear();
      type_pointer = (void *)0;
    }
#endif
  }
  return (swig_module_info *) type_pointer;
}

SWIGRUNTIME void
SWIG_Python_DestroyModule(PyObject *obj)
{
  swig_module_info *swig_module = (swig_module_info *) PyCapsule_GetPointer(obj, SWIGPY_CAPSULE_NAME);
  swig_type_info **types = swig_module->types;
  size_t i;
  for (i =0; i < swig_module->size; ++i) {
    swig_type_info *ty = types[i];
    if (ty->owndata) {
      SwigPyClientData *data = (SwigPyClientData *) ty->clientdata;
      if (data) SwigPyClientData_Del(data);
    }
  }
  Py_DECREF(SWIG_This());
  Swig_This_global = NULL;
}

SWIGRUNTIME void
SWIG_Python_SetModule(swig_module_info *swig_module) {
#if PY_VERSION_HEX >= 0x03000000
 /* Add a dummy module object into sys.modules */
  PyObject *module = PyImport_AddModule("swig_runtime_data" SWIG_RUNTIME_VERSION);
#else
  static PyMethodDef swig_empty_runtime_method_table[] = { {NULL, NULL, 0, NULL} }; /* Sentinel */
  PyObject *module = Py_InitModule("swig_runtime_data" SWIG_RUNTIME_VERSION, swig_empty_runtime_method_table);
#endif
  PyObject *pointer = PyCapsule_New((void *) swig_module, SWIGPY_CAPSULE_NAME, SWIG_Python_DestroyModule);
  if (pointer && module) {
    PyModule_AddObject(module, "type_pointer_capsule" SWIG_TYPE_TABLE_NAME, pointer);
  } else {
    Py_XDECREF(pointer);
  }
}

/* The python cached type query */
SWIGRUNTIME PyObject *
SWIG_Python_TypeCache(void) {
  static PyObject *SWIG_STATIC_POINTER(cache) = PyDict_New();
  return cache;
}

SWIGRUNTIME swig_type_info *
SWIG_Python_TypeQuery(const char *type)
{
  PyObject *cache = SWIG_Python_TypeCache();
  PyObject *key = SWIG_Python_str_FromChar(type); 
  PyObject *obj = PyDict_GetItem(cache, key);
  swig_type_info *descriptor;
  if (obj) {
    descriptor = (swig_type_info *) PyCapsule_GetPointer(obj, NULL);
  } else {
    swig_module_info *swig_module = SWIG_GetModule(0);
    descriptor = SWIG_TypeQueryModule(swig_module, swig_module, type);
    if (descriptor) {
      obj = PyCapsule_New((void*) descriptor, NULL, NULL);
      PyDict_SetItem(cache, key, obj);
      Py_DECREF(obj);
    }
  }
  Py_DECREF(key);
  return descriptor;
}

/* 
   For backward compatibility only
*/
#define SWIG_POINTER_EXCEPTION  0
#define SWIG_arg_fail(arg)      SWIG_Python_ArgFail(arg)
#define SWIG_MustGetPtr(p, type, argnum, flags)  SWIG_Python_MustGetPtr(p, type, argnum, flags)

SWIGRUNTIME int
SWIG_Python_AddErrMesg(const char* mesg, int infront)
{  
  if (PyErr_Occurred()) {
    PyObject *type = 0;
    PyObject *value = 0;
    PyObject *traceback = 0;
    PyErr_Fetch(&type, &value, &traceback);
    if (value) {
      PyObject *old_str = PyObject_Str(value);
      const char *tmp = SWIG_Python_str_AsChar(old_str);
      const char *errmesg = tmp ? tmp : "Invalid error message";
      Py_XINCREF(type);
      PyErr_Clear();
      if (infront) {
	PyErr_Format(type, "%s %s", mesg, errmesg);
      } else {
	PyErr_Format(type, "%s %s", errmesg, mesg);
      }
      SWIG_Python_str_DelForPy3(tmp);
      Py_DECREF(old_str);
    }
    return 1;
  } else {
    return 0;
  }
}
  
SWIGRUNTIME int
SWIG_Python_ArgFail(int argnum)
{
  if (PyErr_Occurred()) {
    /* add information about failing argument */
    char mesg[256];
    PyOS_snprintf(mesg, sizeof(mesg), "argument number %d:", argnum);
    return SWIG_Python_AddErrMesg(mesg, 1);
  } else {
    return 0;
  }
}

SWIGRUNTIMEINLINE const char *
SwigPyObject_GetDesc(PyObject *self)
{
  SwigPyObject *v = (SwigPyObject *)self;
  swig_type_info *ty = v ? v->ty : 0;
  return ty ? ty->str : "";
}

SWIGRUNTIME void
SWIG_Python_TypeError(const char *type, PyObject *obj)
{
  if (type) {
#if defined(SWIG_COBJECT_TYPES)
    if (obj && SwigPyObject_Check(obj)) {
      const char *otype = (const char *) SwigPyObject_GetDesc(obj);
      if (otype) {
	PyErr_Format(PyExc_TypeError, "a '%s' is expected, 'SwigPyObject(%s)' is received",
		     type, otype);
	return;
      }
    } else 
#endif      
    {
      const char *otype = (obj ? obj->ob_type->tp_name : 0); 
      if (otype) {
	PyObject *str = PyObject_Str(obj);
	const char *cstr = str ? SWIG_Python_str_AsChar(str) : 0;
	if (cstr) {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s(%s)' is received",
		       type, otype, cstr);
          SWIG_Python_str_DelForPy3(cstr);
	} else {
	  PyErr_Format(PyExc_TypeError, "a '%s' is expected, '%s' is received",
		       type, otype);
	}
	Py_XDECREF(str);
	return;
      }
    }   
    PyErr_Format(PyExc_TypeError, "a '%s' is expected", type);
  } else {
    PyErr_Format(PyExc_TypeError, "unexpected type is received");
  }
}


/* Convert a pointer value, signal an exception on a type mismatch */
SWIGRUNTIME void *
SWIG_Python_MustGetPtr(PyObject *obj, swig_type_info *ty, int SWIGUNUSEDPARM(argnum), int flags) {
  void *result;
  if (SWIG_Python_ConvertPtr(obj, &result, ty, flags) == -1) {
    PyErr_Clear();
#if SWIG_POINTER_EXCEPTION
    if (flags) {
      SWIG_Python_TypeError(SWIG_TypePrettyName(ty), obj);
      SWIG_Python_ArgFail(argnum);
    }
#endif
  }
  return result;
}

#ifdef SWIGPYTHON_BUILTIN
SWIGRUNTIME int
SWIG_Python_NonDynamicSetAttr(PyObject *obj, PyObject *name, PyObject *value) {
  PyTypeObject *tp = obj->ob_type;
  PyObject *descr;
  PyObject *encoded_name;
  descrsetfunc f;
  int res = -1;

# ifdef Py_USING_UNICODE
  if (PyString_Check(name)) {
    name = PyUnicode_Decode(PyString_AsString(name), PyString_Size(name), NULL, NULL);
    if (!name)
      return -1;
  } else if (!PyUnicode_Check(name))
# else
  if (!PyString_Check(name))
# endif
  {
    PyErr_Format(PyExc_TypeError, "attribute name must be string, not '%.200s'", name->ob_type->tp_name);
    return -1;
  } else {
    Py_INCREF(name);
  }

  if (!tp->tp_dict) {
    if (PyType_Ready(tp) < 0)
      goto done;
  }

  descr = _PyType_Lookup(tp, name);
  f = NULL;
  if (descr != NULL)
    f = descr->ob_type->tp_descr_set;
  if (!f) {
    if (PyString_Check(name)) {
      encoded_name = name;
      Py_INCREF(name);
    } else {
      encoded_name = PyUnicode_AsUTF8String(name);
      if (!encoded_name)
        return -1;
    }
    PyErr_Format(PyExc_AttributeError, "'%.100s' object has no attribute '%.200s'", tp->tp_name, PyString_AsString(encoded_name));
    Py_DECREF(encoded_name);
  } else {
    res = f(descr, obj, value);
  }
  
  done:
  Py_DECREF(name);
  return res;
}
#endif


#ifdef __cplusplus
}
#endif



#define SWIG_exception_fail(code, msg) do { SWIG_Error(code, msg); SWIG_fail; } while(0) 

#define SWIG_contract_assert(expr, msg) if (!(expr)) { SWIG_Error(SWIG_RuntimeError, msg); SWIG_fail; } else 



#ifdef __cplusplus
extern "C" {
#endif

/* Method creation and docstring support functions */

SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name);
SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);
SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func);

#ifdef __cplusplus
}
#endif


  #define SWIG_exception(code, msg) do { SWIG_Error(code, msg); SWIG_fail;; } while(0) 


/* -------- TYPES TABLE (BEGIN) -------- */

#define SWIGTYPE_p_FILE swig_types[0]
#define SWIGTYPE_p_PyArrayObject swig_types[1]
#define SWIGTYPE_p_a_10__double swig_types[2]
#define SWIGTYPE_p_a_2__double swig_types[3]
#define SWIGTYPE_p_anqfits_t swig_types[4]
#define SWIGTYPE_p_anwcs_t swig_types[5]
#define SWIGTYPE_p_char swig_types[6]
#define SWIGTYPE_p_coadd_t swig_types[7]
#define SWIGTYPE_p_codetree_t swig_types[8]
#define SWIGTYPE_p_dl swig_types[9]
#define SWIGTYPE_p_double swig_types[10]
#define SWIGTYPE_p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double swig_types[11]
#define SWIGTYPE_p_f_int64_t_p_void__int swig_types[12]
#define SWIGTYPE_p_f_int_p_void__int swig_types[13]
#define SWIGTYPE_p_f_p_q_const__sip_t_double_double_double_double_p_void__void swig_types[14]
#define SWIGTYPE_p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void swig_types[15]
#define SWIGTYPE_p_f_p_q_const__void_double_double_p_double_p_double__int swig_types[16]
#define SWIGTYPE_p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char swig_types[17]
#define SWIGTYPE_p_f_p_q_const__void_double_double_p_double_p_double__void swig_types[18]
#define SWIGTYPE_p_fitsbin_t swig_types[19]
#define SWIGTYPE_p_fitstable_t swig_types[20]
#define SWIGTYPE_p_float swig_types[21]
#define SWIGTYPE_p_il swig_types[22]
#define SWIGTYPE_p_index_t swig_types[23]
#define SWIGTYPE_p_int swig_types[24]
#define SWIGTYPE_p_int16_t swig_types[25]
#define SWIGTYPE_p_int32_t swig_types[26]
#define SWIGTYPE_p_int64_t swig_types[27]
#define SWIGTYPE_p_kdtree_t swig_types[28]
#define SWIGTYPE_p_lanczos_args_t swig_types[29]
#define SWIGTYPE_p_ll swig_types[30]
#define SWIGTYPE_p_off_t swig_types[31]
#define SWIGTYPE_p_p_char swig_types[32]
#define SWIGTYPE_p_p_double swig_types[33]
#define SWIGTYPE_p_p_int swig_types[34]
#define SWIGTYPE_p_p_qfits_header swig_types[35]
#define SWIGTYPE_p_pl swig_types[36]
#define SWIGTYPE_p_qfits_header swig_types[37]
#define SWIGTYPE_p_qfits_table swig_types[38]
#define SWIGTYPE_p_qfitsdumper swig_types[39]
#define SWIGTYPE_p_quadfile_t swig_types[40]
#define SWIGTYPE_p_sip_t swig_types[41]
#define SWIGTYPE_p_sl swig_types[42]
#define SWIGTYPE_p_startree_t swig_types[43]
#define SWIGTYPE_p_tan_t swig_types[44]
#define SWIGTYPE_p_tfits_type swig_types[45]
#define SWIGTYPE_p_uint32_t swig_types[46]
#define SWIGTYPE_p_uint8_t swig_types[47]
#define SWIGTYPE_p_unsigned_char swig_types[48]
#define SWIGTYPE_p_unsigned_int swig_types[49]
#define SWIGTYPE_p_void swig_types[50]
static swig_type_info *swig_types[52];
static swig_module_info swig_module = {swig_types, 51, 0, 0, 0, 0};
#define SWIG_TypeQuery(name) SWIG_TypeQueryModule(&swig_module, &swig_module, name)
#define SWIG_MangledTypeQuery(name) SWIG_MangledTypeQueryModule(&swig_module, &swig_module, name)

/* -------- TYPES TABLE (END) -------- */

#ifdef SWIG_TypeQuery
# undef SWIG_TypeQuery
#endif
#define SWIG_TypeQuery SWIG_Python_TypeQuery

/*-----------------------------------------------
              @(target):= _util.so
  ------------------------------------------------*/
#if PY_VERSION_HEX >= 0x03000000
#  define SWIG_init    PyInit__util

#else
#  define SWIG_init    init_util

#endif
#define SWIG_name    "_util"

#define SWIGVERSION 0x040002 
#define SWIG_VERSION SWIGVERSION


#define SWIG_as_voidptr(a) (void *)((const void *)(a)) 
#define SWIG_as_voidptrptr(a) ((void)SWIG_as_voidptr(*a),(void**)(a)) 


// numpy.
#define NPY_NO_DEPRECATED_API NPY_1_7_API_VERSION
#include <numpy/arrayobject.h>

#include <stdint.h>
#include <stdlib.h>
#include <math.h>

#include "os-features.h"
#include "log.h"
#include "healpix.h"
#include "healpix-utils.h"
#include "anwcs.h"
#include "sip.h"
#include "fitsioutils.h"
#include "sip-utils.h"
#include "sip_qfits.h"
#include "index.h"
#include "quadfile.h"
#include "codekd.h"
#include "starkd.h"
#include "starutil.h"
#include "an-bool.h"
#include "ioutils.h"
#include "errors.h"

#include "coadd.h"
#include "wcs-resample.h"
#include "resample.h"
#include "keywords.h"

#include "dimage.h"

#include "fit-wcs.h"

#include "qfits_header.h"
#include "qfits_rw.h"
#include "wcs-pv2sip.h"

#define true 1
#define false 0

// For sip.h
static void checkorder(int i, int j) {
    assert(i >= 0);
    assert(i < SIP_MAXORDER);
    assert(j >= 0);
    assert(j < SIP_MAXORDER);
}

// From index.i:
/**
For returning single codes and quads as python lists, do something like this:

%typemap(out) float [ANY] {
  int i;
  $result = PyList_New($1_dim0);
  for (i = 0; i < $1_dim0; i++) {
    PyObject *o = PyFloat_FromDouble((double) $1[i]);
    PyList_SetItem($result,i,o);
  }
}
**/

double* code_alloc(int DC) {
	 return malloc(DC * sizeof(double));
}
void code_free(double* code) {
	 free(code);
}
double code_get(double* code, int i) {
	return code[i];
}

long codekd_addr(index_t* ind) {
	 return (long)ind->codekd;
}
long starkd_addr(index_t* ind) {
	 return (long)ind->starkd;
}

long quadfile_addr(index_t* ind) {
	 return (long)ind->quads;
}
/*
long qidxfile_addr(qidxfile* qf) {
	 return (long)qf;
}
 */



#include <limits.h>
#if !defined(SWIG_NO_LLONG_MAX)
# if !defined(LLONG_MAX) && defined(__GNUC__) && defined (__LONG_LONG_MAX__)
#   define LLONG_MAX __LONG_LONG_MAX__
#   define LLONG_MIN (-LLONG_MAX - 1LL)
#   define ULLONG_MAX (LLONG_MAX * 2ULL + 1ULL)
# endif
#endif


SWIGINTERN int
SWIG_AsVal_double (PyObject *obj, double *val)
{
  int res = SWIG_TypeError;
  if (PyFloat_Check(obj)) {
    if (val) *val = PyFloat_AsDouble(obj);
    return SWIG_OK;
#if PY_VERSION_HEX < 0x03000000
  } else if (PyInt_Check(obj)) {
    if (val) *val = (double) PyInt_AsLong(obj);
    return SWIG_OK;
#endif
  } else if (PyLong_Check(obj)) {
    double v = PyLong_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    double d = PyFloat_AsDouble(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = d;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      long v = PyLong_AsLong(obj);
      if (!PyErr_Occurred()) {
	if (val) *val = v;
	return SWIG_AddCast(SWIG_AddCast(SWIG_OK));
      } else {
	PyErr_Clear();
      }
    }
  }
#endif
  return res;
}


#include <float.h>


#include <math.h>


SWIGINTERNINLINE int
SWIG_CanCastAsInteger(double *d, double min, double max) {
  double x = *d;
  if ((min <= x && x <= max)) {
   double fx = floor(x);
   double cx = ceil(x);
   double rd =  ((x - fx) < 0.5) ? fx : cx; /* simple rint */
   if ((errno == EDOM) || (errno == ERANGE)) {
     errno = 0;
   } else {
     double summ, reps, diff;
     if (rd < x) {
       diff = x - rd;
     } else if (rd > x) {
       diff = rd - x;
     } else {
       return 1;
     }
     summ = rd + x;
     reps = diff/summ;
     if (reps < 8*DBL_EPSILON) {
       *d = rd;
       return 1;
     }
   }
  }
  return 0;
}


SWIGINTERN int
SWIG_AsVal_long (PyObject *obj, long* val)
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    if (val) *val = PyInt_AsLong(obj);
    return SWIG_OK;
  } else
#endif
  if (PyLong_Check(obj)) {
    long v = PyLong_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    long v = PyInt_AsLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, LONG_MIN, LONG_MAX)) {
	if (val) *val = (long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_int (PyObject * obj, int *val)
{
  long v;
  int res = SWIG_AsVal_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v < INT_MIN || v > INT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = (int)(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE PyObject*
  SWIG_From_int  (int value)
{
  return PyInt_FromLong((long) value);
}


/* Getting isfinite working pre C99 across multiple platforms is non-trivial. Users can provide SWIG_isfinite on older platforms. */
#ifndef SWIG_isfinite
/* isfinite() is a macro for C99 */
# if defined(isfinite)
#  define SWIG_isfinite(X) (isfinite(X))
# elif defined(__cplusplus) && __cplusplus >= 201103L
/* Use a template so that this works whether isfinite() is std::isfinite() or
 * in the global namespace.  The reality seems to vary between compiler
 * versions.
 *
 * Make sure namespace std exists to avoid compiler warnings.
 *
 * extern "C++" is required as this fragment can end up inside an extern "C" { } block
 */
namespace std { }
extern "C++" template<typename T>
inline int SWIG_isfinite_func(T x) {
  using namespace std;
  return isfinite(x);
}
#  define SWIG_isfinite(X) (SWIG_isfinite_func(X))
# elif defined(__GNUC__) && (__GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ >= 2))
#  define SWIG_isfinite(X) (__builtin_isfinite(X))
# elif defined(__clang__) && defined(__has_builtin)
#  if __has_builtin(__builtin_isfinite)
#   define SWIG_isfinite(X) (__builtin_isfinite(X))
#  endif
# elif defined(_MSC_VER)
#  define SWIG_isfinite(X) (_finite(X))
# elif defined(__sun) && defined(__SVR4)
#  include <ieeefp.h>
#  define SWIG_isfinite(X) (finite(X))
# endif
#endif


/* Accept infinite as a valid float value unless we are unable to check if a value is finite */
#ifdef SWIG_isfinite
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX) && SWIG_isfinite(X))
#else
# define SWIG_Float_Overflow_Check(X) ((X < -FLT_MAX || X > FLT_MAX))
#endif


SWIGINTERN int
SWIG_AsVal_float (PyObject * obj, float *val)
{
  double v;
  int res = SWIG_AsVal_double (obj, &v);
  if (SWIG_IsOK(res)) {
    if (SWIG_Float_Overflow_Check(v)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = (float)(v);
    }
  }  
  return res;
}


  #define SWIG_From_double   PyFloat_FromDouble 


#define ERR(x, ...)                             \
    printf(x, ## __VA_ARGS__)

    static void print_array(PyObject* arr) {
        PyArrayObject *obj;
        int i, N;
        PyArray_Descr *desc;
        printf("Array: %p\n", arr);
        if (!arr) return;
        if (!PyArray_Check(arr)) {
            printf("  Not a Numpy Array\n");
            if (arr == Py_None)
                printf("  is None\n");
            return;
        }
        obj = (PyArrayObject*)arr;

        printf("  Contiguous: %s\n",
               PyArray_ISCONTIGUOUS(obj) ? "yes" : "no");
        printf("  Writeable: %s\n",
               PyArray_ISWRITEABLE(obj) ? "yes" : "no");
        printf("  Aligned: %s\n",
               PyArray_ISALIGNED(obj) ? "yes" : "no");
        printf("  C array: %s\n",
               PyArray_ISCARRAY(obj) ? "yes" : "no");

        //printf("  typeobj: %p (float is %p)\n", arr->typeobj,
        //&PyFloat_Type);

        printf("  data: %p\n", PyArray_DATA(obj));
        printf("  N dims: %i\n", PyArray_NDIM(obj));
        N = PyArray_NDIM(obj);
        for (i=0; i<N; i++)
            printf("  dim %i: %i\n", i, (int)PyArray_DIM(obj, i));
        for (i=0; i<N; i++)
            printf("  stride %i: %i\n", i, (int)PyArray_STRIDE(obj, i));
        desc = PyArray_DESCR(obj);
        printf("  descr kind: '%c'\n", desc->kind);
        printf("  descr type: '%c'\n", desc->type);
        printf("  descr byteorder: '%c'\n", desc->byteorder);
        printf("  descr elsize: %i\n", desc->elsize);
    }


    static PyObject* an_hist2d(PyObject* py_arrx, PyObject* py_arry,
                               PyObject* py_hist,
                               double xlo, double xhi,
                               double ylo, double yhi) {
        PyArray_Descr* dtype = NULL;
        PyArray_Descr* itype = NULL;
        int req = NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED |
               NPY_ARRAY_NOTSWAPPED | NPY_ARRAY_ELEMENTSTRIDES;
        int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_WRITEBACKIFCOPY;
        PyArrayObject* np_arrx;
        PyArrayObject* np_arry;
        PyArrayObject* np_hist;
        double *arrx;
        double *arry;
        int32_t *hist;
        int nx, ny;
        double dx, dy, idx, idy;
        int i, N;

        dtype = PyArray_DescrFromType(NPY_DOUBLE);
        itype = PyArray_DescrFromType(NPY_INT32);

        Py_INCREF(dtype);
        np_arrx = (PyArrayObject*)PyArray_FromAny(py_arrx, dtype, 1, 1, req, NULL);
        if (!np_arrx) {
            PyErr_SetString(PyExc_ValueError,"Expected x array to be double");
            Py_DECREF(dtype);
            return NULL;
        }
        N = PyArray_SIZE(np_arrx);

        Py_INCREF(dtype);
        np_arry = (PyArrayObject*)PyArray_FromAny(py_arry, dtype, 1, 1, req, NULL);
        if (!np_arry) {
            PyErr_SetString(PyExc_ValueError,"Expected y array to be double");
            Py_DECREF(dtype);
            Py_DECREF(np_arrx);
            return NULL;
        }
        if (PyArray_SIZE(np_arry) != N) {
            PyErr_SetString(PyExc_ValueError,"Expected x and y arrays to be the same length");
            Py_DECREF(dtype);
            Py_DECREF(np_arrx);
            return NULL;
        }
        Py_CLEAR(dtype);
        Py_INCREF(itype);
        np_hist = (PyArrayObject*)PyArray_FromAny(py_hist, itype, 2, 2, reqout, NULL);
        if (!np_hist) {
            PyErr_SetString(PyExc_ValueError,"Expected hist array to be int32");
            Py_DECREF(np_arrx);
            Py_DECREF(np_arry);
            Py_DECREF(itype);
            return NULL;
        }
        Py_CLEAR(itype);

        ny = PyArray_DIM(np_hist, 0);
        nx = PyArray_DIM(np_hist, 1);
        dx = (xhi - xlo) / (double)nx;
        dy = (yhi - ylo) / (double)ny;
        idx = 1./dx;
        idy = 1./dy;

        hist = PyArray_DATA(np_hist);
        arrx = PyArray_DATA(np_arrx);
        arry = PyArray_DATA(np_arry);

        for (i=0; i<N; i++,
                 arrx++, arry++) {
            double x, y;
            int binx, biny;
            x = *arrx;
            y = *arry;
            if ((x < xlo) || (x > xhi) || (y < ylo) || (y > yhi))
                continue;
            binx = (int)((x - xlo) * idx);
            biny = (int)((y - ylo) * idy);
            // == upper limit
            if (unlikely(binx == nx)) {
                binx--;
            }
            if (unlikely(biny == ny)) {
                biny--;
            }
            hist[biny * nx + binx]++;
        }

        Py_DECREF(np_arrx);
        Py_DECREF(np_arry);
        if (PyArray_ResolveWritebackIfCopy(np_hist) == -1) {
            PyErr_SetString(PyExc_ValueError, "Failed to write-back hist array values!");
            Py_DECREF(np_hist);
            return NULL;
        }
        Py_DECREF(np_hist);
    
        Py_RETURN_NONE;
    }


    static double flat_percentile_f(PyObject* np_arr, double pct) {
        PyArray_Descr* dtype;
        npy_intp N;
        int req = NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED |
            NPY_ARRAY_NOTSWAPPED | NPY_ARRAY_ELEMENTSTRIDES;
        float* x;
        float med = 0;
        int L, R;
        int mid;

        dtype = PyArray_DescrFromType(NPY_FLOAT);
        np_arr  = PyArray_CheckFromAny(np_arr, dtype, 0, 0, req, NULL);
        if (!np_arr) {
            ERR("flat_median_f: Failed to convert array to float\n");
            return 0;
        }
        dtype = NULL;
        N = PyArray_Size(np_arr);
        x = (float*)malloc(sizeof(float) * N);
        memcpy(x, PyArray_DATA((PyArrayObject*)np_arr), sizeof(float)*N);
        Py_DECREF(np_arr);

        {
            int i;
            for (i=0; i<N; i++) {
                if (!isfinite(x[i])) {
                    ERR("flat_median_f cannot handle NaN values (element %i)\n", i);
                    return x[i];
                }
            }
        }

        // Pseudocode from wikipedia's 'Selection algorithm' page
        L = 0;
        R = (int)(N-1);
        mid = (int)(pct * 0.01 * N);
        if (mid < 0) {
            mid = 0;
        }
        if (mid >= R) {
            mid = R;
        }
        while (L < R) {
            int ipivot;
            int i,j;
            int k;
            float pivot;
            //printf("L=%i, R=%i (N=%i), mid=%i\n", L, R, 1+R-L, mid);
            ipivot = random() % (1+R-L) + L;
            pivot = x[ipivot];
            // partition array...
            i = L;
            j = R;
            do {
                // scan for elements out of place
                // scan from the left:
                while (x[i] < pivot)
                    i++;
                // scan from the right:
                while (x[j] >= pivot && j>i)
                    j--;
                // now x[i] >= pivot
                // and (x[j] < pivot) OR j == i
                assert(x[i] >= pivot);
                assert((x[j] < pivot) || (j == i));
                assert(j >= i);
                if (i < j) {
                    // swap
                    float tmp = x[i];
                    x[i] = x[j];
                    x[j] = tmp;
                }
            } while (i < j);
            {
                for (k=L; k<i; k++) {
                    assert(x[k] < pivot);
                }
                for (k=i; k<=R; k++) {
                    assert(x[k] >= pivot);
                }
            }
            // partition the right partition into == and >
            j = i;
            k = R;
            do {
                // scan for elements out of place
                // scan from the right:
                while (x[k] > pivot)
                    k--;
                // scan from the left:
                while (x[j] == pivot && j<k)
                    j++;

                assert(x[k] == pivot);
                assert((x[j] > pivot) || (j == k));
                assert(k >= j);
                if (j < k) {
                    // swap
                    float tmp = x[j];
                    x[j] = x[k];
                    x[k] = tmp;
                }
            } while (j < k);

            j = k+1;

            {
                //printf("L=%i, i=%i, j=%i, k=%i, R=%i\n", L, i, j, k, R);
                for (k=L; k<i; k++) {
                    assert(x[k] < pivot);
                }
                for (k=i; k<j; k++) {
                    assert(x[k] == pivot);
                }
                for (k=j; k<=R; k++) {
                    assert(x[k] > pivot);
                }
            }



            // there must be at least one element in the right partitions
            assert(i <= R);

            // there must be at least one element in the middle partition
            assert(j-i >= 1);

            if (mid < i)
                // the median is in the left partition (< pivot)
                R = i-1;
            else if (mid >= j)
                // the median is in the right partition (> pivot)
                L = j;
            else {
                // the median is in the middle partition (== pivot)
                L = R = i;
                break;
            }
            assert(L <= mid);
            assert(R >= mid);
        }
        med = x[mid];
        free(x);
        return med;
    }

    static double flat_median_f(PyObject* np_arr) {
        return flat_percentile_f(np_arr, 50.0);
    }

    static int median_smooth(PyObject* py_image,
                             PyObject* py_mask,
                             int halfbox,
                             PyObject* py_smooth) {
        /*

         image: np.float32
         mask: bool or uint8; 1 to IGNORE.
         smooth: np.float32; output array.

         */
        PyArrayObject* np_image  = (PyArrayObject*)py_image;
        PyArrayObject* np_mask   = (PyArrayObject*)py_mask;
        PyArrayObject* np_smooth = (PyArrayObject*)py_smooth;

        if (!PyArray_Check(np_image) ||
            !PyArray_Check(np_smooth) ||
            !PyArray_ISNOTSWAPPED(np_image) ||
            !PyArray_ISNOTSWAPPED(np_smooth ) ||
            !PyArray_ISFLOAT(np_image) ||
            !PyArray_ISFLOAT(np_smooth ) ||
            (PyArray_ITEMSIZE(np_image) != sizeof(float)) ||
            (PyArray_ITEMSIZE(np_smooth ) != sizeof(float)) ||
            !(PyArray_NDIM(np_image) == 2) ||
            !(PyArray_NDIM(np_smooth ) == 2) ||
            !PyArray_ISCONTIGUOUS(np_image) ||
            !PyArray_ISCONTIGUOUS(np_smooth ) ||
            !PyArray_ISWRITEABLE(np_smooth)) {
            ERR("median_smooth: array type checks failed for image/smooth\n");
            ERR("check %i %i notswapped %i %i isfloat %i %i size %i %i ndim %i %i contig %i %i writable %i\n",
                PyArray_Check(np_image), PyArray_Check(np_smooth),
                PyArray_ISNOTSWAPPED(np_image), PyArray_ISNOTSWAPPED(np_smooth ),
                PyArray_ISFLOAT(np_image), PyArray_ISFLOAT(np_smooth),
                (PyArray_ITEMSIZE(np_image) == sizeof(float)),
                (PyArray_ITEMSIZE(np_smooth) == sizeof(float)),
                (PyArray_NDIM(np_image) == 2),
                (PyArray_NDIM(np_smooth ) == 2),
                PyArray_ISCONTIGUOUS(np_image),
                PyArray_ISCONTIGUOUS(np_smooth),
                PyArray_ISWRITEABLE(np_smooth));
            return -1;
        }
        if ((PyObject*)np_mask != Py_None) {
            if (!PyArray_Check(np_mask) ||
                !PyArray_ISNOTSWAPPED(np_mask) ||
                !PyArray_ISBOOL(np_mask) ||
                (PyArray_ITEMSIZE(np_mask) != sizeof(uint8_t)) ||
                !(PyArray_NDIM(np_mask) == 2) ||
                !PyArray_ISCONTIGUOUS(np_mask)) {
                ERR("median_smooth: array type checks failed for mask\n");
                return -1;
            }
        }
        npy_intp NX, NY;
        const float* image;
        float* smooth;
        const uint8_t* maskimg = NULL;

        NY = PyArray_DIM(np_image, 0);
        NX = PyArray_DIM(np_image, 1);
        if ((PyArray_DIM(np_smooth, 0) != NY) ||
            (PyArray_DIM(np_smooth, 1) != NX)) {
            ERR("median_smooth: 'smooth' array is wrong shape\n");
            return -1;
        }
        image = PyArray_DATA(np_image);
        smooth = PyArray_DATA(np_smooth);

        if ((PyObject*)np_mask != Py_None) {
            if ((PyArray_DIM(np_mask, 0) != NY) ||
                (PyArray_DIM(np_mask, 1) != NX)) {
                ERR("median_smooth: 'mask' array is wrong shape\n");
                return -1;
            }
            maskimg = PyArray_DATA(np_mask);
        }

        dmedsmooth(image, maskimg, (int)NX, (int)NY, halfbox, smooth);

        return 0;
    }

#define L 5

    static PyObject*lanczos5_interpolate(PyObject* np_ixi, PyObject* np_iyi,
                                         PyObject* np_dx, PyObject* np_dy,
                                         PyObject* loutputs, PyObject* linputs);
    static PyObject* lanczos5_interpolate_grid(float x0, float xstep,
                                               float y0, float ystep,
                                               PyObject* output_img,
                                               PyObject* input_img);
#include "lanczos.i"
#undef L

#define L 3

    static PyObject* lanczos3_interpolate(PyObject* np_ixi, PyObject* np_iyi,
                                          PyObject* np_dx, PyObject* np_dy,
                                          PyObject* loutputs, PyObject* linputs);
    static PyObject* lanczos3_interpolate_grid(float x0, float xstep,
                                               float y0, float ystep,
                                               PyObject* output_img,
                                               PyObject* input_img);
#include "lanczos.i"
#undef L

    static int lanczos5_filter(PyObject* py_dx, PyObject* py_f) {
        npy_intp N;
        npy_intp i;
        float* dx;
        float* f;

        PyArrayObject *np_dx = (PyArrayObject*)py_dx;
        PyArrayObject *np_f  = (PyArrayObject*)py_f;

        if (!PyArray_Check(np_dx) ||
            !PyArray_Check(np_f ) ||
            !PyArray_ISNOTSWAPPED(np_dx) ||
            !PyArray_ISNOTSWAPPED(np_f ) ||
            !PyArray_ISFLOAT(np_dx) ||
            !PyArray_ISFLOAT(np_f ) ||
            (PyArray_ITEMSIZE(np_dx) != sizeof(float)) ||
            (PyArray_ITEMSIZE(np_f ) != sizeof(float)) ||
            !(PyArray_NDIM(np_dx) == 1) ||
            !(PyArray_NDIM(np_f ) == 1) ||
            !PyArray_ISCONTIGUOUS(np_dx) ||
            !PyArray_ISCONTIGUOUS(np_f ) ||
            !PyArray_ISWRITEABLE(np_f)
            ) {
            ERR("Arrays aren't right type\n");
            return -1;
        }
        N = PyArray_DIM(np_dx, 0);
        if (PyArray_DIM(np_f, 0) != N) {
            ERR("Input and output must have same dimensions\n");
            return -1;
        }
        dx = PyArray_DATA(np_dx);
        f = PyArray_DATA(np_f);
        const double fifthpi = M_PI / 5.0;
        const double pisq = M_PI * M_PI;
        const double fiveopisq = 5. / pisq;
        for (i=N; i>0; i--, dx++, f++) {
            double x = *dx;
            if (x < -5.0 || x > 5.0) {
                *f = 0.0;
            } else if (x == 0) {
                *f = 1.0;
            } else {
                *f = fiveopisq * sin(M_PI * x) * sin(fifthpi * x) / (x * x);
            }
        }
        return 0;
    }

    static int lanczos3_filter(PyObject* py_dx, PyObject* py_f) {
        npy_intp N;
        npy_intp i;
        float* dx;
        float* f;

        PyArrayObject *np_dx = (PyArrayObject*)py_dx;
        PyArrayObject *np_f  = (PyArrayObject*)py_f;

        if (!PyArray_Check(np_dx) ||
            !PyArray_Check(np_f ) ||
            !PyArray_ISNOTSWAPPED(np_dx) ||
            !PyArray_ISNOTSWAPPED(np_f ) ||
            !PyArray_ISFLOAT(np_dx) ||
            !PyArray_ISFLOAT(np_f ) ||
            (PyArray_ITEMSIZE(np_dx) != sizeof(float)) ||
            (PyArray_ITEMSIZE(np_f ) != sizeof(float)) ||
            !(PyArray_NDIM(np_dx) == 1) ||
            !(PyArray_NDIM(np_f ) == 1) ||
            !PyArray_ISCONTIGUOUS(np_dx) ||
            !PyArray_ISCONTIGUOUS(np_f ) ||
            !PyArray_ISWRITEABLE(np_f)
            ) {
            ERR("Arrays aren't right type\n");
            return -1;
        }
        N = PyArray_DIM(np_dx, 0);
        if (PyArray_DIM(np_f, 0) != N) {
            ERR("Input and output must have same dimensions\n");
            return -1;
        }
        dx = PyArray_DATA(np_dx);
        f = PyArray_DATA(np_f);
        const double thirdpi = M_PI / 3.0;
        const double pisq = M_PI * M_PI;
        const double threeopisq = 3. / pisq;
        for (i=N; i>0; i--, dx++, f++) {
            double x = *dx;
            if (x < -3.0 || x > 3.0) {
                *f = 0.0;
            } else if (x == 0) {
                *f = 1.0;
            } else {
                *f = threeopisq * sin(M_PI * x) * sin(thirdpi * x) / (x * x);
            }
        }
        return 0;
    }

    static int lanczos3_filter_table(PyObject* py_dx, PyObject* py_f, int rangecheck) {
        npy_intp N;
        npy_intp i;
        float* dx;
        float* f;

        PyArrayObject *np_dx = (PyArrayObject*)py_dx;
        PyArrayObject *np_f  = (PyArrayObject*)py_f;

        // Nlutunit is number of bins per unit x
        static const int Nlutunit = 1024;
        static const float lut0 = -4.;
        static const int Nlut = 8192; //8 * Nlutunit;
        // We want bins to go from -4 to 4 (Lanczos-3 range of -3 to 3, plus some buffer)
        // [Nlut]
        static float lut[8192];
        static int initialized = 0;

        if (!initialized) {
            for (i=0; i<(Nlut); i++) {
                float x,f;
                x = (lut0 + (i / (float)Nlutunit));
                if (x <= -3.0 || x >= 3.0) {
                    f = 0.0;
                } else if (x == 0) {
                    f = 1.0;
                } else {
                    f = 3. * sin(M_PI * x) * sin(M_PI / 3.0 * x) / (M_PI * M_PI * x * x);
                }
                lut[i] = f;
            }
            initialized = 1;
        }

        if (!PyArray_Check(np_dx) ||
            !PyArray_Check(np_f )) {
            ERR("Array check\n");
        }
        if (!PyArray_ISNOTSWAPPED(np_dx) ||
            !PyArray_ISNOTSWAPPED(np_f )) {
            ERR("Swapped\n");
        }
        if (!PyArray_ISFLOAT(np_dx) ||
            !PyArray_ISFLOAT(np_f )) {
            ERR("Float\n");
        }
        if ((PyArray_ITEMSIZE(np_dx) != sizeof(float)) ||
            (PyArray_ITEMSIZE(np_f ) != sizeof(float))) {
            ERR("sizeof float\n");
        }
        if ((PyArray_ITEMSIZE(np_dx) != sizeof(float))) {
            ERR("sizeof dx %i\n", (int)PyArray_ITEMSIZE(np_dx));
        }
        if ((PyArray_ITEMSIZE(np_f ) != sizeof(float))) {
            ERR("sizeof f %i\n", (int)PyArray_ITEMSIZE(np_f));
        }
        if (!(PyArray_NDIM(np_dx) == 1) ||
            !(PyArray_NDIM(np_f ) == 1)) {
            ERR("one-d\n");
        }
        if (!PyArray_ISCONTIGUOUS(np_dx) ||
            !PyArray_ISCONTIGUOUS(np_f )) {
            ERR("contig\n");
        }
        if (!PyArray_ISWRITEABLE(np_f)) {
            ERR("writable\n");
        }


        if (!PyArray_Check(np_dx) ||
            !PyArray_Check(np_f ) ||
            !PyArray_ISNOTSWAPPED(np_dx) ||
            !PyArray_ISNOTSWAPPED(np_f ) ||
            !PyArray_ISFLOAT(np_dx) ||
            !PyArray_ISFLOAT(np_f ) ||
            (PyArray_ITEMSIZE(np_dx) != sizeof(float)) ||
            (PyArray_ITEMSIZE(np_f ) != sizeof(float)) ||
            !(PyArray_NDIM(np_dx) == 1) ||
            !(PyArray_NDIM(np_f ) == 1) ||
            !PyArray_ISCONTIGUOUS(np_dx) ||
            !PyArray_ISCONTIGUOUS(np_f ) ||
            !PyArray_ISWRITEABLE(np_f)
            ) {
            ERR("Arrays aren't right type\n");
            return -1;
        }
        N = PyArray_DIM(np_dx, 0);
        if (PyArray_DIM(np_f, 0) != N) {
            ERR("Input and output must have same dimensions\n");
            return -1;
        }
        dx = PyArray_DATA(np_dx);
        f = PyArray_DATA(np_f);
        if (rangecheck) {
            for (i=N; i>0; i--, dx++, f++) {
                float x = *dx;
                int li = (int)((x - lut0) * Nlutunit);
                if ((li < 0) || (li >= Nlut)) {
                    *f = 0.0;
                } else {
                    *f = lut[li];
                }
            }
        } else {
            for (i=N; i>0; i--, dx++, f++) {
                float x = *dx;
                int li = (int)((x - lut0) * Nlutunit);
                *f = lut[li];
            }
        }
        return 0;
    }

    static int lanczos_shift_image_c(PyObject* py_img,
                                     PyObject* py_weight,
                                     PyObject* py_outimg,
                                     PyObject* py_outweight,
                                     int order, double dx, double dy) {
        int W,H;
        int i,j;

        lanczos_args_t lanczos;

        PyArray_Descr* dtype;
        int req = NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED |
               NPY_ARRAY_NOTSWAPPED | NPY_ARRAY_ELEMENTSTRIDES;
        int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_WRITEBACKIFCOPY;
        double *img, *weight, *outimg, *outweight;

        PyArrayObject *np_img=NULL, *np_weight=NULL, *np_outimg=NULL, *np_outweight=NULL;

        weight = NULL;
        outweight = NULL;
        lanczos.order = order;

        /*
         printf("np_img:\n");
         print_array(np_img);
         printf("np_weight:\n");
         print_array(np_weight);
         printf("np_outimg:\n");
         print_array(np_outimg);
         printf("np_outweight:\n");
         print_array(np_outweight);
         */

        dtype = PyArray_DescrFromType(NPY_DOUBLE);
        Py_INCREF(dtype);
        np_img = (PyArrayObject*)PyArray_CheckFromAny(py_img, dtype, 2, 2, req, NULL);
        if (py_weight != Py_None) {
            Py_INCREF(dtype);
            np_weight = (PyArrayObject*)PyArray_CheckFromAny(py_weight, dtype, 2, 2, req, NULL);
            if (!np_weight) {
                ERR("Failed to run PyArray_FromAny on np_weight\n");
                return -1;
            }
        }
        Py_INCREF(dtype);
        np_outimg = (PyArrayObject*)PyArray_CheckFromAny(py_outimg, dtype, 2, 2, reqout, NULL);
        if (py_outweight != Py_None) {
            Py_INCREF(dtype);
            np_outweight = (PyArrayObject*)PyArray_CheckFromAny(py_outweight, dtype, 2, 2, reqout, NULL);
        }
        Py_DECREF(dtype);
        dtype = NULL;

        if (!np_img || !np_outimg ||
            ((py_outweight != Py_None) && !np_outweight)) {
            ERR("Failed to PyArray_FromAny the images (np_img=%p, np_outimg=%p, np_outweight=%p)\n",
                np_img, np_outimg, np_outweight);
            return -1;
        }

        H = (int)PyArray_DIM(np_img, 0);
        W = (int)PyArray_DIM(np_img, 1);

        if ((PyArray_DIM(np_outimg, 0) != H) ||
            (PyArray_DIM(np_outimg, 1) != W)) {
            ERR("All images must have the same dimensions.\n");
            return -1;
        }
        if (np_weight) {
            if ((PyArray_DIM(np_weight, 0) != H) ||
                (PyArray_DIM(np_weight, 1) != W)) {
                ERR("All images must have the same dimensions.\n");
                return -1;
            }
            weight = PyArray_DATA(np_weight);
        }
        if (np_outweight) {
            if ((PyArray_DIM(np_outweight, 0) != H) ||
                (PyArray_DIM(np_outweight, 1) != W)) {
                ERR("All images must have the same dimensions.\n");
                return -1;
            }
            outweight = PyArray_DATA(np_outweight);
        }

        /*
         printf("np_img:\n");
         print_array(np_img);
         printf("np_weight:\n");
         print_array(np_weight);
         printf("np_outimg:\n");
         print_array(np_outimg);
         printf("np_outweight:\n");
         print_array(np_outweight);
         printf("weight = %p, outweight = %p\n", weight, outweight);
         */

        img       = PyArray_DATA(np_img);
        outimg    = PyArray_DATA(np_outimg);

        for (i=0; i<H; i++) {
            for (j=0; j<W; j++) {
                double wt, val;
                double px, py;
                px = j - dx;
                py = i - dy;
                val = lanczos_resample_d(px, py, img, weight, W, H, &wt,
                                         &lanczos);
                //printf("pixel %i,%i: wt %g\n", j, i, wt);
                if (outweight) {
                    outimg[i*W + j] = val;
                    outweight[i*W + j] = wt;
                } else {
                    outimg[i*W + j] = val / wt;
                }
            }
        }

        /*
         if (np_img != Py_None) {
         Py_XDECREF(np_img);
         }
         if (np_weight != Py_None) {
         Py_XDECREF(np_weight);
         }
         if (np_outweight != Py_None) {
         Py_XDECREF(np_outweight);
         }
         if (np_outimg != Py_None) {
         Py_XDECREF(np_outimg);
         }
         */
        if (PyArray_ResolveWritebackIfCopy(np_outimg) == -1) {
            PyErr_SetString(PyExc_ValueError, "Failed to write-back output image!");
            Py_DECREF(np_outimg);
            return -1;
        }

        return 0;
    }
    

SWIGINTERN swig_type_info*
SWIG_pchar_descriptor(void)
{
  static int init = 0;
  static swig_type_info* info = 0;
  if (!init) {
    info = SWIG_TypeQuery("_p_char");
    init = 1;
  }
  return info;
}


SWIGINTERN int
SWIG_AsCharPtrAndSize(PyObject *obj, char** cptr, size_t* psize, int *alloc)
{
#if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
  if (PyBytes_Check(obj))
#else
  if (PyUnicode_Check(obj))
#endif
#else  
  if (PyString_Check(obj))
#endif
  {
    char *cstr; Py_ssize_t len;
    int ret = SWIG_OK;
#if PY_VERSION_HEX>=0x03000000
#if !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    if (!alloc && cptr) {
        /* We can't allow converting without allocation, since the internal
           representation of string in Python 3 is UCS-2/UCS-4 but we require
           a UTF-8 representation.
           TODO(bhy) More detailed explanation */
        return SWIG_RuntimeError;
    }
    obj = PyUnicode_AsUTF8String(obj);
    if (!obj)
      return SWIG_TypeError;
    if (alloc)
      *alloc = SWIG_NEWOBJ;
#endif
    if (PyBytes_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#else
    if (PyString_AsStringAndSize(obj, &cstr, &len) == -1)
      return SWIG_TypeError;
#endif
    if (cptr) {
      if (alloc) {
	if (*alloc == SWIG_NEWOBJ) {
	  *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
	  *alloc = SWIG_NEWOBJ;
	} else {
	  *cptr = cstr;
	  *alloc = SWIG_OLDOBJ;
	}
      } else {
#if PY_VERSION_HEX>=0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
	*cptr = PyBytes_AsString(obj);
#else
	assert(0); /* Should never reach here with Unicode strings in Python 3 */
#endif
#else
	*cptr = SWIG_Python_str_AsChar(obj);
        if (!*cptr)
          ret = SWIG_TypeError;
#endif
      }
    }
    if (psize) *psize = len + 1;
#if PY_VERSION_HEX>=0x03000000 && !defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
    Py_XDECREF(obj);
#endif
    return ret;
  } else {
#if defined(SWIG_PYTHON_2_UNICODE)
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
#error "Cannot use both SWIG_PYTHON_2_UNICODE and SWIG_PYTHON_STRICT_BYTE_CHAR at once"
#endif
#if PY_VERSION_HEX<0x03000000
    if (PyUnicode_Check(obj)) {
      char *cstr; Py_ssize_t len;
      if (!alloc && cptr) {
        return SWIG_RuntimeError;
      }
      obj = PyUnicode_AsUTF8String(obj);
      if (!obj)
        return SWIG_TypeError;
      if (PyString_AsStringAndSize(obj, &cstr, &len) != -1) {
        if (cptr) {
          if (alloc) *alloc = SWIG_NEWOBJ;
          *cptr = (char *)memcpy(malloc((len + 1)*sizeof(char)), cstr, sizeof(char)*(len + 1));
        }
        if (psize) *psize = len + 1;

        Py_XDECREF(obj);
        return SWIG_OK;
      } else {
        Py_XDECREF(obj);
      }
    }
#endif
#endif

    swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
    if (pchar_descriptor) {
      void* vptr = 0;
      if (SWIG_ConvertPtr(obj, &vptr, pchar_descriptor, 0) == SWIG_OK) {
	if (cptr) *cptr = (char *) vptr;
	if (psize) *psize = vptr ? (strlen((char *)vptr) + 1) : 0;
	if (alloc) *alloc = SWIG_OLDOBJ;
	return SWIG_OK;
      }
    }
  }
  return SWIG_TypeError;
}





SWIGINTERNINLINE PyObject *
SWIG_FromCharPtrAndSize(const char* carray, size_t size)
{
  if (carray) {
    if (size > INT_MAX) {
      swig_type_info* pchar_descriptor = SWIG_pchar_descriptor();
      return pchar_descriptor ? 
	SWIG_InternalNewPointerObj((char *)(carray), pchar_descriptor, 0) : SWIG_Py_Void();
    } else {
#if PY_VERSION_HEX >= 0x03000000
#if defined(SWIG_PYTHON_STRICT_BYTE_CHAR)
      return PyBytes_FromStringAndSize(carray, (Py_ssize_t)(size));
#else
      return PyUnicode_DecodeUTF8(carray, (Py_ssize_t)(size), "surrogateescape");
#endif
#else
      return PyString_FromStringAndSize(carray, (Py_ssize_t)(size));
#endif
    }
  } else {
    return SWIG_Py_Void();
  }
}


SWIGINTERNINLINE PyObject * 
SWIG_FromCharPtr(const char *cptr)
{ 
  return SWIG_FromCharPtrAndSize(cptr, (cptr ? strlen(cptr) : 0));
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_long (PyObject *obj, unsigned long *val) 
{
#if PY_VERSION_HEX < 0x03000000
  if (PyInt_Check(obj)) {
    long v = PyInt_AsLong(obj);
    if (v >= 0) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      return SWIG_OverflowError;
    }
  } else
#endif
  if (PyLong_Check(obj)) {
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      return SWIG_OverflowError;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    int dispatch = 0;
    unsigned long v = PyLong_AsUnsignedLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_AddCast(SWIG_OK);
    } else {
      PyErr_Clear();
    }
    if (!dispatch) {
      double d;
      int res = SWIG_AddCast(SWIG_AsVal_double (obj,&d));
      if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, ULONG_MAX)) {
	if (val) *val = (unsigned long)(d);
	return res;
      }
    }
  }
#endif
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_char (PyObject * obj, unsigned char *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v > UCHAR_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = (unsigned char)(v);
    }
  }  
  return res;
}


  #define SWIG_From_long   PyInt_FromLong 


SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long  (unsigned long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLong(value) : PyInt_FromLong((long)(value));
}


SWIGINTERNINLINE PyObject *
SWIG_From_unsigned_SS_char  (unsigned char value)
{    
  return SWIG_From_unsigned_SS_long  (value);
}


SWIGINTERN int
SWIG_AsVal_unsigned_SS_int (PyObject * obj, unsigned int *val)
{
  unsigned long v;
  int res = SWIG_AsVal_unsigned_SS_long (obj, &v);
  if (SWIG_IsOK(res)) {
    if ((v > UINT_MAX)) {
      return SWIG_OverflowError;
    } else {
      if (val) *val = (unsigned int)(v);
    }
  }  
  return res;
}


SWIGINTERNINLINE PyObject*
  SWIG_From_unsigned_SS_int  (unsigned int value)
{
  return PyInt_FromSize_t((size_t) value);
}

SWIGINTERN struct anwcs_t *new_anwcs_t(char *fn,int ext,int slen){
        if ((ext == -1) ||
            (starts_with(fn, "SIMPLE  =") && !file_exists(fn))) {
            // assume header string
            if (slen == 0) {
                 slen = (int)strlen(fn);
            }
            return anwcs_wcslib_from_string(fn, slen);
        }
        anwcs_t* w = anwcs_open(fn, ext);
        return w;
    }
SWIGINTERN void delete_anwcs_t(struct anwcs_t *self){ free(self); }
SWIGINTERN double anwcs_t_pixel_scale(struct anwcs_t *self){ return anwcs_pixel_scale(self); }
SWIGINTERN void anwcs_t_get_center(struct anwcs_t *self,double *p_ra,double *p_dec){
        anwcs_get_radec_center_and_radius(self, p_ra, p_dec, NULL);
    }
SWIGINTERN void anwcs_t_get_radius(struct anwcs_t *self,double *p_radius){
      anwcs_get_radec_center_and_radius(self, NULL, NULL, p_radius);
    }
SWIGINTERN anbool anwcs_t_is_inside(struct anwcs_t *self,double ra,double dec){
        return anwcs_radec_is_inside_image(self, ra, dec);
    }
SWIGINTERN double anwcs_t_get_width(struct anwcs_t *self){
        return anwcs_imagew(self);
    }
SWIGINTERN double anwcs_t_get_height(struct anwcs_t *self){
        return anwcs_imageh(self);
    }
SWIGINTERN void anwcs_t_set_width(struct anwcs_t *self,int W){
        int H = anwcs_imageh(self);
        anwcs_set_size(self, W, H);
    }
SWIGINTERN void anwcs_t_set_height(struct anwcs_t *self,int H){
        int W = anwcs_imagew(self);
        anwcs_set_size(self, W, H);
    }
SWIGINTERN void anwcs_t_pixelxy2radec(struct anwcs_t *self,double x,double y,double *p_ra,double *p_dec){
        anwcs_pixelxy2radec(self, x, y, p_ra, p_dec);
    }
SWIGINTERN int anwcs_t_radec2pixelxy(struct anwcs_t *self,double ra,double dec,double *p_x,double *p_y){
        return anwcs_radec2pixelxy(self, ra, dec, p_x, p_y);
    }
SWIGINTERN int anwcs_t_write_to(struct anwcs_t *self,char const *filename){
        return anwcs_write(self, filename);
    }
SWIGINTERN tan_t *new_tan_t__SWIG_0(char *fn,int ext,int only){
        tan_t* t = NULL;
        if (fn) {
            if (only) {
                t = tan_read_header_file_ext_only(fn, ext, NULL);
            } else {
                t = tan_read_header_file_ext(fn, ext, NULL);
            }
        } else {
            t = (tan_t*)calloc(1, sizeof(tan_t));
        }
    //      printf("tan_t: %p\n", t);
        if (!t) {
            // SWIG_exception(SWIG_RuntimeError, "Failed to read TAN WCS header");
            PyErr_SetString(PyExc_RuntimeError, "Failed to read TAN WCS header");
            return NULL;
        }
        return t;
    }
SWIGINTERN tan_t *new_tan_t__SWIG_1(double crval1,double crval2,double crpix1,double crpix2,double cd11,double cd12,double cd21,double cd22,double imagew,double imageh){
        tan_t* t = (tan_t*)calloc(1, sizeof(tan_t));
        t->crval[0] = crval1;
        t->crval[1] = crval2;
        t->crpix[0] = crpix1;
        t->crpix[1] = crpix2;
        t->cd[0][0] = cd11;
        t->cd[0][1] = cd12;
        t->cd[1][0] = cd21;
        t->cd[1][1] = cd22;
        t->imagew = imagew;
        t->imageh = imageh;
        return t;
    }
SWIGINTERN tan_t *new_tan_t__SWIG_2(tan_t const *other){
        tan_t* t = (tan_t*)calloc(1, sizeof(tan_t));
        memcpy(t, other, sizeof(tan_t));
        return t;
    }
SWIGINTERN tan_t *new_tan_t__SWIG_3(qfits_header const *hdr){
        tan_t* t = tan_read_header(hdr, NULL);
        return t;
    }
SWIGINTERN void delete_tan_t(tan_t *self){ free(self); }
SWIGINTERN void tan_t_set(tan_t *self,double crval1,double crval2,double crpix1,double crpix2,double cd11,double cd12,double cd21,double cd22,double imagew,double imageh){
        self->crval[0] = crval1;
        self->crval[1] = crval2;
        self->crpix[0] = crpix1;
        self->crpix[1] = crpix2;
        self->cd[0][0] = cd11;
        self->cd[0][1] = cd12;
        self->cd[1][0] = cd21;
        self->cd[1][1] = cd22;
        self->imagew = imagew;
        self->imageh = imageh;
    }
SWIGINTERN anbool tan_t_is_inside(tan_t *self,double ra,double dec){
        return tan_is_inside_image(self, ra, dec);
    }
SWIGINTERN tan_t *tan_t_scale(tan_t *self,double factor){
        tan_t* t = (tan_t*)calloc(1, sizeof(tan_t));
        tan_scale(self, t, factor);
        return t;
    }
SWIGINTERN tan_t *tan_t_rotate(tan_t *self,double angle_deg){
        tan_t* t = (tan_t*)calloc(1, sizeof(tan_t));
        tan_rotate(self, t, angle_deg);
        return t;
    }
SWIGINTERN double tan_t_get_width(tan_t *self){
        return self->imagew;
    }
SWIGINTERN double tan_t_get_height(tan_t *self){
        return self->imageh;
    }
SWIGINTERN void tan_t_set_width(tan_t *self,double x){
        self->imagew = x;
    }
SWIGINTERN void tan_t_set_height(tan_t *self,double x){
        self->imageh = x;
    }
SWIGINTERN double tan_t_pixel_scale(tan_t *self){ return tan_pixel_scale(self); }
SWIGINTERN void tan_t_radec_center(tan_t *self,double *p_ra,double *p_dec){
        tan_get_radec_center(self, p_ra, p_dec);
    }
SWIGINTERN double tan_t_radius(tan_t *self){
        return tan_get_radius_deg(self);
    }
SWIGINTERN void tan_t_xyzcenter(tan_t *self,double *p_x,double *p_y,double *p_z){
        double xyz[3];
        tan_pixelxy2xyzarr(self, 0.5+self->imagew/2.0, 0.5+self->imageh/2.0, xyz);
        *p_x = xyz[0];
        *p_y = xyz[1];
        *p_z = xyz[2];
    }
SWIGINTERN void tan_t_pixelxy2xyz(tan_t *self,double x,double y,double *p_x,double *p_y,double *p_z){
        double xyz[3];
        tan_pixelxy2xyzarr(self, x, y, xyz);
        *p_x = xyz[0];
        *p_y = xyz[1];
        *p_z = xyz[2];
    }
SWIGINTERN void tan_t_pixelxy2radec(tan_t *self,double x,double y,double *p_ra,double *p_dec){
        tan_pixelxy2radec(self, x, y, p_ra, p_dec);
    }
SWIGINTERN int tan_t_radec2pixelxy(tan_t *self,double ra,double dec,double *p_x,double *p_y){
        return tan_radec2pixelxy(self, ra, dec, p_x, p_y);
    }
SWIGINTERN void tan_t_iwc2pixelxy(tan_t *self,double u,double v,double *p_x,double *p_y){
        tan_iwc2pixelxy(self, u, v, p_x, p_y);
    }
SWIGINTERN void tan_t_pixelxy2iwc(tan_t *self,double x,double y,double *p_x,double *p_y){
        tan_pixelxy2iwc(self, x, y, p_x, p_y);
    }
SWIGINTERN void tan_t_iwc2radec(tan_t *self,double u,double v,double *p_ra,double *p_dec){
        tan_iwc2radec(self, u, v, p_ra, p_dec);
    }
SWIGINTERN int tan_t_radec2iwc(tan_t *self,double ra,double dec,double *p_x,double *p_y){
        return tan_radec2iwc(self, ra, dec, p_x, p_y);
    }
SWIGINTERN int tan_t_xyz2pixelxy(tan_t *self,double x,double y,double z,double *p_x,double *p_y){
        double xyz[3];
        xyz[0] = x;
        xyz[1] = y;
        xyz[2] = z;
        return tan_xyzarr2pixelxy(self, xyz, p_x, p_y);
    }
SWIGINTERN int tan_t_write_to(tan_t *self,char const *filename){
        return tan_write_to_file(self, filename);
    }
SWIGINTERN void tan_t_set_crval(tan_t *self,double ra,double dec){
        self->crval[0] = ra;
        self->crval[1] = dec;
    }
SWIGINTERN void tan_t_set_crpix(tan_t *self,double x,double y){
        self->crpix[0] = x;
        self->crpix[1] = y;
    }
SWIGINTERN void tan_t_set_cd(tan_t *self,double cd11,double cd12,double cd21,double cd22){
        self->cd[0][0] = cd11;
        self->cd[0][1] = cd12;
        self->cd[1][0] = cd21;
        self->cd[1][1] = cd22;
    }
SWIGINTERN void tan_t_set_imagesize(tan_t *self,double w,double h){
        self->imagew = w;
        self->imageh = h;
    }
SWIGINTERN sip_t *new_sip_t__SWIG_0(char const *fn,int ext){
        if (fn)
            return sip_read_header_file_ext_only(fn, ext, NULL);
        sip_t* t = (sip_t*)calloc(1, sizeof(sip_t));
        return t;
    }
SWIGINTERN sip_t *new_sip_t__SWIG_1(char const *s,int len,int XXX){
        return sip_from_string(s, len, NULL);
    }
SWIGINTERN sip_t *new_sip_t__SWIG_2(sip_t const *other){
        sip_t* t = (sip_t*)calloc(1, sizeof(sip_t));
        memcpy(t, other, sizeof(sip_t));
        return t;
    }
SWIGINTERN sip_t *new_sip_t__SWIG_3(tan_t const *other){
        sip_t* t = (sip_t*)calloc(1, sizeof(sip_t));
        memcpy(&(t->wcstan), other, sizeof(tan_t));
        return t;
    }
SWIGINTERN sip_t *new_sip_t__SWIG_4(qfits_header const *hdr){
        sip_t* t = sip_read_header(hdr, NULL);
        return t;
    }
SWIGINTERN void delete_sip_t(sip_t *self){ free(self); }
SWIGINTERN sip_t *sip_t_get_subimage(sip_t *self,int x0,int y0,int w,int h){
        sip_t* sub = malloc(sizeof(sip_t));
        memcpy(sub, self, sizeof(sip_t));
        sub->wcstan.crpix[0] -= x0;
        sub->wcstan.crpix[1] -= y0;
        sub->wcstan.imagew = w;
        sub->wcstan.imageh = h;
        return sub;
    }
SWIGINTERN sip_t *sip_t_scale(sip_t *self,double factor){
        sip_t* s = (sip_t*)calloc(1, sizeof(sip_t));
        sip_scale(self, s, factor);
        return s;
    }
SWIGINTERN double sip_t_pixel_scale(sip_t *self){ return sip_pixel_scale(self); }
SWIGINTERN void sip_t_radec_center(sip_t *self,double *p_ra,double *p_dec){
        sip_get_radec_center(self, p_ra, p_dec);
    }
SWIGINTERN double sip_t_radius(sip_t *self){
        return sip_get_radius_deg(self);
    }
SWIGINTERN int sip_t_write_to(sip_t *self,char const *filename){
        return sip_write_to_file(self, filename);
    }
SWIGINTERN int sip_t_ensure_inverse_polynomials(sip_t *self){
        return sip_ensure_inverse_polynomials(self);
    }
SWIGINTERN void sip_t_pixelxy2xyz(sip_t *self,double x,double y,double *p_x,double *p_y,double *p_z){
        double xyz[3];
        sip_pixelxy2xyzarr(self, x, y, xyz);
        *p_x = xyz[0];
        *p_y = xyz[1];
        *p_z = xyz[2];
    }
SWIGINTERN void sip_t_pixelxy2radec(sip_t *self,double x,double y,double *p_ra,double *p_dec){
        sip_pixelxy2radec(self, x, y, p_ra, p_dec);
    }
SWIGINTERN int sip_t_radec2pixelxy(sip_t *self,double ra,double dec,double *p_x,double *p_y){
        return sip_radec2pixelxy(self, ra, dec, p_x, p_y);
    }
SWIGINTERN void sip_t_iwc2pixelxy(sip_t *self,double u,double v,double *p_x,double *p_y){
        sip_iwc2pixelxy(self, u, v, p_x, p_y);
    }
SWIGINTERN void sip_t_pixelxy2iwc(sip_t *self,double x,double y,double *p_x,double *p_y){
        sip_pixelxy2iwc(self, x, y, p_x, p_y);
    }
SWIGINTERN void sip_t_iwc2radec(sip_t *self,double u,double v,double *p_ra,double *p_dec){
        sip_iwc2radec(self, u, v, p_ra, p_dec);
    }
SWIGINTERN int sip_t_radec2iwc(sip_t *self,double ra,double dec,double *p_x,double *p_y){
        return sip_radec2iwc(self, ra, dec, p_x, p_y);
    }
SWIGINTERN int sip_t_xyz2pixelxy(sip_t *self,double x,double y,double z,double *p_x,double *p_y){
        double xyz[3];
        xyz[0] = x;
        xyz[1] = y;
        xyz[2] = z;
        return sip_xyzarr2pixelxy(self, xyz, p_x, p_y);
    }
SWIGINTERN anbool sip_t_is_inside(sip_t *self,double ra,double dec){
       return sip_is_inside_image(self, ra, dec);
    }
SWIGINTERN void sip_t_set_a_term(sip_t *self,int i,int j,double val){
        checkorder(i, j);
        self->a[i][j] = val;
    }
SWIGINTERN void sip_t_set_b_term(sip_t *self,int i,int j,double val){
        checkorder(i, j);
        self->b[i][j] = val;
    }
SWIGINTERN void sip_t_set_ap_term(sip_t *self,int i,int j,double val){
        checkorder(i, j);
        self->ap[i][j] = val;
    }
SWIGINTERN void sip_t_set_bp_term(sip_t *self,int i,int j,double val){
        checkorder(i, j);
        self->bp[i][j] = val;
    }
SWIGINTERN double sip_t_get_a_term(sip_t *self,int i,int j){
        checkorder(i, j);
        return self->a[i][j];
    }
SWIGINTERN double sip_t_get_b_term(sip_t *self,int i,int j){
        checkorder(i, j);
        return self->b[i][j];
    }
SWIGINTERN double sip_t_get_ap_term(sip_t *self,int i,int j){
        checkorder(i, j);
        return self->ap[i][j];
    }
SWIGINTERN double sip_t_get_bp_term(sip_t *self,int i,int j){
        checkorder(i, j);
        return self->bp[i][j];
    }
SWIGINTERN void sip_t_set_width(sip_t *self,double x){
        self->wcstan.imagew = x;
    }
SWIGINTERN void sip_t_set_height(sip_t *self,double x){
        self->wcstan.imageh = x;
    }
SWIGINTERN double sip_t_get_width(sip_t *self){
        return self->wcstan.imagew;
    }
SWIGINTERN double sip_t_get_height(sip_t *self){
        return self->wcstan.imageh;
    }
SWIGINTERN void sip_t_get_distortion(sip_t *self,double x,double y,double *p_x,double *p_y){
        return sip_pixel_distortion(self, x, y, p_x, p_y);
    }
SWIGINTERN void sip_t_get_undistortion(sip_t *self,double x,double y,double *p_x,double *p_y){
        return sip_pixel_undistortion(self, x, y, p_x, p_y);
    }


  // Wrapper on coadd_add_image that accepts numpy arrays.

  static int coadd_add_numpy(coadd_t* c, 
                             PyObject* py_img, PyObject* py_weight,
                             float fweight, const anwcs_t* wcs) {
    PyArray_Descr* dtype = PyArray_DescrFromType(NPY_FLOAT);
    int req = NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED | NPY_ARRAY_NOTSWAPPED | NPY_ARRAY_ELEMENTSTRIDES;
    float *img, *weight=NULL;

    PyArrayObject *np_img=NULL, *np_weight=NULL;

    Py_INCREF(dtype);
    np_img = (PyArrayObject*)PyArray_CheckFromAny(py_img, dtype, 2, 2, req, NULL);
    img = PyArray_DATA(np_img);
    if (!np_img) {
      ERR("Failed to PyArray_FromAny the image\n");
      Py_XDECREF(np_img);
      Py_DECREF(dtype);
      return -1;
    }
    if (py_weight != Py_None) {
      Py_INCREF(dtype);
      np_weight = (PyArrayObject*)PyArray_CheckFromAny(py_weight, dtype, 2, 2, req, NULL);
      if (!np_weight) {
        ERR("Failed to PyArray_FromAny the weight\n");
        Py_XDECREF(np_weight);
        Py_DECREF(dtype);
        return -1;
      }
      weight = PyArray_DATA(np_weight);
    }

    int rtn = coadd_add_image(c, img, weight, fweight, wcs);

    Py_DECREF(np_img);
    if (weight) {
      Py_DECREF(np_weight);
    }
    Py_DECREF(dtype);
    return rtn;
  }

  static PyObject* coadd_get_snapshot_numpy(coadd_t* co, float badpix) {
    npy_intp dim[2];
    PyObject* npimg;
    dim[0] = co->H;
    dim[1] = co->W;
    npimg = PyArray_EMPTY(2, dim, NPY_FLOAT, 0);
    coadd_get_snapshot(co, PyArray_DATA((PyArrayObject*)npimg), badpix);
    return npimg;
  }

  static sip_t* fit_sip_wcs_py(PyObject* py_starxyz,
                              PyObject* py_fieldxy,
                              PyObject* py_weights,
                              tan_t* tanin,
                              int sip_order,
                              int inv_order) {
      PyArray_Descr* dtype = PyArray_DescrFromType(NPY_DOUBLE);
      int req = NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED | NPY_ARRAY_NOTSWAPPED |
          NPY_ARRAY_ELEMENTSTRIDES;
      PyArrayObject *np_starxyz=NULL, *np_fieldxy=NULL, *np_weights=NULL;

      Py_INCREF(dtype);
      np_starxyz = (PyArrayObject*)PyArray_CheckFromAny(py_starxyz, dtype, 2, 2, req, NULL);
      Py_INCREF(dtype);
      np_fieldxy = (PyArrayObject*)PyArray_CheckFromAny(py_fieldxy, dtype, 2, 2, req, NULL);
      if (!np_starxyz || !np_fieldxy) {
          Py_DECREF(dtype);
          Py_DECREF(dtype);
          printf("Failed to convert starxyz or fieldxy to numpy double arrays\n");
          return NULL;
      }
      if (py_weights != Py_None) {
          Py_INCREF(dtype);
          np_weights = (PyArrayObject*)PyArray_CheckFromAny(py_weights, dtype, 1, 1, req,NULL);
          if (!np_weights) {
              Py_DECREF(dtype);
              printf("Failed to convert weights to numpy double array\n");
              return NULL;
          }
      }
      Py_DECREF(dtype);
      dtype = NULL;

      int M = (int)PyArray_DIM(np_starxyz, 0);
      if (PyArray_DIM(np_fieldxy, 0) != M) {
          printf("Expected starxyz and fieldxy to have the same length\n");
          return NULL;
      }
      if (np_weights && (PyArray_DIM(np_weights, 0) != M)) {
          printf("Expected starxyz and weights to have the same length\n");
          return NULL;
      }
      if ((PyArray_DIM(np_starxyz, 1) != 3) ||
          (PyArray_DIM(np_fieldxy, 1) != 2)) {
          printf("Expected starxyz Mx3 and fieldxy Mx2\n");
          return NULL;
      }

      sip_t* sipout = calloc(1, sizeof(sip_t));

      double* weights = NULL;
      if (np_weights)
          weights = PyArray_DATA(np_weights);

      int doshift = 1;
      int rtn = fit_sip_wcs(PyArray_DATA(np_starxyz),
                            PyArray_DATA(np_fieldxy),
                            weights, M, tanin, sip_order, inv_order,
                            doshift, sipout);
      if (rtn) {
          free(sipout);
          printf("fit_sip_wcs() returned %i\n", rtn);
          return NULL;
      }
      return sipout;
  }





    typedef anbool (*f_2to2ok)(const void*, double, double, double*, double*);
    typedef void   (*f_2to2)  (const void*, double, double, double*, double*);
    typedef int    (*f_2to2i) (const void*, double, double, double*, double*);

    static PyObject* broadcast_2to2ok
        (
         //anbool func(const void*, double, double, double*, double*),
         f_2to2ok func,
         const void* baton,
         PyObject* in1, PyObject* in2);

    static PyObject* broadcast_2to2
        (
         //void func(const void*, double, double, double*, double*),
         f_2to2 func,
         const void* baton,
         PyObject* in1, PyObject* in2);

    static PyObject* broadcast_2to2i
        (
         //int func(const void*, double, double, double*, double*),
         f_2to2i func,
         const void* baton,
         PyObject* in1, PyObject* in2);

static PyObject* tan_rd2xy_wrapper(const tan_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2ok((f_2to2ok)tan_radec2pixelxy, wcs, in1, in2);
}
static PyObject* sip_rd2xy_wrapper(const sip_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2ok((f_2to2ok)sip_radec2pixelxy, wcs, in1, in2);
}
static PyObject* anwcs_rd2xy_wrapper(const anwcs_t* wcs,
                                     PyObject* in1, PyObject* in2) {
    return broadcast_2to2i((f_2to2i)anwcs_radec2pixelxy, wcs, in1, in2);
}

static PyObject* tan_iwc2xy_wrapper(const tan_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)tan_iwc2pixelxy, wcs, in1, in2);
}
static PyObject* sip_iwc2xy_wrapper(const sip_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)sip_iwc2pixelxy, wcs, in1, in2);
}

static PyObject* tan_xy2iwc_wrapper(const tan_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)tan_pixelxy2iwc, wcs, in1, in2);
}
static PyObject* sip_xy2iwc_wrapper(const sip_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)sip_pixelxy2iwc, wcs, in1, in2);
}

static PyObject* tan_iwc2rd_wrapper(const tan_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)tan_iwc2radec, wcs, in1, in2);
}
static PyObject* sip_iwc2rd_wrapper(const sip_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)sip_iwc2radec, wcs, in1, in2);
}

static PyObject* tan_rd2iwc_wrapper(const tan_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2ok((f_2to2ok)tan_radec2iwc, wcs, in1, in2);
}
static PyObject* sip_rd2iwc_wrapper(const sip_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2ok((f_2to2ok)sip_radec2iwc, wcs, in1, in2);
}

static PyObject* tan_xy2rd_wrapper(const tan_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)tan_pixelxy2radec, wcs, in1, in2);
}
static PyObject* sip_xy2rd_wrapper(const sip_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2((f_2to2)sip_pixelxy2radec, wcs, in1, in2);
}
static PyObject* anwcs_xy2rd_wrapper(const anwcs_t* wcs,
                                   PyObject* in1, PyObject* in2) {
    return broadcast_2to2i((f_2to2i)anwcs_pixelxy2radec, wcs, in1, in2);
}

    static PyObject* broadcast_2to2ok
        (
         //anbool func(const void*, double, double, double*, double*),
         f_2to2ok func,
         const void* baton,
         PyObject* in1, PyObject* in2) {

        NpyIter *iter = NULL;
        NpyIter_IterNextFunc *iternext;
        PyArrayObject *op[5];
        PyObject *ret;
        npy_uint32 flags;
        npy_uint32 op_flags[5];
        npy_intp *innersizeptr;
        char **dataptrarray;
        npy_intp* strideptr;
        PyArray_Descr* dtypes[5];
        npy_intp i, N;

        // we'll do the inner loop ourselves
        flags = NPY_ITER_EXTERNAL_LOOP;
        // use buffers to satisfy dtype casts
        flags |= NPY_ITER_BUFFERED;
        // grow inner loop
        flags |= NPY_ITER_GROWINNER;

        op[0] = (PyArrayObject*)PyArray_FromAny(in1, NULL, 0, 0, 0, NULL);
        op[1] = (PyArrayObject*)PyArray_FromAny(in2, NULL, 0, 0, 0, NULL);
        // automatically allocate the output arrays.
        op[2] = NULL;
        op[3] = NULL;
        op[4] = NULL;

        if ((PyArray_Size((PyObject*)op[0]) == 0) ||
            (PyArray_Size((PyObject*)op[1]) == 0)) {
            // empty inputs -- empty outputs
            npy_intp dim = 0;
            ret = Py_BuildValue("(NNN)",
                                PyArray_SimpleNew(1, &dim, NPY_BOOL),
                                PyArray_SimpleNew(1, &dim, NPY_DOUBLE),
                                PyArray_SimpleNew(1, &dim, NPY_DOUBLE));
            goto cleanup;
        }

        op_flags[0] = NPY_ITER_READONLY | NPY_ITER_NBO;
        op_flags[1] = NPY_ITER_READONLY | NPY_ITER_NBO;
        op_flags[2] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO;
        op_flags[3] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO;
        op_flags[4] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO;

        dtypes[0] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[1] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[2] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[3] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[4] = PyArray_DescrFromType(NPY_BOOL);

        iter = NpyIter_MultiNew(5, op, flags, NPY_KEEPORDER, NPY_SAFE_CASTING,
                                op_flags, dtypes);
        for (i=0; i<5; i++)
            Py_DECREF(dtypes[i]);

        if (!iter)
            return NULL;

        iternext = NpyIter_GetIterNext(iter, NULL);
        strideptr = NpyIter_GetInnerStrideArray(iter);
        // The inner loop size and data pointers may change during the
        // loop, so just cache the addresses.
        innersizeptr = NpyIter_GetInnerLoopSizePtr(iter);
        dataptrarray = NpyIter_GetDataPtrArray(iter);

        do {
            // are the inputs contiguous?  (Outputs will be, since we
            // allocated them)
            if ((strideptr[0] == sizeof(double)) &&
                (strideptr[1] == sizeof(double))) {
                // printf("Contiguous inputs; going fast\n");
                double* din1  = (double*)(dataptrarray[0]);
                double* din2  = (double*)(dataptrarray[1]);
                double* dout1 = (double*)(dataptrarray[2]);
                double* dout2 = (double*)(dataptrarray[3]);
                char* ok = dataptrarray[4];
                N = *innersizeptr;
                while (N--) {
                    *ok = func(baton, *din1, *din2, dout1, dout2);
                    ok++;
                    din1++;
                    din2++;
                    dout1++;
                    dout2++;
                }
            } else {
                // printf("Non-contiguous inputs; going slow\n");
                npy_intp stride1 = strideptr[0];
                npy_intp stride2 = strideptr[1];
                npy_intp size = *innersizeptr;
                char* src1 = dataptrarray[0];
                char* src2 = dataptrarray[1];
                double* dout1 = (double*)dataptrarray[2];
                double* dout2 = (double*)dataptrarray[3];
                char* ok = dataptrarray[4];

                for (i=0; i<size; i++) {
                    *ok = func(baton, *((double*)src1), *((double*)src2),
                               dout1, dout2);
                    ok++;
                    src1 += stride1;
                    src2 += stride2;
                    dout1++;
                    dout2++;
                }
            }
        } while (iternext(iter));

        if (PyArray_IsPythonScalar(in1) && PyArray_IsPythonScalar(in2)) {
            PyObject* px  = (PyObject*)(NpyIter_GetOperandArray(iter)[2]);
            PyObject* py  = (PyObject*)(NpyIter_GetOperandArray(iter)[3]);
            PyObject* pok = (PyObject*)(NpyIter_GetOperandArray(iter)[4]);
            //printf("Both inputs are python scalars\n");
            double d;
            unsigned char c;
            d = *(double*)PyArray_DATA((PyArrayObject*)px);
            px = PyFloat_FromDouble(d);
            d = *(double*)PyArray_DATA((PyArrayObject*)py);
            py = PyFloat_FromDouble(d);
            c = *(unsigned char*)PyArray_DATA((PyArrayObject*)pok);
            pok = PyBool_FromLong(c);
            ret = Py_BuildValue("(NNN)", pok, px, py);
            /*
             // I couldn't figure this out -- ScalarAsCtype didn't work
             if (PyArray_CheckScalar(px)) {
             printf("x is scalar\n");
             }
             if (PyArray_IsScalar(px, Double)) {
             printf("x is PyDoubleArrType\n");
             }
             if (PyArray_IsScalar(px, CDouble)) {
             printf("x is PyCDoubleArrType\n");
             }
             if (PyArray_ISFLOAT(px)) {
             printf("x ISFLOAT\n");
             }
             //PyArray_ScalarAsCtype(px, &d);
             */
        } else {
            ret = Py_BuildValue("(OOO)",
                                NpyIter_GetOperandArray(iter)[4],
                                NpyIter_GetOperandArray(iter)[2],
                                NpyIter_GetOperandArray(iter)[3]);
        }

        cleanup:
        if (NpyIter_Deallocate(iter) != NPY_SUCCEED) {
            Py_DECREF(ret);
            return NULL;
        }
        Py_DECREF(op[0]);
        Py_DECREF(op[1]);
        return ret;
    }


    static PyObject* broadcast_2to2i
        (
         //int func(const void*, double, double, double*, double*),
         f_2to2i func,
         const void* baton,
         PyObject* in1, PyObject* in2) {

        NpyIter *iter = NULL;
        NpyIter_IterNextFunc *iternext;
        PyArrayObject *op[5];
        PyObject *ret;
        npy_uint32 flags;
        npy_uint32 op_flags[5];
        npy_intp *innersizeptr;
        char **dataptrarray;
        npy_intp* strideptr;
        PyArray_Descr* dtypes[5];
        int j;

        // we'll do the inner loop ourselves
        flags = NPY_ITER_EXTERNAL_LOOP;
        // use buffers to satisfy dtype casts
        flags |= NPY_ITER_BUFFERED;
        // grow inner loop
        flags |= NPY_ITER_GROWINNER;

        op[0] = (PyArrayObject*)PyArray_FromAny(in1, NULL, 0, 0, 0, NULL);
        op[1] = (PyArrayObject*)PyArray_FromAny(in2, NULL, 0, 0, 0, NULL);
        // automatically allocate the output arrays.
        op[2] = NULL;
        op[3] = NULL;
        op[4] = NULL;

        if ((PyArray_Size((PyObject*)op[0]) == 0) ||
            (PyArray_Size((PyObject*)op[1]) == 0)) {
            // empty inputs -- empty outputs
            npy_intp dim = 0;
            ret = Py_BuildValue("(NNN)",
                                PyArray_SimpleNew(1, &dim, NPY_INT),
                                PyArray_SimpleNew(1, &dim, NPY_DOUBLE),
                                PyArray_SimpleNew(1, &dim, NPY_DOUBLE));
            goto cleanup;
        }

        op_flags[0] = NPY_ITER_READONLY | NPY_ITER_NBO;
        op_flags[1] = NPY_ITER_READONLY | NPY_ITER_NBO;
        op_flags[2] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO | NPY_ITER_CONTIG | NPY_ITER_ALIGNED;
        op_flags[3] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO | NPY_ITER_CONTIG | NPY_ITER_ALIGNED;
        op_flags[4] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO | NPY_ITER_CONTIG | NPY_ITER_ALIGNED;

        dtypes[0] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[1] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[2] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[3] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[4] = PyArray_DescrFromType(NPY_INT);

        iter = NpyIter_MultiNew(5, op, flags, NPY_KEEPORDER, NPY_SAFE_CASTING,
                                op_flags, dtypes);
        for (j=0; j<5; j++)
            Py_DECREF(dtypes[j]);

        if (!iter)
            return NULL;

        iternext = NpyIter_GetIterNext(iter, NULL);
        strideptr = NpyIter_GetInnerStrideArray(iter);
        // The inner loop size and data pointers may change during the
        // loop, so just cache the addresses.
        innersizeptr = NpyIter_GetInnerLoopSizePtr(iter);
        dataptrarray = NpyIter_GetDataPtrArray(iter);

        do {
            npy_intp i, N;
            char* src1 = dataptrarray[0];
            char* src2 = dataptrarray[1];
            double* dout1 = (double*)(dataptrarray[2]);
            double* dout2 = (double*)(dataptrarray[3]);
            int* ok = (int*)dataptrarray[4];
            N = *innersizeptr;

            //printf("2to2i: N=%i, strides %i,%i\n", N, strideptr[0], strideptr[1]);

            // are the inputs contiguous?  (Outputs will be, since we
            // allocated them)
            if ((strideptr[0] == sizeof(double)) &&
                (strideptr[1] == sizeof(double))) {
                // printf("Contiguous inputs; going fast\n");
                double* din1  = (double*)src1;
                double* din2  = (double*)src2;
                while (N--) {
                    *ok = func(baton, *din1, *din2, dout1, dout2);
                    ok++;
                    din1++;
                    din2++;
                    dout1++;
                    dout2++;
                }
            } else {
                // printf("Non-contiguous inputs; going slow\n");
                npy_intp stride1 = strideptr[0];
                npy_intp stride2 = strideptr[1];
                for (i=0; i<N; i++) {
                    *ok = func(baton, *((double*)src1), *((double*)src2),
                               dout1, dout2);
                    ok++;
                    src1 += stride1;
                    src2 += stride2;
                    dout1++;
                    dout2++;
                }
            }
        } while (iternext(iter));

        if (PyArray_IsPythonScalar(in1) && PyArray_IsPythonScalar(in2)) {
            PyObject* px  = (PyObject*)(NpyIter_GetOperandArray(iter)[2]);
            PyObject* py  = (PyObject*)(NpyIter_GetOperandArray(iter)[3]);
            PyObject* pok = (PyObject*)(NpyIter_GetOperandArray(iter)[4]);
            //printf("Both inputs are python scalars\n");
            double d;
            int i;
            d = *(double*)PyArray_DATA((PyArrayObject*)px);
            px = PyFloat_FromDouble(d);
            d = *(double*)PyArray_DATA((PyArrayObject*)py);
            py = PyFloat_FromDouble(d);
            i = *(int*)PyArray_DATA((PyArrayObject*)pok);
            pok = PyInt_FromLong(i);
            ret = Py_BuildValue("(NNN)", pok, px, py);
        } else {
            // Grab the results -- note "4,2,3" order -- ok,x,y
            ret = Py_BuildValue("(OOO)",
                                NpyIter_GetOperandArray(iter)[4],
                                NpyIter_GetOperandArray(iter)[2],
                                NpyIter_GetOperandArray(iter)[3]);
        }
        cleanup:
        if (NpyIter_Deallocate(iter) != NPY_SUCCEED) {
            Py_DECREF(ret);
            return NULL;
        }
        Py_DECREF(op[0]);
        Py_DECREF(op[1]);
        return ret;
    }

    static PyObject* broadcast_2to2
        (
         //void func(const void*, double, double, double*, double*),
         f_2to2 func,
         const void* baton,
         PyObject* in1, PyObject* in2) {

        NpyIter *iter = NULL;
        NpyIter_IterNextFunc *iternext;
        PyArrayObject *op[4];
        PyObject *ret;
        npy_uint32 flags;
        npy_uint32 op_flags[4];
        npy_intp *innersizeptr;
        char **dataptrarray;
        npy_intp* strideptr;
        PyArray_Descr* dtypes[4];
        npy_intp i;

        // we'll do the inner loop ourselves
        flags = NPY_ITER_EXTERNAL_LOOP;
        // use buffers to satisfy dtype casts
        flags |= NPY_ITER_BUFFERED;
        // grow inner loop
        flags |= NPY_ITER_GROWINNER;

        op[0] = (PyArrayObject*)PyArray_FromAny(in1, NULL, 0, 0, 0, NULL);
        op[1] = (PyArrayObject*)PyArray_FromAny(in2, NULL, 0, 0, 0, NULL);
        // automatically allocate the output arrays.
        op[2] = NULL;
        op[3] = NULL;

        if ((PyArray_Size((PyObject*)op[0]) == 0) ||
            (PyArray_Size((PyObject*)op[1]) == 0)) {
            // empty inputs -- empty outputs
            npy_intp dim = 0;
            ret = Py_BuildValue("(NN)",
                                PyArray_SimpleNew(1, &dim, NPY_DOUBLE),
                                PyArray_SimpleNew(1, &dim, NPY_DOUBLE));
            goto cleanup;
        }

        op_flags[0] = NPY_ITER_READONLY | NPY_ITER_NBO;
        op_flags[1] = NPY_ITER_READONLY | NPY_ITER_NBO;
        op_flags[2] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO;
        op_flags[3] = NPY_ITER_WRITEONLY | NPY_ITER_ALLOCATE | NPY_ITER_NBO;

        dtypes[0] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[1] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[2] = PyArray_DescrFromType(NPY_DOUBLE);
        dtypes[3] = PyArray_DescrFromType(NPY_DOUBLE);

        iter = NpyIter_MultiNew(4, op, flags, NPY_KEEPORDER, NPY_SAFE_CASTING,
                                op_flags, dtypes);
        for (i=0; i<4; i++)
            Py_DECREF(dtypes[i]);
        if (!iter)
            return NULL;

        iternext = NpyIter_GetIterNext(iter, NULL);
        strideptr = NpyIter_GetInnerStrideArray(iter);
        // The inner loop size and data pointers may change during the
        // loop, so just cache the addresses.
        innersizeptr = NpyIter_GetInnerLoopSizePtr(iter);
        dataptrarray = NpyIter_GetDataPtrArray(iter);

        do {
            // are the inputs contiguous?  (Outputs will be, since we
            // allocated them)
            if ((strideptr[0] == sizeof(double)) &&
                (strideptr[1] == sizeof(double))) {

                npy_intp N = *innersizeptr;
                double* din1  = (double*)(dataptrarray[0]);
                double* din2  = (double*)(dataptrarray[1]);
                double* dout1 = (double*)(dataptrarray[2]);
                double* dout2 = (double*)(dataptrarray[3]);

                //printf("Contiguous inputs; going fast\n");
                //printf("Inner loop: %i\n", (int)N);
                //printf("Output strides: %i %i\n", (int)strideptr[2], (int)strideptr[3]);
                //printf("Strides: %i %i %i %i\n", (int)strideptr[0], (int)strideptr[1], (int)strideptr[2], (int)strideptr[3]);

                while (N--) {
                    //printf("Calling %i: inputs (%12g,%12g)\n", (int)N, *din1, *din2);
                    func(baton, *din1, *din2, dout1, dout2);
                    din1++;
                    din2++;
                    dout1++;
                    dout2++;
                }
            } else {
                npy_intp stride1 = NpyIter_GetInnerStrideArray(iter)[0];
                npy_intp stride2 = NpyIter_GetInnerStrideArray(iter)[1];
                npy_intp size = *innersizeptr;
                char*   src1  = dataptrarray[0];
                char*   src2  = dataptrarray[1];
                double* dout1 = (double*)(dataptrarray[2]);
                double* dout2 = (double*)(dataptrarray[3]);

                //printf("Non-contiguous inputs; going slow\n");
                //printf("%i items\n", (int)size);

                for (i=0; i<size; i++) {
                    //printf("Call %i: inputs (%12g,%12g)\n", (int)i, ((double*)src1)[0], ((double*)src2)[0]);
                    func(baton, *((double*)src1), *((double*)src2),
                         dout1, dout2);
                    src1 += stride1;
                    src2 += stride2;
                    dout1++;
                    dout2++;
                }
            }
        } while (iternext(iter));

        if (PyArray_IsPythonScalar(in1) && PyArray_IsPythonScalar(in2)) {
            PyObject* px  = (PyObject*)(NpyIter_GetOperandArray(iter)[2]);
            PyObject* py  = (PyObject*)(NpyIter_GetOperandArray(iter)[3]);
            //printf("Both inputs are python scalars\n");
            double d;
            d = *(double*)PyArray_DATA((PyArrayObject*)px);
            px = PyFloat_FromDouble(d);
            d = *(double*)PyArray_DATA((PyArrayObject*)py);
            py = PyFloat_FromDouble(d);
            ret = Py_BuildValue("(NN)", px, py);
        } else {
            // Grab the results
            ret = Py_BuildValue("(OO)",
                                NpyIter_GetOperandArray(iter)[2],
                                NpyIter_GetOperandArray(iter)[3]);
        }

        cleanup:
        if (NpyIter_Deallocate(iter) != NPY_SUCCEED) {
            Py_DECREF(ret);
            return NULL;
        }
        Py_DECREF(op[0]);
        Py_DECREF(op[1]);
        return ret;
    }

    static int tan_wcs_resample(tan_t* inwcs, tan_t* outwcs,
                                PyObject* py_inimg, PyObject* py_outimg,
                                int weighted, int lorder) {
        PyArray_Descr* dtype = PyArray_DescrFromType(NPY_FLOAT);
        int req = NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED | NPY_ARRAY_NOTSWAPPED | NPY_ARRAY_ELEMENTSTRIDES;
        int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_WRITEBACKIFCOPY;
        PyArrayObject *np_inimg=NULL, *np_outimg=NULL;

        Py_INCREF(dtype);
        Py_INCREF(dtype);
        np_inimg  = (PyArrayObject*)PyArray_CheckFromAny(py_inimg,  dtype, 2, 2, req, NULL);
        np_outimg = (PyArrayObject*)PyArray_CheckFromAny(py_outimg, dtype, 2, 2, reqout, NULL);
        if (!np_inimg || !np_outimg) {
            ERR("Failed to PyArray_FromAny the images (np_inimg=%p, np_outimg=%p)\n",
                np_inimg, np_outimg);
            Py_XDECREF(np_inimg);
            Py_XDECREF(np_outimg);
            Py_DECREF(dtype);
            return -1;
        }

        int inW, inH, outW, outH;
        float *inimg, *outimg;
        inH = (int)PyArray_DIM(np_inimg, 0);
        inW = (int)PyArray_DIM(np_inimg, 1);
        outH = (int)PyArray_DIM(np_outimg, 0);
        outW = (int)PyArray_DIM(np_outimg, 1);
        inimg = PyArray_DATA(np_inimg);
        outimg = PyArray_DATA(np_outimg);

        anwcs_t* inanwcs = anwcs_new_tan(inwcs);
        anwcs_t* outanwcs = anwcs_new_tan(outwcs);

        int res = resample_wcs(inanwcs, inimg, inW, inH,
                               outanwcs, outimg, outW, outH,
                               weighted, lorder);

        anwcs_free(inanwcs);
        anwcs_free(outanwcs);

        Py_DECREF(dtype);
        Py_DECREF(np_inimg);
        if (PyArray_ResolveWritebackIfCopy(np_outimg) == -1) {
            PyErr_SetString(PyExc_ValueError, "Failed to write-back output image!");
            Py_DECREF(np_outimg);
            return -1;
        }
        Py_DECREF(np_outimg);

        return res;
    }

    static int tan_numpy_xyz2pixelxy(tan_t* tan, PyArrayObject* npxyz,
                                     PyArrayObject* npx, PyArrayObject* npy) {
        npy_intp i, N;
        int rtn = 0;
        double *x, *y;

        if (PyArray_NDIM(npx) != 1) {
            PyErr_SetString(PyExc_ValueError, "arrays must be one-dimensional");
            return -1;
        }
        if (PyArray_TYPE(npx) != NPY_DOUBLE) {
            PyErr_SetString(PyExc_ValueError, "array must contain doubles");
            return -1;
        }
        N = PyArray_DIM(npx, 0);
        if ((PyArray_DIM(npy, 0) != N) ||
            (PyArray_DIM(npxyz, 0) != N) ||
            (PyArray_DIM(npxyz, 1) != 3)) {
            PyErr_SetString(PyExc_ValueError, "arrays must be the same size");
            return -1;
        }
        x = PyArray_GETPTR1(npx, 0);
        y = PyArray_GETPTR1(npy, 0);
        for (i=0; i<N; i++) {
            double xyz[3];
            anbool ok;
            xyz[0] = *((double*)PyArray_GETPTR2(npxyz, i, 0));
            xyz[1] = *((double*)PyArray_GETPTR2(npxyz, i, 1));
            xyz[2] = *((double*)PyArray_GETPTR2(npxyz, i, 2));
            ok = tan_xyzarr2pixelxy(tan, xyz, x+i, y+i);
            if (!ok) {
                x[i] = -1.0;
                y[i] = -1.0;
                rtn = -1;
            }
        }
        return rtn;
    }


    static int an_tally(PyObject* py_counts, PyObject* py_x, PyObject* py_y) {
        PyArray_Descr* itype;
        PyArrayObject *np_counts=NULL, *np_x=NULL, *np_y=NULL;
        int req = NPY_ARRAY_C_CONTIGUOUS | NPY_ARRAY_ALIGNED | NPY_ARRAY_NOTSWAPPED |
            NPY_ARRAY_ELEMENTSTRIDES;
        int reqout = req | NPY_ARRAY_WRITEABLE | NPY_ARRAY_WRITEBACKIFCOPY;
        int32_t *counts, *px, *py;
        int W, H, i, N;

        itype = PyArray_DescrFromType(NPY_INT32);
        Py_INCREF(itype);
        Py_INCREF(itype);

        np_counts = (PyArrayObject*)PyArray_CheckFromAny(py_counts, itype, 2, 2, reqout, NULL);
        np_x = (PyArrayObject*)PyArray_CheckFromAny(py_x, itype, 1, 1, req, NULL);
        np_y = (PyArrayObject*)PyArray_CheckFromAny(py_y, itype, 1, 1, req, NULL);

        if (!np_counts || !np_x || !np_y) {
            ERR("Failed to PyArray_FromAny the counts, x, and y arrays.\n");
            Py_XDECREF(np_counts);
            Py_XDECREF(np_x);
            Py_XDECREF(np_y);
            return -1;
        }
        N = (int)PyArray_DIM(np_x, 0);
        if (PyArray_DIM(np_y, 0) != N) {
            ERR("Expected x and y arrays to have the same lengths!\n");
            Py_XDECREF(np_counts);
            Py_XDECREF(np_x);
            Py_XDECREF(np_y);
            return -1;
        }

        H = (int)PyArray_DIM(np_counts, 0);
        W = (int)PyArray_DIM(np_counts, 1);
        //printf("Counts array size %i x %i\n", W, H);
        counts = PyArray_DATA(np_counts);
        px = PyArray_DATA(np_x);
        py = PyArray_DATA(np_y);
        for (i=0; i<N; i++) {
            int32_t xi = (*px);
            int32_t yi = (*py);
            if (yi < 0 || yi >= H || xi < 0 || xi >= W) {
                printf("Warning: skipping out-of-range value: i=%i, xi,yi = %i,%i\n", i, xi, yi);
            } else {
                counts[yi*W + xi]++;
            }
            px++;
            py++;
        }
        Py_DECREF(np_x);
        Py_DECREF(np_y);
        if (PyArray_ResolveWritebackIfCopy(np_counts) == -1) {
            PyErr_SetString(PyExc_ValueError, "Failed to write-back counts array!");
            Py_DECREF(np_counts);
            return -1;
        }
        Py_DECREF(np_counts);
        return 0;
    }



#if defined(LLONG_MAX) && !defined(SWIG_LONG_LONG_AVAILABLE)
#  define SWIG_LONG_LONG_AVAILABLE
#endif


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERN int
SWIG_AsVal_unsigned_SS_long_SS_long (PyObject *obj, unsigned long long *val)
{
  int res = SWIG_TypeError;
  if (PyLong_Check(obj)) {
    unsigned long long v = PyLong_AsUnsignedLongLong(obj);
    if (!PyErr_Occurred()) {
      if (val) *val = v;
      return SWIG_OK;
    } else {
      PyErr_Clear();
      res = SWIG_OverflowError;
    }
  } else {
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj,&v);
    if (SWIG_IsOK(res)) {
      if (val) *val = v;
      return res;
    }
  }
#ifdef SWIG_PYTHON_CAST_MODE
  {
    const double mant_max = 1LL << DBL_MANT_DIG;
    double d;
    res = SWIG_AsVal_double (obj,&d);
    if (SWIG_IsOK(res) && !SWIG_CanCastAsInteger(&d, 0, mant_max))
      return SWIG_OverflowError;
    if (SWIG_IsOK(res) && SWIG_CanCastAsInteger(&d, 0, mant_max)) {
      if (val) *val = (unsigned long long)(d);
      return SWIG_AddCast(res);
    }
    res = SWIG_TypeError;
  }
#endif
  return res;
}
#endif


SWIGINTERNINLINE int
SWIG_AsVal_size_t (PyObject * obj, size_t *val)
{
  int res = SWIG_TypeError;
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    unsigned long v;
    res = SWIG_AsVal_unsigned_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = (size_t)(v);
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else if (sizeof(size_t) <= sizeof(unsigned long long)) {
    unsigned long long v;
    res = SWIG_AsVal_unsigned_SS_long_SS_long (obj, val ? &v : 0);
    if (SWIG_IsOK(res) && val) *val = (size_t)(v);
  }
#endif
  return res;
}


#ifdef SWIG_LONG_LONG_AVAILABLE
SWIGINTERNINLINE PyObject* 
SWIG_From_unsigned_SS_long_SS_long  (unsigned long long value)
{
  return (value > LONG_MAX) ?
    PyLong_FromUnsignedLongLong(value) : PyInt_FromLong((long)(value));
}
#endif


SWIGINTERNINLINE PyObject *
SWIG_From_size_t  (size_t value)
{    
#ifdef SWIG_LONG_LONG_AVAILABLE
  if (sizeof(size_t) <= sizeof(unsigned long)) {
#endif
    return SWIG_From_unsigned_SS_long  ((unsigned long)(value));
#ifdef SWIG_LONG_LONG_AVAILABLE
  } else {
    /* assume sizeof(size_t) <= sizeof(unsigned long long) */
    return SWIG_From_unsigned_SS_long_SS_long  ((unsigned long long)(value));
  }
#endif
}


SWIGINTERN int
SWIG_AsCharArray(PyObject * obj, char *val, size_t size)
{ 
  char* cptr = 0; size_t csize = 0; int alloc = SWIG_OLDOBJ;
  int res = SWIG_AsCharPtrAndSize(obj, &cptr, &csize, &alloc);
  if (SWIG_IsOK(res)) {
    /* special case of single char conversion when we don't need space for NUL */
    if (size == 1 && csize == 2 && cptr && !cptr[1]) --csize;
    if (csize <= size) {
      if (val) {
	if (csize) memcpy(val, cptr, csize*sizeof(char));
	if (csize < size) memset(val + csize, 0, (size - csize)*sizeof(char));
      }
      if (alloc == SWIG_NEWOBJ) {
	free((char*)cptr);
	res = SWIG_DelNewMask(res);
      }      
      return res;
    }
    if (alloc == SWIG_NEWOBJ) free((char*)cptr);
  }
  return SWIG_TypeError;
}


SWIGINTERN int
SWIG_AsVal_char (PyObject * obj, char *val)
{    
  int res = SWIG_AsCharArray(obj, val, 1);
  if (!SWIG_IsOK(res)) {
    long v;
    res = SWIG_AddCast(SWIG_AsVal_long (obj, &v));
    if (SWIG_IsOK(res)) {
      if ((CHAR_MIN <= v) && (v <= CHAR_MAX)) {
	if (val) *val = (char)(v);
      } else {
	res = SWIG_OverflowError;
      }
    }
  }
  return res;
}


SWIGINTERNINLINE PyObject *
SWIG_From_float  (float value)
{    
  return SWIG_From_double  (value);
}


int dcen3x3b(float i0, float i1, float i2,
             float i3, float i4, float i5,
             float i6, float i7, float i8,
             float *xcen, float *ycen) {
float im[9];
im[0] = i0;
im[1] = i1;
im[2] = i2;
im[3] = i3;
im[4] = i4;
im[5] = i5;
im[6] = i6;
im[7] = i7;
im[8] = i8;
return dcen3x3(im, xcen, ycen);
}

#ifdef __cplusplus
extern "C" {
#endif
SWIGINTERN PyObject *_wrap_log_init(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_init" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  log_init(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_log_get_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "log_get_level", 0, 0, 0)) SWIG_fail;
  result = (int)log_get_level();
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_log_set_level(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "log_set_level" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  log_set_level(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_img_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  number *arg2 = (number *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_t_img_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_img_set" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "coadd_t_img_set" "', argument " "2"" of type '" "number *""'"); 
  }
  arg2 = (number *)(argp2);
  if (arg1) (arg1)->img = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_img_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  number *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_img_get" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  result = (number *) ((arg1)->img);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_weight_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  number *arg2 = (number *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_t_weight_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_weight_set" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_float, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "coadd_t_weight_set" "', argument " "2"" of type '" "number *""'"); 
  }
  arg2 = (number *)(argp2);
  if (arg1) (arg1)->weight = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_weight_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  number *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_weight_get" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  result = (number *) ((arg1)->weight);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_W_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_t_W_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_W_set" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_t_W_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->W = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_W_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_W_get" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  result = (int) ((arg1)->W);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_H_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_t_H_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_H_set" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_t_H_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->H = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_H_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_H_get" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  result = (int) ((arg1)->H);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_wcs_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  anwcs_t *arg2 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_t_wcs_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_wcs_set" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_anwcs_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "coadd_t_wcs_set" "', argument " "2"" of type '" "anwcs_t *""'"); 
  }
  arg2 = (anwcs_t *)(argp2);
  if (arg1) (arg1)->wcs = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_wcs_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anwcs_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_wcs_get" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  result = (anwcs_t *) ((arg1)->wcs);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_resample_func_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  double (*arg2)(double,double,number const *,number const *,int,int,double *,void *) = (double (*)(double,double,number const *,number const *,int,int,double *,void *)) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_t_resample_func_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_resample_func_set" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[1], (void**)(&arg2), SWIGTYPE_p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "coadd_t_resample_func_set" "', argument " "2"" of type '" "double (*)(double,double,number const *,number const *,int,int,double *,void *)""'"); 
    }
  }
  if (arg1) (arg1)->resample_func = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_resample_func_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double (*result)(double,double,number const *,number const *,int,int,double *,void *) = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_resample_func_get" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  result = (double (*)(double,double,number const *,number const *,int,int,double *,void *)) ((arg1)->resample_func);
  resultobj = SWIG_NewFunctionPtrObj((void *)(result), SWIGTYPE_p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_resample_token_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_t_resample_token_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_resample_token_set" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "coadd_t_resample_token_set" "', argument " "2"" of type '" "void *""'"); 
  }
  if (arg1) (arg1)->resample_token = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_t_resample_token_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  void *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_t_resample_token_get" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  result = (void *) ((arg1)->resample_token);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_coadd_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_coadd_t", 0, 0, 0)) SWIG_fail;
  result = (coadd_t *)calloc(1, sizeof(coadd_t));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_coadd_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_coadd_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_coadd_t" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *coadd_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_coadd_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *coadd_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_coadd_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  coadd_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_new", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "coadd_new" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_new" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (coadd_t *)coadd_new(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_coadd_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_new_from_wcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  coadd_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_new_from_wcs" "', argument " "1"" of type '" "anwcs_t *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (coadd_t *)coadd_new_from_wcs(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_coadd_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_set_lanczos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_set_lanczos", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_set_lanczos" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_set_lanczos" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  coadd_set_lanczos(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_add_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  number *arg2 = (number *) 0 ;
  number *arg3 = (number *) 0 ;
  number arg4 ;
  anwcs_t *arg5 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_add_image", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_add_image" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "coadd_add_image" "', argument " "2"" of type '" "number const *""'"); 
  }
  arg2 = (number *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "coadd_add_image" "', argument " "3"" of type '" "number const *""'"); 
  }
  arg3 = (number *)(argp3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "coadd_add_image" "', argument " "4"" of type '" "number""'");
  } 
  arg4 = (number)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "coadd_add_image" "', argument " "5"" of type '" "anwcs_t const *""'"); 
  }
  arg5 = (anwcs_t *)(argp5);
  result = (int)coadd_add_image(arg1,(float const *)arg2,(float const *)arg3,arg4,(struct anwcs_t const *)arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_divide_by_weight(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  number arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  float val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_divide_by_weight", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_divide_by_weight" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  ecode2 = SWIG_AsVal_float(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_divide_by_weight" "', argument " "2"" of type '" "number""'");
  } 
  arg2 = (number)(val2);
  coadd_divide_by_weight(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_get_snapshot(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  number *arg2 = (number *) 0 ;
  number arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  float val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  number *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_get_snapshot", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_get_snapshot" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "coadd_get_snapshot" "', argument " "2"" of type '" "number *""'"); 
  }
  arg2 = (number *)(argp2);
  ecode3 = SWIG_AsVal_float(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "coadd_get_snapshot" "', argument " "3"" of type '" "number""'");
  } 
  arg3 = (number)(val3);
  result = (number *)coadd_get_snapshot(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_free" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  coadd_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_debug(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_debug" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  coadd_debug(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_create_weight_image_from_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  number *arg1 = (number *) 0 ;
  int arg2 ;
  int arg3 ;
  number arg4 ;
  number arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  float val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  number *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_create_weight_image_from_range", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_create_weight_image_from_range" "', argument " "1"" of type '" "number const *""'"); 
  }
  arg1 = (number *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_create_weight_image_from_range" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "coadd_create_weight_image_from_range" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "coadd_create_weight_image_from_range" "', argument " "4"" of type '" "number""'");
  } 
  arg4 = (number)(val4);
  ecode5 = SWIG_AsVal_float(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "coadd_create_weight_image_from_range" "', argument " "5"" of type '" "number""'");
  } 
  arg5 = (number)(val5);
  result = (number *)coadd_create_weight_image_from_range((float const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_float, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_weight_image_mask_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  number *arg1 = (number *) 0 ;
  int arg2 ;
  int arg3 ;
  number *arg4 = (number *) 0 ;
  number arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  float val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_weight_image_mask_value", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_weight_image_mask_value" "', argument " "1"" of type '" "number const *""'"); 
  }
  arg1 = (number *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_weight_image_mask_value" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "coadd_weight_image_mask_value" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "coadd_weight_image_mask_value" "', argument " "4"" of type '" "number *""'"); 
  }
  arg4 = (number *)(argp4);
  ecode5 = SWIG_AsVal_float(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "coadd_weight_image_mask_value" "', argument " "5"" of type '" "number""'");
  } 
  arg5 = (number)(val5);
  coadd_weight_image_mask_value((float const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_args_t_order_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  lanczos_args_t *arg1 = (lanczos_args_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos_args_t_order_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lanczos_args_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lanczos_args_t_order_set" "', argument " "1"" of type '" "lanczos_args_t *""'"); 
  }
  arg1 = (lanczos_args_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos_args_t_order_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->order = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_args_t_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  lanczos_args_t *arg1 = (lanczos_args_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lanczos_args_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lanczos_args_t_order_get" "', argument " "1"" of type '" "lanczos_args_t *""'"); 
  }
  arg1 = (lanczos_args_t *)(argp1);
  result = (int) ((arg1)->order);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_args_t_weighted_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  lanczos_args_t *arg1 = (lanczos_args_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos_args_t_weighted_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lanczos_args_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lanczos_args_t_weighted_set" "', argument " "1"" of type '" "lanczos_args_t *""'"); 
  }
  arg1 = (lanczos_args_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos_args_t_weighted_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->weighted = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_args_t_weighted_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  lanczos_args_t *arg1 = (lanczos_args_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lanczos_args_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "lanczos_args_t_weighted_get" "', argument " "1"" of type '" "lanczos_args_t *""'"); 
  }
  arg1 = (lanczos_args_t *)(argp1);
  result = (int) ((arg1)->weighted);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_lanczos_args_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  lanczos_args_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_lanczos_args_t", 0, 0, 0)) SWIG_fail;
  result = (lanczos_args_t *)calloc(1, sizeof(lanczos_args_t));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_lanczos_args_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_lanczos_args_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  lanczos_args_t *arg1 = (lanczos_args_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_lanczos_args_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_lanczos_args_t" "', argument " "1"" of type '" "lanczos_args_t *""'"); 
  }
  arg1 = (lanczos_args_t *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *lanczos_args_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_lanczos_args_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *lanczos_args_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_lanczos(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  int arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "lanczos" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (double)lanczos(arg1,arg2);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_nearest_resample_f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  float *arg3 = (float *) 0 ;
  float *arg4 = (float *) 0 ;
  int arg5 ;
  int arg6 ;
  double *arg7 = (double *) 0 ;
  void *arg8 = (void *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int res8 ;
  PyObject *swig_obj[8] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "nearest_resample_f", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "nearest_resample_f" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nearest_resample_f" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "nearest_resample_f" "', argument " "3"" of type '" "float const *""'"); 
  }
  arg3 = (float *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "nearest_resample_f" "', argument " "4"" of type '" "float const *""'"); 
  }
  arg4 = (float *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "nearest_resample_f" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "nearest_resample_f" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "nearest_resample_f" "', argument " "7"" of type '" "double *""'"); 
  }
  arg7 = (double *)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7],SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "nearest_resample_f" "', argument " "8"" of type '" "void *""'"); 
  }
  result = (double)nearest_resample_f(arg1,arg2,(float const *)arg3,(float const *)arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_resample_f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  float *arg3 = (float *) 0 ;
  float *arg4 = (float *) 0 ;
  int arg5 ;
  int arg6 ;
  double *arg7 = (double *) 0 ;
  void *arg8 = (void *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int res8 ;
  PyObject *swig_obj[8] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos_resample_f", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "lanczos_resample_f" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos_resample_f" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lanczos_resample_f" "', argument " "3"" of type '" "float const *""'"); 
  }
  arg3 = (float *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "lanczos_resample_f" "', argument " "4"" of type '" "float const *""'"); 
  }
  arg4 = (float *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lanczos_resample_f" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lanczos_resample_f" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "lanczos_resample_f" "', argument " "7"" of type '" "double *""'"); 
  }
  arg7 = (double *)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7],SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "lanczos_resample_f" "', argument " "8"" of type '" "void *""'"); 
  }
  result = (double)lanczos_resample_f(arg1,arg2,(float const *)arg3,(float const *)arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_resample_unw_sep_f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  float *arg3 = (float *) 0 ;
  int arg4 ;
  int arg5 ;
  void *arg6 = (void *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int res6 ;
  PyObject *swig_obj[6] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos_resample_unw_sep_f", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "lanczos_resample_unw_sep_f" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos_resample_unw_sep_f" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lanczos_resample_unw_sep_f" "', argument " "3"" of type '" "float const *""'"); 
  }
  arg3 = (float *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lanczos_resample_unw_sep_f" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lanczos_resample_unw_sep_f" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5],SWIG_as_voidptrptr(&arg6), 0, 0);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "lanczos_resample_unw_sep_f" "', argument " "6"" of type '" "void *""'"); 
  }
  result = (double)lanczos_resample_unw_sep_f(arg1,arg2,(float const *)arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_nearest_resample_d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  int arg5 ;
  int arg6 ;
  double *arg7 = (double *) 0 ;
  void *arg8 = (void *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int res8 ;
  PyObject *swig_obj[8] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "nearest_resample_d", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "nearest_resample_d" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "nearest_resample_d" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "nearest_resample_d" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "nearest_resample_d" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = (double *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "nearest_resample_d" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "nearest_resample_d" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "nearest_resample_d" "', argument " "7"" of type '" "double *""'"); 
  }
  arg7 = (double *)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7],SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "nearest_resample_d" "', argument " "8"" of type '" "void *""'"); 
  }
  result = (double)nearest_resample_d(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_resample_d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  int arg5 ;
  int arg6 ;
  double *arg7 = (double *) 0 ;
  void *arg8 = (void *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  int res8 ;
  PyObject *swig_obj[8] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos_resample_d", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "lanczos_resample_d" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos_resample_d" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "lanczos_resample_d" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "lanczos_resample_d" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = (double *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lanczos_resample_d" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lanczos_resample_d" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "lanczos_resample_d" "', argument " "7"" of type '" "double *""'"); 
  }
  arg7 = (double *)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7],SWIG_as_voidptrptr(&arg8), 0, 0);
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "lanczos_resample_d" "', argument " "8"" of type '" "void *""'"); 
  }
  result = (double)lanczos_resample_d(arg1,arg2,(double const *)arg3,(double const *)arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_sip_coefficients(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  tan_t *arg5 = (tan_t *) 0 ;
  int arg6 ;
  int arg7 ;
  sip_t *arg8 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject *swig_obj[8] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_sip_coefficients", 8, 8, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fit_sip_coefficients" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fit_sip_coefficients" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fit_sip_coefficients" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fit_sip_coefficients" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fit_sip_coefficients" "', argument " "5"" of type '" "tan_t const *""'"); 
  }
  arg5 = (tan_t *)(argp5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fit_sip_coefficients" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fit_sip_coefficients" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = (int)(val7);
  res8 = SWIG_ConvertPtr(swig_obj[7], &argp8,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "fit_sip_coefficients" "', argument " "8"" of type '" "sip_t *""'"); 
  }
  arg8 = (sip_t *)(argp8);
  result = (int)fit_sip_coefficients((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(tan_t const *)arg5,arg6,arg7,arg8);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_wcs_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "wcs_shift", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wcs_shift" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "wcs_shift" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wcs_shift" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  wcs_shift(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_sip_wcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  tan_t *arg5 = (tan_t *) 0 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  sip_t *arg9 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject *swig_obj[9] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_sip_wcs", 9, 9, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fit_sip_wcs" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fit_sip_wcs" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fit_sip_wcs" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fit_sip_wcs" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fit_sip_wcs" "', argument " "5"" of type '" "tan_t const *""'"); 
  }
  arg5 = (tan_t *)(argp5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fit_sip_wcs" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fit_sip_wcs" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = (int)(val7);
  ecode8 = SWIG_AsVal_int(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fit_sip_wcs" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = (int)(val8);
  res9 = SWIG_ConvertPtr(swig_obj[8], &argp9,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "fit_sip_wcs" "', argument " "9"" of type '" "sip_t *""'"); 
  }
  arg9 = (sip_t *)(argp9);
  result = (int)fit_sip_wcs((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(tan_t const *)arg5,arg6,arg7,arg8,arg9);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_sip_wcs_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  int arg5 ;
  int arg6 ;
  int arg7 ;
  int arg8 ;
  int arg9 ;
  double *arg10 = (double *) 0 ;
  int arg11 ;
  sip_t *arg12 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  int val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  void *argp10 = 0 ;
  int res10 = 0 ;
  int val11 ;
  int ecode11 = 0 ;
  void *argp12 = 0 ;
  int res12 = 0 ;
  PyObject *swig_obj[12] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_sip_wcs_2", 12, 12, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fit_sip_wcs_2" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fit_sip_wcs_2" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fit_sip_wcs_2" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fit_sip_wcs_2" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fit_sip_wcs_2" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fit_sip_wcs_2" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "fit_sip_wcs_2" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = (int)(val7);
  ecode8 = SWIG_AsVal_int(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "fit_sip_wcs_2" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = (int)(val8);
  ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "fit_sip_wcs_2" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = (int)(val9);
  res10 = SWIG_ConvertPtr(swig_obj[9], &argp10,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res10)) {
    SWIG_exception_fail(SWIG_ArgError(res10), "in method '" "fit_sip_wcs_2" "', argument " "10"" of type '" "double *""'"); 
  }
  arg10 = (double *)(argp10);
  ecode11 = SWIG_AsVal_int(swig_obj[10], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "fit_sip_wcs_2" "', argument " "11"" of type '" "int""'");
  } 
  arg11 = (int)(val11);
  res12 = SWIG_ConvertPtr(swig_obj[11], &argp12,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res12)) {
    SWIG_exception_fail(SWIG_ArgError(res12), "in method '" "fit_sip_wcs_2" "', argument " "12"" of type '" "sip_t *""'"); 
  }
  arg12 = (sip_t *)(argp12);
  result = (int)fit_sip_wcs_2((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_tan_wcs_move_tangent_point(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  tan_t *arg5 = (tan_t *) 0 ;
  tan_t *arg6 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_tan_wcs_move_tangent_point", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fit_tan_wcs_move_tangent_point" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fit_tan_wcs_move_tangent_point" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fit_tan_wcs_move_tangent_point" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fit_tan_wcs_move_tangent_point" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fit_tan_wcs_move_tangent_point" "', argument " "5"" of type '" "tan_t const *""'"); 
  }
  arg5 = (tan_t *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fit_tan_wcs_move_tangent_point" "', argument " "6"" of type '" "tan_t *""'"); 
  }
  arg6 = (tan_t *)(argp6);
  result = (int)fit_tan_wcs_move_tangent_point((double const *)arg1,(double const *)arg2,arg3,(double const *)arg4,(tan_t const *)arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_tan_wcs_move_tangent_point_weighted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  double *arg5 = (double *) 0 ;
  tan_t *arg6 = (tan_t *) 0 ;
  tan_t *arg7 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject *swig_obj[7] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_tan_wcs_move_tangent_point_weighted", 7, 7, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fit_tan_wcs_move_tangent_point_weighted" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fit_tan_wcs_move_tangent_point_weighted" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fit_tan_wcs_move_tangent_point_weighted" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fit_tan_wcs_move_tangent_point_weighted" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fit_tan_wcs_move_tangent_point_weighted" "', argument " "5"" of type '" "double const *""'"); 
  }
  arg5 = (double *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fit_tan_wcs_move_tangent_point_weighted" "', argument " "6"" of type '" "tan_t const *""'"); 
  }
  arg6 = (tan_t *)(argp6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "fit_tan_wcs_move_tangent_point_weighted" "', argument " "7"" of type '" "tan_t *""'"); 
  }
  arg7 = (tan_t *)(argp7);
  result = (int)fit_tan_wcs_move_tangent_point_weighted((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,(double const *)arg5,(tan_t const *)arg6,arg7);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_tan_wcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  int arg3 ;
  tan_t *arg4 = (tan_t *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_tan_wcs", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fit_tan_wcs" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fit_tan_wcs" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fit_tan_wcs" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fit_tan_wcs" "', argument " "4"" of type '" "tan_t *""'"); 
  }
  arg4 = (tan_t *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fit_tan_wcs" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (int)fit_tan_wcs((double const *)arg1,(double const *)arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_tan_wcs_weighted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  tan_t *arg5 = (tan_t *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_tan_wcs_weighted", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fit_tan_wcs_weighted" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fit_tan_wcs_weighted" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fit_tan_wcs_weighted" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fit_tan_wcs_weighted" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fit_tan_wcs_weighted" "', argument " "5"" of type '" "tan_t *""'"); 
  }
  arg5 = (tan_t *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fit_tan_wcs_weighted" "', argument " "6"" of type '" "double *""'"); 
  }
  arg6 = (double *)(argp6);
  result = (int)fit_tan_wcs_weighted((double const *)arg1,(double const *)arg2,(double const *)arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_print_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  print_array(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_an_hist2d(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject *swig_obj[7] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "an_hist2d", 7, 7, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "an_hist2d" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "an_hist2d" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "an_hist2d" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "an_hist2d" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  result = (PyObject *)an_hist2d(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flat_percentile_f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  double arg2 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "flat_percentile_f", 2, 2, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "flat_percentile_f" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  result = (double)flat_percentile_f(arg1,arg2);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_flat_median_f(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  arg1 = swig_obj[0];
  result = (double)flat_median_f(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_median_smooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  int arg3 ;
  PyObject *arg4 = (PyObject *) 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "median_smooth", 4, 4, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "median_smooth" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  arg4 = swig_obj[3];
  result = (int)median_smooth(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos5_interpolate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *arg4 = (PyObject *) 0 ;
  PyObject *arg5 = (PyObject *) 0 ;
  PyObject *arg6 = (PyObject *) 0 ;
  PyObject *swig_obj[6] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos5_interpolate", 6, 6, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  arg4 = swig_obj[3];
  arg5 = swig_obj[4];
  arg6 = swig_obj[5];
  result = (PyObject *)lanczos5_interpolate(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos5_interpolate_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  PyObject *arg5 = (PyObject *) 0 ;
  PyObject *arg6 = (PyObject *) 0 ;
  float val1 ;
  int ecode1 = 0 ;
  float val2 ;
  int ecode2 = 0 ;
  float val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[6] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos5_interpolate_grid", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_float(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "lanczos5_interpolate_grid" "', argument " "1"" of type '" "float""'");
  } 
  arg1 = (float)(val1);
  ecode2 = SWIG_AsVal_float(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos5_interpolate_grid" "', argument " "2"" of type '" "float""'");
  } 
  arg2 = (float)(val2);
  ecode3 = SWIG_AsVal_float(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "lanczos5_interpolate_grid" "', argument " "3"" of type '" "float""'");
  } 
  arg3 = (float)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lanczos5_interpolate_grid" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  arg5 = swig_obj[4];
  arg6 = swig_obj[5];
  result = (PyObject *)lanczos5_interpolate_grid(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos3_interpolate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *arg4 = (PyObject *) 0 ;
  PyObject *arg5 = (PyObject *) 0 ;
  PyObject *arg6 = (PyObject *) 0 ;
  PyObject *swig_obj[6] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos3_interpolate", 6, 6, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  arg4 = swig_obj[3];
  arg5 = swig_obj[4];
  arg6 = swig_obj[5];
  result = (PyObject *)lanczos3_interpolate(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos3_interpolate_grid(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  PyObject *arg5 = (PyObject *) 0 ;
  PyObject *arg6 = (PyObject *) 0 ;
  float val1 ;
  int ecode1 = 0 ;
  float val2 ;
  int ecode2 = 0 ;
  float val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[6] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos3_interpolate_grid", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_float(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "lanczos3_interpolate_grid" "', argument " "1"" of type '" "float""'");
  } 
  arg1 = (float)(val1);
  ecode2 = SWIG_AsVal_float(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "lanczos3_interpolate_grid" "', argument " "2"" of type '" "float""'");
  } 
  arg2 = (float)(val2);
  ecode3 = SWIG_AsVal_float(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "lanczos3_interpolate_grid" "', argument " "3"" of type '" "float""'");
  } 
  arg3 = (float)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "lanczos3_interpolate_grid" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  arg5 = swig_obj[4];
  arg6 = swig_obj[5];
  result = (PyObject *)lanczos3_interpolate_grid(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos5_filter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos5_filter", 2, 2, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  result = (int)lanczos5_filter(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos3_filter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos3_filter", 2, 2, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  result = (int)lanczos3_filter(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos3_filter_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  int arg3 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos3_filter_table", 3, 3, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "lanczos3_filter_table" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)lanczos3_filter_table(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_lanczos_shift_image_c(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *arg4 = (PyObject *) 0 ;
  int arg5 ;
  double arg6 ;
  double arg7 ;
  int val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject *swig_obj[7] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "lanczos_shift_image_c", 7, 7, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  arg4 = swig_obj[3];
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "lanczos_shift_image_c" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "lanczos_shift_image_c" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "lanczos_shift_image_c" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  result = (int)lanczos_shift_image_c(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_codekd_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  codetree_t *arg2 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_codekd_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_codekd_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_codetree_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_t_codekd_set" "', argument " "2"" of type '" "codetree_t *""'"); 
  }
  arg2 = (codetree_t *)(argp2);
  if (arg1) (arg1)->codekd = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_codekd_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  codetree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_codekd_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (codetree_t *) ((arg1)->codekd);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_codetree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_quads_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  quadfile_t *arg2 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_quads_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_quads_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_quadfile_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_t_quads_set" "', argument " "2"" of type '" "quadfile_t *""'"); 
  }
  arg2 = (quadfile_t *)(argp2);
  if (arg1) (arg1)->quads = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_quads_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  quadfile_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_quads_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (quadfile_t *) ((arg1)->quads);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quadfile_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_starkd_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  startree_t *arg2 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_starkd_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_starkd_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_startree_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_t_starkd_set" "', argument " "2"" of type '" "startree_t *""'"); 
  }
  arg2 = (startree_t *)(argp2);
  if (arg1) (arg1)->starkd = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_starkd_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  startree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_starkd_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (startree_t *) ((arg1)->starkd);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_startree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_fits_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  anqfits_t *arg2 = (anqfits_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_fits_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_fits_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_anqfits_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_t_fits_set" "', argument " "2"" of type '" "anqfits_t *""'"); 
  }
  arg2 = (anqfits_t *)(argp2);
  if (arg1) (arg1)->fits = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_fits_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anqfits_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_fits_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (anqfits_t *) ((arg1)->fits);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anqfits_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_indexfn_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_indexfn_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_indexfn_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_t_indexfn_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->indexfn) free((char*)arg1->indexfn);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->indexfn = (char *)(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->indexfn = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_indexfn_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_indexfn_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (char *) ((arg1)->indexfn);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_indexname_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_indexname_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_indexname_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_t_indexname_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->indexname) free((char*)arg1->indexname);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->indexname = (char *)(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->indexname = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_indexname_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_indexname_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (char *) ((arg1)->indexname);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_indexid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_indexid_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_indexid_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_indexid_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->indexid = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_indexid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_indexid_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->indexid);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_healpix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_healpix_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_healpix_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_healpix_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->healpix = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_healpix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_healpix_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->healpix);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_hpnside_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_hpnside_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_hpnside_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_hpnside_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->hpnside = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_hpnside_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_hpnside_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->hpnside);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_index_jitter_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_index_jitter_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_index_jitter_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_index_jitter_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->index_jitter = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_index_jitter_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_index_jitter_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (double) ((arg1)->index_jitter);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutnside_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_cutnside_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutnside_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_cutnside_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->cutnside = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutnside_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutnside_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->cutnside);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutnsweep_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_cutnsweep_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutnsweep_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_cutnsweep_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->cutnsweep = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutnsweep_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutnsweep_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->cutnsweep);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutdedup_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_cutdedup_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutdedup_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_cutdedup_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->cutdedup = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutdedup_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutdedup_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (double) ((arg1)->cutdedup);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutband_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_cutband_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutband_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_t_cutband_set" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  if (arg1->cutband) free((char*)arg1->cutband);
  if (arg2) {
    size_t size = strlen((const char *)(arg2)) + 1;
    arg1->cutband = (char *)(char *)memcpy(malloc((size)*sizeof(char)), (const char *)(arg2), sizeof(char)*(size));
  } else {
    arg1->cutband = 0;
  }
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutband_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutband_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (char *) ((arg1)->cutband);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutmargin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_cutmargin_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutmargin_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_cutmargin_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->cutmargin = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cutmargin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cutmargin_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->cutmargin);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_circle_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  anbool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_circle_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_circle_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_circle_set" "', argument " "2"" of type '" "anbool""'");
  } 
  arg2 = (anbool)(val2);
  if (arg1) (arg1)->circle = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_circle_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anbool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_circle_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (anbool) ((arg1)->circle);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cx_less_than_dx_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  anbool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_cx_less_than_dx_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cx_less_than_dx_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_cx_less_than_dx_set" "', argument " "2"" of type '" "anbool""'");
  } 
  arg2 = (anbool)(val2);
  if (arg1) (arg1)->cx_less_than_dx = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_cx_less_than_dx_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anbool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_cx_less_than_dx_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (anbool) ((arg1)->cx_less_than_dx);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_meanx_less_than_half_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  anbool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_meanx_less_than_half_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_meanx_less_than_half_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_meanx_less_than_half_set" "', argument " "2"" of type '" "anbool""'");
  } 
  arg2 = (anbool)(val2);
  if (arg1) (arg1)->meanx_less_than_half = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_meanx_less_than_half_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anbool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_meanx_less_than_half_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (anbool) ((arg1)->meanx_less_than_half);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_index_scale_upper_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_index_scale_upper_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_index_scale_upper_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_index_scale_upper_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->index_scale_upper = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_index_scale_upper_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_index_scale_upper_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (double) ((arg1)->index_scale_upper);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_index_scale_lower_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_index_scale_lower_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_index_scale_lower_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_index_scale_lower_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->index_scale_lower = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_index_scale_lower_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_index_scale_lower_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (double) ((arg1)->index_scale_lower);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_dimquads_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_dimquads_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_dimquads_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_dimquads_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->dimquads = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_dimquads_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_dimquads_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->dimquads);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_nstars_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_nstars_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_nstars_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_nstars_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->nstars = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_nstars_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_nstars_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->nstars);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_nquads_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_t_nquads_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_nquads_set" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_t_nquads_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->nquads = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_t_nquads_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_t_nquads_get" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int) ((arg1)->nquads);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_index_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_index_t", 0, 0, 0)) SWIG_fail;
  result = (index_t *)calloc(1, sizeof(index_t));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_index_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_index_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_index_t" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *index_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_index_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *index_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_index_dimquads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_dimquads" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int)index_dimquads(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_overlaps_scale_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "index_overlaps_scale_range", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_overlaps_scale_range" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_overlaps_scale_range" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "index_overlaps_scale_range" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)index_overlaps_scale_range(arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_is_within_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "index_is_within_range", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_is_within_range" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_is_within_range" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "index_is_within_range" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "index_is_within_range" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (anbool)index_is_within_range(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_get_meta(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  index_t *arg2 = (index_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "index_get_meta", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_get_meta" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_get_meta" "', argument " "2"" of type '" "index_t *""'"); 
  }
  arg2 = (index_t *)(argp2);
  result = (int)index_get_meta((char const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_is_file_index(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  anbool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_is_file_index" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (anbool)index_is_file_index((char const *)arg1);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_get_quad_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_get_quad_filename" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (char *)index_get_quad_filename((char const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_get_qidx_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_get_qidx_filename" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (char *)index_get_qidx_filename((char const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_get_quad_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_get_quad_dim" "', argument " "1"" of type '" "index_t const *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int)index_get_quad_dim((index_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_get_code_dim(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_get_code_dim" "', argument " "1"" of type '" "index_t const *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int)index_get_code_dim((index_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_nquads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_nquads" "', argument " "1"" of type '" "index_t const *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int)index_nquads((index_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_nstars(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_nstars" "', argument " "1"" of type '" "index_t const *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int)index_nstars((index_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_build_from(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  quadfile_t *arg2 = (quadfile_t *) 0 ;
  startree_t *arg3 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  index_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_build_from", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_build_from" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_build_from" "', argument " "2"" of type '" "quadfile_t *""'"); 
  }
  arg2 = (quadfile_t *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "index_build_from" "', argument " "3"" of type '" "startree_t *""'"); 
  }
  arg3 = (startree_t *)(argp3);
  result = (index_t *)index_build_from(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_index_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_load(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  index_t *arg3 = (index_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  index_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "index_load", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_load" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "index_load" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "index_load" "', argument " "3"" of type '" "index_t *""'"); 
  }
  arg3 = (index_t *)(argp3);
  result = (index_t *)index_load((char const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_index_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_unload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_unload" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  index_unload(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_reload(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_reload" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int)index_reload(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_close_fds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_close_fds" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (int)index_close_fds(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_close" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  index_close(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "index_free" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  index_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_index_get_missing_cut_params(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  double *arg4 = (double *) 0 ;
  int *arg5 = (int *) 0 ;
  char **arg6 = (char **) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "index_get_missing_cut_params", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "index_get_missing_cut_params" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "index_get_missing_cut_params" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "index_get_missing_cut_params" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "index_get_missing_cut_params" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "index_get_missing_cut_params" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "index_get_missing_cut_params" "', argument " "6"" of type '" "char **""'"); 
  }
  arg6 = (char **)(argp6);
  result = (int)index_get_missing_cut_params(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_numquads_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_numquads_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_numquads_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_numquads_set" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  if (arg1) (arg1)->numquads = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_numquads_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  unsigned int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_numquads_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (unsigned int) ((arg1)->numquads);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_numstars_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  unsigned int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_numstars_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_numstars_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_numstars_set" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  if (arg1) (arg1)->numstars = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_numstars_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  unsigned int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_numstars_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (unsigned int) ((arg1)->numstars);
  resultobj = SWIG_From_unsigned_SS_int((unsigned int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_dimquads_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_dimquads_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_dimquads_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_dimquads_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->dimquads = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_dimquads_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_dimquads_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int) ((arg1)->dimquads);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_index_scale_upper_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_index_scale_upper_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_index_scale_upper_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_index_scale_upper_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->index_scale_upper = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_index_scale_upper_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_index_scale_upper_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (double) ((arg1)->index_scale_upper);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_index_scale_lower_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_index_scale_lower_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_index_scale_lower_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_index_scale_lower_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->index_scale_lower = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_index_scale_lower_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_index_scale_lower_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (double) ((arg1)->index_scale_lower);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_indexid_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_indexid_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_indexid_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_indexid_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->indexid = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_indexid_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_indexid_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int) ((arg1)->indexid);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_healpix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_healpix_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_healpix_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_healpix_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->healpix = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_healpix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_healpix_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int) ((arg1)->healpix);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_hpnside_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_hpnside_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_hpnside_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_t_hpnside_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->hpnside = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_hpnside_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_hpnside_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int) ((arg1)->hpnside);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_fb_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  fitsbin_t *arg2 = (fitsbin_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_fb_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_fb_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_fitsbin_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "quadfile_t_fb_set" "', argument " "2"" of type '" "fitsbin_t *""'"); 
  }
  arg2 = (fitsbin_t *)(argp2);
  if (arg1) (arg1)->fb = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_fb_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  fitsbin_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_fb_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (fitsbin_t *) ((arg1)->fb);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fitsbin_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_quadarray_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  uint32_t *arg2 = (uint32_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_t_quadarray_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_quadarray_set" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_uint32_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "quadfile_t_quadarray_set" "', argument " "2"" of type '" "uint32_t *""'"); 
  }
  arg2 = (uint32_t *)(argp2);
  if (arg1) (arg1)->quadarray = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_t_quadarray_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  uint32_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_t_quadarray_get" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (uint32_t *) ((arg1)->quadarray);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint32_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_quadfile_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_quadfile_t", 0, 0, 0)) SWIG_fail;
  result = (quadfile_t *)calloc(1, sizeof(quadfile_t));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quadfile_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_quadfile_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_quadfile_t" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *quadfile_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_quadfile_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *quadfile_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_quadfile_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  quadfile_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_open" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (quadfile_t *)quadfile_open((char const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_open_fits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anqfits_t *arg1 = (anqfits_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  quadfile_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anqfits_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_open_fits" "', argument " "1"" of type '" "anqfits_t *""'"); 
  }
  arg1 = (anqfits_t *)(argp1);
  result = (quadfile_t *)quadfile_open_fits(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quadfile_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_get_filename(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_get_filename" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (char *)quadfile_get_filename((quadfile_t const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_open_for_writing(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  quadfile_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_open_for_writing" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (quadfile_t *)quadfile_open_for_writing((char const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_open_in_memory(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_open_in_memory", 0, 0, 0)) SWIG_fail;
  result = (quadfile_t *)quadfile_open_in_memory();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_quadfile_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_switch_to_reading(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_switch_to_reading" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_switch_to_reading(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_close" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_close(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_check(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_check" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_check((quadfile_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_get_stars(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  unsigned int arg2 ;
  unsigned int *arg3 = (unsigned int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  unsigned int tempstars3[DQMAX] ;
  PyObject *swig_obj[2] ;
  int result;
  
  {
    arg3 = tempstars3;
  }
  if (!SWIG_Python_UnpackTuple(args, "quadfile_get_stars", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_get_stars" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "quadfile_get_stars" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  result = (int)quadfile_get_stars((quadfile_t const *)arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  {
    int i;
    int D;
    if (result == -1) {
      goto fail;
    }
    D = arg1->dimquads;
    resultobj = PyList_New(D);
    for (i = 0; i < D; i++) {
      PyObject *o = PyInt_FromLong(arg3[i]);
      PyList_SetItem(resultobj, i, o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_write_quad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  unsigned int *arg2 = (unsigned int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int tempstars2[DQMAX] ;
  PyObject *swig_obj[1] ;
  int result;
  
  {
    arg2 = tempstars2;
  }
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_write_quad" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_write_quad(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_dimquads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_dimquads" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_dimquads((quadfile_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_nquads(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_nquads" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_nquads((quadfile_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_fix_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_fix_header" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_fix_header(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_write_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_write_header" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (int)quadfile_write_header(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_get_index_scale_upper_arcsec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_get_index_scale_upper_arcsec" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (double)quadfile_get_index_scale_upper_arcsec((quadfile_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_get_index_scale_lower_arcsec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_get_index_scale_lower_arcsec" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (double)quadfile_get_index_scale_lower_arcsec((quadfile_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_get_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_get_header" "', argument " "1"" of type '" "quadfile_t const *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  result = (qfits_header *)quadfile_get_header((quadfile_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_write_header_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_write_header_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_write_header_to" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "quadfile_write_header_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)quadfile_write_header_to(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_write_all_quads_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  quadfile_t *arg1 = (quadfile_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "quadfile_write_all_quads_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_quadfile_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_write_all_quads_to" "', argument " "1"" of type '" "quadfile_t *""'"); 
  }
  arg1 = (quadfile_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "quadfile_write_all_quads_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)quadfile_write_all_quads_to(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_t_tree_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  kdtree_t *arg2 = (kdtree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_t_tree_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_t_tree_set" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_kdtree_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "codetree_t_tree_set" "', argument " "2"" of type '" "kdtree_t *""'"); 
  }
  arg2 = (kdtree_t *)(argp2);
  if (arg1) (arg1)->tree = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_t_tree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  kdtree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_t_tree_get" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (kdtree_t *) ((arg1)->tree);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_kdtree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_t_header_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  qfits_header *arg2 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_t_header_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_t_header_set" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfits_header, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "codetree_t_header_set" "', argument " "2"" of type '" "qfits_header *""'"); 
  }
  arg2 = (qfits_header *)(argp2);
  if (arg1) (arg1)->header = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_t_header_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_t_header_get" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (qfits_header *) ((arg1)->header);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_t_inverse_perm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  int *arg2 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_t_inverse_perm_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_t_inverse_perm_set" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "codetree_t_inverse_perm_set" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  if (arg1) (arg1)->inverse_perm = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_t_inverse_perm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_t_inverse_perm_get" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (int *) ((arg1)->inverse_perm);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_codetree_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_codetree_t", 0, 0, 0)) SWIG_fail;
  result = (codetree_t *)calloc(1, sizeof(codetree_t));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_codetree_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_codetree_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_codetree_t" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *codetree_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_codetree_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *codetree_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_codetree_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  codetree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_open" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (codetree_t *)codetree_open((char const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_codetree_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_open_fits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anqfits_t *arg1 = (anqfits_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  codetree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anqfits_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_open_fits" "', argument " "1"" of type '" "anqfits_t *""'"); 
  }
  arg1 = (anqfits_t *)(argp1);
  result = (codetree_t *)codetree_open_fits(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_codetree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  unsigned int arg2 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_get", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_get" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "codetree_get" "', argument " "2"" of type '" "unsigned int""'");
  } 
  arg2 = (unsigned int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "codetree_get" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  result = (int)codetree_get(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_N(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_N" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (int)codetree_N(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_nodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_nodes" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (int)codetree_nodes(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_D" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (int)codetree_D(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_get_permuted(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_get_permuted", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_get_permuted" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "codetree_get_permuted" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)codetree_get_permuted(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_header" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (qfits_header *)codetree_header(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_close" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  result = (int)codetree_close(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_new", 0, 0, 0)) SWIG_fail;
  result = (codetree_t *)codetree_new();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_codetree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_append_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_append_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_append_to" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "codetree_append_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)codetree_append_to(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_write_to_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_write_to_file", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_write_to_file" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "codetree_write_to_file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)codetree_write_to_file(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_codetree_write_to_file_flipped(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  codetree_t *arg1 = (codetree_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "codetree_write_to_file_flipped", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_codetree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codetree_write_to_file_flipped" "', argument " "1"" of type '" "codetree_t *""'"); 
  }
  arg1 = (codetree_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "codetree_write_to_file_flipped" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)codetree_write_to_file_flipped(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_tree_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  kdtree_t *arg2 = (kdtree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_t_tree_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_tree_set" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_kdtree_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_t_tree_set" "', argument " "2"" of type '" "kdtree_t *""'"); 
  }
  arg2 = (kdtree_t *)(argp2);
  if (arg1) (arg1)->tree = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_tree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  kdtree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_tree_get" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (kdtree_t *) ((arg1)->tree);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_kdtree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_header_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  qfits_header *arg2 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_t_header_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_header_set" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfits_header, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_t_header_set" "', argument " "2"" of type '" "qfits_header *""'"); 
  }
  arg2 = (qfits_header *)(argp2);
  if (arg1) (arg1)->header = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_header_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_header_get" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (qfits_header *) ((arg1)->header);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_inverse_perm_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int *arg2 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_t_inverse_perm_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_inverse_perm_set" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_t_inverse_perm_set" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  if (arg1) (arg1)->inverse_perm = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_inverse_perm_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_inverse_perm_get" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int *) ((arg1)->inverse_perm);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_sweep_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  uint8_t *arg2 = (uint8_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_t_sweep_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_sweep_set" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_uint8_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_t_sweep_set" "', argument " "2"" of type '" "uint8_t *""'"); 
  }
  arg2 = (uint8_t *)(argp2);
  if (arg1) (arg1)->sweep = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_sweep_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  uint8_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_sweep_get" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (uint8_t *) ((arg1)->sweep);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_uint8_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_writing_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_t_writing_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_writing_set" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_t_writing_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->writing = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_writing_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_writing_get" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int) ((arg1)->writing);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_tagalong_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  fitstable_t *arg2 = (fitstable_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_t_tagalong_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_tagalong_set" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_fitstable_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_t_tagalong_set" "', argument " "2"" of type '" "fitstable_t *""'"); 
  }
  arg2 = (fitstable_t *)(argp2);
  if (arg1) (arg1)->tagalong = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_t_tagalong_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  fitstable_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_t_tagalong_get" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (fitstable_t *) ((arg1)->tagalong);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fitstable_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_startree_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_startree_t", 0, 0, 0)) SWIG_fail;
  result = (startree_t *)calloc(1, sizeof(startree_t));
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_startree_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_startree_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_startree_t" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  free((char *) arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *startree_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_startree_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *startree_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_startree_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  startree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_open" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (startree_t *)startree_open((char const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_startree_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_open_fits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anqfits_t *arg1 = (anqfits_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  startree_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anqfits_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_open_fits" "', argument " "1"" of type '" "anqfits_t *""'"); 
  }
  arg1 = (anqfits_t *)(argp1);
  result = (startree_t *)startree_open_fits(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_startree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_search_for(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double arg3 ;
  double **arg4 = (double **) 0 ;
  double **arg5 = (double **) 0 ;
  int **arg6 = (int **) 0 ;
  int *arg7 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  PyObject *swig_obj[7] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_search_for", 7, 7, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_search_for" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_search_for" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "startree_search_for" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "startree_search_for" "', argument " "4"" of type '" "double **""'"); 
  }
  arg4 = (double **)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "startree_search_for" "', argument " "5"" of type '" "double **""'"); 
  }
  arg5 = (double **)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_p_int, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "startree_search_for" "', argument " "6"" of type '" "int **""'"); 
  }
  arg6 = (int **)(argp6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "startree_search_for" "', argument " "7"" of type '" "int *""'"); 
  }
  arg7 = (int *)(argp7);
  startree_search_for((startree_t const *)arg1,(double const *)arg2,arg3,arg4,arg5,arg6,arg7);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_search_for_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double **arg5 = (double **) 0 ;
  double **arg6 = (double **) 0 ;
  int **arg7 = (int **) 0 ;
  int *arg8 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject *swig_obj[8] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_search_for_radec", 8, 8, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_search_for_radec" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_search_for_radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "startree_search_for_radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "startree_search_for_radec" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "startree_search_for_radec" "', argument " "5"" of type '" "double **""'"); 
  }
  arg5 = (double **)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "startree_search_for_radec" "', argument " "6"" of type '" "double **""'"); 
  }
  arg6 = (double **)(argp6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "startree_search_for_radec" "', argument " "7"" of type '" "int **""'"); 
  }
  arg7 = (int **)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7], &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "startree_search_for_radec" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = (int *)(argp8);
  startree_search_for_radec((startree_t const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double arg3 ;
  double **arg4 = (double **) 0 ;
  double **arg5 = (double **) 0 ;
  int *arg6 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_search", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_search" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_search" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "startree_search" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "startree_search" "', argument " "4"" of type '" "double **""'"); 
  }
  arg4 = (double **)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "startree_search" "', argument " "5"" of type '" "double **""'"); 
  }
  arg5 = (double **)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "startree_search" "', argument " "6"" of type '" "int *""'"); 
  }
  arg6 = (int *)(argp6);
  startree_search((startree_t const *)arg1,(double const *)arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_data_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  double *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_data_column", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_data_column" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_get_data_column" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "startree_get_data_column" "', argument " "3"" of type '" "int const *""'"); 
  }
  arg3 = (int *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "startree_get_data_column" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (double *)startree_get_data_column(arg1,(char const *)arg2,(int const *)arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  {
    int i;
    int N;
    if (!result) {
      goto fail;
    }
    N = arg4;
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyFloat_FromDouble(result[i]);
      PyList_SetItem(resultobj, i, o);
    }
    free(result);
  }
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_data_column_int64(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int64_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_data_column_int64", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_data_column_int64" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_get_data_column_int64" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "startree_get_data_column_int64" "', argument " "3"" of type '" "int const *""'"); 
  }
  arg3 = (int *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "startree_get_data_column_int64" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (int64_t *)startree_get_data_column_int64(arg1,(char const *)arg2,(int const *)arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int64_t, 0 |  0 );
  {
    int i;
    int N;
    if (!result) {
      goto fail;
    }
    N = arg4;
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyFloat_FromDouble(result[i]);
      PyList_SetItem(resultobj, i, o);
    }
    free(result);
  }
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_data_column_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  double *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_data_column_array", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_data_column_array" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_get_data_column_array" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "startree_get_data_column_array" "', argument " "3"" of type '" "int const *""'"); 
  }
  arg3 = (int *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "startree_get_data_column_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "startree_get_data_column_array" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  result = (double *)startree_get_data_column_array(arg1,(char const *)arg2,(int const *)arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  {
    int i;
    int N;
    if (!result) {
      goto fail;
    }
    N = arg4;
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyFloat_FromDouble(result[i]);
      PyList_SetItem(resultobj, i, o);
    }
    free(result);
  }
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_free_data_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_free_data_column", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_free_data_column" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_free_data_column" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = (double *)(argp2);
  startree_free_data_column(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_has_tagalong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anbool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_has_tagalong" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (anbool)startree_has_tagalong(arg1);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_tagalong(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  fitstable_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_tagalong" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (fitstable_t *)startree_get_tagalong(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_fitstable_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_tagalong_column_names(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  sl *arg2 = (sl *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  sl *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_tagalong_column_names", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_tagalong_column_names" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sl, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_get_tagalong_column_names" "', argument " "2"" of type '" "sl *""'"); 
  }
  arg2 = (sl *)(argp2);
  result = (sl *)startree_get_tagalong_column_names(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sl, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_tagalong_N_columns(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_tagalong_N_columns" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_get_tagalong_N_columns(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_tagalong_column_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_tagalong_column_name", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_tagalong_column_name" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_get_tagalong_column_name" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (char *)startree_get_tagalong_column_name(arg1,arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_tagalong_column_fits_type(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  tfits_type result;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_tagalong_column_fits_type", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_tagalong_column_fits_type" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_get_tagalong_column_fits_type" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = startree_get_tagalong_column_fits_type(arg1,arg2);
  resultobj = SWIG_NewPointerObj((tfits_type *)memcpy((tfits_type *)calloc(1,sizeof(tfits_type)),&result,sizeof(tfits_type)), SWIGTYPE_p_tfits_type, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_tagalong_column_array_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_tagalong_column_array_size", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_tagalong_column_array_size" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_get_tagalong_column_array_size" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)startree_get_tagalong_column_array_size(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_cut_nside(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_cut_nside" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_get_cut_nside((startree_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_cut_nsweeps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_cut_nsweeps" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_get_cut_nsweeps((startree_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_cut_dedup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_cut_dedup" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (double)startree_get_cut_dedup((startree_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_cut_band(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_cut_band" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (char *)startree_get_cut_band((startree_t const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_cut_margin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_cut_margin" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_get_cut_margin((startree_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_jitter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_jitter" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (double)startree_get_jitter((startree_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_set_jitter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_set_jitter", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_set_jitter" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_set_jitter" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  startree_set_jitter(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_sweep(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_get_sweep", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_sweep" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_get_sweep" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)startree_get_sweep((startree_t const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_N(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_N" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_N((startree_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_nodes(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_nodes" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_nodes((startree_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_D" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_D((startree_t const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_header" "', argument " "1"" of type '" "startree_t const *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (qfits_header *)startree_header((startree_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double tempxyz3[3] ;
  PyObject *swig_obj[2] ;
  int result;
  
  {
    arg3 = tempxyz3;
  }
  if (!SWIG_Python_UnpackTuple(args, "startree_get", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_get" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)startree_get(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  {
    resultobj = Py_BuildValue("(ddd)", arg3[0], arg3[1], arg3[2]);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_get_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  PyObject *swig_obj[2] ;
  int result;
  
  arg3 = &temp3;
  arg4 = &temp4;
  if (!SWIG_Python_UnpackTuple(args, "startree_get_radec", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_get_radec" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "startree_get_radec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)startree_get_radec(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_close(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_close" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_close(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_compute_inverse_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_compute_inverse_perm" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  startree_compute_inverse_perm(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_check_inverse_perm(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_check_inverse_perm" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  result = (int)startree_check_inverse_perm(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_new", 0, 0, 0)) SWIG_fail;
  result = (startree_t *)startree_new();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_startree_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_write_to_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_write_to_file", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_write_to_file" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_write_to_file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)startree_write_to_file(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_write_to_file_flipped(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_write_to_file_flipped", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_write_to_file_flipped" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_write_to_file_flipped" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)startree_write_to_file_flipped(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_startree_append_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  startree_t *arg1 = (startree_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "startree_append_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_startree_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "startree_append_to" "', argument " "1"" of type '" "startree_t *""'"); 
  }
  arg1 = (startree_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "startree_append_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)startree_append_to(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_code_alloc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "code_alloc" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  result = (double *)code_alloc(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_double, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_code_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "code_free" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = (double *)(argp1);
  code_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_code_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "code_get", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "code_get" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "code_get" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (double)code_get(arg1,arg2);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_codekd_addr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  long result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "codekd_addr" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (long)codekd_addr(arg1);
  resultobj = SWIG_From_long((long)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_starkd_addr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  long result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "starkd_addr" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (long)starkd_addr(arg1);
  resultobj = SWIG_From_long((long)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_quadfile_addr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  index_t *arg1 = (index_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  long result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_index_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "quadfile_addr" "', argument " "1"" of type '" "index_t *""'"); 
  }
  arg1 = (index_t *)(argp1);
  result = (long)quadfile_addr(arg1);
  resultobj = SWIG_From_long((long)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_xy_to_ring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_xy_to_ring", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_xy_to_ring" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_xy_to_ring" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)healpix_xy_to_ring(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_ring_to_xy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_ring_to_xy", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_ring_to_xy" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_ring_to_xy" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)healpix_ring_to_xy(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_xy_to_nested(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_xy_to_nested", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_xy_to_nested" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_xy_to_nested" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)healpix_xy_to_nested(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_nested_to_xy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_nested_to_xy", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_nested_to_xy" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_nested_to_xy" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)healpix_nested_to_xy(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_decompose_ring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_decompose_ring", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_decompose_ring" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_decompose_ring" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "healpix_decompose_ring" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_decompose_ring" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  healpix_decompose_ring(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_compose_ring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_compose_ring", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_compose_ring" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_compose_ring" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_compose_ring" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)healpix_compose_ring(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_decompose_xy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_decompose_xy", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_decompose_xy" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "healpix_decompose_xy" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "healpix_decompose_xy" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_decompose_xy" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "healpix_decompose_xy" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  healpix_decompose_xy(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_decompose_xyl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int64_t arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_decompose_xyl", 5, 5, swig_obj)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_int64_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpix_decompose_xyl" "', argument " "1"" of type '" "int64_t""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "healpix_decompose_xyl" "', argument " "1"" of type '" "int64_t""'");
    } else {
      arg1 = *((int64_t *)(argp1));
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "healpix_decompose_xyl" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "healpix_decompose_xyl" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_decompose_xyl" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "healpix_decompose_xyl" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  healpix_decompose_xyl(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_compose_xy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_compose_xy", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_compose_xy" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_compose_xy" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_compose_xy" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_compose_xy" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (int)healpix_compose_xy(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_compose_xyl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int64_t result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_compose_xyl", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_compose_xyl" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_compose_xyl" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_compose_xyl" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_compose_xyl" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = healpix_compose_xyl(arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_convert_xy_nside(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_convert_xy_nside", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_convert_xy_nside" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_convert_xy_nside" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_convert_xy_nside" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_convert_xy_nside" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpix_convert_xy_nside" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "healpix_convert_xy_nside" "', argument " "6"" of type '" "int *""'"); 
  }
  arg6 = (int *)(argp6);
  healpix_convert_xy_nside(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_convert_nside(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_convert_nside", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_convert_nside" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_convert_nside" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_convert_nside" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_convert_nside" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  healpix_convert_nside(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_convert_nsidel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int64_t arg1 ;
  int arg2 ;
  int arg3 ;
  int64_t *arg4 = (int64_t *) 0 ;
  void *argp1 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_convert_nsidel", 4, 4, swig_obj)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_int64_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpix_convert_nsidel" "', argument " "1"" of type '" "int64_t""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "healpix_convert_nsidel" "', argument " "1"" of type '" "int64_t""'");
    } else {
      arg1 = *((int64_t *)(argp1));
    }
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_convert_nsidel" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_convert_nsidel" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int64_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_convert_nsidel" "', argument " "4"" of type '" "int64_t *""'"); 
  }
  arg4 = (int64_t *)(argp4);
  healpix_convert_nsidel(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radectohealpix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "radectohealpix", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radectohealpix" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radectohealpix" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radectohealpix" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)radectohealpix(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radectohealpixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "radectohealpixf", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radectohealpixf" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radectohealpixf" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radectohealpixf" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)radectohealpixf(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radectohealpixl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int64_t result;
  
  if (!SWIG_Python_UnpackTuple(args, "radectohealpixl", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radectohealpixl" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radectohealpixl" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radectohealpixl" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = radectohealpixl(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radectohealpixlf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int64_t result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "radectohealpixlf", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radectohealpixlf" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radectohealpixlf" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radectohealpixlf" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = radectohealpixlf(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdegtohealpix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "radecdegtohealpix", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radecdegtohealpix" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radecdegtohealpix" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radecdegtohealpix" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)radecdegtohealpix(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdegtohealpixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "radecdegtohealpixf", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radecdegtohealpixf" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radecdegtohealpixf" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radecdegtohealpixf" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)radecdegtohealpixf(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdegtohealpixl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int64_t result;
  
  if (!SWIG_Python_UnpackTuple(args, "radecdegtohealpixl", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radecdegtohealpixl" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radecdegtohealpixl" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radecdegtohealpixl" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = radecdegtohealpixl(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdegtohealpixlf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int64_t result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "radecdegtohealpixlf", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radecdegtohealpixlf" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radecdegtohealpixlf" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radecdegtohealpixlf" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = radecdegtohealpixlf(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyztohealpix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "xyztohealpix", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "xyztohealpix" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyztohealpix" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "xyztohealpix" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "xyztohealpix" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (int)xyztohealpix(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyztohealpixl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int64_t result;
  
  if (!SWIG_Python_UnpackTuple(args, "xyztohealpixl", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "xyztohealpixl" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyztohealpixl" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "xyztohealpixl" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "xyztohealpixl" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = xyztohealpixl(arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyztohealpixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  int result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "xyztohealpixf", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "xyztohealpixf" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyztohealpixf" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "xyztohealpixf" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "xyztohealpixf" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (int)xyztohealpixf(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyztohealpixlf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  int64_t result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "xyztohealpixlf", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "xyztohealpixlf" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyztohealpixlf" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "xyztohealpixlf" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "xyztohealpixlf" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = xyztohealpixlf(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyzarrtohealpix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "xyzarrtohealpix", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xyzarrtohealpix" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyzarrtohealpix" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)xyzarrtohealpix((double const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyzarrtohealpixl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int64_t result;
  
  if (!SWIG_Python_UnpackTuple(args, "xyzarrtohealpixl", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xyzarrtohealpixl" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyzarrtohealpixl" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = xyzarrtohealpixl((double const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj((int64_t *)memcpy((int64_t *)calloc(1,sizeof(int64_t)),&result,sizeof(int64_t)), SWIGTYPE_p_int64_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyzarrtohealpixf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  PyObject *swig_obj[2] ;
  int result;
  
  arg3 = &temp3;
  arg4 = &temp4;
  if (!SWIG_Python_UnpackTuple(args, "xyzarrtohealpixf", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xyzarrtohealpixf" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyzarrtohealpixf" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)xyzarrtohealpixf((double const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_to_xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  double *arg7 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  double temp7 ;
  int res7 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  
  arg5 = &temp5;
  arg6 = &temp6;
  arg7 = &temp7;
  if (!SWIG_Python_UnpackTuple(args, "healpix_to_xyz", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_to_xyz" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_to_xyz" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_to_xyz" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_to_xyz" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  healpix_to_xyz(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res7)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg7)));
  } else {
    int new_flags = SWIG_IsNewObj(res7) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg7), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_to_xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_to_xyzarr", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_to_xyzarr" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_to_xyzarr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_to_xyzarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_to_xyzarr" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpix_to_xyzarr" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  healpix_to_xyzarr(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpixl_to_xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int64_t arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  void *argp1 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpixl_to_xyzarr", 5, 5, swig_obj)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_int64_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpixl_to_xyzarr" "', argument " "1"" of type '" "int64_t""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "healpixl_to_xyzarr" "', argument " "1"" of type '" "int64_t""'");
    } else {
      arg1 = *((int64_t *)(argp1));
    }
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpixl_to_xyzarr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpixl_to_xyzarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpixl_to_xyzarr" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpixl_to_xyzarr" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  healpixl_to_xyzarr(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_to_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "healpix_to_radec", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_to_radec" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_to_radec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_to_radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_to_radec" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  healpix_to_radec(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_to_radecdeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "healpix_to_radecdeg", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_to_radecdeg" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_to_radecdeg" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_to_radecdeg" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_to_radecdeg" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  healpix_to_radecdeg(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpixl_to_radecdeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int64_t arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "healpixl_to_radecdeg", 4, 4, swig_obj)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_int64_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpixl_to_radecdeg" "', argument " "1"" of type '" "int64_t""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "healpixl_to_radecdeg" "', argument " "1"" of type '" "int64_t""'");
    } else {
      arg1 = *((int64_t *)(argp1));
    }
  }
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpixl_to_radecdeg" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpixl_to_radecdeg" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpixl_to_radecdeg" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  healpixl_to_radecdeg(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_to_radecarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_to_radecarr", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_to_radecarr" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_to_radecarr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_to_radecarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_to_radecarr" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpix_to_radecarr" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  healpix_to_radecarr(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_to_radecdegarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_to_radecdegarr", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_to_radecdegarr" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_to_radecdegarr" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_to_radecdegarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_to_radecdegarr" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpix_to_radecdegarr" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  healpix_to_radecdegarr(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_side_length_arcmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_side_length_arcmin" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  result = (double)healpix_side_length_arcmin(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_nside_for_side_length_arcmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_nside_for_side_length_arcmin" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)healpix_nside_for_side_length_arcmin(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_get_neighbours(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int *arg2 = (int *) 0 ;
  int arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int tempneigh2[8] ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  {
    arg2 = tempneigh2;
  }
  if (!SWIG_Python_UnpackTuple(args, "healpix_get_neighbours", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_get_neighbours" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode3 = SWIG_AsVal_int(swig_obj[1], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_get_neighbours" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)healpix_get_neighbours(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  {
    int i;
    int nn;
    // convert resultobj to nn
    //nn = (int)PyInt_AsLong(resultobj);
    nn = result;
    resultobj = PyList_New(nn);
    for (i = 0; i < nn; i++) {
      PyObject *o = PyInt_FromLong(arg2[i]);
      PyList_SetItem(resultobj, i, o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_get_neighboursl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int64_t arg1 ;
  int64_t *arg2 = (int64_t *) 0 ;
  int arg3 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_get_neighboursl", 3, 3, swig_obj)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_int64_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpix_get_neighboursl" "', argument " "1"" of type '" "int64_t""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "healpix_get_neighboursl" "', argument " "1"" of type '" "int64_t""'");
    } else {
      arg1 = *((int64_t *)(argp1));
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int64_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "healpix_get_neighboursl" "', argument " "2"" of type '" "int64_t *""'"); 
  }
  arg2 = (int64_t *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_get_neighboursl" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)healpix_get_neighboursl(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_get_neighbours_within_range(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double arg2 ;
  int *arg3 = (int *) 0 ;
  int arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_get_neighbours_within_range", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpix_get_neighbours_within_range" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_get_neighbours_within_range" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "healpix_get_neighbours_within_range" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_get_neighbours_within_range" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (int)healpix_get_neighbours_within_range(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_get_neighbours_within_range_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int *arg4 = (int *) 0 ;
  int arg5 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_get_neighbours_within_range_radec", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_get_neighbours_within_range_radec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_get_neighbours_within_range_radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_get_neighbours_within_range_radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_get_neighbours_within_range_radec" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "healpix_get_neighbours_within_range_radec" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  result = (int)healpix_get_neighbours_within_range_radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_distance_to_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_distance_to_radec", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_distance_to_radec" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_distance_to_radec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_distance_to_radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_distance_to_radec" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpix_distance_to_radec" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (double)healpix_distance_to_radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_distance_to_xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_distance_to_xyz", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_distance_to_xyz" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_distance_to_xyz" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "healpix_distance_to_xyz" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_distance_to_xyz" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  result = (double)healpix_distance_to_xyz(arg1,arg2,(double const *)arg3,arg4);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_within_range_of_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_within_range_of_radec", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_within_range_of_radec" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_within_range_of_radec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_within_range_of_radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_within_range_of_radec" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "healpix_within_range_of_radec" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  result = (int)healpix_within_range_of_radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_within_range_of_xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  double arg4 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_within_range_of_xyz", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_within_range_of_xyz" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_within_range_of_xyz" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "healpix_within_range_of_xyz" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_within_range_of_xyz" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (int)healpix_within_range_of_xyz(arg1,arg2,(double const *)arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_radec_bounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[2] ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "healpix_radec_bounds", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_radec_bounds" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_radec_bounds" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  healpix_radec_bounds(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_rangesearch_xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double arg2 ;
  int arg3 ;
  il *arg4 = (il *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  il *result = 0 ;
  
  {
    arg4 = NULL;
  }
  if (!SWIG_Python_UnpackTuple(args, "healpix_rangesearch_xyz", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpix_rangesearch_xyz" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_rangesearch_xyz" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_rangesearch_xyz" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (il *)healpix_rangesearch_xyz((double const *)arg1,arg2,arg3,arg4);
  {
    int i;
    int N;
    N = il_size(result);
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyInt_FromLong(il_get(result, i));
      PyList_SetItem(resultobj, i, o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_rangesearch_xyz_approx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double arg2 ;
  int arg3 ;
  il *arg4 = (il *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  il *result = 0 ;
  
  {
    arg4 = NULL;
  }
  if (!SWIG_Python_UnpackTuple(args, "healpix_rangesearch_xyz_approx", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpix_rangesearch_xyz_approx" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_rangesearch_xyz_approx" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_rangesearch_xyz_approx" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (il *)healpix_rangesearch_xyz_approx((double const *)arg1,arg2,arg3,arg4);
  {
    int i;
    int N;
    N = il_size(result);
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyInt_FromLong(il_get(result, i));
      PyList_SetItem(resultobj, i, o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_rangesearch_radec_approx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  il *arg5 = (il *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  il *result = 0 ;
  
  {
    arg5 = NULL;
  }
  if (!SWIG_Python_UnpackTuple(args, "healpix_rangesearch_radec_approx", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_rangesearch_radec_approx" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_rangesearch_radec_approx" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_rangesearch_radec_approx" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_rangesearch_radec_approx" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (il *)healpix_rangesearch_radec_approx(arg1,arg2,arg3,arg4,arg5);
  {
    int i;
    int N;
    N = il_size(result);
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyInt_FromLong(il_get(result, i));
      PyList_SetItem(resultobj, i, o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_rangesearch_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  il *arg5 = (il *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  il *result = 0 ;
  
  {
    arg5 = NULL;
  }
  if (!SWIG_Python_UnpackTuple(args, "healpix_rangesearch_radec", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_rangesearch_radec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "healpix_rangesearch_radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_rangesearch_radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "healpix_rangesearch_radec" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (il *)healpix_rangesearch_radec(arg1,arg2,arg3,arg4,arg5);
  {
    int i;
    int N;
    N = il_size(result);
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyInt_FromLong(il_get(result, i));
      PyList_SetItem(resultobj, i, o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_region_search(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  il *arg2 = (il *) 0 ;
  int arg3 ;
  il *arg4 = (il *) 0 ;
  il *arg5 = (il *) 0 ;
  int (*arg6)(int,void *) = (int (*)(int,void *)) 0 ;
  void *arg7 = (void *) 0 ;
  int arg8 ;
  int val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int res7 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject *swig_obj[8] ;
  il *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_region_search", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "healpix_region_search" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_il, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "healpix_region_search" "', argument " "2"" of type '" "il *""'"); 
  }
  arg2 = (il *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_region_search" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_il, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_region_search" "', argument " "4"" of type '" "il *""'"); 
  }
  arg4 = (il *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_il, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpix_region_search" "', argument " "5"" of type '" "il *""'"); 
  }
  arg5 = (il *)(argp5);
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[5], (void**)(&arg6), SWIGTYPE_p_f_int_p_void__int);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "healpix_region_search" "', argument " "6"" of type '" "int (*)(int,void *)""'"); 
    }
  }
  res7 = SWIG_ConvertPtr(swig_obj[6],SWIG_as_voidptrptr(&arg7), 0, 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "healpix_region_search" "', argument " "7"" of type '" "void *""'"); 
  }
  ecode8 = SWIG_AsVal_int(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "healpix_region_search" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = (int)(val8);
  result = (il *)healpix_region_search(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  {
    int i;
    int N;
    N = il_size(result);
    resultobj = PyList_New(N);
    for (i = 0; i < N; i++) {
      PyObject *o = PyInt_FromLong(il_get(result, i));
      PyList_SetItem(resultobj, i, o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_healpix_region_searchl(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int64_t arg1 ;
  ll *arg2 = (ll *) 0 ;
  int arg3 ;
  ll *arg4 = (ll *) 0 ;
  ll *arg5 = (ll *) 0 ;
  int (*arg6)(int64_t,void *) = (int (*)(int64_t,void *)) 0 ;
  void *arg7 = (void *) 0 ;
  int arg8 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int res7 ;
  int val8 ;
  int ecode8 = 0 ;
  PyObject *swig_obj[8] ;
  ll *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "healpix_region_searchl", 8, 8, swig_obj)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_int64_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "healpix_region_searchl" "', argument " "1"" of type '" "int64_t""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "healpix_region_searchl" "', argument " "1"" of type '" "int64_t""'");
    } else {
      arg1 = *((int64_t *)(argp1));
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_ll, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "healpix_region_searchl" "', argument " "2"" of type '" "ll *""'"); 
  }
  arg2 = (ll *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "healpix_region_searchl" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_ll, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "healpix_region_searchl" "', argument " "4"" of type '" "ll *""'"); 
  }
  arg4 = (ll *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_ll, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "healpix_region_searchl" "', argument " "5"" of type '" "ll *""'"); 
  }
  arg5 = (ll *)(argp5);
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[5], (void**)(&arg6), SWIGTYPE_p_f_int64_t_p_void__int);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "healpix_region_searchl" "', argument " "6"" of type '" "int (*)(int64_t,void *)""'"); 
    }
  }
  res7 = SWIG_ConvertPtr(swig_obj[6],SWIG_as_voidptrptr(&arg7), 0, 0);
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "healpix_region_searchl" "', argument " "7"" of type '" "void *""'"); 
  }
  ecode8 = SWIG_AsVal_int(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "healpix_region_searchl" "', argument " "8"" of type '" "int""'");
  } 
  arg8 = (int)(val8);
  result = (ll *)healpix_region_searchl(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_ll, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_wcslib_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  char **arg2 = (char **) 0 ;
  int *arg3 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char *tempstr2 ;
  int slen3 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  {
    arg2 = &tempstr2;
  }
  {
    arg3 = &slen3;
  }
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_wcslib_to_string" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (char *)anwcs_wcslib_to_string((struct anwcs_t const *)arg1,arg2,arg3);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_type_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_type_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_type_set" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_t_type_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->type = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_type_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_type_get" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  result = (int) ((arg1)->type);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_data_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  void *arg2 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_data_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_data_set" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, SWIG_POINTER_DISOWN);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_t_data_set" "', argument " "2"" of type '" "void *""'"); 
  }
  if (arg1) (arg1)->data = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_data_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  void *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_data_get" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  result = (void *) ((arg1)->data);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_void, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_anwcs_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 = (int) 0 ;
  int arg3 = (int) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  struct anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "new_anwcs_t", 1, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_anwcs_t" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_anwcs_t" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = (int)(val2);
  }
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_anwcs_t" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = (int)(val3);
  }
  result = (struct anwcs_t *)new_anwcs_t(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_delete_anwcs_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_anwcs_t" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  delete_anwcs_t(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_pixel_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_pixel_scale" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  result = (double)anwcs_t_pixel_scale(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_get_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_get_center" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  anwcs_t_get_center(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_get_radius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_get_radius" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  anwcs_t_get_radius(arg1,arg2);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_is_inside(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_is_inside", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_is_inside" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_t_is_inside" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_t_is_inside" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)anwcs_t_is_inside(arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_get_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_get_width" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  result = (double)anwcs_t_get_width(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_get_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_get_height" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  result = (double)anwcs_t_get_height(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_set_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_set_width", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_set_width" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_t_set_width" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  anwcs_t_set_width(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_set_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_set_height", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_set_height" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_t_set_height" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  anwcs_t_set_height(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_pixelxy2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_pixelxy2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_pixelxy2radec" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_t_pixelxy2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_t_pixelxy2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  anwcs_t_pixelxy2radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_radec2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_radec2pixelxy", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_radec2pixelxy" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_t_radec2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_t_radec2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)anwcs_t_radec2pixelxy(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_t_write_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  struct anwcs_t *arg1 = (struct anwcs_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_t_write_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_t_write_to" "', argument " "1"" of type '" "struct anwcs_t *""'"); 
  }
  arg1 = (struct anwcs_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_t_write_to" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)anwcs_t_write_to(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *anwcs_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_anwcs_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *anwcs_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_anwcs_walk_outline(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  dl *arg2 = (dl *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  pl *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_walk_outline", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_walk_outline" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_dl, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_walk_outline" "', argument " "2"" of type '" "dl const *""'"); 
  }
  arg2 = (dl *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_walk_outline" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (pl *)anwcs_walk_outline((struct anwcs_t const *)arg1,(dl const *)arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_pl, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_wcslib_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_wcslib_from_string", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_wcslib_from_string" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_wcslib_from_string" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (anwcs_t *)anwcs_wcslib_from_string((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_open(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_open", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_open" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_open" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (anwcs_t *)anwcs_open((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_open_wcslib(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_open_wcslib", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_open_wcslib" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_open_wcslib" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (anwcs_t *)anwcs_open_wcslib((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_open_wcstools(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_open_wcstools", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_open_wcstools" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_open_wcstools" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (anwcs_t *)anwcs_open_wcstools((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_wcstools_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_wcstools_from_string", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_wcstools_from_string" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_wcstools_from_string" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (anwcs_t *)anwcs_wcstools_from_string((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_open_sip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_open_sip", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_open_sip" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_open_sip" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (anwcs_t *)anwcs_open_sip((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_open_tan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_open_tan", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_open_tan" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_open_tan" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (anwcs_t *)anwcs_open_tan((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_new_sip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anwcs_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_new_sip" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (anwcs_t *)anwcs_new_sip((sip_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_new_tan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anwcs_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_new_tan" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (anwcs_t *)anwcs_new_tan((tan_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_box(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  int arg5 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_box", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_box" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_box" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_box" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_box" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_box" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  result = (anwcs_t *)anwcs_create_box(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_box_upsidedown(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  int arg5 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_box_upsidedown", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_box_upsidedown" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_box_upsidedown" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_box_upsidedown" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_box_upsidedown" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_box_upsidedown" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  result = (anwcs_t *)anwcs_create_box_upsidedown(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_mercator(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  int arg5 ;
  anbool arg6 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  unsigned char val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_mercator", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_mercator" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_mercator" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_mercator" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_mercator" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_mercator" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_unsigned_SS_char(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_mercator" "', argument " "6"" of type '" "anbool""'");
  } 
  arg6 = (anbool)(val6);
  result = (anwcs_t *)anwcs_create_mercator(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_mercator_2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  int arg7 ;
  anbool arg8 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  unsigned char val8 ;
  int ecode8 = 0 ;
  PyObject *swig_obj[8] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_mercator_2", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_mercator_2" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_mercator_2" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_mercator_2" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_mercator_2" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_mercator_2" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_mercator_2" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "anwcs_create_mercator_2" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = (int)(val7);
  ecode8 = SWIG_AsVal_unsigned_SS_char(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "anwcs_create_mercator_2" "', argument " "8"" of type '" "anbool""'");
  } 
  arg8 = (anbool)(val8);
  result = (anwcs_t *)anwcs_create_mercator_2(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_mollweide(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  int arg5 ;
  anbool arg6 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  unsigned char val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_mollweide", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_mollweide" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_mollweide" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_mollweide" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_mollweide" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_mollweide" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_unsigned_SS_char(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_mollweide" "', argument " "6"" of type '" "anbool""'");
  } 
  arg6 = (anbool)(val6);
  result = (anwcs_t *)anwcs_create_mollweide(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_cea_wcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  int arg7 ;
  anbool arg8 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  unsigned char val8 ;
  int ecode8 = 0 ;
  PyObject *swig_obj[8] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_cea_wcs", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_cea_wcs" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_cea_wcs" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_cea_wcs" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_cea_wcs" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_cea_wcs" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_cea_wcs" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "anwcs_create_cea_wcs" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = (int)(val7);
  ecode8 = SWIG_AsVal_unsigned_SS_char(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "anwcs_create_cea_wcs" "', argument " "8"" of type '" "anbool""'");
  } 
  arg8 = (anbool)(val8);
  result = (anwcs_t *)anwcs_create_cea_wcs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_galactic_to_radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_galactic_to_radec" "', argument " "1"" of type '" "anwcs_t *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (int)anwcs_galactic_to_radec(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_galactic_car_wcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  int arg6 ;
  int arg7 ;
  anbool arg8 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  int val7 ;
  int ecode7 = 0 ;
  unsigned char val8 ;
  int ecode8 = 0 ;
  PyObject *swig_obj[8] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_galactic_car_wcs", 8, 8, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_int(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "7"" of type '" "int""'");
  } 
  arg7 = (int)(val7);
  ecode8 = SWIG_AsVal_unsigned_SS_char(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "anwcs_create_galactic_car_wcs" "', argument " "8"" of type '" "anbool""'");
  } 
  arg8 = (anbool)(val8);
  result = (anwcs_t *)anwcs_create_galactic_car_wcs(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_hammer_aitoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  int arg5 ;
  anbool arg6 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  unsigned char val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_hammer_aitoff", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_hammer_aitoff" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_hammer_aitoff" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_hammer_aitoff" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_hammer_aitoff" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_hammer_aitoff" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_unsigned_SS_char(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_hammer_aitoff" "', argument " "6"" of type '" "anbool""'");
  } 
  arg6 = (anbool)(val6);
  result = (anwcs_t *)anwcs_create_hammer_aitoff(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_hammer_aitoff_rectangular(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  int arg5 ;
  int arg6 ;
  anbool arg7 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  unsigned char val7 ;
  int ecode7 = 0 ;
  PyObject *swig_obj[7] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_hammer_aitoff_rectangular", 7, 7, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_hammer_aitoff_rectangular" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_hammer_aitoff_rectangular" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_hammer_aitoff_rectangular" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_hammer_aitoff_rectangular" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_hammer_aitoff_rectangular" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_hammer_aitoff_rectangular" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_unsigned_SS_char(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "anwcs_create_hammer_aitoff_rectangular" "', argument " "7"" of type '" "anbool""'");
  } 
  arg7 = (anbool)(val7);
  result = (anwcs_t *)anwcs_create_hammer_aitoff_rectangular(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_hammer_aitoff_galactic(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  int arg4 ;
  int arg5 ;
  anbool arg6 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  unsigned char val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_hammer_aitoff_galactic", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_hammer_aitoff_galactic" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_hammer_aitoff_galactic" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_hammer_aitoff_galactic" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_hammer_aitoff_galactic" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_create_hammer_aitoff_galactic" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_unsigned_SS_char(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_create_hammer_aitoff_galactic" "', argument " "6"" of type '" "anbool""'");
  } 
  arg6 = (anbool)(val6);
  result = (anwcs_t *)anwcs_create_hammer_aitoff_galactic(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_allsky_hammer_aitoff(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_allsky_hammer_aitoff", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_allsky_hammer_aitoff" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_allsky_hammer_aitoff" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_allsky_hammer_aitoff" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_allsky_hammer_aitoff" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (anwcs_t *)anwcs_create_allsky_hammer_aitoff(arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_create_allsky_hammer_aitoff2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  int arg3 ;
  int arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  anwcs_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_create_allsky_hammer_aitoff2", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "anwcs_create_allsky_hammer_aitoff2" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_create_allsky_hammer_aitoff2" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_create_allsky_hammer_aitoff2" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_create_allsky_hammer_aitoff2" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  result = (anwcs_t *)anwcs_create_allsky_hammer_aitoff2(arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_anwcs_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_write(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_write", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_write" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_write" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)anwcs_write((struct anwcs_t const *)arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_write_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_write_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_write_to" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_write_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)anwcs_write_to((struct anwcs_t const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_add_to_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  qfits_header *arg2 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_add_to_header", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_add_to_header" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_add_to_header" "', argument " "2"" of type '" "qfits_header *""'"); 
  }
  arg2 = (qfits_header *)(argp2);
  result = (int)anwcs_add_to_header((struct anwcs_t const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_radec2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "anwcs_radec2pixelxy", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_radec2pixelxy" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_radec2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_radec2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)anwcs_radec2pixelxy((struct anwcs_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_pixelxy2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "anwcs_pixelxy2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_pixelxy2radec" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_pixelxy2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_pixelxy2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)anwcs_pixelxy2radec((struct anwcs_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_pixelxy2xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double tempxyz4[3] ;
  PyObject *swig_obj[3] ;
  int result;
  
  {
    arg4 = tempxyz4;
  }
  if (!SWIG_Python_UnpackTuple(args, "anwcs_pixelxy2xyz", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_pixelxy2xyz" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_pixelxy2xyz" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_pixelxy2xyz" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)anwcs_pixelxy2xyz((struct anwcs_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  {
    resultobj = Py_BuildValue("(ddd)", arg4[0], arg4[1], arg4[2]);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_xyz2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_xyz2pixelxy", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_xyz2pixelxy" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_xyz2pixelxy" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "anwcs_xyz2pixelxy" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "anwcs_xyz2pixelxy" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  result = (int)anwcs_xyz2pixelxy((struct anwcs_t const *)arg1,(double const *)arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_radec_is_inside_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_radec_is_inside_image", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_radec_is_inside_image" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_radec_is_inside_image" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_radec_is_inside_image" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)anwcs_radec_is_inside_image((struct anwcs_t const *)arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_get_cd_matrix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double tempcd2[4] ;
  PyObject *swig_obj[1] ;
  
  {
    arg2 = tempcd2;
  }
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_get_cd_matrix" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  anwcs_get_cd_matrix((struct anwcs_t const *)arg1,arg2);
  resultobj = SWIG_Py_Void();
  {
    resultobj = Py_BuildValue("(dddd)", arg2[0], arg2[1], arg2[2], arg2[3]);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_get_radec_bounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[2] ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "anwcs_get_radec_bounds", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_get_radec_bounds" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_get_radec_bounds" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  anwcs_get_radec_bounds((struct anwcs_t const *)arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_print", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_print" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_print" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  anwcs_print((struct anwcs_t const *)arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_print_stdout(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_print_stdout" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  anwcs_print_stdout((struct anwcs_t const *)arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_get_radec_center_and_radius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  int result;
  
  arg2 = &temp2;
  arg3 = &temp3;
  arg4 = &temp4;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_get_radec_center_and_radius" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (int)anwcs_get_radec_center_and_radius((struct anwcs_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_walk_image_boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  void (*arg3)(anwcs_t const *,double,double,double,double,void *) = (void (*)(anwcs_t const *,double,double,double,double,void *)) 0 ;
  void *arg4 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int res4 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_walk_image_boundary", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_walk_image_boundary" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_walk_image_boundary" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[2], (void**)(&arg3), SWIGTYPE_p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "anwcs_walk_image_boundary" "', argument " "3"" of type '" "void (*)(anwcs_t const *,double,double,double,double,void *)""'"); 
    }
  }
  res4 = SWIG_ConvertPtr(swig_obj[3],SWIG_as_voidptrptr(&arg4), 0, 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "anwcs_walk_image_boundary" "', argument " "4"" of type '" "void *""'"); 
  }
  anwcs_walk_image_boundary((struct anwcs_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_find_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double *arg6 = (double *) 0 ;
  double *arg7 = (double *) 0 ;
  double *arg8 = (double *) 0 ;
  double *arg9 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  void *argp9 = 0 ;
  int res9 = 0 ;
  PyObject *swig_obj[9] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_find_discontinuity", 9, 9, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_find_discontinuity" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_find_discontinuity" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_find_discontinuity" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_find_discontinuity" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_find_discontinuity" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "anwcs_find_discontinuity" "', argument " "6"" of type '" "double *""'"); 
  }
  arg6 = (double *)(argp6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "anwcs_find_discontinuity" "', argument " "7"" of type '" "double *""'"); 
  }
  arg7 = (double *)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7], &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "anwcs_find_discontinuity" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = (double *)(argp8);
  res9 = SWIG_ConvertPtr(swig_obj[8], &argp9,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res9)) {
    SWIG_exception_fail(SWIG_ArgError(res9), "in method '" "anwcs_find_discontinuity" "', argument " "9"" of type '" "double *""'"); 
  }
  arg9 = (double *)(argp9);
  result = (anbool)anwcs_find_discontinuity((struct anwcs_t const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_is_discontinuous(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_is_discontinuous", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_is_discontinuous" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_is_discontinuous" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_is_discontinuous" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_is_discontinuous" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_is_discontinuous" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  result = (anbool)anwcs_is_discontinuous((struct anwcs_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_walk_discontinuity(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  double arg10 ;
  dl *arg11 = (dl *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  void *argp11 = 0 ;
  int res11 = 0 ;
  PyObject *swig_obj[11] ;
  dl *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_walk_discontinuity", 11, 11, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_walk_discontinuity" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_walk_discontinuity" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_walk_discontinuity" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "anwcs_walk_discontinuity" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "anwcs_walk_discontinuity" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "anwcs_walk_discontinuity" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "anwcs_walk_discontinuity" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "anwcs_walk_discontinuity" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = (double)(val8);
  ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "anwcs_walk_discontinuity" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = (double)(val9);
  ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "anwcs_walk_discontinuity" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = (double)(val10);
  res11 = SWIG_ConvertPtr(swig_obj[10], &argp11,SWIGTYPE_p_dl, 0 |  0 );
  if (!SWIG_IsOK(res11)) {
    SWIG_exception_fail(SWIG_ArgError(res11), "in method '" "anwcs_walk_discontinuity" "', argument " "11"" of type '" "dl *""'"); 
  }
  arg11 = (dl *)(argp11);
  result = (dl *)anwcs_walk_discontinuity((struct anwcs_t const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_dl, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_overlaps(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  anwcs_t *arg2 = (anwcs_t *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_overlaps", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_overlaps" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "anwcs_overlaps" "', argument " "2"" of type '" "anwcs_t const *""'"); 
  }
  arg2 = (anwcs_t *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_overlaps" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (anbool)anwcs_overlaps((struct anwcs_t const *)arg1,(struct anwcs_t const *)arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_imagew(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_imagew" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (double)anwcs_imagew((struct anwcs_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_imageh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_imageh" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (double)anwcs_imageh((struct anwcs_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_set_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_set_size", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_set_size" "', argument " "1"" of type '" "anwcs_t *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_set_size" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "anwcs_set_size" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  anwcs_set_size(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_scale_wcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_scale_wcs", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_scale_wcs" "', argument " "1"" of type '" "anwcs_t *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_scale_wcs" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  result = (int)anwcs_scale_wcs(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_rotate_wcs(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_rotate_wcs", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_rotate_wcs" "', argument " "1"" of type '" "anwcs_t *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "anwcs_rotate_wcs" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  result = (int)anwcs_rotate_wcs(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_pixel_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_pixel_scale" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (double)anwcs_pixel_scale((struct anwcs_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_free" "', argument " "1"" of type '" "anwcs_t *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  anwcs_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_get_sip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  sip_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_get_sip" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  result = (sip_t *)anwcs_get_sip((struct anwcs_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_errors_start_logging_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!SWIG_Python_UnpackTuple(args, "errors_start_logging_to_string", 0, 0, 0)) SWIG_fail;
  errors_start_logging_to_string();
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_errors_stop_logging_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  char *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "errors_stop_logging_to_string" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (char *)errors_stop_logging_to_string((char const *)arg1);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_dimquad2dimcode(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dimquad2dimcode" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  result = (int)dimquad2dimcode(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_rad2deg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rad2deg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)rad2deg(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_rad2arcmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rad2arcmin" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)rad2arcmin(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_rad2arcsec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rad2arcsec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)rad2arcsec(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_deg2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "deg2rad" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)deg2rad(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_deg2arcmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "deg2arcmin" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)deg2arcmin(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_deg2arcsec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "deg2arcsec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)deg2arcsec(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcmin2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcmin2rad" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcmin2rad(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcmin2deg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcmin2deg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcmin2deg(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcmin2arcsec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcmin2arcsec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcmin2arcsec(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcsec2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcsec2rad" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcsec2rad(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcsec2deg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcsec2deg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcsec2deg(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcsec2arcmin(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcsec2arcmin" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcsec2arcmin(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_mjdtojd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "mjdtojd" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)mjdtojd(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_jdtomjd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "jdtomjd" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)jdtomjd(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xy2ra(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "xy2ra", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "xy2ra" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xy2ra" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  result = (double)xy2ra(arg1,arg2);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_z2dec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "z2dec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)z2dec(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_atora(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "atora" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (double)atora((char const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_atodec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "atodec" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (double)atodec((char const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_mag2flux(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "mag2flux" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)mag2flux(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecrange2xyzrange(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  
  if (!SWIG_Python_UnpackTuple(args, "radecrange2xyzrange", 6, 6, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radecrange2xyzrange" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radecrange2xyzrange" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "radecrange2xyzrange" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "radecrange2xyzrange" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "radecrange2xyzrange" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "radecrange2xyzrange" "', argument " "6"" of type '" "double *""'"); 
  }
  arg6 = (double *)(argp6);
  radecrange2xyzrange(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radec2xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "radec2xyz", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radec2xyz" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radec2xyz" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "radec2xyz" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "radec2xyz" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "radec2xyz" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  radec2xyz(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyz2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "xyz2radec", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "xyz2radec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "xyz2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "xyz2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  xyz2radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyzarr2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xyzarr2radec" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  xyzarr2radec((double const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyzarr2radecarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "xyzarr2radecarr", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xyzarr2radecarr" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "xyzarr2radecarr" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = (double *)(argp2);
  xyzarr2radecarr((double const *)arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radec2xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double *arg3 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double tempxyz3[3] ;
  PyObject *swig_obj[2] ;
  
  {
    arg3 = tempxyz3;
  }
  if (!SWIG_Python_UnpackTuple(args, "radec2xyzarr", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radec2xyzarr" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radec2xyzarr" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  radec2xyzarr(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  {
    resultobj = Py_BuildValue("(ddd)", arg3[0], arg3[1], arg3[2]);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radec2xyzarrmany(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  double temp1 ;
  int res1 = SWIG_TMPOBJ ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[2] ;
  
  arg1 = &temp1;
  arg2 = &temp2;
  if (!SWIG_Python_UnpackTuple(args, "radec2xyzarrmany", 2, 2, swig_obj)) SWIG_fail;
  res3 = SWIG_ConvertPtr(swig_obj[0], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "radec2xyzarrmany" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "radec2xyzarrmany" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  radec2xyzarrmany(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res1)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg1)));
  } else {
    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdeg2xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "radecdeg2xyz", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radecdeg2xyz" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radecdeg2xyz" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "radecdeg2xyz" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "radecdeg2xyz" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "radecdeg2xyz" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  radecdeg2xyz(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyzarr2radecdeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xyzarr2radecdeg" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  xyzarr2radecdeg((double const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_xyzarr2radecdegarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "xyzarr2radecdegarr", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "xyzarr2radecdegarr" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "xyzarr2radecdegarr" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = (double *)(argp2);
  xyzarr2radecdegarr(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdeg2xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double *arg3 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double tempxyz3[3] ;
  PyObject *swig_obj[2] ;
  
  {
    arg3 = tempxyz3;
  }
  if (!SWIG_Python_UnpackTuple(args, "radecdeg2xyzarr", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radecdeg2xyzarr" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radecdeg2xyzarr" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  radecdeg2xyzarr(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  {
    resultobj = Py_BuildValue("(ddd)", arg3[0], arg3[1], arg3[2]);
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdegarr2xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "radecdegarr2xyzarr", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "radecdegarr2xyzarr" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "radecdegarr2xyzarr" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = (double *)(argp2);
  radecdegarr2xyzarr(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radecdeg2xyzarrmany(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  int arg4 ;
  double temp1 ;
  int res1 = SWIG_TMPOBJ ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[2] ;
  
  arg1 = &temp1;
  arg2 = &temp2;
  if (!SWIG_Python_UnpackTuple(args, "radecdeg2xyzarrmany", 2, 2, swig_obj)) SWIG_fail;
  res3 = SWIG_ConvertPtr(swig_obj[0], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "radecdeg2xyzarrmany" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  ecode4 = SWIG_AsVal_int(swig_obj[1], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "radecdeg2xyzarrmany" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  radecdeg2xyzarrmany(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res1)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg1)));
  } else {
    int new_flags = SWIG_IsNewObj(res1) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg1), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_radec_derivatives(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "radec_derivatives", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "radec_derivatives" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "radec_derivatives" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "radec_derivatives" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "radec_derivatives" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  radec_derivatives(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_distsq_between_radecdeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "distsq_between_radecdeg", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "distsq_between_radecdeg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "distsq_between_radecdeg" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "distsq_between_radecdeg" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "distsq_between_radecdeg" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (double)distsq_between_radecdeg(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcsec_between_radecdeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "arcsec_between_radecdeg", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcsec_between_radecdeg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "arcsec_between_radecdeg" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "arcsec_between_radecdeg" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "arcsec_between_radecdeg" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (double)arcsec_between_radecdeg(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_deg_between_radecdeg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "deg_between_radecdeg", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "deg_between_radecdeg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "deg_between_radecdeg" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "deg_between_radecdeg" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "deg_between_radecdeg" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (double)deg_between_radecdeg(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ra2mercx(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ra2mercx" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)ra2mercx(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dec2mercy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dec2mercy" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)dec2mercy(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ra2hms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  double *arg4 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "ra2hms", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ra2hms" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ra2hms" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "ra2hms" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "ra2hms" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  ra2hms(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dec2dms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  int *arg4 = (int *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "dec2dms", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dec2dms" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dec2dms" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dec2dms" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dec2dms" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dec2dms" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  dec2dms(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_hms2ra(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  double arg3 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "hms2ra", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "hms2ra" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "hms2ra" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "hms2ra" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (double)hms2ra(arg1,arg2,arg3);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dms2dec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "dms2dec", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dms2dec" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dms2dec" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dms2dec" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dms2dec" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (double)dms2dec(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_ra2hmsstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "ra2hmsstring", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "ra2hmsstring" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "ra2hmsstring" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  ra2hmsstring(arg1,arg2);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_dec2dmsstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  char *arg2 = (char *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "dec2dmsstring", 2, 2, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dec2dmsstring" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dec2dmsstring" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  dec2dmsstring(arg1,arg2);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_project_hammer_aitoff_x(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "project_hammer_aitoff_x", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "project_hammer_aitoff_x" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_hammer_aitoff_x" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_hammer_aitoff_x" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "project_hammer_aitoff_x" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "project_hammer_aitoff_x" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  project_hammer_aitoff_x(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_project_equal_area(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "project_equal_area", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "project_equal_area" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "project_equal_area" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "project_equal_area" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "project_equal_area" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "project_equal_area" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  project_equal_area(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_distsq2arc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "distsq2arc" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)distsq2arc(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_distsq2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "distsq2rad" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)distsq2rad(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_distsq2deg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "distsq2deg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)distsq2deg(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dist2rad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dist2rad" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)dist2rad(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_distsq2arcsec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "distsq2arcsec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)distsq2arcsec(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dist2arcsec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dist2arcsec" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)dist2arcsec(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_rad2distsq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rad2distsq" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)rad2distsq(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_rad2dist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "rad2dist" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)rad2dist(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcsec2distsq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcsec2distsq" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcsec2distsq(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcsec2dist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcsec2dist" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcsec2dist(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_deg2dist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "deg2dist" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)deg2dist(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_deg2distsq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "deg2distsq" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)deg2distsq(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcmin2dist(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcmin2dist" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcmin2dist(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_arcmin2distsq(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "arcmin2distsq" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)arcmin2distsq(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dist2deg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dist2deg" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)dist2deg(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_make_rand_star(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "make_rand_star", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "make_rand_star" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = (double *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "make_rand_star" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "make_rand_star" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "make_rand_star" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "make_rand_star" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  make_rand_star(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_star_coords(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  anbool arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  unsigned char val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "star_coords", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "star_coords" "', argument " "1"" of type '" "double const *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "star_coords" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  ecode3 = SWIG_AsVal_unsigned_SS_char(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "star_coords" "', argument " "3"" of type '" "anbool""'");
  } 
  arg3 = (anbool)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "star_coords" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "star_coords" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (anbool)star_coords((double const *)arg1,(double const *)arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_star_midpoint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double *arg1 = (double *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "star_midpoint", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "star_midpoint" "', argument " "1"" of type '" "double *""'"); 
  }
  arg1 = (double *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "star_midpoint" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "star_midpoint" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  star_midpoint(arg1,(double const *)arg2,(double const *)arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_debug_dump(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_debug_dump" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  qfits_header_debug_dump((qfits_header const *)arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_list(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_list", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_list" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_list" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)qfits_header_list((qfits_header const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_new(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_new", 0, 0, 0)) SWIG_fail;
  result = (qfits_header *)qfits_header_new();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_default(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_default", 0, 0, 0)) SWIG_fail;
  result = (qfits_header *)qfits_header_default();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_n(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_n" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  result = (int)qfits_header_n((qfits_header const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_add(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_add", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_add" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_add" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_add" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "qfits_header_add" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "qfits_header_add" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = (char *)(buf5);
  qfits_header_add(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_add_after(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  PyObject *swig_obj[6] ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_add_after", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_add_after" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_add_after" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_add_after" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "qfits_header_add_after" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "qfits_header_add_after" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = (char *)(buf5);
  res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "qfits_header_add_after" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = (char *)(buf6);
  qfits_header_add_after(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5,(char const *)arg6);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_append(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_append", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_append" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_append" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_append" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "qfits_header_append" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "qfits_header_append" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = (char *)(buf5);
  qfits_header_append(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,(char const *)arg5);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_del(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_del", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_del" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_del" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  qfits_header_del(arg1,(char const *)arg2);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_sort(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header **arg1 = (qfits_header **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_sort" "', argument " "1"" of type '" "qfits_header **""'"); 
  }
  arg1 = (qfits_header **)(argp1);
  result = (int)qfits_header_sort(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_copy" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  result = (qfits_header *)qfits_header_copy((qfits_header const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_mod(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_mod", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_mod" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_mod" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_mod" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "qfits_header_mod" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  qfits_header_mod(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_destroy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_destroy" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  qfits_header_destroy(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_getstr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_getstr", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_getstr" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_getstr" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (char *)qfits_header_getstr((qfits_header const *)arg1,(char const *)arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_getstr_pretty(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_getstr_pretty", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_getstr_pretty" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_getstr_pretty" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_getstr_pretty" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "qfits_header_getstr_pretty" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (int)qfits_header_getstr_pretty((qfits_header const *)arg1,(char const *)arg2,arg3,(char const *)arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_getitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_getitem", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_getitem" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "qfits_header_getitem" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_getitem" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "qfits_header_getitem" "', argument " "4"" of type '" "char *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "qfits_header_getitem" "', argument " "5"" of type '" "char *""'");
  }
  arg5 = (char *)(buf5);
  res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "qfits_header_getitem" "', argument " "6"" of type '" "char *""'");
  }
  arg6 = (char *)(buf6);
  result = (int)qfits_header_getitem((qfits_header const *)arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_setitem(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_setitem", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_setitem" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "qfits_header_setitem" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_setitem" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "qfits_header_setitem" "', argument " "4"" of type '" "char *""'");
  }
  arg4 = (char *)(buf4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "qfits_header_setitem" "', argument " "5"" of type '" "char *""'");
  }
  arg5 = (char *)(buf5);
  res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "qfits_header_setitem" "', argument " "6"" of type '" "char *""'");
  }
  arg6 = (char *)(buf6);
  result = (int)qfits_header_setitem(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_getcom(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_getcom", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_getcom" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_getcom" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (char *)qfits_header_getcom((qfits_header const *)arg1,(char const *)arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_getint(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_getint", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_getint" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_getint" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "qfits_header_getint" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)qfits_header_getint((qfits_header const *)arg1,(char const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_getdouble(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_getdouble", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_getdouble" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_getdouble" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "qfits_header_getdouble" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (double)qfits_header_getdouble((qfits_header const *)arg1,(char const *)arg2,arg3);
  resultobj = SWIG_From_double((double)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_getboolean(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_getboolean", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_getboolean" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_getboolean" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "qfits_header_getboolean" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)qfits_header_getboolean((qfits_header const *)arg1,(char const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_dump(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_dump", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_dump" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_dump" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)qfits_header_dump((qfits_header const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_findmatch(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_findmatch", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_findmatch" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "qfits_header_findmatch" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (char *)qfits_header_findmatch((qfits_header const *)arg1,(char const *)arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_write_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "qfits_header_write_line", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_write_line" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "qfits_header_write_line" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "qfits_header_write_line" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)qfits_header_write_line((qfits_header const *)arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_header_read_hdr_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  unsigned char *arg1 = (unsigned char *) 0 ;
  int arg2 ;
  int res1 ;
  char *buf1 = 0 ;
  size_t size1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, &size1, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_header_read_hdr_string" "', argument " "1"" of type '" "unsigned char const *""'");
  }  
  arg1 = (unsigned char *)(buf1);
  arg2 = (int)(size1 - 1);
  result = (qfits_header *)qfits_header_read_hdr_string((unsigned char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_zeropad(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_zeropad" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  qfits_zeropad((char const *)arg1);
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_qfits_is_fits(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "qfits_is_fits" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (int)qfits_is_fits((char const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_is_blank_line(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "is_blank_line" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (int)is_blank_line((char const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_wcs_pv2sip_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  double *arg2 = (double *) 0 ;
  int arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  int arg9 ;
  int arg10 ;
  int arg11 ;
  anbool arg12 ;
  int arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  int val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  int val11 ;
  int ecode11 = 0 ;
  unsigned char val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  PyObject *swig_obj[13] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "wcs_pv2sip_header", 13, 13, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wcs_pv2sip_header" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "wcs_pv2sip_header" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = (double *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "wcs_pv2sip_header" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "wcs_pv2sip_header" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "wcs_pv2sip_header" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "wcs_pv2sip_header" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "wcs_pv2sip_header" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "wcs_pv2sip_header" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = (double)(val8);
  ecode9 = SWIG_AsVal_int(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "wcs_pv2sip_header" "', argument " "9"" of type '" "int""'");
  } 
  arg9 = (int)(val9);
  ecode10 = SWIG_AsVal_int(swig_obj[9], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "wcs_pv2sip_header" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = (int)(val10);
  ecode11 = SWIG_AsVal_int(swig_obj[10], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "wcs_pv2sip_header" "', argument " "11"" of type '" "int""'");
  } 
  arg11 = (int)(val11);
  ecode12 = SWIG_AsVal_unsigned_SS_char(swig_obj[11], &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "wcs_pv2sip_header" "', argument " "12"" of type '" "anbool""'");
  } 
  arg12 = (anbool)(val12);
  ecode13 = SWIG_AsVal_int(swig_obj[12], &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "wcs_pv2sip_header" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = (int)(val13);
  result = (sip_t *)wcs_pv2sip_header(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_wcs_pv2sip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  char *arg3 = (char *) 0 ;
  anbool arg4 ;
  double *arg5 = (double *) 0 ;
  int arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  double arg10 ;
  double arg11 ;
  int arg12 ;
  int arg13 ;
  int arg14 ;
  anbool arg15 ;
  int arg16 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  unsigned char val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  int val14 ;
  int ecode14 = 0 ;
  unsigned char val15 ;
  int ecode15 = 0 ;
  int val16 ;
  int ecode16 = 0 ;
  PyObject *swig_obj[16] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "wcs_pv2sip", 16, 16, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "wcs_pv2sip" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "wcs_pv2sip" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "wcs_pv2sip" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  ecode4 = SWIG_AsVal_unsigned_SS_char(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "wcs_pv2sip" "', argument " "4"" of type '" "anbool""'");
  } 
  arg4 = (anbool)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "wcs_pv2sip" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "wcs_pv2sip" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "wcs_pv2sip" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "wcs_pv2sip" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = (double)(val8);
  ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "wcs_pv2sip" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = (double)(val9);
  ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "wcs_pv2sip" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = (double)(val10);
  ecode11 = SWIG_AsVal_double(swig_obj[10], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "wcs_pv2sip" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = (double)(val11);
  ecode12 = SWIG_AsVal_int(swig_obj[11], &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "wcs_pv2sip" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = (int)(val12);
  ecode13 = SWIG_AsVal_int(swig_obj[12], &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "wcs_pv2sip" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = (int)(val13);
  ecode14 = SWIG_AsVal_int(swig_obj[13], &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "wcs_pv2sip" "', argument " "14"" of type '" "int""'");
  } 
  arg14 = (int)(val14);
  ecode15 = SWIG_AsVal_unsigned_SS_char(swig_obj[14], &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "wcs_pv2sip" "', argument " "15"" of type '" "anbool""'");
  } 
  arg15 = (anbool)(val15);
  ecode16 = SWIG_AsVal_int(swig_obj[15], &val16);
  if (!SWIG_IsOK(ecode16)) {
    SWIG_exception_fail(SWIG_ArgError(ecode16), "in method '" "wcs_pv2sip" "', argument " "16"" of type '" "int""'");
  } 
  arg16 = (int)(val16);
  result = (int)wcs_pv2sip((char const *)arg1,arg2,(char const *)arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15,arg16);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_crval_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[2] ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_crval_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_crval_set" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  {
    int i;
    if (!PySequence_Check(swig_obj[1])) {
      PyErr_SetString(PyExc_ValueError,"Expected a sequence");
      return NULL;
    }
    if (PySequence_Length(swig_obj[1]) != 2) {
      PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected 2 elements");
      return NULL;
    }
    for (i = 0; i < 2; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      if (PyNumber_Check(o)) {
        temp2[i] = PyFloat_AsDouble(o);
      } else {
        PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      
        return NULL;
      }
    }
    arg2 = temp2;
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) *(double *)&arg1->crval[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""crval""' of type '""double [2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_crval_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_crval_get" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double *)(double *) ((arg1)->crval);
  {
    int i;
    resultobj = PyList_New(2);
    for (i = 0; i < 2; i++) {
      PyObject *o = PyFloat_FromDouble(result[i]);
      PyList_SetItem(resultobj,i,o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_crpix_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double *arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[2] ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_crpix_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_crpix_set" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  {
    int i;
    if (!PySequence_Check(swig_obj[1])) {
      PyErr_SetString(PyExc_ValueError,"Expected a sequence");
      return NULL;
    }
    if (PySequence_Length(swig_obj[1]) != 2) {
      PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected 2 elements");
      return NULL;
    }
    for (i = 0; i < 2; i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      if (PyNumber_Check(o)) {
        temp2[i] = PyFloat_AsDouble(o);
      } else {
        PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      
        return NULL;
      }
    }
    arg2 = temp2;
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) *(double *)&arg1->crpix[ii] = *((double *)arg2 + ii);
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""crpix""' of type '""double [2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_crpix_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_crpix_get" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double *)(double *) ((arg1)->crpix);
  {
    int i;
    resultobj = PyList_New(2);
    for (i = 0; i < 2; i++) {
      PyObject *o = PyFloat_FromDouble(result[i]);
      PyList_SetItem(resultobj,i,o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_cd_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double (*arg2)[2] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[2][2] ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_cd_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_cd_set" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  {
    int i;
    if (!PySequence_Check(swig_obj[1])) {
      PyErr_SetString(PyExc_ValueError,"Expected a sequence");
      return NULL;
    }
    if (PySequence_Length(swig_obj[1]) != (2 * 2)) {
      PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected 2*2 elements");
      return NULL;
    }
    for (i = 0; i < (2*2); i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      if (PyNumber_Check(o)) {
        // FIXME -- is it dim0 or dim1?
        temp2[i / 2][i % 2] = PyFloat_AsDouble(o);
      } else {
        PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      
        return NULL;
      }
    }
    arg2 = temp2;
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)2; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)2; ++jj) arg1->cd[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""cd""' of type '""double [2][2]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""cd""' of type '""double [2][2]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_cd_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double (*result)[2] = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_cd_get" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double (*)[2])(double (*)[2]) ((arg1)->cd);
  {
    int i;
    resultobj = PyList_New(2 * 2);
    for (i = 0; i < (2)*(2); i++) {
      // FIXME -- dim0 or dim1?
      PyObject *o = PyFloat_FromDouble(result[i / 2][i % 2]);
      PyList_SetItem(resultobj,i,o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_imagew_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_imagew_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_imagew_set" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_imagew_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->imagew = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_imagew_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_imagew_get" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double) ((arg1)->imagew);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_imageh_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_imageh_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_imageh_set" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_imageh_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  if (arg1) (arg1)->imageh = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_imageh_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_imageh_get" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double) ((arg1)->imageh);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_sin_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  anbool arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_sin_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_sin_set" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_sin_set" "', argument " "2"" of type '" "anbool""'");
  } 
  arg2 = (anbool)(val2);
  if (arg1) (arg1)->sin = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_sin_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  anbool result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_sin_get" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (anbool) ((arg1)->sin);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_tan_t__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) NULL ;
  int arg2 = (int) 0 ;
  int arg3 = (int) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  tan_t *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 3)) SWIG_fail;
  if (swig_obj[0]) {
    res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_tan_t" "', argument " "1"" of type '" "char *""'");
    }
    arg1 = (char *)(buf1);
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_tan_t" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = (int)(val2);
  }
  if (swig_obj[2]) {
    ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
    if (!SWIG_IsOK(ecode3)) {
      SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_tan_t" "', argument " "3"" of type '" "int""'");
    } 
    arg3 = (int)(val3);
  }
  result = (tan_t *)new_tan_t__SWIG_0(arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_tan_t__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  double arg1 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  double arg10 ;
  double val1 ;
  int ecode1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  tan_t *result = 0 ;
  
  if ((nobjs < 10) || (nobjs > 10)) SWIG_fail;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "new_tan_t" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_tan_t" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_tan_t" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "new_tan_t" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "new_tan_t" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "new_tan_t" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "new_tan_t" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "new_tan_t" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = (double)(val8);
  ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "new_tan_t" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = (double)(val9);
  ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "new_tan_t" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = (double)(val10);
  result = (tan_t *)new_tan_t__SWIG_1(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_tan_t__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  tan_t *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_tan_t" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (tan_t *)new_tan_t__SWIG_2((tan_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_tan_t__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  tan_t *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_tan_t" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  result = (tan_t *)new_tan_t__SWIG_3((qfits_header const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_tan_t(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[11] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "new_tan_t", 0, 10, argv))) SWIG_fail;
  --argc;
  if ((argc >= 0) && (argc <= 3)) {
    int _v;
    if (argc <= 0) {
      return _wrap_new_tan_t__SWIG_0(self, argc, argv);
    }
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      if (argc <= 1) {
        return _wrap_new_tan_t__SWIG_0(self, argc, argv);
      }
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        if (argc <= 2) {
          return _wrap_new_tan_t__SWIG_0(self, argc, argv);
        }
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_tan_t__SWIG_0(self, argc, argv);
        }
      }
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_tan_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_tan_t__SWIG_2(self, argc, argv);
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qfits_header, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_tan_t__SWIG_3(self, argc, argv);
    }
  }
  if (argc == 10) {
    int _v;
    {
      int res = SWIG_AsVal_double(argv[0], NULL);
      _v = SWIG_CheckState(res);
    }
    if (_v) {
      {
        int res = SWIG_AsVal_double(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_double(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          {
            int res = SWIG_AsVal_double(argv[3], NULL);
            _v = SWIG_CheckState(res);
          }
          if (_v) {
            {
              int res = SWIG_AsVal_double(argv[4], NULL);
              _v = SWIG_CheckState(res);
            }
            if (_v) {
              {
                int res = SWIG_AsVal_double(argv[5], NULL);
                _v = SWIG_CheckState(res);
              }
              if (_v) {
                {
                  int res = SWIG_AsVal_double(argv[6], NULL);
                  _v = SWIG_CheckState(res);
                }
                if (_v) {
                  {
                    int res = SWIG_AsVal_double(argv[7], NULL);
                    _v = SWIG_CheckState(res);
                  }
                  if (_v) {
                    {
                      int res = SWIG_AsVal_double(argv[8], NULL);
                      _v = SWIG_CheckState(res);
                    }
                    if (_v) {
                      {
                        int res = SWIG_AsVal_double(argv[9], NULL);
                        _v = SWIG_CheckState(res);
                      }
                      if (_v) {
                        return _wrap_new_tan_t__SWIG_1(self, argc, argv);
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_tan_t'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    tan_t::tan_t(char *,int,int)\n"
    "    tan_t::tan_t(double,double,double,double,double,double,double,double,double,double)\n"
    "    tan_t::tan_t(tan_t const *)\n"
    "    tan_t::tan_t(qfits_header const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_tan_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_tan_t" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  delete_tan_t(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  double arg8 ;
  double arg9 ;
  double arg10 ;
  double arg11 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  double val8 ;
  int ecode8 = 0 ;
  double val9 ;
  int ecode9 = 0 ;
  double val10 ;
  int ecode10 = 0 ;
  double val11 ;
  int ecode11 = 0 ;
  PyObject *swig_obj[11] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_set", 11, 11, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_set" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_set" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_set" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "tan_t_set" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "tan_t_set" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "tan_t_set" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "tan_t_set" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  ecode8 = SWIG_AsVal_double(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "tan_t_set" "', argument " "8"" of type '" "double""'");
  } 
  arg8 = (double)(val8);
  ecode9 = SWIG_AsVal_double(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "tan_t_set" "', argument " "9"" of type '" "double""'");
  } 
  arg9 = (double)(val9);
  ecode10 = SWIG_AsVal_double(swig_obj[9], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "tan_t_set" "', argument " "10"" of type '" "double""'");
  } 
  arg10 = (double)(val10);
  ecode11 = SWIG_AsVal_double(swig_obj[10], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "tan_t_set" "', argument " "11"" of type '" "double""'");
  } 
  arg11 = (double)(val11);
  tan_t_set(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_is_inside(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_is_inside", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_is_inside" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_is_inside" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_is_inside" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)tan_t_is_inside(arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  tan_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_scale", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_scale" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_scale" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  result = (tan_t *)tan_t_scale(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_rotate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  tan_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_rotate", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_rotate" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_rotate" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  result = (tan_t *)tan_t_rotate(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_get_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_get_width" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_t_get_width(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_get_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_get_height" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_t_get_height(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_set_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_set_width", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_set_width" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_set_width" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  tan_t_set_width(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_set_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_set_height", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_set_height" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_set_height" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  tan_t_set_height(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_pixel_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_pixel_scale" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_t_pixel_scale(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_radec_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_radec_center" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  tan_t_radec_center(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_radius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_radius" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_t_radius(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_xyzcenter(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  arg4 = &temp4;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_xyzcenter" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  tan_t_xyzcenter(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_pixelxy2xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_pixelxy2xyz", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_pixelxy2xyz" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_pixelxy2xyz" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_pixelxy2xyz" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_pixelxy2xyz(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_pixelxy2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_pixelxy2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_pixelxy2radec" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_pixelxy2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_pixelxy2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_pixelxy2radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_radec2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_radec2pixelxy", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_radec2pixelxy" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_radec2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_radec2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)tan_t_radec2pixelxy(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_iwc2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_iwc2pixelxy", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_iwc2pixelxy" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_iwc2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_iwc2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_iwc2pixelxy(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_pixelxy2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_pixelxy2iwc", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_pixelxy2iwc" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_pixelxy2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_pixelxy2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_pixelxy2iwc(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_iwc2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_iwc2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_iwc2radec" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_iwc2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_iwc2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_iwc2radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_radec2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_radec2iwc", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_radec2iwc" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_radec2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_radec2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)tan_t_radec2iwc(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_xyz2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  int result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "tan_t_xyz2pixelxy", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_xyz2pixelxy" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_xyz2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_xyz2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "tan_t_xyz2pixelxy" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (int)tan_t_xyz2pixelxy(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_write_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_write_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_write_to" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_t_write_to" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)tan_t_write_to(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_set_crval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_set_crval", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_set_crval" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_set_crval" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_set_crval" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_set_crval(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_set_crpix(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_set_crpix", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_set_crpix" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_set_crpix" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_set_crpix" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_set_crpix(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_set_cd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_set_cd", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_set_cd" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_set_cd" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_set_cd" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "tan_t_set_cd" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "tan_t_set_cd" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  tan_t_set_cd(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_t_set_imagesize(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_t_set_imagesize", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_t_set_imagesize" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_t_set_imagesize" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_t_set_imagesize" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_t_set_imagesize(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *tan_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_tan_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *tan_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_sip_t_wcstan_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_wcstan_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_wcstan_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_t_wcstan_set" "', argument " "2"" of type '" "tan_t *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  if (arg1) (arg1)->wcstan = *arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_wcstan_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  tan_t *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_wcstan_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (tan_t *)& ((arg1)->wcstan);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_a_order_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_a_order_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_a_order_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_a_order_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->a_order = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_a_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_a_order_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (int) ((arg1)->a_order);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_b_order_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_b_order_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_b_order_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_b_order_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->b_order = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_b_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_b_order_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (int) ((arg1)->b_order);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_a_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double (*arg2)[10] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[10][10] ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_a_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_a_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  {
    int i;
    if (!PySequence_Check(swig_obj[1])) {
      PyErr_SetString(PyExc_ValueError,"Expected a sequence");
      return NULL;
    }
    if (PySequence_Length(swig_obj[1]) != (10 * 10)) {
      PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected 10*10 elements");
      return NULL;
    }
    for (i = 0; i < (10*10); i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      if (PyNumber_Check(o)) {
        // FIXME -- is it dim0 or dim1?
        temp2[i / 10][i % 10] = PyFloat_AsDouble(o);
      } else {
        PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      
        return NULL;
      }
    }
    arg2 = temp2;
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)10; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)10; ++jj) arg1->a[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""a""' of type '""double [10][10]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""a""' of type '""double [10][10]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_a_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double (*result)[10] = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_a_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double (*)[10])(double (*)[10]) ((arg1)->a);
  {
    int i;
    resultobj = PyList_New(10 * 10);
    for (i = 0; i < (10)*(10); i++) {
      // FIXME -- dim0 or dim1?
      PyObject *o = PyFloat_FromDouble(result[i / 10][i % 10]);
      PyList_SetItem(resultobj,i,o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_b_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double (*arg2)[10] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[10][10] ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_b_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_b_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  {
    int i;
    if (!PySequence_Check(swig_obj[1])) {
      PyErr_SetString(PyExc_ValueError,"Expected a sequence");
      return NULL;
    }
    if (PySequence_Length(swig_obj[1]) != (10 * 10)) {
      PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected 10*10 elements");
      return NULL;
    }
    for (i = 0; i < (10*10); i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      if (PyNumber_Check(o)) {
        // FIXME -- is it dim0 or dim1?
        temp2[i / 10][i % 10] = PyFloat_AsDouble(o);
      } else {
        PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      
        return NULL;
      }
    }
    arg2 = temp2;
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)10; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)10; ++jj) arg1->b[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""b""' of type '""double [10][10]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""b""' of type '""double [10][10]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_b_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double (*result)[10] = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_b_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double (*)[10])(double (*)[10]) ((arg1)->b);
  {
    int i;
    resultobj = PyList_New(10 * 10);
    for (i = 0; i < (10)*(10); i++) {
      // FIXME -- dim0 or dim1?
      PyObject *o = PyFloat_FromDouble(result[i / 10][i % 10]);
      PyList_SetItem(resultobj,i,o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_ap_order_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_ap_order_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_ap_order_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_ap_order_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->ap_order = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_ap_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_ap_order_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (int) ((arg1)->ap_order);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_bp_order_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_bp_order_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_bp_order_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_bp_order_set" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  if (arg1) (arg1)->bp_order = arg2;
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_bp_order_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_bp_order_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (int) ((arg1)->bp_order);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_ap_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double (*arg2)[10] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[10][10] ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_ap_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_ap_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  {
    int i;
    if (!PySequence_Check(swig_obj[1])) {
      PyErr_SetString(PyExc_ValueError,"Expected a sequence");
      return NULL;
    }
    if (PySequence_Length(swig_obj[1]) != (10 * 10)) {
      PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected 10*10 elements");
      return NULL;
    }
    for (i = 0; i < (10*10); i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      if (PyNumber_Check(o)) {
        // FIXME -- is it dim0 or dim1?
        temp2[i / 10][i % 10] = PyFloat_AsDouble(o);
      } else {
        PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      
        return NULL;
      }
    }
    arg2 = temp2;
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)10; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)10; ++jj) arg1->ap[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""ap""' of type '""double [10][10]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""ap""' of type '""double [10][10]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_ap_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double (*result)[10] = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_ap_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double (*)[10])(double (*)[10]) ((arg1)->ap);
  {
    int i;
    resultobj = PyList_New(10 * 10);
    for (i = 0; i < (10)*(10); i++) {
      // FIXME -- dim0 or dim1?
      PyObject *o = PyFloat_FromDouble(result[i / 10][i % 10]);
      PyList_SetItem(resultobj,i,o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_bp_set(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double (*arg2)[10] ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2[10][10] ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_bp_set", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_bp_set" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  {
    int i;
    if (!PySequence_Check(swig_obj[1])) {
      PyErr_SetString(PyExc_ValueError,"Expected a sequence");
      return NULL;
    }
    if (PySequence_Length(swig_obj[1]) != (10 * 10)) {
      PyErr_SetString(PyExc_ValueError,"Size mismatch. Expected 10*10 elements");
      return NULL;
    }
    for (i = 0; i < (10*10); i++) {
      PyObject *o = PySequence_GetItem(swig_obj[1],i);
      if (PyNumber_Check(o)) {
        // FIXME -- is it dim0 or dim1?
        temp2[i / 10][i % 10] = PyFloat_AsDouble(o);
      } else {
        PyErr_SetString(PyExc_ValueError,"Sequence elements must be numbers");      
        return NULL;
      }
    }
    arg2 = temp2;
  }
  {
    if (arg2) {
      size_t ii = 0;
      for (; ii < (size_t)10; ++ii) {
        if (arg2[ii]) {
          size_t jj = 0;
          for (; jj < (size_t)10; ++jj) arg1->bp[ii][jj] = arg2[ii][jj];
        } else {
          SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""bp""' of type '""double [10][10]""'");
        }
      }
    } else {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in variable '""bp""' of type '""double [10][10]""'");
    }
  }
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_bp_get(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double (*result)[10] = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_bp_get" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double (*)[10])(double (*)[10]) ((arg1)->bp);
  {
    int i;
    resultobj = PyList_New(10 * 10);
    for (i = 0; i < (10)*(10); i++) {
      // FIXME -- dim0 or dim1?
      PyObject *o = PyFloat_FromDouble(result[i / 10][i % 10]);
      PyList_SetItem(resultobj,i,o);
    }
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_sip_t__SWIG_0(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) NULL ;
  int arg2 = (int) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  sip_t *result = 0 ;
  
  if ((nobjs < 0) || (nobjs > 2)) SWIG_fail;
  if (swig_obj[0]) {
    res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_sip_t" "', argument " "1"" of type '" "char const *""'");
    }
    arg1 = (char *)(buf1);
  }
  if (swig_obj[1]) {
    ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
    if (!SWIG_IsOK(ecode2)) {
      SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_sip_t" "', argument " "2"" of type '" "int""'");
    } 
    arg2 = (int)(val2);
  }
  result = (sip_t *)new_sip_t__SWIG_0((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_sip_t__SWIG_1(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  int arg3 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  sip_t *result = 0 ;
  
  if ((nobjs < 3) || (nobjs > 3)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_sip_t" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "new_sip_t" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "new_sip_t" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (sip_t *)new_sip_t__SWIG_1((char const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, SWIG_POINTER_NEW |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_sip_t__SWIG_2(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  sip_t *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_sip_t" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (sip_t *)new_sip_t__SWIG_2((sip_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_sip_t__SWIG_3(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  sip_t *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_sip_t" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (sip_t *)new_sip_t__SWIG_3((tan_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_sip_t__SWIG_4(PyObject *SWIGUNUSEDPARM(self), Py_ssize_t nobjs, PyObject **swig_obj) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  sip_t *result = 0 ;
  
  if ((nobjs < 1) || (nobjs > 1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "new_sip_t" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  result = (sip_t *)new_sip_t__SWIG_4((qfits_header const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, SWIG_POINTER_NEW |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_new_sip_t(PyObject *self, PyObject *args) {
  Py_ssize_t argc;
  PyObject *argv[4] = {
    0
  };
  
  if (!(argc = SWIG_Python_UnpackTuple(args, "new_sip_t", 0, 3, argv))) SWIG_fail;
  --argc;
  if ((argc >= 0) && (argc <= 2)) {
    int _v;
    if (argc <= 0) {
      return _wrap_new_sip_t__SWIG_0(self, argc, argv);
    }
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      if (argc <= 1) {
        return _wrap_new_sip_t__SWIG_0(self, argc, argv);
      }
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        return _wrap_new_sip_t__SWIG_0(self, argc, argv);
      }
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_sip_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_sip_t__SWIG_2(self, argc, argv);
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_tan_t, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_sip_t__SWIG_3(self, argc, argv);
    }
  }
  if (argc == 1) {
    int _v;
    void *vptr = 0;
    int res = SWIG_ConvertPtr(argv[0], &vptr, SWIGTYPE_p_qfits_header, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      return _wrap_new_sip_t__SWIG_4(self, argc, argv);
    }
  }
  if (argc == 3) {
    int _v;
    int res = SWIG_AsCharPtrAndSize(argv[0], 0, NULL, 0);
    _v = SWIG_CheckState(res);
    if (_v) {
      {
        int res = SWIG_AsVal_int(argv[1], NULL);
        _v = SWIG_CheckState(res);
      }
      if (_v) {
        {
          int res = SWIG_AsVal_int(argv[2], NULL);
          _v = SWIG_CheckState(res);
        }
        if (_v) {
          return _wrap_new_sip_t__SWIG_1(self, argc, argv);
        }
      }
    }
  }
  
fail:
  SWIG_Python_RaiseOrModifyTypeError("Wrong number or type of arguments for overloaded function 'new_sip_t'.\n"
    "  Possible C/C++ prototypes are:\n"
    "    sip_t::sip_t(char const *,int)\n"
    "    sip_t::sip_t(char const *,int,int)\n"
    "    sip_t::sip_t(sip_t const *)\n"
    "    sip_t::sip_t(tan_t const *)\n"
    "    sip_t::sip_t(qfits_header const *)\n");
  return 0;
}


SWIGINTERN PyObject *_wrap_delete_sip_t(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, SWIG_POINTER_DISOWN |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "delete_sip_t" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  delete_sip_t(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_subimage(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_get_subimage", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_subimage" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_get_subimage" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_get_subimage" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_t_get_subimage" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sip_t_get_subimage" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  result = (sip_t *)sip_t_get_subimage(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_scale", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_scale" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_scale" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  result = (sip_t *)sip_t_scale(arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_pixel_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_pixel_scale" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_t_pixel_scale(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_radec_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_radec_center" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  sip_t_radec_center(arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_radius(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_radius" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_t_radius(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_write_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_write_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_write_to" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_t_write_to" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)sip_t_write_to(arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_ensure_inverse_polynomials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_ensure_inverse_polynomials" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (int)sip_t_ensure_inverse_polynomials(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_pixelxy2xyz(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_pixelxy2xyz", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_pixelxy2xyz" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_pixelxy2xyz" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_pixelxy2xyz" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_t_pixelxy2xyz(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_pixelxy2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_pixelxy2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_pixelxy2radec" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_pixelxy2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_pixelxy2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_t_pixelxy2radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_radec2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_radec2pixelxy", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_radec2pixelxy" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_radec2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_radec2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)sip_t_radec2pixelxy(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_iwc2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_iwc2pixelxy", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_iwc2pixelxy" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_iwc2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_iwc2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_t_iwc2pixelxy(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_pixelxy2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_pixelxy2iwc", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_pixelxy2iwc" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_pixelxy2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_pixelxy2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_t_pixelxy2iwc(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_iwc2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_iwc2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_iwc2radec" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_iwc2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_iwc2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_t_iwc2radec(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_radec2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  int result;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_radec2iwc", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_radec2iwc" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_radec2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_radec2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (int)sip_t_radec2iwc(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_xyz2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[4] ;
  int result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_xyz2pixelxy", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_xyz2pixelxy" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_xyz2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_xyz2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_t_xyz2pixelxy" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  result = (int)sip_t_xyz2pixelxy(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_is_inside(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_is_inside", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_is_inside" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_is_inside" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_is_inside" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)sip_t_is_inside(arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_set_a_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_set_a_term", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_set_a_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_set_a_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_set_a_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_t_set_a_term" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  sip_t_set_a_term(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_set_b_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_set_b_term", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_set_b_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_set_b_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_set_b_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_t_set_b_term" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  sip_t_set_b_term(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_set_ap_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_set_ap_term", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_set_ap_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_set_ap_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_set_ap_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_t_set_ap_term" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  sip_t_set_ap_term(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_set_bp_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_set_bp_term", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_set_bp_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_set_bp_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_set_bp_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_t_set_bp_term" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  sip_t_set_bp_term(arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_a_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_get_a_term", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_a_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_get_a_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_get_a_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (double)sip_t_get_a_term(arg1,arg2,arg3);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_b_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_get_b_term", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_b_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_get_b_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_get_b_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (double)sip_t_get_b_term(arg1,arg2,arg3);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_ap_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_get_ap_term", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_ap_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_get_ap_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_get_ap_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (double)sip_t_get_ap_term(arg1,arg2,arg3);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_bp_term(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_get_bp_term", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_bp_term" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_get_bp_term" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_get_bp_term" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (double)sip_t_get_bp_term(arg1,arg2,arg3);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_set_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_set_width", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_set_width" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_set_width" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  sip_t_set_width(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_set_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_t_set_height", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_set_height" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_set_height" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  sip_t_set_height(arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_width(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_width" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_t_get_width(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_height(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_height" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_t_get_height(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_distortion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_get_distortion", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_distortion" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_get_distortion" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_get_distortion" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_t_get_distortion(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_t_get_undistortion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_t_get_undistortion", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_t_get_undistortion" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_t_get_undistortion" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_t_get_undistortion" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_t_get_undistortion(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *sip_t_swigregister(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *obj;
  if (!SWIG_Python_UnpackTuple(args, "swigregister", 1, 1, &obj)) return NULL;
  SWIG_TypeNewClientData(SWIGTYPE_p_sip_t, SWIG_NewClientData(obj));
  return SWIG_Py_Void();
}

SWIGINTERN PyObject *sip_t_swiginit(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  return SWIG_Python_InitShadowInstance(args);
}

SWIGINTERN PyObject *_wrap_sip_create(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_create", 0, 0, 0)) SWIG_fail;
  result = (sip_t *)sip_create();
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_free(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_free" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  sip_free(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_copy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  sip_t *arg2 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_copy", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_copy" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_copy" "', argument " "2"" of type '" "sip_t const *""'"); 
  }
  arg2 = (sip_t *)(argp2);
  sip_copy(arg1,(sip_t const *)arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_wrap_tan(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  sip_t *arg2 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_wrap_tan", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_wrap_tan" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_wrap_tan" "', argument " "2"" of type '" "sip_t *""'"); 
  }
  arg2 = (sip_t *)(argp2);
  sip_wrap_tan((tan_t const *)arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_imagew(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_imagew" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_imagew(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_imageh(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_imageh" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_imageh(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_pixelxy2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_pixelxy2radec", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_pixelxy2radec" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_pixelxy2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_pixelxy2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_pixelxy2radec" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_pixelxy2radec" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  sip_pixelxy2radec((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_pixelxy2xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_pixelxy2xyzarr", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_pixelxy2xyzarr" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_pixelxy2xyzarr" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_pixelxy2xyzarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_pixelxy2xyzarr" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  sip_pixelxy2xyzarr((sip_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_radec2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_radec2pixelxy", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_radec2pixelxy" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_radec2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_radec2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_radec2pixelxy" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_radec2pixelxy" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (anbool)sip_radec2pixelxy((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_radec2pixelxy_check(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_radec2pixelxy_check", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_radec2pixelxy_check" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_radec2pixelxy_check" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_radec2pixelxy_check" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_radec2pixelxy_check" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_radec2pixelxy_check" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (anbool)sip_radec2pixelxy_check((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_xyzarr2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_xyzarr2pixelxy", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_xyzarr2pixelxy" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_xyzarr2pixelxy" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_xyzarr2pixelxy" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_xyzarr2pixelxy" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  result = (anbool)sip_xyzarr2pixelxy((sip_t const *)arg1,(double const *)arg2,arg3,arg4);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_xyz2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double arg4 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_xyz2pixelxy", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_xyz2pixelxy" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_xyz2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_xyz2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_xyz2pixelxy" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_xyz2pixelxy" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "sip_xyz2pixelxy" "', argument " "6"" of type '" "double *""'"); 
  }
  arg6 = (double *)(argp6);
  result = (anbool)sip_xyz2pixelxy((sip_t const *)arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_pixelxy2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_pixelxy2iwc", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_pixelxy2iwc" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_pixelxy2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_pixelxy2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_pixelxy2iwc" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_pixelxy2iwc" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  sip_pixelxy2iwc((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_det_cd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_det_cd" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_det_cd((tan_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_det_cd(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_det_cd" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_det_cd((sip_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_pixel_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_pixel_scale" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_pixel_scale((tan_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_pixel_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_pixel_scale" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_pixel_scale((sip_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_calc_inv_distortion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_calc_inv_distortion", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_calc_inv_distortion" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_calc_inv_distortion" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_calc_inv_distortion" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_calc_inv_distortion" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_calc_inv_distortion" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  sip_calc_inv_distortion((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_calc_distortion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_calc_distortion", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_calc_distortion" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_calc_distortion" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_calc_distortion" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_calc_distortion" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_calc_distortion" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  sip_calc_distortion((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_pixel_distortion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_pixel_distortion", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_pixel_distortion" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_pixel_distortion" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_pixel_distortion" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_pixel_distortion((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_pixel_undistortion(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_pixel_undistortion", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_pixel_undistortion" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_pixel_undistortion" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_pixel_undistortion" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_pixel_undistortion((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_pixelxy2xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_pixelxy2xyzarr", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_pixelxy2xyzarr" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_pixelxy2xyzarr" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_pixelxy2xyzarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_pixelxy2xyzarr" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  tan_pixelxy2xyzarr((tan_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_pixelxy2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_pixelxy2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_pixelxy2radec" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_pixelxy2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_pixelxy2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_pixelxy2radec((tan_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_pixelxy2radecarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_pixelxy2radecarr", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_pixelxy2radecarr" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_pixelxy2radecarr" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_pixelxy2radecarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_pixelxy2radecarr" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  tan_pixelxy2radecarr((tan_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_radec2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_radec2pixelxy", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_radec2pixelxy" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_radec2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_radec2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_radec2pixelxy" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "tan_radec2pixelxy" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (anbool)tan_radec2pixelxy((tan_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_xyzarr2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_xyzarr2pixelxy", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_xyzarr2pixelxy" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_xyzarr2pixelxy" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "tan_xyzarr2pixelxy" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_xyzarr2pixelxy" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  result = (anbool)tan_xyzarr2pixelxy((tan_t const *)arg1,(double const *)arg2,arg3,arg4);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_iwc2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_iwc2pixelxy", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_iwc2pixelxy" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_iwc2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_iwc2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_iwc2pixelxy" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "tan_iwc2pixelxy" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  tan_iwc2pixelxy((tan_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_iwc2xyzarr(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_iwc2xyzarr", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_iwc2xyzarr" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_iwc2xyzarr" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_iwc2xyzarr" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_iwc2xyzarr" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  tan_iwc2xyzarr((tan_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_iwc2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "tan_iwc2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_iwc2radec" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_iwc2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_iwc2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_iwc2radec((tan_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_pixelxy2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_pixelxy2iwc", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_pixelxy2iwc" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_pixelxy2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_pixelxy2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_pixelxy2iwc" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "tan_pixelxy2iwc" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  tan_pixelxy2iwc((tan_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_xyzarr2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_xyzarr2iwc", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_xyzarr2iwc" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_xyzarr2iwc" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "tan_xyzarr2iwc" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_xyzarr2iwc" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  result = (anbool)tan_xyzarr2iwc((tan_t const *)arg1,(double const *)arg2,arg3,arg4);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_radec2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_radec2iwc", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_radec2iwc" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_radec2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_radec2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_radec2iwc" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "tan_radec2iwc" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (anbool)tan_radec2iwc((tan_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_xyzarr2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_xyzarr2iwc", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_xyzarr2iwc" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_xyzarr2iwc" "', argument " "2"" of type '" "double const *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_xyzarr2iwc" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_xyzarr2iwc" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  result = (anbool)sip_xyzarr2iwc((sip_t const *)arg1,(double const *)arg2,arg3,arg4);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_radec2iwc(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_radec2iwc", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_radec2iwc" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_radec2iwc" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_radec2iwc" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_radec2iwc" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_radec2iwc" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  result = (anbool)sip_radec2iwc((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_iwc2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_iwc2pixelxy", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_iwc2pixelxy" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_iwc2pixelxy" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_iwc2pixelxy" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_iwc2pixelxy" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_iwc2pixelxy" "', argument " "5"" of type '" "double *""'"); 
  }
  arg5 = (double *)(argp5);
  sip_iwc2pixelxy((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_iwc2radec(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  PyObject *swig_obj[3] ;
  
  arg4 = &temp4;
  arg5 = &temp5;
  if (!SWIG_Python_UnpackTuple(args, "sip_iwc2radec", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_iwc2radec" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_iwc2radec" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_iwc2radec" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_iwc2radec((sip_t const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_print" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  sip_print((sip_t const *)arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_print_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_print_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_print_to" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_print_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  sip_print_to((sip_t const *)arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_print(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_print" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  tan_print((tan_t const *)arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_print_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_print_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_print_to" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_print_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  tan_print_to((tan_t const *)arg1,arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_crval(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_crval" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  sip_get_crval((sip_t const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_get_orientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_get_orientation" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_get_orientation((tan_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_orientation(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_orientation" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_get_orientation((sip_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_image_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_get_image_size", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_image_size" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_get_image_size" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_get_image_size" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  result = (int)sip_get_image_size((qfits_header const *)arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_read_tan_or_sip_header_file_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  sip_t *arg3 = (sip_t *) 0 ;
  anbool arg4 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  unsigned char val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_read_tan_or_sip_header_file_ext", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_read_tan_or_sip_header_file_ext" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_read_tan_or_sip_header_file_ext" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_read_tan_or_sip_header_file_ext" "', argument " "3"" of type '" "sip_t *""'"); 
  }
  arg3 = (sip_t *)(argp3);
  ecode4 = SWIG_AsVal_unsigned_SS_char(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_read_tan_or_sip_header_file_ext" "', argument " "4"" of type '" "anbool""'");
  } 
  arg4 = (anbool)(val4);
  result = (sip_t *)sip_read_tan_or_sip_header_file_ext((char const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_create_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_create_header" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (qfits_header *)sip_create_header((sip_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_create_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_header *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_create_header" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (qfits_header *)tan_create_header((tan_t const *)arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_add_to_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  sip_t *arg2 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_add_to_header", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_add_to_header" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_add_to_header" "', argument " "2"" of type '" "sip_t const *""'"); 
  }
  arg2 = (sip_t *)(argp2);
  sip_add_to_header(arg1,(sip_t const *)arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_add_to_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_add_to_header", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_add_to_header" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_add_to_header" "', argument " "2"" of type '" "tan_t const *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  tan_add_to_header(arg1,(tan_t const *)arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_read_header_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  sip_t *arg2 = (sip_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_read_header_file", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_read_header_file" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_read_header_file" "', argument " "2"" of type '" "sip_t *""'"); 
  }
  arg2 = (sip_t *)(argp2);
  result = (sip_t *)sip_read_header_file((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_read_header_file_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  sip_t *arg3 = (sip_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_read_header_file_ext", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_read_header_file_ext" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_read_header_file_ext" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_read_header_file_ext" "', argument " "3"" of type '" "sip_t *""'"); 
  }
  arg3 = (sip_t *)(argp3);
  result = (sip_t *)sip_read_header_file_ext((char const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_read_header_file_ext_only(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  sip_t *arg3 = (sip_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_read_header_file_ext_only", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_read_header_file_ext_only" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_read_header_file_ext_only" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_read_header_file_ext_only" "', argument " "3"" of type '" "sip_t *""'"); 
  }
  arg3 = (sip_t *)(argp3);
  result = (sip_t *)sip_read_header_file_ext_only((char const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_read_header_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  tan_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_read_header_file", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_read_header_file" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_read_header_file" "', argument " "2"" of type '" "tan_t *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  result = (tan_t *)tan_read_header_file((char const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_read_header_file_ext(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  tan_t *arg3 = (tan_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  tan_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_read_header_file_ext", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_read_header_file_ext" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_read_header_file_ext" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "tan_read_header_file_ext" "', argument " "3"" of type '" "tan_t *""'"); 
  }
  arg3 = (tan_t *)(argp3);
  result = (tan_t *)tan_read_header_file_ext((char const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_read_header_file_ext_only(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  tan_t *arg3 = (tan_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  tan_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_read_header_file_ext_only", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_read_header_file_ext_only" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_read_header_file_ext_only" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "tan_read_header_file_ext_only" "', argument " "3"" of type '" "tan_t *""'"); 
  }
  arg3 = (tan_t *)(argp3);
  result = (tan_t *)tan_read_header_file_ext_only((char const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_read_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  sip_t *arg2 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_read_header", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_read_header" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_read_header" "', argument " "2"" of type '" "sip_t *""'"); 
  }
  arg2 = (sip_t *)(argp2);
  result = (sip_t *)sip_read_header((qfits_header const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_read_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  tan_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_read_header", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_read_header" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_read_header" "', argument " "2"" of type '" "tan_t *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  result = (tan_t *)tan_read_header((qfits_header const *)arg1,arg2);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_tan_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_from_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int arg2 ;
  sip_t *arg3 = (sip_t *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_from_string", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_from_string" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_from_string" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_from_string" "', argument " "3"" of type '" "sip_t *""'"); 
  }
  arg3 = (sip_t *)(argp3);
  result = (sip_t *)sip_from_string((char const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_write_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_write_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_write_to" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_write_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)tan_write_to((tan_t const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_write_to(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  FILE *arg2 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_write_to", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_write_to" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_write_to" "', argument " "2"" of type '" "FILE *""'"); 
  }
  arg2 = (FILE *)(argp2);
  result = (int)sip_write_to((sip_t const *)arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_write_to_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_write_to_file", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_write_to_file" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_write_to_file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)sip_write_to_file((sip_t const *)arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_write_to_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_write_to_file", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_write_to_file" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_write_to_file" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)tan_write_to_file((tan_t const *)arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_wcs_pixel_center_for_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  double arg1 ;
  double val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_double(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "wcs_pixel_center_for_size" "', argument " "1"" of type '" "double""'");
  } 
  arg1 = (double)(val1);
  result = (double)wcs_pixel_center_for_size(arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_ensure_inverse_polynomials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_ensure_inverse_polynomials" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (int)sip_ensure_inverse_polynomials(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_compute_inverse_polynomials(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  int arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject *swig_obj[7] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_compute_inverse_polynomials", 7, 7, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_compute_inverse_polynomials" "', argument " "1"" of type '" "sip_t *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_compute_inverse_polynomials" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_compute_inverse_polynomials" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_compute_inverse_polynomials" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sip_compute_inverse_polynomials" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sip_compute_inverse_polynomials" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "sip_compute_inverse_polynomials" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  result = (int)sip_compute_inverse_polynomials(arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_filter_stars_in_field(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  int arg5 ;
  double **arg6 = (double **) 0 ;
  int *arg7 = (int *) 0 ;
  int *arg8 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject *swig_obj[8] ;
  int *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_filter_stars_in_field", 8, 8, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_filter_stars_in_field" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_filter_stars_in_field" "', argument " "2"" of type '" "tan_t const *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_filter_stars_in_field" "', argument " "3"" of type '" "double const *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_filter_stars_in_field" "', argument " "4"" of type '" "double const *""'"); 
  }
  arg4 = (double *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sip_filter_stars_in_field" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_p_double, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "sip_filter_stars_in_field" "', argument " "6"" of type '" "double **""'"); 
  }
  arg6 = (double **)(argp6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "sip_filter_stars_in_field" "', argument " "7"" of type '" "int *""'"); 
  }
  arg7 = (int *)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7], &argp8,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "sip_filter_stars_in_field" "', argument " "8"" of type '" "int *""'"); 
  }
  arg8 = (int *)(argp8);
  result = (int *)sip_filter_stars_in_field((sip_t const *)arg1,(tan_t const *)arg2,(double const *)arg3,(double const *)arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_int, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_radec_bounds(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int arg2 ;
  double *arg3 = (double *) 0 ;
  double *arg4 = (double *) 0 ;
  double *arg5 = (double *) 0 ;
  double *arg6 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  double temp4 ;
  int res4 = SWIG_TMPOBJ ;
  double temp5 ;
  int res5 = SWIG_TMPOBJ ;
  double temp6 ;
  int res6 = SWIG_TMPOBJ ;
  PyObject *swig_obj[2] ;
  
  arg3 = &temp3;
  arg4 = &temp4;
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "sip_get_radec_bounds", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_radec_bounds" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_get_radec_bounds" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  sip_get_radec_bounds((sip_t const *)arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res4)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg4)));
  } else {
    int new_flags = SWIG_IsNewObj(res4) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg4), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_walk_image_boundary(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  void (*arg3)(sip_t const *,double,double,double,double,void *) = (void (*)(sip_t const *,double,double,double,double,void *)) 0 ;
  void *arg4 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  int res4 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_walk_image_boundary", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_walk_image_boundary" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_walk_image_boundary" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[2], (void**)(&arg3), SWIGTYPE_p_f_p_q_const__sip_t_double_double_double_double_p_void__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "sip_walk_image_boundary" "', argument " "3"" of type '" "void (*)(sip_t const *,double,double,double,double,void *)""'"); 
    }
  }
  res4 = SWIG_ConvertPtr(swig_obj[3],SWIG_as_voidptrptr(&arg4), 0, 0);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_walk_image_boundary" "', argument " "4"" of type '" "void *""'"); 
  }
  sip_walk_image_boundary((sip_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_radec_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_radec_center" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  sip_get_radec_center((sip_t const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_get_radec_center(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double temp2 ;
  int res2 = SWIG_TMPOBJ ;
  double temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_get_radec_center" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  tan_get_radec_center((tan_t const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_double, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_double((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_double, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_radius_deg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_radius_deg" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  result = (double)sip_get_radius_deg((sip_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_get_radius_deg(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  double result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_get_radius_deg" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  result = (double)tan_get_radius_deg((tan_t const *)arg1);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_radec_center_hms(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  int *arg2 = (int *) 0 ;
  int *arg3 = (int *) 0 ;
  double *arg4 = (double *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  int *arg7 = (int *) 0 ;
  double *arg8 = (double *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  void *argp8 = 0 ;
  int res8 = 0 ;
  PyObject *swig_obj[8] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_get_radec_center_hms", 8, 8, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_radec_center_hms" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_get_radec_center_hms" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_get_radec_center_hms" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_get_radec_center_hms" "', argument " "4"" of type '" "double *""'"); 
  }
  arg4 = (double *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "sip_get_radec_center_hms" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "sip_get_radec_center_hms" "', argument " "6"" of type '" "int *""'"); 
  }
  arg6 = (int *)(argp6);
  res7 = SWIG_ConvertPtr(swig_obj[6], &argp7,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "sip_get_radec_center_hms" "', argument " "7"" of type '" "int *""'"); 
  }
  arg7 = (int *)(argp7);
  res8 = SWIG_ConvertPtr(swig_obj[7], &argp8,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res8)) {
    SWIG_exception_fail(SWIG_ArgError(res8), "in method '" "sip_get_radec_center_hms" "', argument " "8"" of type '" "double *""'"); 
  }
  arg8 = (double *)(argp8);
  sip_get_radec_center_hms((sip_t const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_pixel_is_inside_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_pixel_is_inside_image", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_pixel_is_inside_image" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_pixel_is_inside_image" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_pixel_is_inside_image" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)sip_pixel_is_inside_image((sip_t const *)arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_is_inside_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_is_inside_image", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_is_inside_image" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "sip_is_inside_image" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_is_inside_image" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)sip_is_inside_image((sip_t const *)arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_radec_center_hms_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_get_radec_center_hms_string", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_radec_center_hms_string" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_get_radec_center_hms_string" "', argument " "2"" of type '" "char *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_get_radec_center_hms_string" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  sip_get_radec_center_hms_string((sip_t const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_get_field_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  double *arg2 = (double *) 0 ;
  double *arg3 = (double *) 0 ;
  char **arg4 = (char **) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_get_field_size", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_get_field_size" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_get_field_size" "', argument " "2"" of type '" "double *""'"); 
  }
  arg2 = (double *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_double, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "sip_get_field_size" "', argument " "3"" of type '" "double *""'"); 
  }
  arg3 = (double *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "sip_get_field_size" "', argument " "4"" of type '" "char **""'"); 
  }
  arg4 = (char **)(argp4);
  sip_get_field_size((sip_t const *)arg1,arg2,arg3,arg4);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_shift(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  sip_t *arg2 = (sip_t *) 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_shift", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_shift" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_shift" "', argument " "2"" of type '" "sip_t *""'"); 
  }
  arg2 = (sip_t *)(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_shift" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "sip_shift" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "sip_shift" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "sip_shift" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  sip_shift((sip_t const *)arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_pixel_is_inside_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_pixel_is_inside_image", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_pixel_is_inside_image" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_pixel_is_inside_image" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_pixel_is_inside_image" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)tan_pixel_is_inside_image((tan_t const *)arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_is_inside_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  double arg2 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  anbool result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_is_inside_image", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_is_inside_image" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "tan_is_inside_image" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_is_inside_image" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  result = (anbool)tan_is_inside_image((tan_t const *)arg1,arg2,arg3);
  resultobj = SWIG_From_unsigned_SS_char((unsigned char)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_transform(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  double arg3 ;
  double arg4 ;
  double arg5 ;
  double arg6 ;
  double arg7 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  double val4 ;
  int ecode4 = 0 ;
  double val5 ;
  int ecode5 = 0 ;
  double val6 ;
  int ecode6 = 0 ;
  double val7 ;
  int ecode7 = 0 ;
  PyObject *swig_obj[7] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_transform", 7, 7, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_transform" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_transform" "', argument " "2"" of type '" "tan_t *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_transform" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  ecode4 = SWIG_AsVal_double(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "tan_transform" "', argument " "4"" of type '" "double""'");
  } 
  arg4 = (double)(val4);
  ecode5 = SWIG_AsVal_double(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "tan_transform" "', argument " "5"" of type '" "double""'");
  } 
  arg5 = (double)(val5);
  ecode6 = SWIG_AsVal_double(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "tan_transform" "', argument " "6"" of type '" "double""'");
  } 
  arg6 = (double)(val6);
  ecode7 = SWIG_AsVal_double(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "tan_transform" "', argument " "7"" of type '" "double""'");
  } 
  arg7 = (double)(val7);
  tan_transform((tan_t const *)arg1,arg2,arg3,arg4,arg5,arg6,arg7);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_scale", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_scale" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_scale" "', argument " "2"" of type '" "tan_t *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_scale" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_scale((tan_t const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_scale(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  sip_t *arg2 = (sip_t *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_scale", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_scale" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "sip_scale" "', argument " "2"" of type '" "sip_t *""'"); 
  }
  arg2 = (sip_t *)(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "sip_scale" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  sip_scale((sip_t const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_rotate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  double arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_rotate", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_rotate" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_rotate" "', argument " "2"" of type '" "tan_t *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "tan_rotate" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  tan_rotate((tan_t const *)arg1,arg2,arg3);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_add_numpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  float arg4 ;
  anwcs_t *arg5 = (anwcs_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_add_numpy", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_add_numpy" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "coadd_add_numpy" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "coadd_add_numpy" "', argument " "5"" of type '" "anwcs_t const *""'"); 
  }
  arg5 = (anwcs_t *)(argp5);
  result = (int)coadd_add_numpy(arg1,arg2,arg3,arg4,(struct anwcs_t const *)arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_coadd_get_snapshot_numpy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  coadd_t *arg1 = (coadd_t *) 0 ;
  float arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  float val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "coadd_get_snapshot_numpy", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_coadd_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "coadd_get_snapshot_numpy" "', argument " "1"" of type '" "coadd_t *""'"); 
  }
  arg1 = (coadd_t *)(argp1);
  ecode2 = SWIG_AsVal_float(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "coadd_get_snapshot_numpy" "', argument " "2"" of type '" "float""'");
  } 
  arg2 = (float)(val2);
  result = (PyObject *)coadd_get_snapshot_numpy(arg1,arg2);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fit_sip_wcs_py(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  tan_t *arg4 = (tan_t *) 0 ;
  int arg5 ;
  int arg6 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  sip_t *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fit_sip_wcs_py", 6, 6, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fit_sip_wcs_py" "', argument " "4"" of type '" "tan_t *""'"); 
  }
  arg4 = (tan_t *)(argp4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fit_sip_wcs_py" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "fit_sip_wcs_py" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  result = (sip_t *)fit_sip_wcs_py(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_sip_t, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast_2to2ok(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  f_2to2ok arg1 = (f_2to2ok) 0 ;
  void *arg2 = (void *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *arg4 = (PyObject *) 0 ;
  int res2 ;
  PyObject *swig_obj[4] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "broadcast_2to2ok", 4, 4, swig_obj)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "broadcast_2to2ok" "', argument " "1"" of type '" "f_2to2ok""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast_2to2ok" "', argument " "2"" of type '" "void const *""'"); 
  }
  arg3 = swig_obj[2];
  arg4 = swig_obj[3];
  result = (PyObject *)broadcast_2to2ok(arg1,(void const *)arg2,arg3,arg4);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast_2to2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  f_2to2 arg1 = (f_2to2) 0 ;
  void *arg2 = (void *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *arg4 = (PyObject *) 0 ;
  int res2 ;
  PyObject *swig_obj[4] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "broadcast_2to2", 4, 4, swig_obj)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__void_double_double_p_double_p_double__void);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "broadcast_2to2" "', argument " "1"" of type '" "f_2to2""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast_2to2" "', argument " "2"" of type '" "void const *""'"); 
  }
  arg3 = swig_obj[2];
  arg4 = swig_obj[3];
  result = (PyObject *)broadcast_2to2(arg1,(void const *)arg2,arg3,arg4);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_broadcast_2to2i(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  f_2to2i arg1 = (f_2to2i) 0 ;
  void *arg2 = (void *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *arg4 = (PyObject *) 0 ;
  int res2 ;
  PyObject *swig_obj[4] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "broadcast_2to2i", 4, 4, swig_obj)) SWIG_fail;
  {
    int res = SWIG_ConvertFunctionPtr(swig_obj[0], (void**)(&arg1), SWIGTYPE_p_f_p_q_const__void_double_double_p_double_p_double__int);
    if (!SWIG_IsOK(res)) {
      SWIG_exception_fail(SWIG_ArgError(res), "in method '" "broadcast_2to2i" "', argument " "1"" of type '" "f_2to2i""'"); 
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "broadcast_2to2i" "', argument " "2"" of type '" "void const *""'"); 
  }
  arg3 = swig_obj[2];
  arg4 = swig_obj[3];
  result = (PyObject *)broadcast_2to2i(arg1,(void const *)arg2,arg3,arg4);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_rd2xy_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_rd2xy_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_rd2xy_wrapper" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)tan_rd2xy_wrapper((tan_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_rd2xy_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_rd2xy_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_rd2xy_wrapper" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)sip_rd2xy_wrapper((sip_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_rd2xy_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_rd2xy_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_rd2xy_wrapper" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)anwcs_rd2xy_wrapper((struct anwcs_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_iwc2xy_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_iwc2xy_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_iwc2xy_wrapper" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)tan_iwc2xy_wrapper((tan_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_iwc2xy_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_iwc2xy_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_iwc2xy_wrapper" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)sip_iwc2xy_wrapper((sip_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_xy2iwc_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_xy2iwc_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_xy2iwc_wrapper" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)tan_xy2iwc_wrapper((tan_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_xy2iwc_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_xy2iwc_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_xy2iwc_wrapper" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)sip_xy2iwc_wrapper((sip_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_iwc2rd_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_iwc2rd_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_iwc2rd_wrapper" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)tan_iwc2rd_wrapper((tan_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_iwc2rd_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_iwc2rd_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_iwc2rd_wrapper" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)sip_iwc2rd_wrapper((sip_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_rd2iwc_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_rd2iwc_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_rd2iwc_wrapper" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)tan_rd2iwc_wrapper((tan_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_rd2iwc_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_rd2iwc_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_rd2iwc_wrapper" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)sip_rd2iwc_wrapper((sip_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_xy2rd_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_xy2rd_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_xy2rd_wrapper" "', argument " "1"" of type '" "tan_t const *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)tan_xy2rd_wrapper((tan_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_sip_xy2rd_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  sip_t *arg1 = (sip_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "sip_xy2rd_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_sip_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "sip_xy2rd_wrapper" "', argument " "1"" of type '" "sip_t const *""'"); 
  }
  arg1 = (sip_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)sip_xy2rd_wrapper((sip_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_anwcs_xy2rd_wrapper(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  anwcs_t *arg1 = (anwcs_t *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[3] ;
  PyObject *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "anwcs_xy2rd_wrapper", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_anwcs_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "anwcs_xy2rd_wrapper" "', argument " "1"" of type '" "anwcs_t const *""'"); 
  }
  arg1 = (anwcs_t *)(argp1);
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (PyObject *)anwcs_xy2rd_wrapper((struct anwcs_t const *)arg1,arg2,arg3);
  resultobj = result;
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_wcs_resample(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  tan_t *arg2 = (tan_t *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *arg4 = (PyObject *) 0 ;
  int arg5 ;
  int arg6 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  int val6 ;
  int ecode6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_wcs_resample", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_wcs_resample" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_wcs_resample" "', argument " "2"" of type '" "tan_t *""'"); 
  }
  arg2 = (tan_t *)(argp2);
  arg3 = swig_obj[2];
  arg4 = swig_obj[3];
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "tan_wcs_resample" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  ecode6 = SWIG_AsVal_int(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "tan_wcs_resample" "', argument " "6"" of type '" "int""'");
  } 
  arg6 = (int)(val6);
  result = (int)tan_wcs_resample(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_tan_numpy_xyz2pixelxy(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  tan_t *arg1 = (tan_t *) 0 ;
  PyArrayObject *arg2 = (PyArrayObject *) 0 ;
  PyArrayObject *arg3 = (PyArrayObject *) 0 ;
  PyArrayObject *arg4 = (PyArrayObject *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "tan_numpy_xyz2pixelxy", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_tan_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "tan_numpy_xyz2pixelxy" "', argument " "1"" of type '" "tan_t *""'"); 
  }
  arg1 = (tan_t *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_PyArrayObject, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "tan_numpy_xyz2pixelxy" "', argument " "2"" of type '" "PyArrayObject *""'"); 
  }
  arg2 = (PyArrayObject *)(argp2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_PyArrayObject, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "tan_numpy_xyz2pixelxy" "', argument " "3"" of type '" "PyArrayObject *""'"); 
  }
  arg3 = (PyArrayObject *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_PyArrayObject, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "tan_numpy_xyz2pixelxy" "', argument " "4"" of type '" "PyArrayObject *""'"); 
  }
  arg4 = (PyArrayObject *)(argp4);
  result = (int)tan_numpy_xyz2pixelxy(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_an_tally(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  PyObject *arg1 = (PyObject *) 0 ;
  PyObject *arg2 = (PyObject *) 0 ;
  PyObject *arg3 = (PyObject *) 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "an_tally", 3, 3, swig_obj)) SWIG_fail;
  arg1 = swig_obj[0];
  arg2 = swig_obj[1];
  arg3 = swig_obj[2];
  result = (int)an_tally(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_use_error_system(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_use_error_system", 0, 0, 0)) SWIG_fail;
  fits_use_error_system();
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_to_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  int *arg2 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_to_string", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_to_string" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_to_string" "', argument " "2"" of type '" "int *""'"); 
  }
  arg2 = (int *)(argp2);
  result = (char *)fits_to_string((qfits_header const *)arg1,arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_float_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_float_image", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_float_image" "', argument " "1"" of type '" "float const *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_float_image" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_float_image" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_write_float_image" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (int)fits_write_float_image((float const *)arg1,arg2,arg3,(char const *)arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_u8_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  uint8_t *arg1 = (uint8_t *) 0 ;
  int arg2 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_u8_image", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_uint8_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_u8_image" "', argument " "1"" of type '" "uint8_t const *""'"); 
  }
  arg1 = (uint8_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_u8_image" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_u8_image" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_write_u8_image" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (int)fits_write_u8_image((uint8_t const *)arg1,arg2,arg3,(char const *)arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_i16_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int16_t *arg1 = (int16_t *) 0 ;
  int arg2 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_i16_image", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_int16_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_i16_image" "', argument " "1"" of type '" "int16_t const *""'"); 
  }
  arg1 = (int16_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_i16_image" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_i16_image" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_write_i16_image" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  result = (int)fits_write_i16_image((int16_t const *)arg1,arg2,arg3,(char const *)arg4);
  resultobj = SWIG_From_int((int)(result));
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_header_for_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfitsdumper *arg1 = (qfitsdumper *) 0 ;
  int arg2 ;
  qfits_header *arg3 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  qfits_header *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_header_for_image", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfitsdumper, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_get_header_for_image" "', argument " "1"" of type '" "qfitsdumper const *""'"); 
  }
  arg1 = (qfitsdumper *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_get_header_for_image" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_get_header_for_image" "', argument " "3"" of type '" "qfits_header *""'"); 
  }
  arg3 = (qfits_header *)(argp3);
  result = (qfits_header *)fits_get_header_for_image((qfitsdumper const *)arg1,arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_header_for_image2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  qfits_header *arg4 = (qfits_header *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  PyObject *swig_obj[4] ;
  qfits_header *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_header_for_image2", 4, 4, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fits_get_header_for_image2" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_get_header_for_image2" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_get_header_for_image2" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_get_header_for_image2" "', argument " "4"" of type '" "qfits_header *""'"); 
  }
  arg4 = (qfits_header *)(argp4);
  result = (qfits_header *)fits_get_header_for_image2(arg1,arg2,arg3,arg4);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_header_for_image3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  qfits_header *arg5 = (qfits_header *) 0 ;
  int val1 ;
  int ecode1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  qfits_header *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_header_for_image3", 5, 5, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fits_get_header_for_image3" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_get_header_for_image3" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_get_header_for_image3" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fits_get_header_for_image3" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fits_get_header_for_image3" "', argument " "5"" of type '" "qfits_header *""'"); 
  }
  arg5 = (qfits_header *)(argp5);
  result = (qfits_header *)fits_get_header_for_image3(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_header, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_header", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_header" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_header" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)fits_write_header((qfits_header const *)arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_header_and_image(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  qfitsdumper *arg2 = (qfitsdumper *) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_header_and_image", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_header_and_image" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfitsdumper, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_header_and_image" "', argument " "2"" of type '" "qfitsdumper const *""'"); 
  }
  arg2 = (qfitsdumper *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_header_and_image" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)fits_write_header_and_image((qfits_header const *)arg1,(qfitsdumper const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_double_val(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_table *arg1 = (qfits_table *) 0 ;
  int arg2 ;
  void *arg3 = (void *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int res3 ;
  PyObject *swig_obj[3] ;
  double result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_double_val", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_table, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_get_double_val" "', argument " "1"" of type '" "qfits_table const *""'"); 
  }
  arg1 = (qfits_table *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_get_double_val" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2],SWIG_as_voidptrptr(&arg3), 0, 0);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_get_double_val" "', argument " "3"" of type '" "void const *""'"); 
  }
  result = (double)fits_get_double_val((qfits_table const *)arg1,arg2,(void const *)arg3);
  resultobj = SWIG_From_double((double)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_is_table_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_is_table_header" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (int)fits_is_table_header((char const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_is_primary_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_is_primary_header" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  result = (int)fits_is_primary_header((char const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_copy_non_table_headers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  qfits_header *arg2 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_copy_non_table_headers", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_copy_non_table_headers" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_copy_non_table_headers" "', argument " "2"" of type '" "qfits_header const *""'"); 
  }
  arg2 = (qfits_header *)(argp2);
  fits_copy_non_table_headers(arg1,(qfits_header const *)arg2);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_dupstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_dupstring", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_get_dupstring" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_get_dupstring" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (char *)fits_get_dupstring((qfits_header const *)arg1,(char const *)arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_long_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_long_string", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_get_long_string" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_get_long_string" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (char *)fits_get_long_string((qfits_header const *)arg1,(char const *)arg2);
  resultobj = SWIG_FromCharPtr((const char *)result);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_addf__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fits_header_addf", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_addf" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_addf" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_header_addf" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_addf" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_addf(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_addf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,4);
  varargs = PyTuple_GetSlice(args,4,PyTuple_Size(args));
  resultobj = _wrap_fits_header_addf__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_fits_header_addf_longstring__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fits_header_addf_longstring", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_addf_longstring" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_addf_longstring" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_header_addf_longstring" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_addf_longstring" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_addf_longstring(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_addf_longstring(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,4);
  varargs = PyTuple_GetSlice(args,4,PyTuple_Size(args));
  resultobj = _wrap_fits_header_addf_longstring__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_fits_header_add_longstring_boilerplate(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_add_longstring_boilerplate" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  fits_header_add_longstring_boilerplate(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_modf__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  char *arg4 = (char *) 0 ;
  void *arg5 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  PyObject * obj2 = 0 ;
  PyObject * obj3 = 0 ;
  
  if (!PyArg_UnpackTuple(args, "fits_header_modf", 4, 4, &obj0, &obj1, &obj2, &obj3)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_modf" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_modf" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(obj2, &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_header_modf" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  res4 = SWIG_AsCharPtrAndSize(obj3, &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_modf" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_modf(arg1,(char const *)arg2,(char const *)arg3,(char const *)arg4,arg5);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_modf(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,4);
  varargs = PyTuple_GetSlice(args,4,PyTuple_Size(args));
  resultobj = _wrap_fits_header_modf__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_fits_header_add_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_header_add_int", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_add_int" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_add_int" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_header_add_int" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_add_int" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_add_int(arg1,(char const *)arg2,arg3,(char const *)arg4);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_add_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_header_add_double", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_add_double" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_add_double" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_header_add_double" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_add_double" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_add_double(arg1,(char const *)arg2,arg3,(char const *)arg4);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_set_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_header_set_double", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_set_double" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_set_double" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_header_set_double" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_set_double" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_set_double(arg1,(char const *)arg2,arg3,(char const *)arg4);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_set_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_header_set_int", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_set_int" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_set_int" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_header_set_int" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_set_int" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_set_int(arg1,(char const *)arg2,arg3,(char const *)arg4);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_mod_int(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  int arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_header_mod_int", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_mod_int" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_mod_int" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_header_mod_int" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_mod_int" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_mod_int(arg1,(char const *)arg2,arg3,(char const *)arg4);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_header_mod_double(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  double arg3 ;
  char *arg4 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  double val3 ;
  int ecode3 = 0 ;
  int res4 ;
  char *buf4 = 0 ;
  int alloc4 = 0 ;
  PyObject *swig_obj[4] ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_header_mod_double", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_header_mod_double" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_header_mod_double" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  ecode3 = SWIG_AsVal_double(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_header_mod_double" "', argument " "3"" of type '" "double""'");
  } 
  arg3 = (double)(val3);
  res4 = SWIG_AsCharPtrAndSize(swig_obj[3], &buf4, NULL, &alloc4);
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_header_mod_double" "', argument " "4"" of type '" "char const *""'");
  }
  arg4 = (char *)(buf4);
  fits_header_mod_double(arg1,(char const *)arg2,arg3,(char const *)arg4);
  resultobj = SWIG_Py_Void();
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc4 == SWIG_NEWOBJ) free((char*)buf4);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_update_value(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_update_value", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_update_value" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_update_value" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_update_value" "', argument " "3"" of type '" "char const *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)fits_update_value(arg1,(char const *)arg2,(char const *)arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_copy_table(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_table *arg1 = (qfits_table *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  qfits_table *result = 0 ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_table, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_copy_table" "', argument " "1"" of type '" "qfits_table *""'"); 
  }
  arg1 = (qfits_table *)(argp1);
  result = (qfits_table *)fits_copy_table(arg1);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_table, 0 |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_an_fits_copy_header(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  qfits_header *arg2 = (qfits_header *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "an_fits_copy_header", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "an_fits_copy_header" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "an_fits_copy_header" "', argument " "2"" of type '" "qfits_header *""'"); 
  }
  arg2 = (qfits_header *)(argp2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "an_fits_copy_header" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)an_fits_copy_header((qfits_header const *)arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_copy_all_headers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  qfits_header *arg2 = (qfits_header *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_copy_all_headers", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_copy_all_headers" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_copy_all_headers" "', argument " "2"" of type '" "qfits_header *""'"); 
  }
  arg2 = (qfits_header *)(argp2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_copy_all_headers" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)fits_copy_all_headers((qfits_header const *)arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_append_all_headers(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  qfits_header *arg2 = (qfits_header *) 0 ;
  char *arg3 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int res3 ;
  char *buf3 = 0 ;
  int alloc3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_append_all_headers", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_append_all_headers" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_append_all_headers" "', argument " "2"" of type '" "qfits_header *""'"); 
  }
  arg2 = (qfits_header *)(argp2);
  res3 = SWIG_AsCharPtrAndSize(swig_obj[2], &buf3, NULL, &alloc3);
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_append_all_headers" "', argument " "3"" of type '" "char *""'");
  }
  arg3 = (char *)(buf3);
  result = (int)fits_append_all_headers((qfits_header const *)arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return resultobj;
fail:
  if (alloc3 == SWIG_NEWOBJ) free((char*)buf3);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_args(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char **arg2 = (char **) 0 ;
  int arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_add_args", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_args" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_p_char, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_add_args" "', argument " "2"" of type '" "char **""'"); 
  }
  arg2 = (char **)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_add_args" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  result = (int)fits_add_args(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_long_comment__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fits_add_long_comment", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_long_comment" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_add_long_comment" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)fits_add_long_comment(arg1,(char const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_long_comment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,2);
  varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args));
  resultobj = _wrap_fits_add_long_comment__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_fits_append_long_comment__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fits_append_long_comment", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_append_long_comment" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_append_long_comment" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)fits_append_long_comment(arg1,(char const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_append_long_comment(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,2);
  varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args));
  resultobj = _wrap_fits_append_long_comment__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_fits_add_long_history__varargs__(PyObject *SWIGUNUSEDPARM(self), PyObject *args, PyObject *varargs) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  char *arg2 = (char *) 0 ;
  void *arg3 = 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject * obj0 = 0 ;
  PyObject * obj1 = 0 ;
  int result;
  
  if (!PyArg_UnpackTuple(args, "fits_add_long_history", 2, 2, &obj0, &obj1)) SWIG_fail;
  res1 = SWIG_ConvertPtr(obj0, &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_long_history" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(obj1, &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_add_long_history" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)fits_add_long_history(arg1,(char const *)arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_long_history(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj;
  PyObject *varargs;
  PyObject *newargs;
  
  newargs = PyTuple_GetSlice(args,0,2);
  varargs = PyTuple_GetSlice(args,2,PyTuple_Size(args));
  resultobj = _wrap_fits_add_long_history__varargs__(NULL,newargs,varargs);
  Py_XDECREF(newargs);
  Py_XDECREF(varargs);
  return resultobj;
}


SWIGINTERN PyObject *_wrap_fits_blocks_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int arg1 ;
  int val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_int(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fits_blocks_needed" "', argument " "1"" of type '" "int""'");
  } 
  arg1 = (int)(val1);
  result = (int)fits_blocks_needed(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_bytes_needed(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  size_t arg1 ;
  size_t val1 ;
  int ecode1 = 0 ;
  PyObject *swig_obj[1] ;
  size_t result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  ecode1 = SWIG_AsVal_size_t(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "fits_bytes_needed" "', argument " "1"" of type '" "size_t""'");
  } 
  arg1 = (size_t)(val1);
  result = fits_bytes_needed(arg1);
  resultobj = SWIG_From_size_t((size_t)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_pad_file_with(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  char arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_pad_file_with", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_pad_file_with" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  ecode2 = SWIG_AsVal_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_pad_file_with" "', argument " "2"" of type '" "char""'");
  } 
  arg2 = (char)(val2);
  result = (int)fits_pad_file_with(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_pad_file(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_pad_file" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  result = (int)fits_pad_file(arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_pad_file_name(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_pad_file_name" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  result = (int)fits_pad_file_name(arg1);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_fill_endian_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_fill_endian_string" "', argument " "1"" of type '" "char *""'");
  }
  arg1 = (char *)(buf1);
  fits_fill_endian_string(arg1);
  resultobj = SWIG_Py_Void();
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_endian_string(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_endian_string", 0, 0, 0)) SWIG_fail;
  result = (char *)fits_get_endian_string();
  resultobj = SWIG_FromCharPtr((const char *)result);
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_check_endian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_check_endian" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  result = (int)fits_check_endian((qfits_header const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_check_uint_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_check_uint_size" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  result = (int)fits_check_uint_size((qfits_header const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_check_double_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  int result;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_check_double_size" "', argument " "1"" of type '" "qfits_header const *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  result = (int)fits_check_double_size((qfits_header const *)arg1);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_endian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_endian" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  fits_add_endian(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_reverse_endian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_reverse_endian" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  fits_add_reverse_endian(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_mod_reverse_endian(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_mod_reverse_endian" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  fits_mod_reverse_endian(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_uint_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_uint_size" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  fits_add_uint_size(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_double_size(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_header *arg1 = (qfits_header *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  PyObject *swig_obj[1] ;
  
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_header, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_double_size" "', argument " "1"" of type '" "qfits_header *""'"); 
  }
  arg1 = (qfits_header *)(argp1);
  fits_add_double_size(arg1);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_find_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_table *arg1 = (qfits_table *) 0 ;
  char *arg2 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_find_column", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_table, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_find_column" "', argument " "1"" of type '" "qfits_table const *""'"); 
  }
  arg1 = (qfits_table *)(argp1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_find_column" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  result = (int)fits_find_column((qfits_table const *)arg1,(char const *)arg2);
  resultobj = SWIG_From_int((int)(result));
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_find_table_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  off_t *arg3 = (off_t *) 0 ;
  off_t *arg4 = (off_t *) 0 ;
  int *arg5 = (int *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_find_table_column", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_find_table_column" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_find_table_column" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_off_t, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_find_table_column" "', argument " "3"" of type '" "off_t *""'"); 
  }
  arg3 = (off_t *)(argp3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_off_t, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "fits_find_table_column" "', argument " "4"" of type '" "off_t *""'"); 
  }
  arg4 = (off_t *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fits_find_table_column" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  result = (int)fits_find_table_column((char const *)arg1,(char const *)arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_get_table_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  char *arg1 = (char *) 0 ;
  char *arg2 = (char *) 0 ;
  int *arg3 = (int *) 0 ;
  int res1 ;
  char *buf1 = 0 ;
  int alloc1 = 0 ;
  int res2 ;
  char *buf2 = 0 ;
  int alloc2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  qfits_table *result = 0 ;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_get_table_column", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_AsCharPtrAndSize(swig_obj[0], &buf1, NULL, &alloc1);
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_get_table_column" "', argument " "1"" of type '" "char const *""'");
  }
  arg1 = (char *)(buf1);
  res2 = SWIG_AsCharPtrAndSize(swig_obj[1], &buf2, NULL, &alloc2);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_get_table_column" "', argument " "2"" of type '" "char const *""'");
  }
  arg2 = (char *)(buf2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_get_table_column" "', argument " "3"" of type '" "int *""'"); 
  }
  arg3 = (int *)(argp3);
  result = (qfits_table *)fits_get_table_column((char const *)arg1,(char const *)arg2,arg3);
  resultobj = SWIG_NewPointerObj(SWIG_as_voidptr(result), SWIGTYPE_p_qfits_table, 0 |  0 );
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return resultobj;
fail:
  if (alloc1 == SWIG_NEWOBJ) free((char*)buf1);
  if (alloc2 == SWIG_NEWOBJ) free((char*)buf2);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_add_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_table *arg1 = (qfits_table *) 0 ;
  int arg2 ;
  tfits_type arg3 ;
  int arg4 ;
  char *arg5 = (char *) 0 ;
  char *arg6 = (char *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  void *argp3 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int res5 ;
  char *buf5 = 0 ;
  int alloc5 = 0 ;
  int res6 ;
  char *buf6 = 0 ;
  int alloc6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_add_column", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_table, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_add_column" "', argument " "1"" of type '" "qfits_table *""'"); 
  }
  arg1 = (qfits_table *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_add_column" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  {
    res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tfits_type,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_add_column" "', argument " "3"" of type '" "tfits_type""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fits_add_column" "', argument " "3"" of type '" "tfits_type""'");
    } else {
      arg3 = *((tfits_type *)(argp3));
    }
  }
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fits_add_column" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  res5 = SWIG_AsCharPtrAndSize(swig_obj[4], &buf5, NULL, &alloc5);
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "fits_add_column" "', argument " "5"" of type '" "char const *""'");
  }
  arg5 = (char *)(buf5);
  res6 = SWIG_AsCharPtrAndSize(swig_obj[5], &buf6, NULL, &alloc6);
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "fits_add_column" "', argument " "6"" of type '" "char const *""'");
  }
  arg6 = (char *)(buf6);
  result = (int)fits_add_column(arg1,arg2,arg3,arg4,(char const *)arg5,(char const *)arg6);
  resultobj = SWIG_From_int((int)(result));
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return resultobj;
fail:
  if (alloc5 == SWIG_NEWOBJ) free((char*)buf5);
  if (alloc6 == SWIG_NEWOBJ) free((char*)buf6);
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_offset_of_column(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  qfits_table *arg1 = (qfits_table *) 0 ;
  int arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_offset_of_column", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_qfits_table, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_offset_of_column" "', argument " "1"" of type '" "qfits_table *""'"); 
  }
  arg1 = (qfits_table *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_offset_of_column" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  result = (int)fits_offset_of_column(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_A(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  char arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_A", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_A" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  ecode2 = SWIG_AsVal_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_data_A" "', argument " "2"" of type '" "char""'");
  } 
  arg2 = (char)(val2);
  result = (int)fits_write_data_A(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_B(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  uint8_t arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_B", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_B" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  {
    res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_uint8_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_data_B" "', argument " "2"" of type '" "uint8_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fits_write_data_B" "', argument " "2"" of type '" "uint8_t""'");
    } else {
      arg2 = *((uint8_t *)(argp2));
    }
  }
  result = (int)fits_write_data_B(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_D(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  double arg2 ;
  anbool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  double val2 ;
  int ecode2 = 0 ;
  unsigned char val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_D", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_D" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  ecode2 = SWIG_AsVal_double(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_data_D" "', argument " "2"" of type '" "double""'");
  } 
  arg2 = (double)(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_char(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_data_D" "', argument " "3"" of type '" "anbool""'");
  } 
  arg3 = (anbool)(val3);
  result = (int)fits_write_data_D(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_E(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  float arg2 ;
  anbool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  float val2 ;
  int ecode2 = 0 ;
  unsigned char val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_E", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_E" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  ecode2 = SWIG_AsVal_float(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_data_E" "', argument " "2"" of type '" "float""'");
  } 
  arg2 = (float)(val2);
  ecode3 = SWIG_AsVal_unsigned_SS_char(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_data_E" "', argument " "3"" of type '" "anbool""'");
  } 
  arg3 = (anbool)(val3);
  result = (int)fits_write_data_E(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_I(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  int16_t arg2 ;
  anbool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  unsigned char val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_I", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_I" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  {
    res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_int16_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_data_I" "', argument " "2"" of type '" "int16_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fits_write_data_I" "', argument " "2"" of type '" "int16_t""'");
    } else {
      arg2 = *((int16_t *)(argp2));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_char(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_data_I" "', argument " "3"" of type '" "anbool""'");
  } 
  arg3 = (anbool)(val3);
  result = (int)fits_write_data_I(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_J(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  int32_t arg2 ;
  anbool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  unsigned char val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_J", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_J" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  {
    res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_int32_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_data_J" "', argument " "2"" of type '" "int32_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fits_write_data_J" "', argument " "2"" of type '" "int32_t""'");
    } else {
      arg2 = *((int32_t *)(argp2));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_char(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_data_J" "', argument " "3"" of type '" "anbool""'");
  } 
  arg3 = (anbool)(val3);
  result = (int)fits_write_data_J(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_K(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  int64_t arg2 ;
  anbool arg3 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 ;
  int res2 = 0 ;
  unsigned char val3 ;
  int ecode3 = 0 ;
  PyObject *swig_obj[3] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_K", 3, 3, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_K" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  {
    res2 = SWIG_ConvertPtr(swig_obj[1], &argp2, SWIGTYPE_p_int64_t,  0 );
    if (!SWIG_IsOK(res2)) {
      SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_data_K" "', argument " "2"" of type '" "int64_t""'"); 
    }  
    if (!argp2) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fits_write_data_K" "', argument " "2"" of type '" "int64_t""'");
    } else {
      arg2 = *((int64_t *)(argp2));
    }
  }
  ecode3 = SWIG_AsVal_unsigned_SS_char(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "fits_write_data_K" "', argument " "3"" of type '" "anbool""'");
  } 
  arg3 = (anbool)(val3);
  result = (int)fits_write_data_K(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_L(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  char arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_L", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_L" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  ecode2 = SWIG_AsVal_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_data_L" "', argument " "2"" of type '" "char""'");
  } 
  arg2 = (char)(val2);
  result = (int)fits_write_data_L(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_X(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  unsigned char arg2 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  unsigned char val2 ;
  int ecode2 = 0 ;
  PyObject *swig_obj[2] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_X", 2, 2, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_X" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  ecode2 = SWIG_AsVal_unsigned_SS_char(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "fits_write_data_X" "', argument " "2"" of type '" "unsigned char""'");
  } 
  arg2 = (unsigned char)(val2);
  result = (int)fits_write_data_X(arg1,arg2);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  void *arg2 = (void *) 0 ;
  tfits_type arg3 ;
  anbool arg4 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  void *argp3 ;
  int res3 = 0 ;
  unsigned char val4 ;
  int ecode4 = 0 ;
  PyObject *swig_obj[4] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data", 4, 4, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_data" "', argument " "2"" of type '" "void *""'"); 
  }
  {
    res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tfits_type,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_write_data" "', argument " "3"" of type '" "tfits_type""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fits_write_data" "', argument " "3"" of type '" "tfits_type""'");
    } else {
      arg3 = *((tfits_type *)(argp3));
    }
  }
  ecode4 = SWIG_AsVal_unsigned_SS_char(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fits_write_data" "', argument " "4"" of type '" "anbool""'");
  } 
  arg4 = (anbool)(val4);
  result = (int)fits_write_data(arg1,arg2,arg3,arg4);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_fits_write_data_array(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  FILE *arg1 = (FILE *) 0 ;
  void *arg2 = (void *) 0 ;
  tfits_type arg3 ;
  int arg4 ;
  anbool arg5 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int res2 ;
  void *argp3 ;
  int res3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  unsigned char val5 ;
  int ecode5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "fits_write_data_array", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_FILE, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "fits_write_data_array" "', argument " "1"" of type '" "FILE *""'"); 
  }
  arg1 = (FILE *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1],SWIG_as_voidptrptr(&arg2), 0, 0);
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "fits_write_data_array" "', argument " "2"" of type '" "void const *""'"); 
  }
  {
    res3 = SWIG_ConvertPtr(swig_obj[2], &argp3, SWIGTYPE_p_tfits_type,  0 );
    if (!SWIG_IsOK(res3)) {
      SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "fits_write_data_array" "', argument " "3"" of type '" "tfits_type""'"); 
    }  
    if (!argp3) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "fits_write_data_array" "', argument " "3"" of type '" "tfits_type""'");
    } else {
      arg3 = *((tfits_type *)(argp3));
    }
  }
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "fits_write_data_array" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_unsigned_SS_char(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "fits_write_data_array" "', argument " "5"" of type '" "anbool""'");
  } 
  arg5 = (anbool)(val5);
  result = (int)fits_write_data_array(arg1,(void const *)arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_collapsing_find_minlabel(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  dimage_label_t arg1 ;
  dimage_label_t *arg2 = (dimage_label_t *) 0 ;
  void *argp1 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  PyObject *swig_obj[2] ;
  dimage_label_t result;
  
  if (!SWIG_Python_UnpackTuple(args, "collapsing_find_minlabel", 2, 2, swig_obj)) SWIG_fail;
  {
    res1 = SWIG_ConvertPtr(swig_obj[0], &argp1, SWIGTYPE_p_int32_t,  0 );
    if (!SWIG_IsOK(res1)) {
      SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "collapsing_find_minlabel" "', argument " "1"" of type '" "dimage_label_t""'"); 
    }  
    if (!argp1) {
      SWIG_exception_fail(SWIG_ValueError, "invalid null reference " "in method '" "collapsing_find_minlabel" "', argument " "1"" of type '" "dimage_label_t""'");
    } else {
      arg1 = *((dimage_label_t *)(argp1));
    }
  }
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_int32_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "collapsing_find_minlabel" "', argument " "2"" of type '" "dimage_label_t *""'"); 
  }
  arg2 = (dimage_label_t *)(argp2);
  result = collapsing_find_minlabel(arg1,arg2);
  resultobj = SWIG_NewPointerObj((dimage_label_t *)memcpy((dimage_label_t *)calloc(1,sizeof(dimage_label_t)),&result,sizeof(dimage_label_t)), SWIGTYPE_p_int32_t, SWIG_POINTER_OWN |  0 );
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dfind2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int *arg1 = (int *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dfind2", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dfind2" "', argument " "1"" of type '" "int const *""'"); 
  }
  arg1 = (int *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dfind2" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dfind2" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dfind2" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dfind2" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  result = (int)dfind2((int const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dfind2_u8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  unsigned char *arg1 = (unsigned char *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dfind2_u8", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_unsigned_char, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dfind2_u8" "', argument " "1"" of type '" "unsigned char const *""'"); 
  }
  arg1 = (unsigned char *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dfind2_u8" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dfind2_u8" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dfind2_u8" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dfind2_u8" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  result = (int)dfind2_u8((unsigned char const *)arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dselip(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  unsigned long arg1 ;
  unsigned long arg2 ;
  float *arg3 = (float *) 0 ;
  unsigned long val1 ;
  int ecode1 = 0 ;
  unsigned long val2 ;
  int ecode2 = 0 ;
  void *argp3 = 0 ;
  int res3 = 0 ;
  PyObject *swig_obj[3] ;
  float result;
  
  if (!SWIG_Python_UnpackTuple(args, "dselip", 3, 3, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_unsigned_SS_long(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dselip" "', argument " "1"" of type '" "unsigned long""'");
  } 
  arg1 = (unsigned long)(val1);
  ecode2 = SWIG_AsVal_unsigned_SS_long(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dselip" "', argument " "2"" of type '" "unsigned long""'");
  } 
  arg2 = (unsigned long)(val2);
  res3 = SWIG_ConvertPtr(swig_obj[2], &argp3,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res3)) {
    SWIG_exception_fail(SWIG_ArgError(res3), "in method '" "dselip" "', argument " "3"" of type '" "float const *""'"); 
  }
  arg3 = (float *)(argp3);
  result = (float)dselip(arg1,arg2,(float const *)arg3);
  resultobj = SWIG_From_float((float)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dselip_cleanup(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  
  if (!SWIG_Python_UnpackTuple(args, "dselip_cleanup", 0, 0, 0)) SWIG_fail;
  dselip_cleanup();
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dsmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  float arg4 ;
  float *arg5 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dsmooth", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsmooth" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dsmooth" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dsmooth" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dsmooth" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dsmooth" "', argument " "5"" of type '" "float *""'"); 
  }
  arg5 = (float *)(argp5);
  result = (int)dsmooth(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dsmooth2(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  float arg4 ;
  float *arg5 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "dsmooth2", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsmooth2" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dsmooth2" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dsmooth2" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dsmooth2" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dsmooth2" "', argument " "5"" of type '" "float *""'"); 
  }
  arg5 = (float *)(argp5);
  dsmooth2(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dsmooth2_u8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  uint8_t *arg1 = (uint8_t *) 0 ;
  int arg2 ;
  int arg3 ;
  float arg4 ;
  float *arg5 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "dsmooth2_u8", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_uint8_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsmooth2_u8" "', argument " "1"" of type '" "uint8_t *""'"); 
  }
  arg1 = (uint8_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dsmooth2_u8" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dsmooth2_u8" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dsmooth2_u8" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dsmooth2_u8" "', argument " "5"" of type '" "float *""'"); 
  }
  arg5 = (float *)(argp5);
  dsmooth2_u8(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dsmooth2_i16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int16_t *arg1 = (int16_t *) 0 ;
  int arg2 ;
  int arg3 ;
  float arg4 ;
  float *arg5 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  PyObject *swig_obj[5] ;
  
  if (!SWIG_Python_UnpackTuple(args, "dsmooth2_i16", 5, 5, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_int16_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsmooth2_i16" "', argument " "1"" of type '" "int16_t *""'"); 
  }
  arg1 = (int16_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dsmooth2_i16" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dsmooth2_i16" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dsmooth2_i16" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dsmooth2_i16" "', argument " "5"" of type '" "float *""'"); 
  }
  arg5 = (float *)(argp5);
  dsmooth2_i16(arg1,arg2,arg3,arg4,arg5);
  resultobj = SWIG_Py_Void();
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dobjects(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  float arg4 ;
  float arg5 ;
  int *arg6 = (int *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  float val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dobjects", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dobjects" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dobjects" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dobjects" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dobjects" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  ecode5 = SWIG_AsVal_float(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dobjects" "', argument " "5"" of type '" "float""'");
  } 
  arg5 = (float)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "dobjects" "', argument " "6"" of type '" "int *""'"); 
  }
  arg6 = (int *)(argp6);
  result = (int)dobjects(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dmask(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  float arg4 ;
  float arg5 ;
  uint8_t *arg6 = (uint8_t *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  float val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dmask", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dmask" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dmask" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dmask" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dmask" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  ecode5 = SWIG_AsVal_float(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dmask" "', argument " "5"" of type '" "float""'");
  } 
  arg5 = (float)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_uint8_t, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "dmask" "', argument " "6"" of type '" "uint8_t *""'"); 
  }
  arg6 = (uint8_t *)(argp6);
  result = (int)dmask(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dpeaks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  int *arg5 = (int *) 0 ;
  int *arg6 = (int *) 0 ;
  float arg7 ;
  float arg8 ;
  float arg9 ;
  int arg10 ;
  int arg11 ;
  int arg12 ;
  float arg13 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  void *argp5 = 0 ;
  int res5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  float val7 ;
  int ecode7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  float val9 ;
  int ecode9 = 0 ;
  int val10 ;
  int ecode10 = 0 ;
  int val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  float val13 ;
  int ecode13 = 0 ;
  PyObject *swig_obj[13] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dpeaks", 13, 13, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dpeaks" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dpeaks" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dpeaks" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dpeaks" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  res5 = SWIG_ConvertPtr(swig_obj[4], &argp5,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res5)) {
    SWIG_exception_fail(SWIG_ArgError(res5), "in method '" "dpeaks" "', argument " "5"" of type '" "int *""'"); 
  }
  arg5 = (int *)(argp5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "dpeaks" "', argument " "6"" of type '" "int *""'"); 
  }
  arg6 = (int *)(argp6);
  ecode7 = SWIG_AsVal_float(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "dpeaks" "', argument " "7"" of type '" "float""'");
  } 
  arg7 = (float)(val7);
  ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "dpeaks" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = (float)(val8);
  ecode9 = SWIG_AsVal_float(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "dpeaks" "', argument " "9"" of type '" "float""'");
  } 
  arg9 = (float)(val9);
  ecode10 = SWIG_AsVal_int(swig_obj[9], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "dpeaks" "', argument " "10"" of type '" "int""'");
  } 
  arg10 = (int)(val10);
  ecode11 = SWIG_AsVal_int(swig_obj[10], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "dpeaks" "', argument " "11"" of type '" "int""'");
  } 
  arg11 = (int)(val11);
  ecode12 = SWIG_AsVal_int(swig_obj[11], &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "dpeaks" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = (int)(val12);
  ecode13 = SWIG_AsVal_float(swig_obj[12], &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "dpeaks" "', argument " "13"" of type '" "float""'");
  } 
  arg13 = (float)(val13);
  result = (int)dpeaks(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dcen3x3(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  float *arg2 = (float *) 0 ;
  float *arg3 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  float temp2 ;
  int res2 = SWIG_TMPOBJ ;
  float temp3 ;
  int res3 = SWIG_TMPOBJ ;
  PyObject *swig_obj[1] ;
  int result;
  
  arg2 = &temp2;
  arg3 = &temp3;
  if (!args) SWIG_fail;
  swig_obj[0] = args;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dcen3x3" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  result = (int)dcen3x3(arg1,arg2,arg3);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res2)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg2)));
  } else {
    int new_flags = SWIG_IsNewObj(res2) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg2), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res3)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg3)));
  } else {
    int new_flags = SWIG_IsNewObj(res3) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg3), SWIGTYPE_p_float, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dsigma(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  float *arg6 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dsigma", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsigma" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dsigma" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dsigma" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dsigma" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dsigma" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "dsigma" "', argument " "6"" of type '" "float *""'"); 
  }
  arg6 = (float *)(argp6);
  result = (int)dsigma(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dsigma_u8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  uint8_t *arg1 = (uint8_t *) 0 ;
  int arg2 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  float *arg6 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dsigma_u8", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_uint8_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dsigma_u8" "', argument " "1"" of type '" "uint8_t *""'"); 
  }
  arg1 = (uint8_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dsigma_u8" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dsigma_u8" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dsigma_u8" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dsigma_u8" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "dsigma_u8" "', argument " "6"" of type '" "float *""'"); 
  }
  arg6 = (float *)(argp6);
  result = (int)dsigma_u8(arg1,arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dmedsmooth(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  uint8_t *arg2 = (uint8_t *) 0 ;
  int arg3 ;
  int arg4 ;
  int arg5 ;
  float *arg6 = (float *) 0 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  void *argp2 = 0 ;
  int res2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  int val4 ;
  int ecode4 = 0 ;
  int val5 ;
  int ecode5 = 0 ;
  void *argp6 = 0 ;
  int res6 = 0 ;
  PyObject *swig_obj[6] ;
  int result;
  
  if (!SWIG_Python_UnpackTuple(args, "dmedsmooth", 6, 6, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dmedsmooth" "', argument " "1"" of type '" "float const *""'"); 
  }
  arg1 = (float *)(argp1);
  res2 = SWIG_ConvertPtr(swig_obj[1], &argp2,SWIGTYPE_p_uint8_t, 0 |  0 );
  if (!SWIG_IsOK(res2)) {
    SWIG_exception_fail(SWIG_ArgError(res2), "in method '" "dmedsmooth" "', argument " "2"" of type '" "uint8_t const *""'"); 
  }
  arg2 = (uint8_t *)(argp2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dmedsmooth" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  ecode4 = SWIG_AsVal_int(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dmedsmooth" "', argument " "4"" of type '" "int""'");
  } 
  arg4 = (int)(val4);
  ecode5 = SWIG_AsVal_int(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dmedsmooth" "', argument " "5"" of type '" "int""'");
  } 
  arg5 = (int)(val5);
  res6 = SWIG_ConvertPtr(swig_obj[5], &argp6,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res6)) {
    SWIG_exception_fail(SWIG_ArgError(res6), "in method '" "dmedsmooth" "', argument " "6"" of type '" "float *""'"); 
  }
  arg6 = (float *)(argp6);
  result = (int)dmedsmooth((float const *)arg1,(uint8_t const *)arg2,arg3,arg4,arg5,arg6);
  resultobj = SWIG_From_int((int)(result));
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dallpeaks(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float *arg1 = (float *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  float *arg5 = (float *) 0 ;
  float *arg6 = (float *) 0 ;
  int *arg7 = (int *) 0 ;
  float arg8 ;
  float arg9 ;
  float arg10 ;
  float arg11 ;
  int arg12 ;
  int arg13 ;
  float arg14 ;
  int arg15 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  float temp5 ;
  int res5 = SWIG_TMPOBJ ;
  float temp6 ;
  int res6 = SWIG_TMPOBJ ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  float val9 ;
  int ecode9 = 0 ;
  float val10 ;
  int ecode10 = 0 ;
  float val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  float val14 ;
  int ecode14 = 0 ;
  int val15 ;
  int ecode15 = 0 ;
  PyObject *swig_obj[13] ;
  int result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "dallpeaks", 13, 13, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_float, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dallpeaks" "', argument " "1"" of type '" "float *""'"); 
  }
  arg1 = (float *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dallpeaks" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dallpeaks" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dallpeaks" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  res7 = SWIG_ConvertPtr(swig_obj[4], &argp7,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "dallpeaks" "', argument " "7"" of type '" "int *""'"); 
  }
  arg7 = (int *)(argp7);
  ecode8 = SWIG_AsVal_float(swig_obj[5], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "dallpeaks" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = (float)(val8);
  ecode9 = SWIG_AsVal_float(swig_obj[6], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "dallpeaks" "', argument " "9"" of type '" "float""'");
  } 
  arg9 = (float)(val9);
  ecode10 = SWIG_AsVal_float(swig_obj[7], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "dallpeaks" "', argument " "10"" of type '" "float""'");
  } 
  arg10 = (float)(val10);
  ecode11 = SWIG_AsVal_float(swig_obj[8], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "dallpeaks" "', argument " "11"" of type '" "float""'");
  } 
  arg11 = (float)(val11);
  ecode12 = SWIG_AsVal_int(swig_obj[9], &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "dallpeaks" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = (int)(val12);
  ecode13 = SWIG_AsVal_int(swig_obj[10], &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "dallpeaks" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = (int)(val13);
  ecode14 = SWIG_AsVal_float(swig_obj[11], &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "dallpeaks" "', argument " "14"" of type '" "float""'");
  } 
  arg14 = (float)(val14);
  ecode15 = SWIG_AsVal_int(swig_obj[12], &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "dallpeaks" "', argument " "15"" of type '" "int""'");
  } 
  arg15 = (int)(val15);
  result = (int)dallpeaks(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_float, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dallpeaks_u8(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  uint8_t *arg1 = (uint8_t *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  float *arg5 = (float *) 0 ;
  float *arg6 = (float *) 0 ;
  int *arg7 = (int *) 0 ;
  float arg8 ;
  float arg9 ;
  float arg10 ;
  float arg11 ;
  int arg12 ;
  int arg13 ;
  float arg14 ;
  int arg15 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  float temp5 ;
  int res5 = SWIG_TMPOBJ ;
  float temp6 ;
  int res6 = SWIG_TMPOBJ ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  float val9 ;
  int ecode9 = 0 ;
  float val10 ;
  int ecode10 = 0 ;
  float val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  float val14 ;
  int ecode14 = 0 ;
  int val15 ;
  int ecode15 = 0 ;
  PyObject *swig_obj[13] ;
  int result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "dallpeaks_u8", 13, 13, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_uint8_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dallpeaks_u8" "', argument " "1"" of type '" "uint8_t *""'"); 
  }
  arg1 = (uint8_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dallpeaks_u8" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dallpeaks_u8" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dallpeaks_u8" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  res7 = SWIG_ConvertPtr(swig_obj[4], &argp7,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "dallpeaks_u8" "', argument " "7"" of type '" "int *""'"); 
  }
  arg7 = (int *)(argp7);
  ecode8 = SWIG_AsVal_float(swig_obj[5], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "dallpeaks_u8" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = (float)(val8);
  ecode9 = SWIG_AsVal_float(swig_obj[6], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "dallpeaks_u8" "', argument " "9"" of type '" "float""'");
  } 
  arg9 = (float)(val9);
  ecode10 = SWIG_AsVal_float(swig_obj[7], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "dallpeaks_u8" "', argument " "10"" of type '" "float""'");
  } 
  arg10 = (float)(val10);
  ecode11 = SWIG_AsVal_float(swig_obj[8], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "dallpeaks_u8" "', argument " "11"" of type '" "float""'");
  } 
  arg11 = (float)(val11);
  ecode12 = SWIG_AsVal_int(swig_obj[9], &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "dallpeaks_u8" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = (int)(val12);
  ecode13 = SWIG_AsVal_int(swig_obj[10], &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "dallpeaks_u8" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = (int)(val13);
  ecode14 = SWIG_AsVal_float(swig_obj[11], &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "dallpeaks_u8" "', argument " "14"" of type '" "float""'");
  } 
  arg14 = (float)(val14);
  ecode15 = SWIG_AsVal_int(swig_obj[12], &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "dallpeaks_u8" "', argument " "15"" of type '" "int""'");
  } 
  arg15 = (int)(val15);
  result = (int)dallpeaks_u8(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_float, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dallpeaks_i16(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  int16_t *arg1 = (int16_t *) 0 ;
  int arg2 ;
  int arg3 ;
  int *arg4 = (int *) 0 ;
  float *arg5 = (float *) 0 ;
  float *arg6 = (float *) 0 ;
  int *arg7 = (int *) 0 ;
  float arg8 ;
  float arg9 ;
  float arg10 ;
  float arg11 ;
  int arg12 ;
  int arg13 ;
  float arg14 ;
  int arg15 ;
  void *argp1 = 0 ;
  int res1 = 0 ;
  int val2 ;
  int ecode2 = 0 ;
  int val3 ;
  int ecode3 = 0 ;
  void *argp4 = 0 ;
  int res4 = 0 ;
  float temp5 ;
  int res5 = SWIG_TMPOBJ ;
  float temp6 ;
  int res6 = SWIG_TMPOBJ ;
  void *argp7 = 0 ;
  int res7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  float val9 ;
  int ecode9 = 0 ;
  float val10 ;
  int ecode10 = 0 ;
  float val11 ;
  int ecode11 = 0 ;
  int val12 ;
  int ecode12 = 0 ;
  int val13 ;
  int ecode13 = 0 ;
  float val14 ;
  int ecode14 = 0 ;
  int val15 ;
  int ecode15 = 0 ;
  PyObject *swig_obj[13] ;
  int result;
  
  arg5 = &temp5;
  arg6 = &temp6;
  if (!SWIG_Python_UnpackTuple(args, "dallpeaks_i16", 13, 13, swig_obj)) SWIG_fail;
  res1 = SWIG_ConvertPtr(swig_obj[0], &argp1,SWIGTYPE_p_int16_t, 0 |  0 );
  if (!SWIG_IsOK(res1)) {
    SWIG_exception_fail(SWIG_ArgError(res1), "in method '" "dallpeaks_i16" "', argument " "1"" of type '" "int16_t *""'"); 
  }
  arg1 = (int16_t *)(argp1);
  ecode2 = SWIG_AsVal_int(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dallpeaks_i16" "', argument " "2"" of type '" "int""'");
  } 
  arg2 = (int)(val2);
  ecode3 = SWIG_AsVal_int(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dallpeaks_i16" "', argument " "3"" of type '" "int""'");
  } 
  arg3 = (int)(val3);
  res4 = SWIG_ConvertPtr(swig_obj[3], &argp4,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res4)) {
    SWIG_exception_fail(SWIG_ArgError(res4), "in method '" "dallpeaks_i16" "', argument " "4"" of type '" "int *""'"); 
  }
  arg4 = (int *)(argp4);
  res7 = SWIG_ConvertPtr(swig_obj[4], &argp7,SWIGTYPE_p_int, 0 |  0 );
  if (!SWIG_IsOK(res7)) {
    SWIG_exception_fail(SWIG_ArgError(res7), "in method '" "dallpeaks_i16" "', argument " "7"" of type '" "int *""'"); 
  }
  arg7 = (int *)(argp7);
  ecode8 = SWIG_AsVal_float(swig_obj[5], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "dallpeaks_i16" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = (float)(val8);
  ecode9 = SWIG_AsVal_float(swig_obj[6], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "dallpeaks_i16" "', argument " "9"" of type '" "float""'");
  } 
  arg9 = (float)(val9);
  ecode10 = SWIG_AsVal_float(swig_obj[7], &val10);
  if (!SWIG_IsOK(ecode10)) {
    SWIG_exception_fail(SWIG_ArgError(ecode10), "in method '" "dallpeaks_i16" "', argument " "10"" of type '" "float""'");
  } 
  arg10 = (float)(val10);
  ecode11 = SWIG_AsVal_float(swig_obj[8], &val11);
  if (!SWIG_IsOK(ecode11)) {
    SWIG_exception_fail(SWIG_ArgError(ecode11), "in method '" "dallpeaks_i16" "', argument " "11"" of type '" "float""'");
  } 
  arg11 = (float)(val11);
  ecode12 = SWIG_AsVal_int(swig_obj[9], &val12);
  if (!SWIG_IsOK(ecode12)) {
    SWIG_exception_fail(SWIG_ArgError(ecode12), "in method '" "dallpeaks_i16" "', argument " "12"" of type '" "int""'");
  } 
  arg12 = (int)(val12);
  ecode13 = SWIG_AsVal_int(swig_obj[10], &val13);
  if (!SWIG_IsOK(ecode13)) {
    SWIG_exception_fail(SWIG_ArgError(ecode13), "in method '" "dallpeaks_i16" "', argument " "13"" of type '" "int""'");
  } 
  arg13 = (int)(val13);
  ecode14 = SWIG_AsVal_float(swig_obj[11], &val14);
  if (!SWIG_IsOK(ecode14)) {
    SWIG_exception_fail(SWIG_ArgError(ecode14), "in method '" "dallpeaks_i16" "', argument " "14"" of type '" "float""'");
  } 
  arg14 = (float)(val14);
  ecode15 = SWIG_AsVal_int(swig_obj[12], &val15);
  if (!SWIG_IsOK(ecode15)) {
    SWIG_exception_fail(SWIG_ArgError(ecode15), "in method '" "dallpeaks_i16" "', argument " "15"" of type '" "int""'");
  } 
  arg15 = (int)(val15);
  result = (int)dallpeaks_i16(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11,arg12,arg13,arg14,arg15);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res5)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg5)));
  } else {
    int new_flags = SWIG_IsNewObj(res5) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg5), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res6)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg6)));
  } else {
    int new_flags = SWIG_IsNewObj(res6) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg6), SWIGTYPE_p_float, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


SWIGINTERN PyObject *_wrap_dcen3x3b(PyObject *SWIGUNUSEDPARM(self), PyObject *args) {
  PyObject *resultobj = 0;
  float arg1 ;
  float arg2 ;
  float arg3 ;
  float arg4 ;
  float arg5 ;
  float arg6 ;
  float arg7 ;
  float arg8 ;
  float arg9 ;
  float *arg10 = (float *) 0 ;
  float *arg11 = (float *) 0 ;
  float val1 ;
  int ecode1 = 0 ;
  float val2 ;
  int ecode2 = 0 ;
  float val3 ;
  int ecode3 = 0 ;
  float val4 ;
  int ecode4 = 0 ;
  float val5 ;
  int ecode5 = 0 ;
  float val6 ;
  int ecode6 = 0 ;
  float val7 ;
  int ecode7 = 0 ;
  float val8 ;
  int ecode8 = 0 ;
  float val9 ;
  int ecode9 = 0 ;
  float temp10 ;
  int res10 = SWIG_TMPOBJ ;
  float temp11 ;
  int res11 = SWIG_TMPOBJ ;
  PyObject *swig_obj[9] ;
  int result;
  
  arg10 = &temp10;
  arg11 = &temp11;
  if (!SWIG_Python_UnpackTuple(args, "dcen3x3b", 9, 9, swig_obj)) SWIG_fail;
  ecode1 = SWIG_AsVal_float(swig_obj[0], &val1);
  if (!SWIG_IsOK(ecode1)) {
    SWIG_exception_fail(SWIG_ArgError(ecode1), "in method '" "dcen3x3b" "', argument " "1"" of type '" "float""'");
  } 
  arg1 = (float)(val1);
  ecode2 = SWIG_AsVal_float(swig_obj[1], &val2);
  if (!SWIG_IsOK(ecode2)) {
    SWIG_exception_fail(SWIG_ArgError(ecode2), "in method '" "dcen3x3b" "', argument " "2"" of type '" "float""'");
  } 
  arg2 = (float)(val2);
  ecode3 = SWIG_AsVal_float(swig_obj[2], &val3);
  if (!SWIG_IsOK(ecode3)) {
    SWIG_exception_fail(SWIG_ArgError(ecode3), "in method '" "dcen3x3b" "', argument " "3"" of type '" "float""'");
  } 
  arg3 = (float)(val3);
  ecode4 = SWIG_AsVal_float(swig_obj[3], &val4);
  if (!SWIG_IsOK(ecode4)) {
    SWIG_exception_fail(SWIG_ArgError(ecode4), "in method '" "dcen3x3b" "', argument " "4"" of type '" "float""'");
  } 
  arg4 = (float)(val4);
  ecode5 = SWIG_AsVal_float(swig_obj[4], &val5);
  if (!SWIG_IsOK(ecode5)) {
    SWIG_exception_fail(SWIG_ArgError(ecode5), "in method '" "dcen3x3b" "', argument " "5"" of type '" "float""'");
  } 
  arg5 = (float)(val5);
  ecode6 = SWIG_AsVal_float(swig_obj[5], &val6);
  if (!SWIG_IsOK(ecode6)) {
    SWIG_exception_fail(SWIG_ArgError(ecode6), "in method '" "dcen3x3b" "', argument " "6"" of type '" "float""'");
  } 
  arg6 = (float)(val6);
  ecode7 = SWIG_AsVal_float(swig_obj[6], &val7);
  if (!SWIG_IsOK(ecode7)) {
    SWIG_exception_fail(SWIG_ArgError(ecode7), "in method '" "dcen3x3b" "', argument " "7"" of type '" "float""'");
  } 
  arg7 = (float)(val7);
  ecode8 = SWIG_AsVal_float(swig_obj[7], &val8);
  if (!SWIG_IsOK(ecode8)) {
    SWIG_exception_fail(SWIG_ArgError(ecode8), "in method '" "dcen3x3b" "', argument " "8"" of type '" "float""'");
  } 
  arg8 = (float)(val8);
  ecode9 = SWIG_AsVal_float(swig_obj[8], &val9);
  if (!SWIG_IsOK(ecode9)) {
    SWIG_exception_fail(SWIG_ArgError(ecode9), "in method '" "dcen3x3b" "', argument " "9"" of type '" "float""'");
  } 
  arg9 = (float)(val9);
  result = (int)dcen3x3b(arg1,arg2,arg3,arg4,arg5,arg6,arg7,arg8,arg9,arg10,arg11);
  resultobj = SWIG_From_int((int)(result));
  if (SWIG_IsTmpObj(res10)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg10)));
  } else {
    int new_flags = SWIG_IsNewObj(res10) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg10), SWIGTYPE_p_float, new_flags));
  }
  if (SWIG_IsTmpObj(res11)) {
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_From_float((*arg11)));
  } else {
    int new_flags = SWIG_IsNewObj(res11) ? (SWIG_POINTER_OWN |  0 ) :  0 ;
    resultobj = SWIG_Python_AppendOutput(resultobj, SWIG_NewPointerObj((void*)(arg11), SWIGTYPE_p_float, new_flags));
  }
  return resultobj;
fail:
  return NULL;
}


static PyMethodDef SwigMethods[] = {
	 { "SWIG_PyInstanceMethod_New", SWIG_PyInstanceMethod_New, METH_O, NULL},
	 { "log_init", _wrap_log_init, METH_O, NULL},
	 { "log_get_level", _wrap_log_get_level, METH_NOARGS, NULL},
	 { "log_set_level", _wrap_log_set_level, METH_O, NULL},
	 { "coadd_t_img_set", _wrap_coadd_t_img_set, METH_VARARGS, NULL},
	 { "coadd_t_img_get", _wrap_coadd_t_img_get, METH_O, NULL},
	 { "coadd_t_weight_set", _wrap_coadd_t_weight_set, METH_VARARGS, NULL},
	 { "coadd_t_weight_get", _wrap_coadd_t_weight_get, METH_O, NULL},
	 { "coadd_t_W_set", _wrap_coadd_t_W_set, METH_VARARGS, NULL},
	 { "coadd_t_W_get", _wrap_coadd_t_W_get, METH_O, NULL},
	 { "coadd_t_H_set", _wrap_coadd_t_H_set, METH_VARARGS, NULL},
	 { "coadd_t_H_get", _wrap_coadd_t_H_get, METH_O, NULL},
	 { "coadd_t_wcs_set", _wrap_coadd_t_wcs_set, METH_VARARGS, NULL},
	 { "coadd_t_wcs_get", _wrap_coadd_t_wcs_get, METH_O, NULL},
	 { "coadd_t_resample_func_set", _wrap_coadd_t_resample_func_set, METH_VARARGS, NULL},
	 { "coadd_t_resample_func_get", _wrap_coadd_t_resample_func_get, METH_O, NULL},
	 { "coadd_t_resample_token_set", _wrap_coadd_t_resample_token_set, METH_VARARGS, NULL},
	 { "coadd_t_resample_token_get", _wrap_coadd_t_resample_token_get, METH_O, NULL},
	 { "new_coadd_t", _wrap_new_coadd_t, METH_NOARGS, NULL},
	 { "delete_coadd_t", _wrap_delete_coadd_t, METH_O, NULL},
	 { "coadd_t_swigregister", coadd_t_swigregister, METH_O, NULL},
	 { "coadd_t_swiginit", coadd_t_swiginit, METH_VARARGS, NULL},
	 { "coadd_new", _wrap_coadd_new, METH_VARARGS, NULL},
	 { "coadd_new_from_wcs", _wrap_coadd_new_from_wcs, METH_O, NULL},
	 { "coadd_set_lanczos", _wrap_coadd_set_lanczos, METH_VARARGS, NULL},
	 { "coadd_add_image", _wrap_coadd_add_image, METH_VARARGS, NULL},
	 { "coadd_divide_by_weight", _wrap_coadd_divide_by_weight, METH_VARARGS, NULL},
	 { "coadd_get_snapshot", _wrap_coadd_get_snapshot, METH_VARARGS, NULL},
	 { "coadd_free", _wrap_coadd_free, METH_O, NULL},
	 { "coadd_debug", _wrap_coadd_debug, METH_O, NULL},
	 { "coadd_create_weight_image_from_range", _wrap_coadd_create_weight_image_from_range, METH_VARARGS, NULL},
	 { "coadd_weight_image_mask_value", _wrap_coadd_weight_image_mask_value, METH_VARARGS, NULL},
	 { "lanczos_args_t_order_set", _wrap_lanczos_args_t_order_set, METH_VARARGS, NULL},
	 { "lanczos_args_t_order_get", _wrap_lanczos_args_t_order_get, METH_O, NULL},
	 { "lanczos_args_t_weighted_set", _wrap_lanczos_args_t_weighted_set, METH_VARARGS, NULL},
	 { "lanczos_args_t_weighted_get", _wrap_lanczos_args_t_weighted_get, METH_O, NULL},
	 { "new_lanczos_args_t", _wrap_new_lanczos_args_t, METH_NOARGS, NULL},
	 { "delete_lanczos_args_t", _wrap_delete_lanczos_args_t, METH_O, NULL},
	 { "lanczos_args_t_swigregister", lanczos_args_t_swigregister, METH_O, NULL},
	 { "lanczos_args_t_swiginit", lanczos_args_t_swiginit, METH_VARARGS, NULL},
	 { "lanczos", _wrap_lanczos, METH_VARARGS, NULL},
	 { "nearest_resample_f", _wrap_nearest_resample_f, METH_VARARGS, NULL},
	 { "lanczos_resample_f", _wrap_lanczos_resample_f, METH_VARARGS, NULL},
	 { "lanczos_resample_unw_sep_f", _wrap_lanczos_resample_unw_sep_f, METH_VARARGS, NULL},
	 { "nearest_resample_d", _wrap_nearest_resample_d, METH_VARARGS, NULL},
	 { "lanczos_resample_d", _wrap_lanczos_resample_d, METH_VARARGS, NULL},
	 { "fit_sip_coefficients", _wrap_fit_sip_coefficients, METH_VARARGS, NULL},
	 { "wcs_shift", _wrap_wcs_shift, METH_VARARGS, NULL},
	 { "fit_sip_wcs", _wrap_fit_sip_wcs, METH_VARARGS, NULL},
	 { "fit_sip_wcs_2", _wrap_fit_sip_wcs_2, METH_VARARGS, NULL},
	 { "fit_tan_wcs_move_tangent_point", _wrap_fit_tan_wcs_move_tangent_point, METH_VARARGS, NULL},
	 { "fit_tan_wcs_move_tangent_point_weighted", _wrap_fit_tan_wcs_move_tangent_point_weighted, METH_VARARGS, NULL},
	 { "fit_tan_wcs", _wrap_fit_tan_wcs, METH_VARARGS, NULL},
	 { "fit_tan_wcs_weighted", _wrap_fit_tan_wcs_weighted, METH_VARARGS, NULL},
	 { "print_array", _wrap_print_array, METH_O, NULL},
	 { "an_hist2d", _wrap_an_hist2d, METH_VARARGS, NULL},
	 { "flat_percentile_f", _wrap_flat_percentile_f, METH_VARARGS, NULL},
	 { "flat_median_f", _wrap_flat_median_f, METH_O, NULL},
	 { "median_smooth", _wrap_median_smooth, METH_VARARGS, NULL},
	 { "lanczos5_interpolate", _wrap_lanczos5_interpolate, METH_VARARGS, NULL},
	 { "lanczos5_interpolate_grid", _wrap_lanczos5_interpolate_grid, METH_VARARGS, NULL},
	 { "lanczos3_interpolate", _wrap_lanczos3_interpolate, METH_VARARGS, NULL},
	 { "lanczos3_interpolate_grid", _wrap_lanczos3_interpolate_grid, METH_VARARGS, NULL},
	 { "lanczos5_filter", _wrap_lanczos5_filter, METH_VARARGS, NULL},
	 { "lanczos3_filter", _wrap_lanczos3_filter, METH_VARARGS, NULL},
	 { "lanczos3_filter_table", _wrap_lanczos3_filter_table, METH_VARARGS, NULL},
	 { "lanczos_shift_image_c", _wrap_lanczos_shift_image_c, METH_VARARGS, NULL},
	 { "index_t_codekd_set", _wrap_index_t_codekd_set, METH_VARARGS, NULL},
	 { "index_t_codekd_get", _wrap_index_t_codekd_get, METH_O, NULL},
	 { "index_t_quads_set", _wrap_index_t_quads_set, METH_VARARGS, NULL},
	 { "index_t_quads_get", _wrap_index_t_quads_get, METH_O, NULL},
	 { "index_t_starkd_set", _wrap_index_t_starkd_set, METH_VARARGS, NULL},
	 { "index_t_starkd_get", _wrap_index_t_starkd_get, METH_O, NULL},
	 { "index_t_fits_set", _wrap_index_t_fits_set, METH_VARARGS, NULL},
	 { "index_t_fits_get", _wrap_index_t_fits_get, METH_O, NULL},
	 { "index_t_indexfn_set", _wrap_index_t_indexfn_set, METH_VARARGS, NULL},
	 { "index_t_indexfn_get", _wrap_index_t_indexfn_get, METH_O, NULL},
	 { "index_t_indexname_set", _wrap_index_t_indexname_set, METH_VARARGS, NULL},
	 { "index_t_indexname_get", _wrap_index_t_indexname_get, METH_O, NULL},
	 { "index_t_indexid_set", _wrap_index_t_indexid_set, METH_VARARGS, NULL},
	 { "index_t_indexid_get", _wrap_index_t_indexid_get, METH_O, NULL},
	 { "index_t_healpix_set", _wrap_index_t_healpix_set, METH_VARARGS, NULL},
	 { "index_t_healpix_get", _wrap_index_t_healpix_get, METH_O, NULL},
	 { "index_t_hpnside_set", _wrap_index_t_hpnside_set, METH_VARARGS, NULL},
	 { "index_t_hpnside_get", _wrap_index_t_hpnside_get, METH_O, NULL},
	 { "index_t_index_jitter_set", _wrap_index_t_index_jitter_set, METH_VARARGS, NULL},
	 { "index_t_index_jitter_get", _wrap_index_t_index_jitter_get, METH_O, NULL},
	 { "index_t_cutnside_set", _wrap_index_t_cutnside_set, METH_VARARGS, NULL},
	 { "index_t_cutnside_get", _wrap_index_t_cutnside_get, METH_O, NULL},
	 { "index_t_cutnsweep_set", _wrap_index_t_cutnsweep_set, METH_VARARGS, NULL},
	 { "index_t_cutnsweep_get", _wrap_index_t_cutnsweep_get, METH_O, NULL},
	 { "index_t_cutdedup_set", _wrap_index_t_cutdedup_set, METH_VARARGS, NULL},
	 { "index_t_cutdedup_get", _wrap_index_t_cutdedup_get, METH_O, NULL},
	 { "index_t_cutband_set", _wrap_index_t_cutband_set, METH_VARARGS, NULL},
	 { "index_t_cutband_get", _wrap_index_t_cutband_get, METH_O, NULL},
	 { "index_t_cutmargin_set", _wrap_index_t_cutmargin_set, METH_VARARGS, NULL},
	 { "index_t_cutmargin_get", _wrap_index_t_cutmargin_get, METH_O, NULL},
	 { "index_t_circle_set", _wrap_index_t_circle_set, METH_VARARGS, NULL},
	 { "index_t_circle_get", _wrap_index_t_circle_get, METH_O, NULL},
	 { "index_t_cx_less_than_dx_set", _wrap_index_t_cx_less_than_dx_set, METH_VARARGS, NULL},
	 { "index_t_cx_less_than_dx_get", _wrap_index_t_cx_less_than_dx_get, METH_O, NULL},
	 { "index_t_meanx_less_than_half_set", _wrap_index_t_meanx_less_than_half_set, METH_VARARGS, NULL},
	 { "index_t_meanx_less_than_half_get", _wrap_index_t_meanx_less_than_half_get, METH_O, NULL},
	 { "index_t_index_scale_upper_set", _wrap_index_t_index_scale_upper_set, METH_VARARGS, NULL},
	 { "index_t_index_scale_upper_get", _wrap_index_t_index_scale_upper_get, METH_O, NULL},
	 { "index_t_index_scale_lower_set", _wrap_index_t_index_scale_lower_set, METH_VARARGS, NULL},
	 { "index_t_index_scale_lower_get", _wrap_index_t_index_scale_lower_get, METH_O, NULL},
	 { "index_t_dimquads_set", _wrap_index_t_dimquads_set, METH_VARARGS, NULL},
	 { "index_t_dimquads_get", _wrap_index_t_dimquads_get, METH_O, NULL},
	 { "index_t_nstars_set", _wrap_index_t_nstars_set, METH_VARARGS, NULL},
	 { "index_t_nstars_get", _wrap_index_t_nstars_get, METH_O, NULL},
	 { "index_t_nquads_set", _wrap_index_t_nquads_set, METH_VARARGS, NULL},
	 { "index_t_nquads_get", _wrap_index_t_nquads_get, METH_O, NULL},
	 { "new_index_t", _wrap_new_index_t, METH_NOARGS, NULL},
	 { "delete_index_t", _wrap_delete_index_t, METH_O, NULL},
	 { "index_t_swigregister", index_t_swigregister, METH_O, NULL},
	 { "index_t_swiginit", index_t_swiginit, METH_VARARGS, NULL},
	 { "index_dimquads", _wrap_index_dimquads, METH_O, NULL},
	 { "index_overlaps_scale_range", _wrap_index_overlaps_scale_range, METH_VARARGS, NULL},
	 { "index_is_within_range", _wrap_index_is_within_range, METH_VARARGS, NULL},
	 { "index_get_meta", _wrap_index_get_meta, METH_VARARGS, NULL},
	 { "index_is_file_index", _wrap_index_is_file_index, METH_O, NULL},
	 { "index_get_quad_filename", _wrap_index_get_quad_filename, METH_O, NULL},
	 { "index_get_qidx_filename", _wrap_index_get_qidx_filename, METH_O, NULL},
	 { "index_get_quad_dim", _wrap_index_get_quad_dim, METH_O, NULL},
	 { "index_get_code_dim", _wrap_index_get_code_dim, METH_O, NULL},
	 { "index_nquads", _wrap_index_nquads, METH_O, NULL},
	 { "index_nstars", _wrap_index_nstars, METH_O, NULL},
	 { "index_build_from", _wrap_index_build_from, METH_VARARGS, NULL},
	 { "index_load", _wrap_index_load, METH_VARARGS, NULL},
	 { "index_unload", _wrap_index_unload, METH_O, NULL},
	 { "index_reload", _wrap_index_reload, METH_O, NULL},
	 { "index_close_fds", _wrap_index_close_fds, METH_O, NULL},
	 { "index_close", _wrap_index_close, METH_O, NULL},
	 { "index_free", _wrap_index_free, METH_O, NULL},
	 { "index_get_missing_cut_params", _wrap_index_get_missing_cut_params, METH_VARARGS, NULL},
	 { "quadfile_t_numquads_set", _wrap_quadfile_t_numquads_set, METH_VARARGS, NULL},
	 { "quadfile_t_numquads_get", _wrap_quadfile_t_numquads_get, METH_O, NULL},
	 { "quadfile_t_numstars_set", _wrap_quadfile_t_numstars_set, METH_VARARGS, NULL},
	 { "quadfile_t_numstars_get", _wrap_quadfile_t_numstars_get, METH_O, NULL},
	 { "quadfile_t_dimquads_set", _wrap_quadfile_t_dimquads_set, METH_VARARGS, NULL},
	 { "quadfile_t_dimquads_get", _wrap_quadfile_t_dimquads_get, METH_O, NULL},
	 { "quadfile_t_index_scale_upper_set", _wrap_quadfile_t_index_scale_upper_set, METH_VARARGS, NULL},
	 { "quadfile_t_index_scale_upper_get", _wrap_quadfile_t_index_scale_upper_get, METH_O, NULL},
	 { "quadfile_t_index_scale_lower_set", _wrap_quadfile_t_index_scale_lower_set, METH_VARARGS, NULL},
	 { "quadfile_t_index_scale_lower_get", _wrap_quadfile_t_index_scale_lower_get, METH_O, NULL},
	 { "quadfile_t_indexid_set", _wrap_quadfile_t_indexid_set, METH_VARARGS, NULL},
	 { "quadfile_t_indexid_get", _wrap_quadfile_t_indexid_get, METH_O, NULL},
	 { "quadfile_t_healpix_set", _wrap_quadfile_t_healpix_set, METH_VARARGS, NULL},
	 { "quadfile_t_healpix_get", _wrap_quadfile_t_healpix_get, METH_O, NULL},
	 { "quadfile_t_hpnside_set", _wrap_quadfile_t_hpnside_set, METH_VARARGS, NULL},
	 { "quadfile_t_hpnside_get", _wrap_quadfile_t_hpnside_get, METH_O, NULL},
	 { "quadfile_t_fb_set", _wrap_quadfile_t_fb_set, METH_VARARGS, NULL},
	 { "quadfile_t_fb_get", _wrap_quadfile_t_fb_get, METH_O, NULL},
	 { "quadfile_t_quadarray_set", _wrap_quadfile_t_quadarray_set, METH_VARARGS, NULL},
	 { "quadfile_t_quadarray_get", _wrap_quadfile_t_quadarray_get, METH_O, NULL},
	 { "new_quadfile_t", _wrap_new_quadfile_t, METH_NOARGS, NULL},
	 { "delete_quadfile_t", _wrap_delete_quadfile_t, METH_O, NULL},
	 { "quadfile_t_swigregister", quadfile_t_swigregister, METH_O, NULL},
	 { "quadfile_t_swiginit", quadfile_t_swiginit, METH_VARARGS, NULL},
	 { "quadfile_open", _wrap_quadfile_open, METH_O, NULL},
	 { "quadfile_open_fits", _wrap_quadfile_open_fits, METH_O, NULL},
	 { "quadfile_get_filename", _wrap_quadfile_get_filename, METH_O, NULL},
	 { "quadfile_open_for_writing", _wrap_quadfile_open_for_writing, METH_O, NULL},
	 { "quadfile_open_in_memory", _wrap_quadfile_open_in_memory, METH_NOARGS, NULL},
	 { "quadfile_switch_to_reading", _wrap_quadfile_switch_to_reading, METH_O, NULL},
	 { "quadfile_close", _wrap_quadfile_close, METH_O, NULL},
	 { "quadfile_check", _wrap_quadfile_check, METH_O, NULL},
	 { "quadfile_get_stars", _wrap_quadfile_get_stars, METH_VARARGS, NULL},
	 { "quadfile_write_quad", _wrap_quadfile_write_quad, METH_O, NULL},
	 { "quadfile_dimquads", _wrap_quadfile_dimquads, METH_O, NULL},
	 { "quadfile_nquads", _wrap_quadfile_nquads, METH_O, NULL},
	 { "quadfile_fix_header", _wrap_quadfile_fix_header, METH_O, NULL},
	 { "quadfile_write_header", _wrap_quadfile_write_header, METH_O, NULL},
	 { "quadfile_get_index_scale_upper_arcsec", _wrap_quadfile_get_index_scale_upper_arcsec, METH_O, NULL},
	 { "quadfile_get_index_scale_lower_arcsec", _wrap_quadfile_get_index_scale_lower_arcsec, METH_O, NULL},
	 { "quadfile_get_header", _wrap_quadfile_get_header, METH_O, NULL},
	 { "quadfile_write_header_to", _wrap_quadfile_write_header_to, METH_VARARGS, NULL},
	 { "quadfile_write_all_quads_to", _wrap_quadfile_write_all_quads_to, METH_VARARGS, NULL},
	 { "codetree_t_tree_set", _wrap_codetree_t_tree_set, METH_VARARGS, NULL},
	 { "codetree_t_tree_get", _wrap_codetree_t_tree_get, METH_O, NULL},
	 { "codetree_t_header_set", _wrap_codetree_t_header_set, METH_VARARGS, NULL},
	 { "codetree_t_header_get", _wrap_codetree_t_header_get, METH_O, NULL},
	 { "codetree_t_inverse_perm_set", _wrap_codetree_t_inverse_perm_set, METH_VARARGS, NULL},
	 { "codetree_t_inverse_perm_get", _wrap_codetree_t_inverse_perm_get, METH_O, NULL},
	 { "new_codetree_t", _wrap_new_codetree_t, METH_NOARGS, NULL},
	 { "delete_codetree_t", _wrap_delete_codetree_t, METH_O, NULL},
	 { "codetree_t_swigregister", codetree_t_swigregister, METH_O, NULL},
	 { "codetree_t_swiginit", codetree_t_swiginit, METH_VARARGS, NULL},
	 { "codetree_open", _wrap_codetree_open, METH_O, NULL},
	 { "codetree_open_fits", _wrap_codetree_open_fits, METH_O, NULL},
	 { "codetree_get", _wrap_codetree_get, METH_VARARGS, NULL},
	 { "codetree_N", _wrap_codetree_N, METH_O, NULL},
	 { "codetree_nodes", _wrap_codetree_nodes, METH_O, NULL},
	 { "codetree_D", _wrap_codetree_D, METH_O, NULL},
	 { "codetree_get_permuted", _wrap_codetree_get_permuted, METH_VARARGS, NULL},
	 { "codetree_header", _wrap_codetree_header, METH_O, NULL},
	 { "codetree_close", _wrap_codetree_close, METH_O, NULL},
	 { "codetree_new", _wrap_codetree_new, METH_NOARGS, NULL},
	 { "codetree_append_to", _wrap_codetree_append_to, METH_VARARGS, NULL},
	 { "codetree_write_to_file", _wrap_codetree_write_to_file, METH_VARARGS, NULL},
	 { "codetree_write_to_file_flipped", _wrap_codetree_write_to_file_flipped, METH_VARARGS, NULL},
	 { "startree_t_tree_set", _wrap_startree_t_tree_set, METH_VARARGS, NULL},
	 { "startree_t_tree_get", _wrap_startree_t_tree_get, METH_O, NULL},
	 { "startree_t_header_set", _wrap_startree_t_header_set, METH_VARARGS, NULL},
	 { "startree_t_header_get", _wrap_startree_t_header_get, METH_O, NULL},
	 { "startree_t_inverse_perm_set", _wrap_startree_t_inverse_perm_set, METH_VARARGS, NULL},
	 { "startree_t_inverse_perm_get", _wrap_startree_t_inverse_perm_get, METH_O, NULL},
	 { "startree_t_sweep_set", _wrap_startree_t_sweep_set, METH_VARARGS, NULL},
	 { "startree_t_sweep_get", _wrap_startree_t_sweep_get, METH_O, NULL},
	 { "startree_t_writing_set", _wrap_startree_t_writing_set, METH_VARARGS, NULL},
	 { "startree_t_writing_get", _wrap_startree_t_writing_get, METH_O, NULL},
	 { "startree_t_tagalong_set", _wrap_startree_t_tagalong_set, METH_VARARGS, NULL},
	 { "startree_t_tagalong_get", _wrap_startree_t_tagalong_get, METH_O, NULL},
	 { "new_startree_t", _wrap_new_startree_t, METH_NOARGS, NULL},
	 { "delete_startree_t", _wrap_delete_startree_t, METH_O, NULL},
	 { "startree_t_swigregister", startree_t_swigregister, METH_O, NULL},
	 { "startree_t_swiginit", startree_t_swiginit, METH_VARARGS, NULL},
	 { "startree_open", _wrap_startree_open, METH_O, NULL},
	 { "startree_open_fits", _wrap_startree_open_fits, METH_O, NULL},
	 { "startree_search_for", _wrap_startree_search_for, METH_VARARGS, NULL},
	 { "startree_search_for_radec", _wrap_startree_search_for_radec, METH_VARARGS, NULL},
	 { "startree_search", _wrap_startree_search, METH_VARARGS, NULL},
	 { "startree_get_data_column", _wrap_startree_get_data_column, METH_VARARGS, NULL},
	 { "startree_get_data_column_int64", _wrap_startree_get_data_column_int64, METH_VARARGS, NULL},
	 { "startree_get_data_column_array", _wrap_startree_get_data_column_array, METH_VARARGS, NULL},
	 { "startree_free_data_column", _wrap_startree_free_data_column, METH_VARARGS, NULL},
	 { "startree_has_tagalong", _wrap_startree_has_tagalong, METH_O, NULL},
	 { "startree_get_tagalong", _wrap_startree_get_tagalong, METH_O, NULL},
	 { "startree_get_tagalong_column_names", _wrap_startree_get_tagalong_column_names, METH_VARARGS, NULL},
	 { "startree_get_tagalong_N_columns", _wrap_startree_get_tagalong_N_columns, METH_O, NULL},
	 { "startree_get_tagalong_column_name", _wrap_startree_get_tagalong_column_name, METH_VARARGS, NULL},
	 { "startree_get_tagalong_column_fits_type", _wrap_startree_get_tagalong_column_fits_type, METH_VARARGS, NULL},
	 { "startree_get_tagalong_column_array_size", _wrap_startree_get_tagalong_column_array_size, METH_VARARGS, NULL},
	 { "startree_get_cut_nside", _wrap_startree_get_cut_nside, METH_O, NULL},
	 { "startree_get_cut_nsweeps", _wrap_startree_get_cut_nsweeps, METH_O, NULL},
	 { "startree_get_cut_dedup", _wrap_startree_get_cut_dedup, METH_O, NULL},
	 { "startree_get_cut_band", _wrap_startree_get_cut_band, METH_O, NULL},
	 { "startree_get_cut_margin", _wrap_startree_get_cut_margin, METH_O, NULL},
	 { "startree_get_jitter", _wrap_startree_get_jitter, METH_O, NULL},
	 { "startree_set_jitter", _wrap_startree_set_jitter, METH_VARARGS, NULL},
	 { "startree_get_sweep", _wrap_startree_get_sweep, METH_VARARGS, NULL},
	 { "startree_N", _wrap_startree_N, METH_O, NULL},
	 { "startree_nodes", _wrap_startree_nodes, METH_O, NULL},
	 { "startree_D", _wrap_startree_D, METH_O, NULL},
	 { "startree_header", _wrap_startree_header, METH_O, NULL},
	 { "startree_get", _wrap_startree_get, METH_VARARGS, NULL},
	 { "startree_get_radec", _wrap_startree_get_radec, METH_VARARGS, NULL},
	 { "startree_close", _wrap_startree_close, METH_O, NULL},
	 { "startree_compute_inverse_perm", _wrap_startree_compute_inverse_perm, METH_O, NULL},
	 { "startree_check_inverse_perm", _wrap_startree_check_inverse_perm, METH_O, NULL},
	 { "startree_new", _wrap_startree_new, METH_NOARGS, NULL},
	 { "startree_write_to_file", _wrap_startree_write_to_file, METH_VARARGS, NULL},
	 { "startree_write_to_file_flipped", _wrap_startree_write_to_file_flipped, METH_VARARGS, NULL},
	 { "startree_append_to", _wrap_startree_append_to, METH_VARARGS, NULL},
	 { "code_alloc", _wrap_code_alloc, METH_O, NULL},
	 { "code_free", _wrap_code_free, METH_O, NULL},
	 { "code_get", _wrap_code_get, METH_VARARGS, NULL},
	 { "codekd_addr", _wrap_codekd_addr, METH_O, NULL},
	 { "starkd_addr", _wrap_starkd_addr, METH_O, NULL},
	 { "quadfile_addr", _wrap_quadfile_addr, METH_O, NULL},
	 { "healpix_xy_to_ring", _wrap_healpix_xy_to_ring, METH_VARARGS, NULL},
	 { "healpix_ring_to_xy", _wrap_healpix_ring_to_xy, METH_VARARGS, NULL},
	 { "healpix_xy_to_nested", _wrap_healpix_xy_to_nested, METH_VARARGS, NULL},
	 { "healpix_nested_to_xy", _wrap_healpix_nested_to_xy, METH_VARARGS, NULL},
	 { "healpix_decompose_ring", _wrap_healpix_decompose_ring, METH_VARARGS, NULL},
	 { "healpix_compose_ring", _wrap_healpix_compose_ring, METH_VARARGS, NULL},
	 { "healpix_decompose_xy", _wrap_healpix_decompose_xy, METH_VARARGS, NULL},
	 { "healpix_decompose_xyl", _wrap_healpix_decompose_xyl, METH_VARARGS, NULL},
	 { "healpix_compose_xy", _wrap_healpix_compose_xy, METH_VARARGS, NULL},
	 { "healpix_compose_xyl", _wrap_healpix_compose_xyl, METH_VARARGS, NULL},
	 { "healpix_convert_xy_nside", _wrap_healpix_convert_xy_nside, METH_VARARGS, NULL},
	 { "healpix_convert_nside", _wrap_healpix_convert_nside, METH_VARARGS, NULL},
	 { "healpix_convert_nsidel", _wrap_healpix_convert_nsidel, METH_VARARGS, NULL},
	 { "radectohealpix", _wrap_radectohealpix, METH_VARARGS, NULL},
	 { "radectohealpixf", _wrap_radectohealpixf, METH_VARARGS, NULL},
	 { "radectohealpixl", _wrap_radectohealpixl, METH_VARARGS, NULL},
	 { "radectohealpixlf", _wrap_radectohealpixlf, METH_VARARGS, NULL},
	 { "radecdegtohealpix", _wrap_radecdegtohealpix, METH_VARARGS, NULL},
	 { "radecdegtohealpixf", _wrap_radecdegtohealpixf, METH_VARARGS, NULL},
	 { "radecdegtohealpixl", _wrap_radecdegtohealpixl, METH_VARARGS, NULL},
	 { "radecdegtohealpixlf", _wrap_radecdegtohealpixlf, METH_VARARGS, NULL},
	 { "xyztohealpix", _wrap_xyztohealpix, METH_VARARGS, NULL},
	 { "xyztohealpixl", _wrap_xyztohealpixl, METH_VARARGS, NULL},
	 { "xyztohealpixf", _wrap_xyztohealpixf, METH_VARARGS, NULL},
	 { "xyztohealpixlf", _wrap_xyztohealpixlf, METH_VARARGS, NULL},
	 { "xyzarrtohealpix", _wrap_xyzarrtohealpix, METH_VARARGS, NULL},
	 { "xyzarrtohealpixl", _wrap_xyzarrtohealpixl, METH_VARARGS, NULL},
	 { "xyzarrtohealpixf", _wrap_xyzarrtohealpixf, METH_VARARGS, NULL},
	 { "healpix_to_xyz", _wrap_healpix_to_xyz, METH_VARARGS, NULL},
	 { "healpix_to_xyzarr", _wrap_healpix_to_xyzarr, METH_VARARGS, NULL},
	 { "healpixl_to_xyzarr", _wrap_healpixl_to_xyzarr, METH_VARARGS, NULL},
	 { "healpix_to_radec", _wrap_healpix_to_radec, METH_VARARGS, NULL},
	 { "healpix_to_radecdeg", _wrap_healpix_to_radecdeg, METH_VARARGS, NULL},
	 { "healpixl_to_radecdeg", _wrap_healpixl_to_radecdeg, METH_VARARGS, NULL},
	 { "healpix_to_radecarr", _wrap_healpix_to_radecarr, METH_VARARGS, NULL},
	 { "healpix_to_radecdegarr", _wrap_healpix_to_radecdegarr, METH_VARARGS, NULL},
	 { "healpix_side_length_arcmin", _wrap_healpix_side_length_arcmin, METH_O, NULL},
	 { "healpix_nside_for_side_length_arcmin", _wrap_healpix_nside_for_side_length_arcmin, METH_O, NULL},
	 { "healpix_get_neighbours", _wrap_healpix_get_neighbours, METH_VARARGS, NULL},
	 { "healpix_get_neighboursl", _wrap_healpix_get_neighboursl, METH_VARARGS, NULL},
	 { "healpix_get_neighbours_within_range", _wrap_healpix_get_neighbours_within_range, METH_VARARGS, NULL},
	 { "healpix_get_neighbours_within_range_radec", _wrap_healpix_get_neighbours_within_range_radec, METH_VARARGS, NULL},
	 { "healpix_distance_to_radec", _wrap_healpix_distance_to_radec, METH_VARARGS, NULL},
	 { "healpix_distance_to_xyz", _wrap_healpix_distance_to_xyz, METH_VARARGS, NULL},
	 { "healpix_within_range_of_radec", _wrap_healpix_within_range_of_radec, METH_VARARGS, NULL},
	 { "healpix_within_range_of_xyz", _wrap_healpix_within_range_of_xyz, METH_VARARGS, NULL},
	 { "healpix_radec_bounds", _wrap_healpix_radec_bounds, METH_VARARGS, NULL},
	 { "healpix_rangesearch_xyz", _wrap_healpix_rangesearch_xyz, METH_VARARGS, NULL},
	 { "healpix_rangesearch_xyz_approx", _wrap_healpix_rangesearch_xyz_approx, METH_VARARGS, NULL},
	 { "healpix_rangesearch_radec_approx", _wrap_healpix_rangesearch_radec_approx, METH_VARARGS, NULL},
	 { "healpix_rangesearch_radec", _wrap_healpix_rangesearch_radec, METH_VARARGS, NULL},
	 { "healpix_region_search", _wrap_healpix_region_search, METH_VARARGS, NULL},
	 { "healpix_region_searchl", _wrap_healpix_region_searchl, METH_VARARGS, NULL},
	 { "anwcs_wcslib_to_string", _wrap_anwcs_wcslib_to_string, METH_O, NULL},
	 { "anwcs_t_type_set", _wrap_anwcs_t_type_set, METH_VARARGS, NULL},
	 { "anwcs_t_type_get", _wrap_anwcs_t_type_get, METH_O, NULL},
	 { "anwcs_t_data_set", _wrap_anwcs_t_data_set, METH_VARARGS, NULL},
	 { "anwcs_t_data_get", _wrap_anwcs_t_data_get, METH_O, NULL},
	 { "new_anwcs_t", _wrap_new_anwcs_t, METH_VARARGS, NULL},
	 { "delete_anwcs_t", _wrap_delete_anwcs_t, METH_O, NULL},
	 { "anwcs_t_pixel_scale", _wrap_anwcs_t_pixel_scale, METH_O, NULL},
	 { "anwcs_t_get_center", _wrap_anwcs_t_get_center, METH_O, NULL},
	 { "anwcs_t_get_radius", _wrap_anwcs_t_get_radius, METH_O, NULL},
	 { "anwcs_t_is_inside", _wrap_anwcs_t_is_inside, METH_VARARGS, NULL},
	 { "anwcs_t_get_width", _wrap_anwcs_t_get_width, METH_O, NULL},
	 { "anwcs_t_get_height", _wrap_anwcs_t_get_height, METH_O, NULL},
	 { "anwcs_t_set_width", _wrap_anwcs_t_set_width, METH_VARARGS, NULL},
	 { "anwcs_t_set_height", _wrap_anwcs_t_set_height, METH_VARARGS, NULL},
	 { "anwcs_t_pixelxy2radec", _wrap_anwcs_t_pixelxy2radec, METH_VARARGS, NULL},
	 { "anwcs_t_radec2pixelxy", _wrap_anwcs_t_radec2pixelxy, METH_VARARGS, NULL},
	 { "anwcs_t_write_to", _wrap_anwcs_t_write_to, METH_VARARGS, NULL},
	 { "anwcs_t_swigregister", anwcs_t_swigregister, METH_O, NULL},
	 { "anwcs_t_swiginit", anwcs_t_swiginit, METH_VARARGS, NULL},
	 { "anwcs_walk_outline", _wrap_anwcs_walk_outline, METH_VARARGS, NULL},
	 { "anwcs_wcslib_from_string", _wrap_anwcs_wcslib_from_string, METH_VARARGS, NULL},
	 { "anwcs_open", _wrap_anwcs_open, METH_VARARGS, NULL},
	 { "anwcs_open_wcslib", _wrap_anwcs_open_wcslib, METH_VARARGS, NULL},
	 { "anwcs_open_wcstools", _wrap_anwcs_open_wcstools, METH_VARARGS, NULL},
	 { "anwcs_wcstools_from_string", _wrap_anwcs_wcstools_from_string, METH_VARARGS, NULL},
	 { "anwcs_open_sip", _wrap_anwcs_open_sip, METH_VARARGS, NULL},
	 { "anwcs_open_tan", _wrap_anwcs_open_tan, METH_VARARGS, NULL},
	 { "anwcs_new_sip", _wrap_anwcs_new_sip, METH_O, NULL},
	 { "anwcs_new_tan", _wrap_anwcs_new_tan, METH_O, NULL},
	 { "anwcs_create_box", _wrap_anwcs_create_box, METH_VARARGS, NULL},
	 { "anwcs_create_box_upsidedown", _wrap_anwcs_create_box_upsidedown, METH_VARARGS, NULL},
	 { "anwcs_create_mercator", _wrap_anwcs_create_mercator, METH_VARARGS, NULL},
	 { "anwcs_create_mercator_2", _wrap_anwcs_create_mercator_2, METH_VARARGS, NULL},
	 { "anwcs_create_mollweide", _wrap_anwcs_create_mollweide, METH_VARARGS, NULL},
	 { "anwcs_create_cea_wcs", _wrap_anwcs_create_cea_wcs, METH_VARARGS, NULL},
	 { "anwcs_galactic_to_radec", _wrap_anwcs_galactic_to_radec, METH_O, NULL},
	 { "anwcs_create_galactic_car_wcs", _wrap_anwcs_create_galactic_car_wcs, METH_VARARGS, NULL},
	 { "anwcs_create_hammer_aitoff", _wrap_anwcs_create_hammer_aitoff, METH_VARARGS, NULL},
	 { "anwcs_create_hammer_aitoff_rectangular", _wrap_anwcs_create_hammer_aitoff_rectangular, METH_VARARGS, NULL},
	 { "anwcs_create_hammer_aitoff_galactic", _wrap_anwcs_create_hammer_aitoff_galactic, METH_VARARGS, NULL},
	 { "anwcs_create_allsky_hammer_aitoff", _wrap_anwcs_create_allsky_hammer_aitoff, METH_VARARGS, NULL},
	 { "anwcs_create_allsky_hammer_aitoff2", _wrap_anwcs_create_allsky_hammer_aitoff2, METH_VARARGS, NULL},
	 { "anwcs_write", _wrap_anwcs_write, METH_VARARGS, NULL},
	 { "anwcs_write_to", _wrap_anwcs_write_to, METH_VARARGS, NULL},
	 { "anwcs_add_to_header", _wrap_anwcs_add_to_header, METH_VARARGS, NULL},
	 { "anwcs_radec2pixelxy", _wrap_anwcs_radec2pixelxy, METH_VARARGS, NULL},
	 { "anwcs_pixelxy2radec", _wrap_anwcs_pixelxy2radec, METH_VARARGS, NULL},
	 { "anwcs_pixelxy2xyz", _wrap_anwcs_pixelxy2xyz, METH_VARARGS, NULL},
	 { "anwcs_xyz2pixelxy", _wrap_anwcs_xyz2pixelxy, METH_VARARGS, NULL},
	 { "anwcs_radec_is_inside_image", _wrap_anwcs_radec_is_inside_image, METH_VARARGS, NULL},
	 { "anwcs_get_cd_matrix", _wrap_anwcs_get_cd_matrix, METH_O, NULL},
	 { "anwcs_get_radec_bounds", _wrap_anwcs_get_radec_bounds, METH_VARARGS, NULL},
	 { "anwcs_print", _wrap_anwcs_print, METH_VARARGS, NULL},
	 { "anwcs_print_stdout", _wrap_anwcs_print_stdout, METH_O, NULL},
	 { "anwcs_get_radec_center_and_radius", _wrap_anwcs_get_radec_center_and_radius, METH_O, NULL},
	 { "anwcs_walk_image_boundary", _wrap_anwcs_walk_image_boundary, METH_VARARGS, NULL},
	 { "anwcs_find_discontinuity", _wrap_anwcs_find_discontinuity, METH_VARARGS, NULL},
	 { "anwcs_is_discontinuous", _wrap_anwcs_is_discontinuous, METH_VARARGS, NULL},
	 { "anwcs_walk_discontinuity", _wrap_anwcs_walk_discontinuity, METH_VARARGS, NULL},
	 { "anwcs_overlaps", _wrap_anwcs_overlaps, METH_VARARGS, NULL},
	 { "anwcs_imagew", _wrap_anwcs_imagew, METH_O, NULL},
	 { "anwcs_imageh", _wrap_anwcs_imageh, METH_O, NULL},
	 { "anwcs_set_size", _wrap_anwcs_set_size, METH_VARARGS, NULL},
	 { "anwcs_scale_wcs", _wrap_anwcs_scale_wcs, METH_VARARGS, NULL},
	 { "anwcs_rotate_wcs", _wrap_anwcs_rotate_wcs, METH_VARARGS, NULL},
	 { "anwcs_pixel_scale", _wrap_anwcs_pixel_scale, METH_O, NULL},
	 { "anwcs_free", _wrap_anwcs_free, METH_O, NULL},
	 { "anwcs_get_sip", _wrap_anwcs_get_sip, METH_O, NULL},
	 { "errors_start_logging_to_string", _wrap_errors_start_logging_to_string, METH_NOARGS, NULL},
	 { "errors_stop_logging_to_string", _wrap_errors_stop_logging_to_string, METH_O, NULL},
	 { "dimquad2dimcode", _wrap_dimquad2dimcode, METH_O, NULL},
	 { "rad2deg", _wrap_rad2deg, METH_O, NULL},
	 { "rad2arcmin", _wrap_rad2arcmin, METH_O, NULL},
	 { "rad2arcsec", _wrap_rad2arcsec, METH_O, NULL},
	 { "deg2rad", _wrap_deg2rad, METH_O, NULL},
	 { "deg2arcmin", _wrap_deg2arcmin, METH_O, NULL},
	 { "deg2arcsec", _wrap_deg2arcsec, METH_O, NULL},
	 { "arcmin2rad", _wrap_arcmin2rad, METH_O, NULL},
	 { "arcmin2deg", _wrap_arcmin2deg, METH_O, NULL},
	 { "arcmin2arcsec", _wrap_arcmin2arcsec, METH_O, NULL},
	 { "arcsec2rad", _wrap_arcsec2rad, METH_O, NULL},
	 { "arcsec2deg", _wrap_arcsec2deg, METH_O, NULL},
	 { "arcsec2arcmin", _wrap_arcsec2arcmin, METH_O, NULL},
	 { "mjdtojd", _wrap_mjdtojd, METH_O, NULL},
	 { "jdtomjd", _wrap_jdtomjd, METH_O, NULL},
	 { "xy2ra", _wrap_xy2ra, METH_VARARGS, NULL},
	 { "z2dec", _wrap_z2dec, METH_O, NULL},
	 { "atora", _wrap_atora, METH_O, NULL},
	 { "atodec", _wrap_atodec, METH_O, NULL},
	 { "mag2flux", _wrap_mag2flux, METH_O, NULL},
	 { "radecrange2xyzrange", _wrap_radecrange2xyzrange, METH_VARARGS, NULL},
	 { "radec2xyz", _wrap_radec2xyz, METH_VARARGS, NULL},
	 { "xyz2radec", _wrap_xyz2radec, METH_VARARGS, NULL},
	 { "xyzarr2radec", _wrap_xyzarr2radec, METH_O, NULL},
	 { "xyzarr2radecarr", _wrap_xyzarr2radecarr, METH_VARARGS, NULL},
	 { "radec2xyzarr", _wrap_radec2xyzarr, METH_VARARGS, NULL},
	 { "radec2xyzarrmany", _wrap_radec2xyzarrmany, METH_VARARGS, NULL},
	 { "radecdeg2xyz", _wrap_radecdeg2xyz, METH_VARARGS, NULL},
	 { "xyzarr2radecdeg", _wrap_xyzarr2radecdeg, METH_O, NULL},
	 { "xyzarr2radecdegarr", _wrap_xyzarr2radecdegarr, METH_VARARGS, NULL},
	 { "radecdeg2xyzarr", _wrap_radecdeg2xyzarr, METH_VARARGS, NULL},
	 { "radecdegarr2xyzarr", _wrap_radecdegarr2xyzarr, METH_VARARGS, NULL},
	 { "radecdeg2xyzarrmany", _wrap_radecdeg2xyzarrmany, METH_VARARGS, NULL},
	 { "radec_derivatives", _wrap_radec_derivatives, METH_VARARGS, NULL},
	 { "distsq_between_radecdeg", _wrap_distsq_between_radecdeg, METH_VARARGS, NULL},
	 { "arcsec_between_radecdeg", _wrap_arcsec_between_radecdeg, METH_VARARGS, NULL},
	 { "deg_between_radecdeg", _wrap_deg_between_radecdeg, METH_VARARGS, NULL},
	 { "ra2mercx", _wrap_ra2mercx, METH_O, NULL},
	 { "dec2mercy", _wrap_dec2mercy, METH_O, NULL},
	 { "ra2hms", _wrap_ra2hms, METH_VARARGS, NULL},
	 { "dec2dms", _wrap_dec2dms, METH_VARARGS, NULL},
	 { "hms2ra", _wrap_hms2ra, METH_VARARGS, NULL},
	 { "dms2dec", _wrap_dms2dec, METH_VARARGS, NULL},
	 { "ra2hmsstring", _wrap_ra2hmsstring, METH_VARARGS, NULL},
	 { "dec2dmsstring", _wrap_dec2dmsstring, METH_VARARGS, NULL},
	 { "project_hammer_aitoff_x", _wrap_project_hammer_aitoff_x, METH_VARARGS, NULL},
	 { "project_equal_area", _wrap_project_equal_area, METH_VARARGS, NULL},
	 { "distsq2arc", _wrap_distsq2arc, METH_O, NULL},
	 { "distsq2rad", _wrap_distsq2rad, METH_O, NULL},
	 { "distsq2deg", _wrap_distsq2deg, METH_O, NULL},
	 { "dist2rad", _wrap_dist2rad, METH_O, NULL},
	 { "distsq2arcsec", _wrap_distsq2arcsec, METH_O, NULL},
	 { "dist2arcsec", _wrap_dist2arcsec, METH_O, NULL},
	 { "rad2distsq", _wrap_rad2distsq, METH_O, NULL},
	 { "rad2dist", _wrap_rad2dist, METH_O, NULL},
	 { "arcsec2distsq", _wrap_arcsec2distsq, METH_O, NULL},
	 { "arcsec2dist", _wrap_arcsec2dist, METH_O, NULL},
	 { "deg2dist", _wrap_deg2dist, METH_O, NULL},
	 { "deg2distsq", _wrap_deg2distsq, METH_O, NULL},
	 { "arcmin2dist", _wrap_arcmin2dist, METH_O, NULL},
	 { "arcmin2distsq", _wrap_arcmin2distsq, METH_O, NULL},
	 { "dist2deg", _wrap_dist2deg, METH_O, NULL},
	 { "make_rand_star", _wrap_make_rand_star, METH_VARARGS, NULL},
	 { "star_coords", _wrap_star_coords, METH_VARARGS, NULL},
	 { "star_midpoint", _wrap_star_midpoint, METH_VARARGS, NULL},
	 { "qfits_header_debug_dump", _wrap_qfits_header_debug_dump, METH_O, NULL},
	 { "qfits_header_list", _wrap_qfits_header_list, METH_VARARGS, NULL},
	 { "qfits_header_new", _wrap_qfits_header_new, METH_NOARGS, NULL},
	 { "qfits_header_default", _wrap_qfits_header_default, METH_NOARGS, NULL},
	 { "qfits_header_n", _wrap_qfits_header_n, METH_O, NULL},
	 { "qfits_header_add", _wrap_qfits_header_add, METH_VARARGS, NULL},
	 { "qfits_header_add_after", _wrap_qfits_header_add_after, METH_VARARGS, NULL},
	 { "qfits_header_append", _wrap_qfits_header_append, METH_VARARGS, NULL},
	 { "qfits_header_del", _wrap_qfits_header_del, METH_VARARGS, NULL},
	 { "qfits_header_sort", _wrap_qfits_header_sort, METH_O, NULL},
	 { "qfits_header_copy", _wrap_qfits_header_copy, METH_O, NULL},
	 { "qfits_header_mod", _wrap_qfits_header_mod, METH_VARARGS, NULL},
	 { "qfits_header_destroy", _wrap_qfits_header_destroy, METH_O, NULL},
	 { "qfits_header_getstr", _wrap_qfits_header_getstr, METH_VARARGS, NULL},
	 { "qfits_header_getstr_pretty", _wrap_qfits_header_getstr_pretty, METH_VARARGS, NULL},
	 { "qfits_header_getitem", _wrap_qfits_header_getitem, METH_VARARGS, NULL},
	 { "qfits_header_setitem", _wrap_qfits_header_setitem, METH_VARARGS, NULL},
	 { "qfits_header_getcom", _wrap_qfits_header_getcom, METH_VARARGS, NULL},
	 { "qfits_header_getint", _wrap_qfits_header_getint, METH_VARARGS, NULL},
	 { "qfits_header_getdouble", _wrap_qfits_header_getdouble, METH_VARARGS, NULL},
	 { "qfits_header_getboolean", _wrap_qfits_header_getboolean, METH_VARARGS, NULL},
	 { "qfits_header_dump", _wrap_qfits_header_dump, METH_VARARGS, NULL},
	 { "qfits_header_findmatch", _wrap_qfits_header_findmatch, METH_VARARGS, NULL},
	 { "qfits_header_write_line", _wrap_qfits_header_write_line, METH_VARARGS, NULL},
	 { "qfits_header_read_hdr_string", _wrap_qfits_header_read_hdr_string, METH_O, NULL},
	 { "qfits_zeropad", _wrap_qfits_zeropad, METH_O, NULL},
	 { "qfits_is_fits", _wrap_qfits_is_fits, METH_O, NULL},
	 { "is_blank_line", _wrap_is_blank_line, METH_O, NULL},
	 { "wcs_pv2sip_header", _wrap_wcs_pv2sip_header, METH_VARARGS, NULL},
	 { "wcs_pv2sip", _wrap_wcs_pv2sip, METH_VARARGS, NULL},
	 { "tan_t_crval_set", _wrap_tan_t_crval_set, METH_VARARGS, NULL},
	 { "tan_t_crval_get", _wrap_tan_t_crval_get, METH_O, NULL},
	 { "tan_t_crpix_set", _wrap_tan_t_crpix_set, METH_VARARGS, NULL},
	 { "tan_t_crpix_get", _wrap_tan_t_crpix_get, METH_O, NULL},
	 { "tan_t_cd_set", _wrap_tan_t_cd_set, METH_VARARGS, NULL},
	 { "tan_t_cd_get", _wrap_tan_t_cd_get, METH_O, NULL},
	 { "tan_t_imagew_set", _wrap_tan_t_imagew_set, METH_VARARGS, NULL},
	 { "tan_t_imagew_get", _wrap_tan_t_imagew_get, METH_O, NULL},
	 { "tan_t_imageh_set", _wrap_tan_t_imageh_set, METH_VARARGS, NULL},
	 { "tan_t_imageh_get", _wrap_tan_t_imageh_get, METH_O, NULL},
	 { "tan_t_sin_set", _wrap_tan_t_sin_set, METH_VARARGS, NULL},
	 { "tan_t_sin_get", _wrap_tan_t_sin_get, METH_O, NULL},
	 { "new_tan_t", _wrap_new_tan_t, METH_VARARGS, NULL},
	 { "delete_tan_t", _wrap_delete_tan_t, METH_O, NULL},
	 { "tan_t_set", _wrap_tan_t_set, METH_VARARGS, NULL},
	 { "tan_t_is_inside", _wrap_tan_t_is_inside, METH_VARARGS, NULL},
	 { "tan_t_scale", _wrap_tan_t_scale, METH_VARARGS, NULL},
	 { "tan_t_rotate", _wrap_tan_t_rotate, METH_VARARGS, NULL},
	 { "tan_t_get_width", _wrap_tan_t_get_width, METH_O, NULL},
	 { "tan_t_get_height", _wrap_tan_t_get_height, METH_O, NULL},
	 { "tan_t_set_width", _wrap_tan_t_set_width, METH_VARARGS, NULL},
	 { "tan_t_set_height", _wrap_tan_t_set_height, METH_VARARGS, NULL},
	 { "tan_t_pixel_scale", _wrap_tan_t_pixel_scale, METH_O, NULL},
	 { "tan_t_radec_center", _wrap_tan_t_radec_center, METH_O, NULL},
	 { "tan_t_radius", _wrap_tan_t_radius, METH_O, NULL},
	 { "tan_t_xyzcenter", _wrap_tan_t_xyzcenter, METH_O, NULL},
	 { "tan_t_pixelxy2xyz", _wrap_tan_t_pixelxy2xyz, METH_VARARGS, NULL},
	 { "tan_t_pixelxy2radec", _wrap_tan_t_pixelxy2radec, METH_VARARGS, NULL},
	 { "tan_t_radec2pixelxy", _wrap_tan_t_radec2pixelxy, METH_VARARGS, NULL},
	 { "tan_t_iwc2pixelxy", _wrap_tan_t_iwc2pixelxy, METH_VARARGS, NULL},
	 { "tan_t_pixelxy2iwc", _wrap_tan_t_pixelxy2iwc, METH_VARARGS, NULL},
	 { "tan_t_iwc2radec", _wrap_tan_t_iwc2radec, METH_VARARGS, NULL},
	 { "tan_t_radec2iwc", _wrap_tan_t_radec2iwc, METH_VARARGS, NULL},
	 { "tan_t_xyz2pixelxy", _wrap_tan_t_xyz2pixelxy, METH_VARARGS, NULL},
	 { "tan_t_write_to", _wrap_tan_t_write_to, METH_VARARGS, NULL},
	 { "tan_t_set_crval", _wrap_tan_t_set_crval, METH_VARARGS, NULL},
	 { "tan_t_set_crpix", _wrap_tan_t_set_crpix, METH_VARARGS, NULL},
	 { "tan_t_set_cd", _wrap_tan_t_set_cd, METH_VARARGS, NULL},
	 { "tan_t_set_imagesize", _wrap_tan_t_set_imagesize, METH_VARARGS, NULL},
	 { "tan_t_swigregister", tan_t_swigregister, METH_O, NULL},
	 { "tan_t_swiginit", tan_t_swiginit, METH_VARARGS, NULL},
	 { "sip_t_wcstan_set", _wrap_sip_t_wcstan_set, METH_VARARGS, NULL},
	 { "sip_t_wcstan_get", _wrap_sip_t_wcstan_get, METH_O, NULL},
	 { "sip_t_a_order_set", _wrap_sip_t_a_order_set, METH_VARARGS, NULL},
	 { "sip_t_a_order_get", _wrap_sip_t_a_order_get, METH_O, NULL},
	 { "sip_t_b_order_set", _wrap_sip_t_b_order_set, METH_VARARGS, NULL},
	 { "sip_t_b_order_get", _wrap_sip_t_b_order_get, METH_O, NULL},
	 { "sip_t_a_set", _wrap_sip_t_a_set, METH_VARARGS, NULL},
	 { "sip_t_a_get", _wrap_sip_t_a_get, METH_O, NULL},
	 { "sip_t_b_set", _wrap_sip_t_b_set, METH_VARARGS, NULL},
	 { "sip_t_b_get", _wrap_sip_t_b_get, METH_O, NULL},
	 { "sip_t_ap_order_set", _wrap_sip_t_ap_order_set, METH_VARARGS, NULL},
	 { "sip_t_ap_order_get", _wrap_sip_t_ap_order_get, METH_O, NULL},
	 { "sip_t_bp_order_set", _wrap_sip_t_bp_order_set, METH_VARARGS, NULL},
	 { "sip_t_bp_order_get", _wrap_sip_t_bp_order_get, METH_O, NULL},
	 { "sip_t_ap_set", _wrap_sip_t_ap_set, METH_VARARGS, NULL},
	 { "sip_t_ap_get", _wrap_sip_t_ap_get, METH_O, NULL},
	 { "sip_t_bp_set", _wrap_sip_t_bp_set, METH_VARARGS, NULL},
	 { "sip_t_bp_get", _wrap_sip_t_bp_get, METH_O, NULL},
	 { "new_sip_t", _wrap_new_sip_t, METH_VARARGS, NULL},
	 { "delete_sip_t", _wrap_delete_sip_t, METH_O, NULL},
	 { "sip_t_get_subimage", _wrap_sip_t_get_subimage, METH_VARARGS, NULL},
	 { "sip_t_scale", _wrap_sip_t_scale, METH_VARARGS, NULL},
	 { "sip_t_pixel_scale", _wrap_sip_t_pixel_scale, METH_O, NULL},
	 { "sip_t_radec_center", _wrap_sip_t_radec_center, METH_O, NULL},
	 { "sip_t_radius", _wrap_sip_t_radius, METH_O, NULL},
	 { "sip_t_write_to", _wrap_sip_t_write_to, METH_VARARGS, NULL},
	 { "sip_t_ensure_inverse_polynomials", _wrap_sip_t_ensure_inverse_polynomials, METH_O, NULL},
	 { "sip_t_pixelxy2xyz", _wrap_sip_t_pixelxy2xyz, METH_VARARGS, NULL},
	 { "sip_t_pixelxy2radec", _wrap_sip_t_pixelxy2radec, METH_VARARGS, NULL},
	 { "sip_t_radec2pixelxy", _wrap_sip_t_radec2pixelxy, METH_VARARGS, NULL},
	 { "sip_t_iwc2pixelxy", _wrap_sip_t_iwc2pixelxy, METH_VARARGS, NULL},
	 { "sip_t_pixelxy2iwc", _wrap_sip_t_pixelxy2iwc, METH_VARARGS, NULL},
	 { "sip_t_iwc2radec", _wrap_sip_t_iwc2radec, METH_VARARGS, NULL},
	 { "sip_t_radec2iwc", _wrap_sip_t_radec2iwc, METH_VARARGS, NULL},
	 { "sip_t_xyz2pixelxy", _wrap_sip_t_xyz2pixelxy, METH_VARARGS, NULL},
	 { "sip_t_is_inside", _wrap_sip_t_is_inside, METH_VARARGS, NULL},
	 { "sip_t_set_a_term", _wrap_sip_t_set_a_term, METH_VARARGS, NULL},
	 { "sip_t_set_b_term", _wrap_sip_t_set_b_term, METH_VARARGS, NULL},
	 { "sip_t_set_ap_term", _wrap_sip_t_set_ap_term, METH_VARARGS, NULL},
	 { "sip_t_set_bp_term", _wrap_sip_t_set_bp_term, METH_VARARGS, NULL},
	 { "sip_t_get_a_term", _wrap_sip_t_get_a_term, METH_VARARGS, NULL},
	 { "sip_t_get_b_term", _wrap_sip_t_get_b_term, METH_VARARGS, NULL},
	 { "sip_t_get_ap_term", _wrap_sip_t_get_ap_term, METH_VARARGS, NULL},
	 { "sip_t_get_bp_term", _wrap_sip_t_get_bp_term, METH_VARARGS, NULL},
	 { "sip_t_set_width", _wrap_sip_t_set_width, METH_VARARGS, NULL},
	 { "sip_t_set_height", _wrap_sip_t_set_height, METH_VARARGS, NULL},
	 { "sip_t_get_width", _wrap_sip_t_get_width, METH_O, NULL},
	 { "sip_t_get_height", _wrap_sip_t_get_height, METH_O, NULL},
	 { "sip_t_get_distortion", _wrap_sip_t_get_distortion, METH_VARARGS, NULL},
	 { "sip_t_get_undistortion", _wrap_sip_t_get_undistortion, METH_VARARGS, NULL},
	 { "sip_t_swigregister", sip_t_swigregister, METH_O, NULL},
	 { "sip_t_swiginit", sip_t_swiginit, METH_VARARGS, NULL},
	 { "sip_create", _wrap_sip_create, METH_NOARGS, NULL},
	 { "sip_free", _wrap_sip_free, METH_O, NULL},
	 { "sip_copy", _wrap_sip_copy, METH_VARARGS, NULL},
	 { "sip_wrap_tan", _wrap_sip_wrap_tan, METH_VARARGS, NULL},
	 { "sip_imagew", _wrap_sip_imagew, METH_O, NULL},
	 { "sip_imageh", _wrap_sip_imageh, METH_O, NULL},
	 { "sip_pixelxy2radec", _wrap_sip_pixelxy2radec, METH_VARARGS, NULL},
	 { "sip_pixelxy2xyzarr", _wrap_sip_pixelxy2xyzarr, METH_VARARGS, NULL},
	 { "sip_radec2pixelxy", _wrap_sip_radec2pixelxy, METH_VARARGS, NULL},
	 { "sip_radec2pixelxy_check", _wrap_sip_radec2pixelxy_check, METH_VARARGS, NULL},
	 { "sip_xyzarr2pixelxy", _wrap_sip_xyzarr2pixelxy, METH_VARARGS, NULL},
	 { "sip_xyz2pixelxy", _wrap_sip_xyz2pixelxy, METH_VARARGS, NULL},
	 { "sip_pixelxy2iwc", _wrap_sip_pixelxy2iwc, METH_VARARGS, NULL},
	 { "tan_det_cd", _wrap_tan_det_cd, METH_O, NULL},
	 { "sip_det_cd", _wrap_sip_det_cd, METH_O, NULL},
	 { "tan_pixel_scale", _wrap_tan_pixel_scale, METH_O, NULL},
	 { "sip_pixel_scale", _wrap_sip_pixel_scale, METH_O, NULL},
	 { "sip_calc_inv_distortion", _wrap_sip_calc_inv_distortion, METH_VARARGS, NULL},
	 { "sip_calc_distortion", _wrap_sip_calc_distortion, METH_VARARGS, NULL},
	 { "sip_pixel_distortion", _wrap_sip_pixel_distortion, METH_VARARGS, NULL},
	 { "sip_pixel_undistortion", _wrap_sip_pixel_undistortion, METH_VARARGS, NULL},
	 { "tan_pixelxy2xyzarr", _wrap_tan_pixelxy2xyzarr, METH_VARARGS, NULL},
	 { "tan_pixelxy2radec", _wrap_tan_pixelxy2radec, METH_VARARGS, NULL},
	 { "tan_pixelxy2radecarr", _wrap_tan_pixelxy2radecarr, METH_VARARGS, NULL},
	 { "tan_radec2pixelxy", _wrap_tan_radec2pixelxy, METH_VARARGS, NULL},
	 { "tan_xyzarr2pixelxy", _wrap_tan_xyzarr2pixelxy, METH_VARARGS, NULL},
	 { "tan_iwc2pixelxy", _wrap_tan_iwc2pixelxy, METH_VARARGS, NULL},
	 { "tan_iwc2xyzarr", _wrap_tan_iwc2xyzarr, METH_VARARGS, NULL},
	 { "tan_iwc2radec", _wrap_tan_iwc2radec, METH_VARARGS, NULL},
	 { "tan_pixelxy2iwc", _wrap_tan_pixelxy2iwc, METH_VARARGS, NULL},
	 { "tan_xyzarr2iwc", _wrap_tan_xyzarr2iwc, METH_VARARGS, NULL},
	 { "tan_radec2iwc", _wrap_tan_radec2iwc, METH_VARARGS, NULL},
	 { "sip_xyzarr2iwc", _wrap_sip_xyzarr2iwc, METH_VARARGS, NULL},
	 { "sip_radec2iwc", _wrap_sip_radec2iwc, METH_VARARGS, NULL},
	 { "sip_iwc2pixelxy", _wrap_sip_iwc2pixelxy, METH_VARARGS, NULL},
	 { "sip_iwc2radec", _wrap_sip_iwc2radec, METH_VARARGS, NULL},
	 { "sip_print", _wrap_sip_print, METH_O, NULL},
	 { "sip_print_to", _wrap_sip_print_to, METH_VARARGS, NULL},
	 { "tan_print", _wrap_tan_print, METH_O, NULL},
	 { "tan_print_to", _wrap_tan_print_to, METH_VARARGS, NULL},
	 { "sip_get_crval", _wrap_sip_get_crval, METH_O, NULL},
	 { "tan_get_orientation", _wrap_tan_get_orientation, METH_O, NULL},
	 { "sip_get_orientation", _wrap_sip_get_orientation, METH_O, NULL},
	 { "sip_get_image_size", _wrap_sip_get_image_size, METH_VARARGS, NULL},
	 { "sip_read_tan_or_sip_header_file_ext", _wrap_sip_read_tan_or_sip_header_file_ext, METH_VARARGS, NULL},
	 { "sip_create_header", _wrap_sip_create_header, METH_O, NULL},
	 { "tan_create_header", _wrap_tan_create_header, METH_O, NULL},
	 { "sip_add_to_header", _wrap_sip_add_to_header, METH_VARARGS, NULL},
	 { "tan_add_to_header", _wrap_tan_add_to_header, METH_VARARGS, NULL},
	 { "sip_read_header_file", _wrap_sip_read_header_file, METH_VARARGS, NULL},
	 { "sip_read_header_file_ext", _wrap_sip_read_header_file_ext, METH_VARARGS, NULL},
	 { "sip_read_header_file_ext_only", _wrap_sip_read_header_file_ext_only, METH_VARARGS, NULL},
	 { "tan_read_header_file", _wrap_tan_read_header_file, METH_VARARGS, NULL},
	 { "tan_read_header_file_ext", _wrap_tan_read_header_file_ext, METH_VARARGS, NULL},
	 { "tan_read_header_file_ext_only", _wrap_tan_read_header_file_ext_only, METH_VARARGS, NULL},
	 { "sip_read_header", _wrap_sip_read_header, METH_VARARGS, NULL},
	 { "tan_read_header", _wrap_tan_read_header, METH_VARARGS, NULL},
	 { "sip_from_string", _wrap_sip_from_string, METH_VARARGS, NULL},
	 { "tan_write_to", _wrap_tan_write_to, METH_VARARGS, NULL},
	 { "sip_write_to", _wrap_sip_write_to, METH_VARARGS, NULL},
	 { "sip_write_to_file", _wrap_sip_write_to_file, METH_VARARGS, NULL},
	 { "tan_write_to_file", _wrap_tan_write_to_file, METH_VARARGS, NULL},
	 { "wcs_pixel_center_for_size", _wrap_wcs_pixel_center_for_size, METH_O, NULL},
	 { "sip_ensure_inverse_polynomials", _wrap_sip_ensure_inverse_polynomials, METH_O, NULL},
	 { "sip_compute_inverse_polynomials", _wrap_sip_compute_inverse_polynomials, METH_VARARGS, NULL},
	 { "sip_filter_stars_in_field", _wrap_sip_filter_stars_in_field, METH_VARARGS, NULL},
	 { "sip_get_radec_bounds", _wrap_sip_get_radec_bounds, METH_VARARGS, NULL},
	 { "sip_walk_image_boundary", _wrap_sip_walk_image_boundary, METH_VARARGS, NULL},
	 { "sip_get_radec_center", _wrap_sip_get_radec_center, METH_O, NULL},
	 { "tan_get_radec_center", _wrap_tan_get_radec_center, METH_O, NULL},
	 { "sip_get_radius_deg", _wrap_sip_get_radius_deg, METH_O, NULL},
	 { "tan_get_radius_deg", _wrap_tan_get_radius_deg, METH_O, NULL},
	 { "sip_get_radec_center_hms", _wrap_sip_get_radec_center_hms, METH_VARARGS, NULL},
	 { "sip_pixel_is_inside_image", _wrap_sip_pixel_is_inside_image, METH_VARARGS, NULL},
	 { "sip_is_inside_image", _wrap_sip_is_inside_image, METH_VARARGS, NULL},
	 { "sip_get_radec_center_hms_string", _wrap_sip_get_radec_center_hms_string, METH_VARARGS, NULL},
	 { "sip_get_field_size", _wrap_sip_get_field_size, METH_VARARGS, NULL},
	 { "sip_shift", _wrap_sip_shift, METH_VARARGS, NULL},
	 { "tan_pixel_is_inside_image", _wrap_tan_pixel_is_inside_image, METH_VARARGS, NULL},
	 { "tan_is_inside_image", _wrap_tan_is_inside_image, METH_VARARGS, NULL},
	 { "tan_transform", _wrap_tan_transform, METH_VARARGS, NULL},
	 { "tan_scale", _wrap_tan_scale, METH_VARARGS, NULL},
	 { "sip_scale", _wrap_sip_scale, METH_VARARGS, NULL},
	 { "tan_rotate", _wrap_tan_rotate, METH_VARARGS, NULL},
	 { "coadd_add_numpy", _wrap_coadd_add_numpy, METH_VARARGS, NULL},
	 { "coadd_get_snapshot_numpy", _wrap_coadd_get_snapshot_numpy, METH_VARARGS, NULL},
	 { "fit_sip_wcs_py", _wrap_fit_sip_wcs_py, METH_VARARGS, NULL},
	 { "broadcast_2to2ok", _wrap_broadcast_2to2ok, METH_VARARGS, NULL},
	 { "broadcast_2to2", _wrap_broadcast_2to2, METH_VARARGS, NULL},
	 { "broadcast_2to2i", _wrap_broadcast_2to2i, METH_VARARGS, NULL},
	 { "tan_rd2xy_wrapper", _wrap_tan_rd2xy_wrapper, METH_VARARGS, NULL},
	 { "sip_rd2xy_wrapper", _wrap_sip_rd2xy_wrapper, METH_VARARGS, NULL},
	 { "anwcs_rd2xy_wrapper", _wrap_anwcs_rd2xy_wrapper, METH_VARARGS, NULL},
	 { "tan_iwc2xy_wrapper", _wrap_tan_iwc2xy_wrapper, METH_VARARGS, NULL},
	 { "sip_iwc2xy_wrapper", _wrap_sip_iwc2xy_wrapper, METH_VARARGS, NULL},
	 { "tan_xy2iwc_wrapper", _wrap_tan_xy2iwc_wrapper, METH_VARARGS, NULL},
	 { "sip_xy2iwc_wrapper", _wrap_sip_xy2iwc_wrapper, METH_VARARGS, NULL},
	 { "tan_iwc2rd_wrapper", _wrap_tan_iwc2rd_wrapper, METH_VARARGS, NULL},
	 { "sip_iwc2rd_wrapper", _wrap_sip_iwc2rd_wrapper, METH_VARARGS, NULL},
	 { "tan_rd2iwc_wrapper", _wrap_tan_rd2iwc_wrapper, METH_VARARGS, NULL},
	 { "sip_rd2iwc_wrapper", _wrap_sip_rd2iwc_wrapper, METH_VARARGS, NULL},
	 { "tan_xy2rd_wrapper", _wrap_tan_xy2rd_wrapper, METH_VARARGS, NULL},
	 { "sip_xy2rd_wrapper", _wrap_sip_xy2rd_wrapper, METH_VARARGS, NULL},
	 { "anwcs_xy2rd_wrapper", _wrap_anwcs_xy2rd_wrapper, METH_VARARGS, NULL},
	 { "tan_wcs_resample", _wrap_tan_wcs_resample, METH_VARARGS, NULL},
	 { "tan_numpy_xyz2pixelxy", _wrap_tan_numpy_xyz2pixelxy, METH_VARARGS, NULL},
	 { "an_tally", _wrap_an_tally, METH_VARARGS, NULL},
	 { "fits_use_error_system", _wrap_fits_use_error_system, METH_NOARGS, NULL},
	 { "fits_to_string", _wrap_fits_to_string, METH_VARARGS, NULL},
	 { "fits_write_float_image", _wrap_fits_write_float_image, METH_VARARGS, NULL},
	 { "fits_write_u8_image", _wrap_fits_write_u8_image, METH_VARARGS, NULL},
	 { "fits_write_i16_image", _wrap_fits_write_i16_image, METH_VARARGS, NULL},
	 { "fits_get_header_for_image", _wrap_fits_get_header_for_image, METH_VARARGS, NULL},
	 { "fits_get_header_for_image2", _wrap_fits_get_header_for_image2, METH_VARARGS, NULL},
	 { "fits_get_header_for_image3", _wrap_fits_get_header_for_image3, METH_VARARGS, NULL},
	 { "fits_write_header", _wrap_fits_write_header, METH_VARARGS, NULL},
	 { "fits_write_header_and_image", _wrap_fits_write_header_and_image, METH_VARARGS, NULL},
	 { "fits_get_double_val", _wrap_fits_get_double_val, METH_VARARGS, NULL},
	 { "fits_is_table_header", _wrap_fits_is_table_header, METH_O, NULL},
	 { "fits_is_primary_header", _wrap_fits_is_primary_header, METH_O, NULL},
	 { "fits_copy_non_table_headers", _wrap_fits_copy_non_table_headers, METH_VARARGS, NULL},
	 { "fits_get_dupstring", _wrap_fits_get_dupstring, METH_VARARGS, NULL},
	 { "fits_get_long_string", _wrap_fits_get_long_string, METH_VARARGS, NULL},
	 { "fits_header_addf", _wrap_fits_header_addf, METH_VARARGS, NULL},
	 { "fits_header_addf_longstring", _wrap_fits_header_addf_longstring, METH_VARARGS, NULL},
	 { "fits_header_add_longstring_boilerplate", _wrap_fits_header_add_longstring_boilerplate, METH_O, NULL},
	 { "fits_header_modf", _wrap_fits_header_modf, METH_VARARGS, NULL},
	 { "fits_header_add_int", _wrap_fits_header_add_int, METH_VARARGS, NULL},
	 { "fits_header_add_double", _wrap_fits_header_add_double, METH_VARARGS, NULL},
	 { "fits_header_set_double", _wrap_fits_header_set_double, METH_VARARGS, NULL},
	 { "fits_header_set_int", _wrap_fits_header_set_int, METH_VARARGS, NULL},
	 { "fits_header_mod_int", _wrap_fits_header_mod_int, METH_VARARGS, NULL},
	 { "fits_header_mod_double", _wrap_fits_header_mod_double, METH_VARARGS, NULL},
	 { "fits_update_value", _wrap_fits_update_value, METH_VARARGS, NULL},
	 { "fits_copy_table", _wrap_fits_copy_table, METH_O, NULL},
	 { "an_fits_copy_header", _wrap_an_fits_copy_header, METH_VARARGS, NULL},
	 { "fits_copy_all_headers", _wrap_fits_copy_all_headers, METH_VARARGS, NULL},
	 { "fits_append_all_headers", _wrap_fits_append_all_headers, METH_VARARGS, NULL},
	 { "fits_add_args", _wrap_fits_add_args, METH_VARARGS, NULL},
	 { "fits_add_long_comment", _wrap_fits_add_long_comment, METH_VARARGS, NULL},
	 { "fits_append_long_comment", _wrap_fits_append_long_comment, METH_VARARGS, NULL},
	 { "fits_add_long_history", _wrap_fits_add_long_history, METH_VARARGS, NULL},
	 { "fits_blocks_needed", _wrap_fits_blocks_needed, METH_O, NULL},
	 { "fits_bytes_needed", _wrap_fits_bytes_needed, METH_O, NULL},
	 { "fits_pad_file_with", _wrap_fits_pad_file_with, METH_VARARGS, NULL},
	 { "fits_pad_file", _wrap_fits_pad_file, METH_O, NULL},
	 { "fits_pad_file_name", _wrap_fits_pad_file_name, METH_O, NULL},
	 { "fits_fill_endian_string", _wrap_fits_fill_endian_string, METH_O, NULL},
	 { "fits_get_endian_string", _wrap_fits_get_endian_string, METH_NOARGS, NULL},
	 { "fits_check_endian", _wrap_fits_check_endian, METH_O, NULL},
	 { "fits_check_uint_size", _wrap_fits_check_uint_size, METH_O, NULL},
	 { "fits_check_double_size", _wrap_fits_check_double_size, METH_O, NULL},
	 { "fits_add_endian", _wrap_fits_add_endian, METH_O, NULL},
	 { "fits_add_reverse_endian", _wrap_fits_add_reverse_endian, METH_O, NULL},
	 { "fits_mod_reverse_endian", _wrap_fits_mod_reverse_endian, METH_O, NULL},
	 { "fits_add_uint_size", _wrap_fits_add_uint_size, METH_O, NULL},
	 { "fits_add_double_size", _wrap_fits_add_double_size, METH_O, NULL},
	 { "fits_find_column", _wrap_fits_find_column, METH_VARARGS, NULL},
	 { "fits_find_table_column", _wrap_fits_find_table_column, METH_VARARGS, NULL},
	 { "fits_get_table_column", _wrap_fits_get_table_column, METH_VARARGS, NULL},
	 { "fits_add_column", _wrap_fits_add_column, METH_VARARGS, NULL},
	 { "fits_offset_of_column", _wrap_fits_offset_of_column, METH_VARARGS, NULL},
	 { "fits_write_data_A", _wrap_fits_write_data_A, METH_VARARGS, NULL},
	 { "fits_write_data_B", _wrap_fits_write_data_B, METH_VARARGS, NULL},
	 { "fits_write_data_D", _wrap_fits_write_data_D, METH_VARARGS, NULL},
	 { "fits_write_data_E", _wrap_fits_write_data_E, METH_VARARGS, NULL},
	 { "fits_write_data_I", _wrap_fits_write_data_I, METH_VARARGS, NULL},
	 { "fits_write_data_J", _wrap_fits_write_data_J, METH_VARARGS, NULL},
	 { "fits_write_data_K", _wrap_fits_write_data_K, METH_VARARGS, NULL},
	 { "fits_write_data_L", _wrap_fits_write_data_L, METH_VARARGS, NULL},
	 { "fits_write_data_X", _wrap_fits_write_data_X, METH_VARARGS, NULL},
	 { "fits_write_data", _wrap_fits_write_data, METH_VARARGS, NULL},
	 { "fits_write_data_array", _wrap_fits_write_data_array, METH_VARARGS, NULL},
	 { "collapsing_find_minlabel", _wrap_collapsing_find_minlabel, METH_VARARGS, NULL},
	 { "dfind2", _wrap_dfind2, METH_VARARGS, NULL},
	 { "dfind2_u8", _wrap_dfind2_u8, METH_VARARGS, NULL},
	 { "dselip", _wrap_dselip, METH_VARARGS, NULL},
	 { "dselip_cleanup", _wrap_dselip_cleanup, METH_NOARGS, NULL},
	 { "dsmooth", _wrap_dsmooth, METH_VARARGS, NULL},
	 { "dsmooth2", _wrap_dsmooth2, METH_VARARGS, NULL},
	 { "dsmooth2_u8", _wrap_dsmooth2_u8, METH_VARARGS, NULL},
	 { "dsmooth2_i16", _wrap_dsmooth2_i16, METH_VARARGS, NULL},
	 { "dobjects", _wrap_dobjects, METH_VARARGS, NULL},
	 { "dmask", _wrap_dmask, METH_VARARGS, NULL},
	 { "dpeaks", _wrap_dpeaks, METH_VARARGS, NULL},
	 { "dcen3x3", _wrap_dcen3x3, METH_O, NULL},
	 { "dsigma", _wrap_dsigma, METH_VARARGS, NULL},
	 { "dsigma_u8", _wrap_dsigma_u8, METH_VARARGS, NULL},
	 { "dmedsmooth", _wrap_dmedsmooth, METH_VARARGS, NULL},
	 { "dallpeaks", _wrap_dallpeaks, METH_VARARGS, NULL},
	 { "dallpeaks_u8", _wrap_dallpeaks_u8, METH_VARARGS, NULL},
	 { "dallpeaks_i16", _wrap_dallpeaks_i16, METH_VARARGS, NULL},
	 { "dcen3x3b", _wrap_dcen3x3b, METH_VARARGS, NULL},
	 { NULL, NULL, 0, NULL }
};

static PyMethodDef SwigMethods_proxydocs[] = {
	 { NULL, NULL, 0, NULL }
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (BEGIN) -------- */

static swig_type_info _swigt__p_FILE = {"_p_FILE", "FILE *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_PyArrayObject = {"_p_PyArrayObject", "PyArrayObject *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_10__double = {"_p_a_10__double", "double (*)[10]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_a_2__double = {"_p_a_2__double", "double (*)[2]", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_anqfits_t = {"_p_anqfits_t", "anqfits_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_anwcs_t = {"_p_anwcs_t", "struct anwcs_t *|anwcs_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_char = {"_p_char", "char *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_coadd_t = {"_p_coadd_t", "coadd_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_codetree_t = {"_p_codetree_t", "codetree_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_dl = {"_p_dl", "dl *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_double = {"_p_double", "double *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double = {"_p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double", "double (*)(double,double,float const *,float const *,int,int,double *,void *)|double (*)(double,double,number const *,number const *,int,int,double *,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_int64_t_p_void__int = {"_p_f_int64_t_p_void__int", "int (*)(int64_t,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_int_p_void__int = {"_p_f_int_p_void__int", "int (*)(int,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__sip_t_double_double_double_double_p_void__void = {"_p_f_p_q_const__sip_t_double_double_double_double_p_void__void", "void (*)(sip_t const *,double,double,double,double,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void = {"_p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void", "void (*)(struct anwcs_t const *,double,double,double,double,void *)|void (*)(anwcs_t const *,double,double,double,double,void *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__void_double_double_p_double_p_double__int = {"_p_f_p_q_const__void_double_double_p_double_p_double__int", "f_2to2i|int (*)(void const *,double,double,double *,double *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char = {"_p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char", "unsigned char (*)(void const *,double,double,double *,double *)|f_2to2ok", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_f_p_q_const__void_double_double_p_double_p_double__void = {"_p_f_p_q_const__void_double_double_p_double_p_double__void", "f_2to2|void (*)(void const *,double,double,double *,double *)", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_fitsbin_t = {"_p_fitsbin_t", "fitsbin_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_fitstable_t = {"_p_fitstable_t", "fitstable_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_float = {"_p_float", "number *|float *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_il = {"_p_il", "il *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_index_t = {"_p_index_t", "index_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int = {"_p_int", "int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int16_t = {"_p_int16_t", "int16_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int32_t = {"_p_int32_t", "int32_t *|dimage_label_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_int64_t = {"_p_int64_t", "int64_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_kdtree_t = {"_p_kdtree_t", "kdtree_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_lanczos_args_t = {"_p_lanczos_args_t", "lanczos_args_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_ll = {"_p_ll", "ll *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_off_t = {"_p_off_t", "off_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_char = {"_p_p_char", "char **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_double = {"_p_p_double", "double **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_int = {"_p_p_int", "int **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_p_qfits_header = {"_p_p_qfits_header", "qfits_header **", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_pl = {"_p_pl", "pl *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_qfits_header = {"_p_qfits_header", "qfits_header *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_qfits_table = {"_p_qfits_table", "qfits_table *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_qfitsdumper = {"_p_qfitsdumper", "qfitsdumper *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_quadfile_t = {"_p_quadfile_t", "quadfile_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_sip_t = {"_p_sip_t", "sip_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_sl = {"_p_sl", "sl *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_startree_t = {"_p_startree_t", "startree_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tan_t = {"_p_tan_t", "tan_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_tfits_type = {"_p_tfits_type", "tfits_type *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_uint32_t = {"_p_uint32_t", "uint32_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_uint8_t = {"_p_uint8_t", "uint8_t *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_char = {"_p_unsigned_char", "uchar *|unsigned char *|anbool *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_unsigned_int = {"_p_unsigned_int", "unsigned int *", 0, 0, (void*)0, 0};
static swig_type_info _swigt__p_void = {"_p_void", "void *", 0, 0, (void*)0, 0};

static swig_type_info *swig_type_initial[] = {
  &_swigt__p_FILE,
  &_swigt__p_PyArrayObject,
  &_swigt__p_a_10__double,
  &_swigt__p_a_2__double,
  &_swigt__p_anqfits_t,
  &_swigt__p_anwcs_t,
  &_swigt__p_char,
  &_swigt__p_coadd_t,
  &_swigt__p_codetree_t,
  &_swigt__p_dl,
  &_swigt__p_double,
  &_swigt__p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double,
  &_swigt__p_f_int64_t_p_void__int,
  &_swigt__p_f_int_p_void__int,
  &_swigt__p_f_p_q_const__sip_t_double_double_double_double_p_void__void,
  &_swigt__p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void,
  &_swigt__p_f_p_q_const__void_double_double_p_double_p_double__int,
  &_swigt__p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char,
  &_swigt__p_f_p_q_const__void_double_double_p_double_p_double__void,
  &_swigt__p_fitsbin_t,
  &_swigt__p_fitstable_t,
  &_swigt__p_float,
  &_swigt__p_il,
  &_swigt__p_index_t,
  &_swigt__p_int,
  &_swigt__p_int16_t,
  &_swigt__p_int32_t,
  &_swigt__p_int64_t,
  &_swigt__p_kdtree_t,
  &_swigt__p_lanczos_args_t,
  &_swigt__p_ll,
  &_swigt__p_off_t,
  &_swigt__p_p_char,
  &_swigt__p_p_double,
  &_swigt__p_p_int,
  &_swigt__p_p_qfits_header,
  &_swigt__p_pl,
  &_swigt__p_qfits_header,
  &_swigt__p_qfits_table,
  &_swigt__p_qfitsdumper,
  &_swigt__p_quadfile_t,
  &_swigt__p_sip_t,
  &_swigt__p_sl,
  &_swigt__p_startree_t,
  &_swigt__p_tan_t,
  &_swigt__p_tfits_type,
  &_swigt__p_uint32_t,
  &_swigt__p_uint8_t,
  &_swigt__p_unsigned_char,
  &_swigt__p_unsigned_int,
  &_swigt__p_void,
};

static swig_cast_info _swigc__p_FILE[] = {  {&_swigt__p_FILE, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_PyArrayObject[] = {  {&_swigt__p_PyArrayObject, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_10__double[] = {  {&_swigt__p_a_10__double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_a_2__double[] = {  {&_swigt__p_a_2__double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_anqfits_t[] = {  {&_swigt__p_anqfits_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_anwcs_t[] = {  {&_swigt__p_anwcs_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_char[] = {  {&_swigt__p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_coadd_t[] = {  {&_swigt__p_coadd_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_codetree_t[] = {  {&_swigt__p_codetree_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_dl[] = {  {&_swigt__p_dl, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_double[] = {  {&_swigt__p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double[] = {  {&_swigt__p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_int64_t_p_void__int[] = {  {&_swigt__p_f_int64_t_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_int_p_void__int[] = {  {&_swigt__p_f_int_p_void__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__sip_t_double_double_double_double_p_void__void[] = {  {&_swigt__p_f_p_q_const__sip_t_double_double_double_double_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void[] = {  {&_swigt__p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__void_double_double_p_double_p_double__int[] = {  {&_swigt__p_f_p_q_const__void_double_double_p_double_p_double__int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char[] = {  {&_swigt__p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_f_p_q_const__void_double_double_p_double_p_double__void[] = {  {&_swigt__p_f_p_q_const__void_double_double_p_double_p_double__void, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_fitsbin_t[] = {  {&_swigt__p_fitsbin_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_fitstable_t[] = {  {&_swigt__p_fitstable_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_float[] = {  {&_swigt__p_float, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_il[] = {  {&_swigt__p_il, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_index_t[] = {  {&_swigt__p_index_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int[] = {  {&_swigt__p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int16_t[] = {  {&_swigt__p_int16_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int32_t[] = {  {&_swigt__p_int32_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_int64_t[] = {  {&_swigt__p_int64_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_kdtree_t[] = {  {&_swigt__p_kdtree_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_lanczos_args_t[] = {  {&_swigt__p_lanczos_args_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_ll[] = {  {&_swigt__p_ll, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_off_t[] = {  {&_swigt__p_off_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_char[] = {  {&_swigt__p_p_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_double[] = {  {&_swigt__p_p_double, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_int[] = {  {&_swigt__p_p_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_p_qfits_header[] = {  {&_swigt__p_p_qfits_header, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_pl[] = {  {&_swigt__p_pl, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_qfits_header[] = {  {&_swigt__p_qfits_header, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_qfits_table[] = {  {&_swigt__p_qfits_table, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_qfitsdumper[] = {  {&_swigt__p_qfitsdumper, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_quadfile_t[] = {  {&_swigt__p_quadfile_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_sip_t[] = {  {&_swigt__p_sip_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_sl[] = {  {&_swigt__p_sl, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_startree_t[] = {  {&_swigt__p_startree_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tan_t[] = {  {&_swigt__p_tan_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_tfits_type[] = {  {&_swigt__p_tfits_type, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_uint32_t[] = {  {&_swigt__p_uint32_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_uint8_t[] = {  {&_swigt__p_uint8_t, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_char[] = {  {&_swigt__p_unsigned_char, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_unsigned_int[] = {  {&_swigt__p_unsigned_int, 0, 0, 0},{0, 0, 0, 0}};
static swig_cast_info _swigc__p_void[] = {  {&_swigt__p_void, 0, 0, 0},{0, 0, 0, 0}};

static swig_cast_info *swig_cast_initial[] = {
  _swigc__p_FILE,
  _swigc__p_PyArrayObject,
  _swigc__p_a_10__double,
  _swigc__p_a_2__double,
  _swigc__p_anqfits_t,
  _swigc__p_anwcs_t,
  _swigc__p_char,
  _swigc__p_coadd_t,
  _swigc__p_codetree_t,
  _swigc__p_dl,
  _swigc__p_double,
  _swigc__p_f_double_double_p_q_const__float_p_q_const__float_int_int_p_double_p_void__double,
  _swigc__p_f_int64_t_p_void__int,
  _swigc__p_f_int_p_void__int,
  _swigc__p_f_p_q_const__sip_t_double_double_double_double_p_void__void,
  _swigc__p_f_p_q_const__struct_anwcs_t_double_double_double_double_p_void__void,
  _swigc__p_f_p_q_const__void_double_double_p_double_p_double__int,
  _swigc__p_f_p_q_const__void_double_double_p_double_p_double__unsigned_char,
  _swigc__p_f_p_q_const__void_double_double_p_double_p_double__void,
  _swigc__p_fitsbin_t,
  _swigc__p_fitstable_t,
  _swigc__p_float,
  _swigc__p_il,
  _swigc__p_index_t,
  _swigc__p_int,
  _swigc__p_int16_t,
  _swigc__p_int32_t,
  _swigc__p_int64_t,
  _swigc__p_kdtree_t,
  _swigc__p_lanczos_args_t,
  _swigc__p_ll,
  _swigc__p_off_t,
  _swigc__p_p_char,
  _swigc__p_p_double,
  _swigc__p_p_int,
  _swigc__p_p_qfits_header,
  _swigc__p_pl,
  _swigc__p_qfits_header,
  _swigc__p_qfits_table,
  _swigc__p_qfitsdumper,
  _swigc__p_quadfile_t,
  _swigc__p_sip_t,
  _swigc__p_sl,
  _swigc__p_startree_t,
  _swigc__p_tan_t,
  _swigc__p_tfits_type,
  _swigc__p_uint32_t,
  _swigc__p_uint8_t,
  _swigc__p_unsigned_char,
  _swigc__p_unsigned_int,
  _swigc__p_void,
};


/* -------- TYPE CONVERSION AND EQUIVALENCE RULES (END) -------- */

static swig_const_info swig_const_table[] = {
{0, 0, 0, 0.0, 0, 0}};

#ifdef __cplusplus
}
#endif
/* -----------------------------------------------------------------------------
 * Type initialization:
 * This problem is tough by the requirement that no dynamic
 * memory is used. Also, since swig_type_info structures store pointers to
 * swig_cast_info structures and swig_cast_info structures store pointers back
 * to swig_type_info structures, we need some lookup code at initialization.
 * The idea is that swig generates all the structures that are needed.
 * The runtime then collects these partially filled structures.
 * The SWIG_InitializeModule function takes these initial arrays out of
 * swig_module, and does all the lookup, filling in the swig_module.types
 * array with the correct data and linking the correct swig_cast_info
 * structures together.
 *
 * The generated swig_type_info structures are assigned statically to an initial
 * array. We just loop through that array, and handle each type individually.
 * First we lookup if this type has been already loaded, and if so, use the
 * loaded structure instead of the generated one. Then we have to fill in the
 * cast linked list. The cast data is initially stored in something like a
 * two-dimensional array. Each row corresponds to a type (there are the same
 * number of rows as there are in the swig_type_initial array). Each entry in
 * a column is one of the swig_cast_info structures for that type.
 * The cast_initial array is actually an array of arrays, because each row has
 * a variable number of columns. So to actually build the cast linked list,
 * we find the array of casts associated with the type, and loop through it
 * adding the casts to the list. The one last trick we need to do is making
 * sure the type pointer in the swig_cast_info struct is correct.
 *
 * First off, we lookup the cast->type name to see if it is already loaded.
 * There are three cases to handle:
 *  1) If the cast->type has already been loaded AND the type we are adding
 *     casting info to has not been loaded (it is in this module), THEN we
 *     replace the cast->type pointer with the type pointer that has already
 *     been loaded.
 *  2) If BOTH types (the one we are adding casting info to, and the
 *     cast->type) are loaded, THEN the cast info has already been loaded by
 *     the previous module so we just ignore it.
 *  3) Finally, if cast->type has not already been loaded, then we add that
 *     swig_cast_info to the linked list (because the cast->type) pointer will
 *     be correct.
 * ----------------------------------------------------------------------------- */

#ifdef __cplusplus
extern "C" {
#if 0
} /* c-mode */
#endif
#endif

#if 0
#define SWIGRUNTIME_DEBUG
#endif


SWIGRUNTIME void
SWIG_InitializeModule(void *clientdata) {
  size_t i;
  swig_module_info *module_head, *iter;
  int init;
  
  /* check to see if the circular list has been setup, if not, set it up */
  if (swig_module.next==0) {
    /* Initialize the swig_module */
    swig_module.type_initial = swig_type_initial;
    swig_module.cast_initial = swig_cast_initial;
    swig_module.next = &swig_module;
    init = 1;
  } else {
    init = 0;
  }
  
  /* Try and load any already created modules */
  module_head = SWIG_GetModule(clientdata);
  if (!module_head) {
    /* This is the first module loaded for this interpreter */
    /* so set the swig module into the interpreter */
    SWIG_SetModule(clientdata, &swig_module);
  } else {
    /* the interpreter has loaded a SWIG module, but has it loaded this one? */
    iter=module_head;
    do {
      if (iter==&swig_module) {
        /* Our module is already in the list, so there's nothing more to do. */
        return;
      }
      iter=iter->next;
    } while (iter!= module_head);
    
    /* otherwise we must add our module into the list */
    swig_module.next = module_head->next;
    module_head->next = &swig_module;
  }
  
  /* When multiple interpreters are used, a module could have already been initialized in
       a different interpreter, but not yet have a pointer in this interpreter.
       In this case, we do not want to continue adding types... everything should be
       set up already */
  if (init == 0) return;
  
  /* Now work on filling in swig_module.types */
#ifdef SWIGRUNTIME_DEBUG
  printf("SWIG_InitializeModule: size %lu\n", (unsigned long)swig_module.size);
#endif
  for (i = 0; i < swig_module.size; ++i) {
    swig_type_info *type = 0;
    swig_type_info *ret;
    swig_cast_info *cast;
    
#ifdef SWIGRUNTIME_DEBUG
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
#endif
    
    /* if there is another module already loaded */
    if (swig_module.next != &swig_module) {
      type = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, swig_module.type_initial[i]->name);
    }
    if (type) {
      /* Overwrite clientdata field */
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: found type %s\n", type->name);
#endif
      if (swig_module.type_initial[i]->clientdata) {
        type->clientdata = swig_module.type_initial[i]->clientdata;
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: found and overwrite type %s \n", type->name);
#endif
      }
    } else {
      type = swig_module.type_initial[i];
    }
    
    /* Insert casting types */
    cast = swig_module.cast_initial[i];
    while (cast->type) {
      /* Don't need to add information already in the list */
      ret = 0;
#ifdef SWIGRUNTIME_DEBUG
      printf("SWIG_InitializeModule: look cast %s\n", cast->type->name);
#endif
      if (swig_module.next != &swig_module) {
        ret = SWIG_MangledTypeQueryModule(swig_module.next, &swig_module, cast->type->name);
#ifdef SWIGRUNTIME_DEBUG
        if (ret) printf("SWIG_InitializeModule: found cast %s\n", ret->name);
#endif
      }
      if (ret) {
        if (type == swig_module.type_initial[i]) {
#ifdef SWIGRUNTIME_DEBUG
          printf("SWIG_InitializeModule: skip old type %s\n", ret->name);
#endif
          cast->type = ret;
          ret = 0;
        } else {
          /* Check for casting already in the list */
          swig_cast_info *ocast = SWIG_TypeCheck(ret->name, type);
#ifdef SWIGRUNTIME_DEBUG
          if (ocast) printf("SWIG_InitializeModule: skip old cast %s\n", ret->name);
#endif
          if (!ocast) ret = 0;
        }
      }
      
      if (!ret) {
#ifdef SWIGRUNTIME_DEBUG
        printf("SWIG_InitializeModule: adding cast %s\n", cast->type->name);
#endif
        if (type->cast) {
          type->cast->prev = cast;
          cast->next = type->cast;
        }
        type->cast = cast;
      }
      cast++;
    }
    /* Set entry in modules->types array equal to the type */
    swig_module.types[i] = type;
  }
  swig_module.types[i] = 0;
  
#ifdef SWIGRUNTIME_DEBUG
  printf("**** SWIG_InitializeModule: Cast List ******\n");
  for (i = 0; i < swig_module.size; ++i) {
    int j = 0;
    swig_cast_info *cast = swig_module.cast_initial[i];
    printf("SWIG_InitializeModule: type %lu %s\n", (unsigned long)i, swig_module.type_initial[i]->name);
    while (cast->type) {
      printf("SWIG_InitializeModule: cast type %s\n", cast->type->name);
      cast++;
      ++j;
    }
    printf("---- Total casts: %d\n",j);
  }
  printf("**** SWIG_InitializeModule: Cast List ******\n");
#endif
}

/* This function will propagate the clientdata field of type to
* any new swig_type_info structures that have been added into the list
* of equivalent types.  It is like calling
* SWIG_TypeClientData(type, clientdata) a second time.
*/
SWIGRUNTIME void
SWIG_PropagateClientData(void) {
  size_t i;
  swig_cast_info *equiv;
  static int init_run = 0;
  
  if (init_run) return;
  init_run = 1;
  
  for (i = 0; i < swig_module.size; i++) {
    if (swig_module.types[i]->clientdata) {
      equiv = swig_module.types[i]->cast;
      while (equiv) {
        if (!equiv->converter) {
          if (equiv->type && !equiv->type->clientdata)
          SWIG_TypeClientData(equiv->type, swig_module.types[i]->clientdata);
        }
        equiv = equiv->next;
      }
    }
  }
}

#ifdef __cplusplus
#if 0
{
  /* c-mode */
#endif
}
#endif



#ifdef __cplusplus
extern "C" {
#endif
  
  /* Python-specific SWIG API */
#define SWIG_newvarlink()                             SWIG_Python_newvarlink()
#define SWIG_addvarlink(p, name, get_attr, set_attr)  SWIG_Python_addvarlink(p, name, get_attr, set_attr)
#define SWIG_InstallConstants(d, constants)           SWIG_Python_InstallConstants(d, constants)
  
  /* -----------------------------------------------------------------------------
   * global variable support code.
   * ----------------------------------------------------------------------------- */
  
  typedef struct swig_globalvar {
    char       *name;                  /* Name of global variable */
    PyObject *(*get_attr)(void);       /* Return the current value */
    int       (*set_attr)(PyObject *); /* Set the value */
    struct swig_globalvar *next;
  } swig_globalvar;
  
  typedef struct swig_varlinkobject {
    PyObject_HEAD
    swig_globalvar *vars;
  } swig_varlinkobject;
  
  SWIGINTERN PyObject *
  swig_varlink_repr(swig_varlinkobject *SWIGUNUSEDPARM(v)) {
#if PY_VERSION_HEX >= 0x03000000
    return PyUnicode_InternFromString("<Swig global variables>");
#else
    return PyString_FromString("<Swig global variables>");
#endif
  }
  
  SWIGINTERN PyObject *
  swig_varlink_str(swig_varlinkobject *v) {
#if PY_VERSION_HEX >= 0x03000000
    PyObject *str = PyUnicode_InternFromString("(");
    PyObject *tail;
    PyObject *joined;
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      tail = PyUnicode_FromString(var->name);
      joined = PyUnicode_Concat(str, tail);
      Py_DecRef(str);
      Py_DecRef(tail);
      str = joined;
      if (var->next) {
        tail = PyUnicode_InternFromString(", ");
        joined = PyUnicode_Concat(str, tail);
        Py_DecRef(str);
        Py_DecRef(tail);
        str = joined;
      }
    }
    tail = PyUnicode_InternFromString(")");
    joined = PyUnicode_Concat(str, tail);
    Py_DecRef(str);
    Py_DecRef(tail);
    str = joined;
#else
    PyObject *str = PyString_FromString("(");
    swig_globalvar *var;
    for (var = v->vars; var; var=var->next) {
      PyString_ConcatAndDel(&str,PyString_FromString(var->name));
      if (var->next) PyString_ConcatAndDel(&str,PyString_FromString(", "));
    }
    PyString_ConcatAndDel(&str,PyString_FromString(")"));
#endif
    return str;
  }
  
  SWIGINTERN void
  swig_varlink_dealloc(swig_varlinkobject *v) {
    swig_globalvar *var = v->vars;
    while (var) {
      swig_globalvar *n = var->next;
      free(var->name);
      free(var);
      var = n;
    }
  }
  
  SWIGINTERN PyObject *
  swig_varlink_getattr(swig_varlinkobject *v, char *n) {
    PyObject *res = NULL;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->get_attr)();
        break;
      }
      var = var->next;
    }
    if (res == NULL && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN int
  swig_varlink_setattr(swig_varlinkobject *v, char *n, PyObject *p) {
    int res = 1;
    swig_globalvar *var = v->vars;
    while (var) {
      if (strcmp(var->name,n) == 0) {
        res = (*var->set_attr)(p);
        break;
      }
      var = var->next;
    }
    if (res == 1 && !PyErr_Occurred()) {
      PyErr_Format(PyExc_AttributeError, "Unknown C global variable '%s'", n);
    }
    return res;
  }
  
  SWIGINTERN PyTypeObject*
  swig_varlink_type(void) {
    static char varlink__doc__[] = "Swig var link object";
    static PyTypeObject varlink_type;
    static int type_init = 0;
    if (!type_init) {
      const PyTypeObject tmp = {
#if PY_VERSION_HEX >= 0x03000000
        PyVarObject_HEAD_INIT(NULL, 0)
#else
        PyObject_HEAD_INIT(NULL)
        0,                                  /* ob_size */
#endif
        "swigvarlink",                      /* tp_name */
        sizeof(swig_varlinkobject),         /* tp_basicsize */
        0,                                  /* tp_itemsize */
        (destructor) swig_varlink_dealloc,  /* tp_dealloc */
        0,                                  /* tp_print */
        (getattrfunc) swig_varlink_getattr, /* tp_getattr */
        (setattrfunc) swig_varlink_setattr, /* tp_setattr */
        0,                                  /* tp_compare */
        (reprfunc) swig_varlink_repr,       /* tp_repr */
        0,                                  /* tp_as_number */
        0,                                  /* tp_as_sequence */
        0,                                  /* tp_as_mapping */
        0,                                  /* tp_hash */
        0,                                  /* tp_call */
        (reprfunc) swig_varlink_str,        /* tp_str */
        0,                                  /* tp_getattro */
        0,                                  /* tp_setattro */
        0,                                  /* tp_as_buffer */
        0,                                  /* tp_flags */
        varlink__doc__,                     /* tp_doc */
        0,                                  /* tp_traverse */
        0,                                  /* tp_clear */
        0,                                  /* tp_richcompare */
        0,                                  /* tp_weaklistoffset */
        0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0, /* tp_iter -> tp_weaklist */
        0,                                  /* tp_del */
        0,                                  /* tp_version_tag */
#if PY_VERSION_HEX >= 0x03040000
        0,                                  /* tp_finalize */
#endif
#if PY_VERSION_HEX >= 0x03080000
        0,                                  /* tp_vectorcall */
#endif
#if (PY_VERSION_HEX >= 0x03080000) && (PY_VERSION_HEX < 0x03090000)
        0,                                  /* tp_print */
#endif
#ifdef COUNT_ALLOCS
        0,                                  /* tp_allocs */
        0,                                  /* tp_frees */
        0,                                  /* tp_maxalloc */
        0,                                  /* tp_prev */
        0                                   /* tp_next */
#endif
      };
      varlink_type = tmp;
      type_init = 1;
      if (PyType_Ready(&varlink_type) < 0)
      return NULL;
    }
    return &varlink_type;
  }
  
  /* Create a variable linking object for use later */
  SWIGINTERN PyObject *
  SWIG_Python_newvarlink(void) {
    swig_varlinkobject *result = PyObject_NEW(swig_varlinkobject, swig_varlink_type());
    if (result) {
      result->vars = 0;
    }
    return ((PyObject*) result);
  }
  
  SWIGINTERN void 
  SWIG_Python_addvarlink(PyObject *p, const char *name, PyObject *(*get_attr)(void), int (*set_attr)(PyObject *p)) {
    swig_varlinkobject *v = (swig_varlinkobject *) p;
    swig_globalvar *gv = (swig_globalvar *) malloc(sizeof(swig_globalvar));
    if (gv) {
      size_t size = strlen(name)+1;
      gv->name = (char *)malloc(size);
      if (gv->name) {
        memcpy(gv->name, name, size);
        gv->get_attr = get_attr;
        gv->set_attr = set_attr;
        gv->next = v->vars;
      }
    }
    v->vars = gv;
  }
  
  SWIGINTERN PyObject *
  SWIG_globals(void) {
    static PyObject *globals = 0;
    if (!globals) {
      globals = SWIG_newvarlink();
    }
    return globals;
  }
  
  /* -----------------------------------------------------------------------------
   * constants/methods manipulation
   * ----------------------------------------------------------------------------- */
  
  /* Install Constants */
  SWIGINTERN void
  SWIG_Python_InstallConstants(PyObject *d, swig_const_info constants[]) {
    PyObject *obj = 0;
    size_t i;
    for (i = 0; constants[i].type; ++i) {
      switch(constants[i].type) {
      case SWIG_PY_POINTER:
        obj = SWIG_InternalNewPointerObj(constants[i].pvalue, *(constants[i]).ptype,0);
        break;
      case SWIG_PY_BINARY:
        obj = SWIG_NewPackedObj(constants[i].pvalue, constants[i].lvalue, *(constants[i].ptype));
        break;
      default:
        obj = 0;
        break;
      }
      if (obj) {
        PyDict_SetItemString(d, constants[i].name, obj);
        Py_DECREF(obj);
      }
    }
  }
  
  /* -----------------------------------------------------------------------------*/
  /* Fix SwigMethods to carry the callback ptrs when needed */
  /* -----------------------------------------------------------------------------*/
  
  SWIGINTERN void
  SWIG_Python_FixMethods(PyMethodDef *methods,
    swig_const_info *const_table,
    swig_type_info **types,
    swig_type_info **types_initial) {
    size_t i;
    for (i = 0; methods[i].ml_name; ++i) {
      const char *c = methods[i].ml_doc;
      if (!c) continue;
      c = strstr(c, "swig_ptr: ");
      if (c) {
        int j;
        swig_const_info *ci = 0;
        const char *name = c + 10;
        for (j = 0; const_table[j].type; ++j) {
          if (strncmp(const_table[j].name, name, 
              strlen(const_table[j].name)) == 0) {
            ci = &(const_table[j]);
            break;
          }
        }
        if (ci) {
          void *ptr = (ci->type == SWIG_PY_POINTER) ? ci->pvalue : 0;
          if (ptr) {
            size_t shift = (ci->ptype) - types;
            swig_type_info *ty = types_initial[shift];
            size_t ldoc = (c - methods[i].ml_doc);
            size_t lptr = strlen(ty->name)+2*sizeof(void*)+2;
            char *ndoc = (char*)malloc(ldoc + lptr + 10);
            if (ndoc) {
              char *buff = ndoc;
              memcpy(buff, methods[i].ml_doc, ldoc);
              buff += ldoc;
              memcpy(buff, "swig_ptr: ", 10);
              buff += 10;
              SWIG_PackVoidPtr(buff, ptr, ty->name, lptr);
              methods[i].ml_doc = ndoc;
            }
          }
        }
      }
    }
  } 
  
  /* -----------------------------------------------------------------------------
   * Method creation and docstring support functions
   * ----------------------------------------------------------------------------- */
  
  /* -----------------------------------------------------------------------------
   * Function to find the method definition with the correct docstring for the
   * proxy module as opposed to the low-level API
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyMethodDef *SWIG_PythonGetProxyDoc(const char *name) {
    /* Find the function in the modified method table */
    size_t offset = 0;
    int found = 0;
    while (SwigMethods_proxydocs[offset].ml_meth != NULL) {
      if (strcmp(SwigMethods_proxydocs[offset].ml_name, name) == 0) {
        found = 1;
        break;
      }
      offset++;
    }
    /* Use the copy with the modified docstring if available */
    return found ? &SwigMethods_proxydocs[offset] : NULL;
  }
  
  /* -----------------------------------------------------------------------------
   * Wrapper of PyInstanceMethod_New() used in Python 3
   * It is exported to the generated module, used for -fastproxy
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyObject *SWIG_PyInstanceMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
    if (PyCFunction_Check(func)) {
      PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
      PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
      if (ml)
      func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
    }
#if PY_VERSION_HEX >= 0x03000000
    return PyInstanceMethod_New(func);
#else
    return PyMethod_New(func, NULL, NULL);
#endif
  }
  
  /* -----------------------------------------------------------------------------
   * Wrapper of PyStaticMethod_New()
   * It is exported to the generated module, used for -fastproxy
   * ----------------------------------------------------------------------------- */
  
  SWIGINTERN PyObject *SWIG_PyStaticMethod_New(PyObject *SWIGUNUSEDPARM(self), PyObject *func) {
    if (PyCFunction_Check(func)) {
      PyCFunctionObject *funcobj = (PyCFunctionObject *)func;
      PyMethodDef *ml = SWIG_PythonGetProxyDoc(funcobj->m_ml->ml_name);
      if (ml)
      func = PyCFunction_NewEx(ml, funcobj->m_self, funcobj->m_module);
    }
    return PyStaticMethod_New(func);
  }
  
#ifdef __cplusplus
}
#endif

/* -----------------------------------------------------------------------------*
 *  Partial Init method
 * -----------------------------------------------------------------------------*/

#ifdef __cplusplus
extern "C"
#endif

SWIGEXPORT 
#if PY_VERSION_HEX >= 0x03000000
PyObject*
#else
void
#endif
SWIG_init(void) {
  PyObject *m, *d, *md, *globals;
  
#if PY_VERSION_HEX >= 0x03000000
  static struct PyModuleDef SWIG_module = {
    PyModuleDef_HEAD_INIT,
    SWIG_name,
    NULL,
    -1,
    SwigMethods,
    NULL,
    NULL,
    NULL,
    NULL
  };
#endif
  
#if defined(SWIGPYTHON_BUILTIN)
  static SwigPyClientData SwigPyObject_clientdata = {
    0, 0, 0, 0, 0, 0, 0
  };
  static PyGetSetDef this_getset_def = {
    (char *)"this", &SwigPyBuiltin_ThisClosure, NULL, NULL, NULL
  };
  static SwigPyGetSet thisown_getset_closure = {
    SwigPyObject_own,
    SwigPyObject_own
  };
  static PyGetSetDef thisown_getset_def = {
    (char *)"thisown", SwigPyBuiltin_GetterClosure, SwigPyBuiltin_SetterClosure, NULL, &thisown_getset_closure
  };
  PyTypeObject *builtin_pytype;
  int builtin_base_count;
  swig_type_info *builtin_basetype;
  PyObject *tuple;
  PyGetSetDescrObject *static_getset;
  PyTypeObject *metatype;
  PyTypeObject *swigpyobject;
  SwigPyClientData *cd;
  PyObject *public_interface, *public_symbol;
  PyObject *this_descr;
  PyObject *thisown_descr;
  PyObject *self = 0;
  int i;
  
  (void)builtin_pytype;
  (void)builtin_base_count;
  (void)builtin_basetype;
  (void)tuple;
  (void)static_getset;
  (void)self;
  
  /* Metaclass is used to implement static member variables */
  metatype = SwigPyObjectType();
  assert(metatype);
#endif
  
  (void)globals;
  
  /* Create singletons now to avoid potential deadlocks with multi-threaded usage after module initialization */
  SWIG_This();
  SWIG_Python_TypeCache();
  SwigPyPacked_type();
#ifndef SWIGPYTHON_BUILTIN
  SwigPyObject_type();
#endif
  
  /* Fix SwigMethods to carry the callback ptrs when needed */
  SWIG_Python_FixMethods(SwigMethods, swig_const_table, swig_types, swig_type_initial);
  
#if PY_VERSION_HEX >= 0x03000000
  m = PyModule_Create(&SWIG_module);
#else
  m = Py_InitModule(SWIG_name, SwigMethods);
#endif
  
  md = d = PyModule_GetDict(m);
  (void)md;
  
  SWIG_InitializeModule(0);
  
#ifdef SWIGPYTHON_BUILTIN
  swigpyobject = SwigPyObject_TypeOnce();
  
  SwigPyObject_stype = SWIG_MangledTypeQuery("_p_SwigPyObject");
  assert(SwigPyObject_stype);
  cd = (SwigPyClientData*) SwigPyObject_stype->clientdata;
  if (!cd) {
    SwigPyObject_stype->clientdata = &SwigPyObject_clientdata;
    SwigPyObject_clientdata.pytype = swigpyobject;
  } else if (swigpyobject->tp_basicsize != cd->pytype->tp_basicsize) {
    PyErr_SetString(PyExc_RuntimeError, "Import error: attempted to load two incompatible swig-generated modules.");
# if PY_VERSION_HEX >= 0x03000000
    return NULL;
# else
    return;
# endif
  }
  
  /* All objects have a 'this' attribute */
  this_descr = PyDescr_NewGetSet(SwigPyObject_type(), &this_getset_def);
  (void)this_descr;
  
  /* All objects have a 'thisown' attribute */
  thisown_descr = PyDescr_NewGetSet(SwigPyObject_type(), &thisown_getset_def);
  (void)thisown_descr;
  
  public_interface = PyList_New(0);
  public_symbol = 0;
  (void)public_symbol;
  
  PyDict_SetItemString(md, "__all__", public_interface);
  Py_DECREF(public_interface);
  for (i = 0; SwigMethods[i].ml_name != NULL; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, SwigMethods[i].ml_name);
  for (i = 0; swig_const_table[i].name != 0; ++i)
  SwigPyBuiltin_AddPublicSymbol(public_interface, swig_const_table[i].name);
#endif
  
  SWIG_InstallConstants(d,swig_const_table);
  
  
  // numpy
  import_array();
  
  SWIG_Python_SetConstant(d, "TRUE",SWIG_From_int((int)(1)));
  SWIG_Python_SetConstant(d, "FALSE",SWIG_From_int((int)(0)));
  SWIG_Python_SetConstant(d, "L",SWIG_From_int((int)(5)));
  SWIG_Python_SetConstant(d, "DEFAULT_INDEX_JITTER",SWIG_From_double((double)(1.0)));
  SWIG_Python_SetConstant(d, "INDEX_ONLY_LOAD_METADATA",SWIG_From_int((int)(2)));
  SWIG_Python_SetConstant(d, "AN_FILETYPE_CODETREE",SWIG_FromCharPtr("CKDT"));
  SWIG_Python_SetConstant(d, "CODETREE_NAME",SWIG_FromCharPtr("codes"));
  SWIG_Python_SetConstant(d, "AN_FILETYPE_STARTREE",SWIG_FromCharPtr("SKDT"));
  SWIG_Python_SetConstant(d, "AN_FILETYPE_TAGALONG",SWIG_FromCharPtr("TAGALONG"));
  SWIG_Python_SetConstant(d, "STARTREE_NAME",SWIG_FromCharPtr("stars"));
  SWIG_Python_SetConstant(d, "HP_MAX_INT_NSIDE",SWIG_From_int((int)(13377)));
  SWIG_Python_SetConstant(d, "ANWCS_TYPE_WCSLIB",SWIG_From_int((int)(1)));
  SWIG_Python_SetConstant(d, "ANWCS_TYPE_SIP",SWIG_From_int((int)(2)));
  SWIG_Python_SetConstant(d, "ANWCS_TYPE_WCSTOOLS",SWIG_From_int((int)(3)));
  SWIG_Python_SetConstant(d, "DIM_STARS",SWIG_From_int((int)(3)));
  SWIG_Python_SetConstant(d, "DIM_XY",SWIG_From_int((int)(2)));
  SWIG_Python_SetConstant(d, "DQMAX",SWIG_From_int((int)(5)));
  SWIG_Python_SetConstant(d, "DCMAX",SWIG_From_int((int)(6)));
  SWIG_Python_SetConstant(d, "ONE_OVER_SIXTY",SWIG_From_double((double)(0.016666666666666666)));
  SWIG_Python_SetConstant(d, "RAD_PER_DEG",SWIG_From_double((double)(0.017453292519943295)));
  SWIG_Python_SetConstant(d, "RAD_PER_ARCMIN",SWIG_From_double((double)(0.00029088820866572158)));
  SWIG_Python_SetConstant(d, "RAD_PER_ARCSEC",SWIG_From_double((double)(4.8481368110953598e-06)));
  SWIG_Python_SetConstant(d, "DEG_PER_RAD",SWIG_From_double((double)(57.295779513082323)));
  SWIG_Python_SetConstant(d, "DEG_PER_ARCMIN",SWIG_From_double((double)(0.016666666666666666)));
  SWIG_Python_SetConstant(d, "DEG_PER_ARCSEC",SWIG_From_double((double)(0.00027777777777777778)));
  SWIG_Python_SetConstant(d, "ARCMIN_PER_RAD",SWIG_From_double((double)(3437.7467707849396)));
  SWIG_Python_SetConstant(d, "ARCMIN_PER_DEG",SWIG_From_double((double)(60.0)));
  SWIG_Python_SetConstant(d, "ARCMIN_PER_ARCSEC",SWIG_From_double((double)(0.016666666666666666)));
  SWIG_Python_SetConstant(d, "ARCSEC_PER_RAD",SWIG_From_double((double)(206264.80624709636)));
  SWIG_Python_SetConstant(d, "ARCSEC_PER_DEG",SWIG_From_double((double)(3600.0)));
  SWIG_Python_SetConstant(d, "ARCSEC_PER_ARCMIN",SWIG_From_double((double)(60.0)));
  SWIG_Python_SetConstant(d, "MJD_JD_OFFSET",SWIG_From_double((double)(2400000.5)));
  SWIG_Python_SetConstant(d, "HELP_ERR",SWIG_From_int((int)(-101)));
  SWIG_Python_SetConstant(d, "OPT_ERR",SWIG_From_int((int)(-201)));
  SWIG_Python_SetConstant(d, "SIP_MAXORDER",SWIG_From_int((int)(10)));
#if PY_VERSION_HEX >= 0x03000000
  return m;
#else
  return;
#endif
}

