[Debian-astro-commits] [python-astropy] 01/05: New upstream version 1.3.3

Ole Streicher olebole at moszumanska.debian.org
Tue Jun 20 19:20:24 UTC 2017


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

olebole pushed a commit to branch master
in repository python-astropy.

commit 576ec0e8523561d8b8d6358defc7cc4edfd6cbf6
Author: Ole Streicher <olebole at debian.org>
Date:   Mon Jun 19 21:49:39 2017 +0200

    New upstream version 1.3.3
---
 CHANGES.rst                                        | 117 ++--
 PKG-INFO                                           |   2 +-
 astropy/_erfa/core.py                              |   6 +-
 astropy/constants/constant.py                      |   2 +-
 astropy/convolution/boundary_extend.c              |  81 ++-
 astropy/convolution/boundary_fill.c                |  81 ++-
 astropy/convolution/boundary_none.c                |  81 ++-
 astropy/convolution/boundary_wrap.c                |  81 ++-
 astropy/coordinates/name_resolve.py                |  28 +-
 astropy/coordinates/transformations.py             |   5 +-
 astropy/cosmology/scalar_inv_efuncs.c              |  57 +-
 astropy/cython_version.py                          |   2 +-
 astropy/io/ascii/cparser.c                         |  95 ++--
 astropy/io/ascii/ecsv.py                           |   4 +-
 astropy/io/fits/convenience.py                     |   8 +-
 astropy/io/fits/hdu/compressed.py                  |   8 +-
 astropy/io/fits/hdu/groups.py                      |  29 +-
 astropy/io/fits/hdu/image.py                       |  28 +-
 astropy/io/fits/py3compat.py                       |  11 +-
 astropy/io/fits/scripts/fitsheader.py              |  24 +-
 astropy/io/fits/src/compressionmodule.c            |   3 +-
 astropy/io/fits/tests/test_convenience.py          |  35 +-
 astropy/io/fits/tests/test_header.py               |  28 +
 astropy/io/fits/tests/test_image.py                |  69 +++
 astropy/modeling/src/projections.c                 | 624 ++++++++++-----------
 .../lombscargle/implementations/cython_impl.c      |  85 ++-
 astropy/table/_column_mixins.c                     |  61 +-
 astropy/table/_np_utils.c                          |  81 ++-
 astropy/table/pprint.py                            |   2 +-
 astropy/table/tests/test_pprint.py                 |  10 +
 astropy/units/format/fits.py                       |  16 +-
 astropy/units/function/core.py                     |   2 +-
 astropy/units/quantity.py                          |  42 +-
 astropy/units/quantity_helper.py                   |  34 +-
 astropy/units/tests/test_format.py                 |   9 +-
 astropy/units/tests/test_quantity.py               |  36 ++
 astropy/units/tests/test_quantity_ufuncs.py        |  49 +-
 astropy/utils/iers/iers.py                         |   1 +
 astropy/utils/iers/tests/test_iers.py              |   7 +
 astropy/utils/introspection.py                     |   8 +
 astropy/utils/tests/test_introspection.py          |  25 +-
 astropy/version.py                                 |  10 +-
 astropy/visualization/interval.py                  |   8 +-
 astropy/visualization/tests/test_interval.py       |  17 +
 astropy/visualization/wcsaxes/core.py              |   8 +-
 astropy/visualization/wcsaxes/formatter_locator.py |  12 +
 astropy/visualization/wcsaxes/tests/datasets.py    |   3 +-
 astropy/visualization/wcsaxes/tests/test_images.py |  14 +
 astropy/visualization/wcsaxes/tests/test_misc.py   |  83 +++
 astropy/visualization/wcsaxes/ticklabels.py        |  17 +-
 docs/conf.py                                       |   6 +-
 docs/coordinates/angles.rst                        |   4 +-
 docs/credits.rst                                   |   3 +-
 docs/development/testguide.rst                     |  15 +-
 docs/development/workflow/git_links.inc            |   2 +-
 docs/development/workflow/known_projects.inc       |  30 +-
 docs/index.rst                                     |   6 +-
 docs/install.rst                                   |   2 +-
 docs/io/fits/usage/table.rst                       |   2 +-
 docs/io/misc.rst                                   |   6 +-
 docs/units/format.rst                              |   2 +-
 setup.py                                           |   2 +-
 62 files changed, 1439 insertions(+), 790 deletions(-)

diff --git a/CHANGES.rst b/CHANGES.rst
index 506fadd..6a4d28d 100644
--- a/CHANGES.rst
+++ b/CHANGES.rst
@@ -1,3 +1,70 @@
+1.3.3 (2017-05-29)
+------------------
+
+Bug Fixes
+^^^^^^^^^
+
+- ``astropy.coordinates``
+
+  - Fixed a bug where ``StaticMatrixTransform`` erroneously copied frame
+    attributes from the input coordinate to the output frame. In practice, this
+    didn't actually affect any transforms in Astropy but may change behavior for
+    users who explicitly used the ``StaticMatrixTransform`` in their own code.
+    [#6045]
+
+  - Fixed ``get_icrs_coordinates`` to loop through all the urls in case one
+    raises an exception. [#5864]
+
+- ``astropy.io.fits``
+
+  - Fix table header not written out properly when ``fits.writeto()``
+    convenience function is used. [#6042]
+
+  - Fix writing out read-only arrays. [#6036]
+
+  - Extension headers are written out properly when the ``fits.update()``
+    convenience function is used. [#6058]
+
+  - Angstrom, erg, G, and barn are no more reported as deprecated FITS units.
+    [#5929]
+
+- ``astropy.table``
+
+  - Fix problem with Table pprint/pformat raising an exception for
+    non-UTF-8 compliant bytestring data. [#6117]
+
+- ``astropy.units``
+
+  - Allow strings 'nan' and 'inf' as Quantity inputs. [#5958]
+
+  - Add support for ``positive`` and ``divmod`` ufuncs (new in numpy 1.13).
+    [#5998, #6020, #6116]
+
+- ``astropy.utils``
+
+  - On systems that do not have ``pkg_resources`` non-numerical additions to
+    version numbers like ``dev`` or ``rc1`` are stripped in ``minversion`` to
+    avoid a ``TypeError`` in ``distutils.version.LooseVersion`` [#5944]
+
+  - Fix ``auto_download`` setting ignored in ``Time.ut1``. [#6033]
+
+- ``astropy.visualization``
+
+  - Fix bug in ManualInterval which caused the limits to be returned incorrectly
+    if set to zero, and fix defaults for ManualInterval in the presence of NaNs.
+    [#6088]
+
+  - Get rid of warnings that occurred when slicing a cube due to the tick
+    locator trying to find ticks for the sliced axis. [#6104]
+
+  - Accept normal Matplotlib keyword arguments in set_xlabel and set_ylabel
+    functions. [#5686, #5692, #6060]
+
+  - Fix a bug that caused labels to be missing from frames with labels that
+    could change direction mid-axis, such as EllipticalFrame. Also ensure
+    that empty tick labels do not cause any warnings. [#6063]
+
+
 1.3.2 (2017-03-30)
 ------------------
 
@@ -1914,57 +1981,15 @@ Other Changes and Additions
   filtering mechanisms). [#3779]
 
 
-1.0.13 (unreleased)
+1.0.13 (2017-05-29)
 -------------------
 
-- ``astropy.config``
-
-- ``astropy.constants``
-
-- ``astropy.convolution``
-
-- ``astropy.coordinates``
-
-- ``astropy.cosmology``
-
-- ``astropy.extern``
-
-- ``astropy.io.ascii``
-
 - ``astropy.io.fits``
 
-- ``astropy.io.misc``
-
-- ``astropy.io.registry``
-
-- ``astropy.io.votable``
-
-- ``astropy.modeling``
-
-- ``astropy.nddata``
-
-- ``astropy.stats``
-
-- ``astropy.table``
-
-- ``astropy.tests``
-
-- ``astropy.time``
-
-- ``astropy.units``
-
-- ``astropy.utils``
-
-- ``astropy.visualization``
-
-- ``astropy.vo``
-
-- ``astropy.wcs``
-
-Other Changes and Additions
-^^^^^^^^^^^^^^^^^^^^^^^^^^^
+  - Fix use of quantize level parameter for ``CompImageHDU``. [#6029]
 
-- Nothing changed yet.
+  - Prevent crash when a header contains non-ASCII (e.g. UTF-8) characters, to
+    allow fixing the problematic cards. [#6084]
 
 
 1.0.12 (2017-03-05)
diff --git a/PKG-INFO b/PKG-INFO
index 40e6d9b..96e94b2 100644
--- a/PKG-INFO
+++ b/PKG-INFO
@@ -1,6 +1,6 @@
 Metadata-Version: 1.2
 Name: astropy
-Version: 1.3.2
+Version: 1.3.3
 Summary: Community-developed python astronomy tools
 Home-page: http://astropy.org
 Author: The Astropy Developers
diff --git a/astropy/_erfa/core.py b/astropy/_erfa/core.py
index e96acc8..a7e0c32 100644
--- a/astropy/_erfa/core.py
+++ b/astropy/_erfa/core.py
@@ -6882,7 +6882,7 @@ def pmsafe(ra1, dec1, pmr1, pmd1, px1, rv1, ep1a, ep1b, ep2a, ep2b):
         rv2_out = rv2_out.reshape(rv2_out.shape[1:])
 
     return ra2_out, dec2_out, pmr2_out, pmd2_out, px2_out, rv2_out
-STATUS_CODES['pmsafe'] = {0: 'no warnings or errors', 1: 'distance overridden (Note 6)', 2: 'excessive velocity (Note 7)', 4: "solution didn't converge (Note 8)", 'else': 'binary logical OR of the above warnings', -1: 'system error (should not occur)'}
+STATUS_CODES['pmsafe'] = {0: 'no warnings or errors', 1: 'distance overridden (Note 6)', 2: 'excessive velocity (Note 7)', 'else': 'binary logical OR of the above warnings', 4: "solution didn't converge (Note 8)", -1: 'system error (should not occur)'}
 
 
 
@@ -19267,7 +19267,7 @@ def starpv(ra, dec, pmr, pmd, px, rv):
         pv_out = pv_out.reshape(pv_out.shape[1:])
 
     return pv_out
-STATUS_CODES['starpv'] = {0: 'no warnings', 1: 'distance overridden (Note 6)', 2: 'excessive speed (Note 7)', 4: "solution didn't converge (Note 8)", 'else': 'binary logical OR of the above'}
+STATUS_CODES['starpv'] = {0: 'no warnings', 1: 'distance overridden (Note 6)', 2: 'excessive speed (Note 7)', 'else': 'binary logical OR of the above', 4: "solution didn't converge (Note 8)"}
 
 
 
@@ -20173,7 +20173,7 @@ def starpm(ra1, dec1, pmr1, pmd1, px1, rv1, ep1a, ep1b, ep2a, ep2b):
         rv2_out = rv2_out.reshape(rv2_out.shape[1:])
 
     return ra2_out, dec2_out, pmr2_out, pmd2_out, px2_out, rv2_out
-STATUS_CODES['starpm'] = {0: 'no warnings or errors', 1: 'distance overridden (Note 6)', 2: 'excessive velocity (Note 7)', 4: "solution didn't converge (Note 8)", 'else': 'binary logical OR of the above warnings', -1: 'system error (should not occur)'}
+STATUS_CODES['starpm'] = {0: 'no warnings or errors', 1: 'distance overridden (Note 6)', 2: 'excessive velocity (Note 7)', 'else': 'binary logical OR of the above warnings', 4: "solution didn't converge (Note 8)", -1: 'system error (should not occur)'}
 
 
 
diff --git a/astropy/constants/constant.py b/astropy/constants/constant.py
index 78293ab..3571a94 100644
--- a/astropy/constants/constant.py
+++ b/astropy/constants/constant.py
@@ -91,7 +91,7 @@ class Constant(Quantity):
         name_lower = name.lower()
         instances = Constant._registry.setdefault(name_lower, {})
         if system in instances:
-            warnings.warn('Constant {0!r} is already has a definition in the '
+            warnings.warn('Constant {0!r} already has a definition in the '
                           '{1!r} system'.format(name, system),
                           AstropyUserWarning)
         # By-pass Quantity initialization, since units may not yet be
diff --git a/astropy/convolution/boundary_extend.c b/astropy/convolution/boundary_extend.c
index 17a2328..64598fd 100644
--- a/astropy/convolution/boundary_extend.c
+++ b/astropy/convolution/boundary_extend.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -414,26 +443,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -9326,9 +9335,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = powf(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2f(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_float(a);
                 theta = atan2f(a.imag, a.real);
@@ -9473,9 +9490,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = pow(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_double(a);
                 theta = atan2(a.imag, a.real);
diff --git a/astropy/convolution/boundary_fill.c b/astropy/convolution/boundary_fill.c
index 1b1eda6..08530fb 100644
--- a/astropy/convolution/boundary_fill.c
+++ b/astropy/convolution/boundary_fill.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -414,26 +443,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -9516,9 +9525,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = powf(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2f(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_float(a);
                 theta = atan2f(a.imag, a.real);
@@ -9663,9 +9680,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = pow(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_double(a);
                 theta = atan2(a.imag, a.real);
diff --git a/astropy/convolution/boundary_none.c b/astropy/convolution/boundary_none.c
index 8bf69c7..2a151bc 100644
--- a/astropy/convolution/boundary_none.c
+++ b/astropy/convolution/boundary_none.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -414,26 +443,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -9100,9 +9109,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = powf(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2f(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_float(a);
                 theta = atan2f(a.imag, a.real);
@@ -9247,9 +9264,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = pow(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_double(a);
                 theta = atan2(a.imag, a.real);
diff --git a/astropy/convolution/boundary_wrap.c b/astropy/convolution/boundary_wrap.c
index cb23845..d40c516 100644
--- a/astropy/convolution/boundary_wrap.c
+++ b/astropy/convolution/boundary_wrap.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -414,26 +443,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -9406,9 +9415,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = powf(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2f(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_float(a);
                 theta = atan2f(a.imag, a.real);
@@ -9553,9 +9570,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = pow(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_double(a);
                 theta = atan2(a.imag, a.real);
diff --git a/astropy/coordinates/name_resolve.py b/astropy/coordinates/name_resolve.py
index 90d6d66..3c63a48 100644
--- a/astropy/coordinates/name_resolve.py
+++ b/astropy/coordinates/name_resolve.py
@@ -132,6 +132,7 @@ def get_icrs_coordinates(name):
             fmt_url = fmt_url.format(name=urllib.parse.quote(name), db=db)
             urls.append(fmt_url)
 
+    exceptions = []
     for url in urls:
         try:
             # Retrieve ascii name resolve data from CDS
@@ -139,27 +140,22 @@ def get_icrs_coordinates(name):
             resp_data = resp.read()
             break
         except urllib.error.URLError as e:
-            # This catches a timeout error, see:
-            #   http://stackoverflow.com/questions/2712524/handling-urllib2s-timeout-python
-            if isinstance(e.reason, socket.timeout):
-                # If it was a timeout, try with the next URL
-                continue
-            else:
-                raise NameResolveError(
-                    "Unable to retrieve coordinates for name '{0}'; "
-                    "connection timed out".format(name))
-        except socket.timeout:
+            exceptions.append(e)
+            continue
+        except socket.timeout as e:
             # There are some cases where urllib2 does not catch socket.timeout
             # especially while receiving response data on an already previously
             # working request
-            raise NameResolveError(
-                "Unable to retrieve coordinates for name '{0}'; connection "
-                "timed out".format(name))
+            exceptions.append(e)
+            continue
 
-    # All Sesame URL's timed out...
+    # All Sesame URL's failed...
     else:
-        raise NameResolveError("All Sesame queries timed out. Unable to "
-                               "retrieve coordinates.")
+        messages = ["{url}: {e.reason}".format(url=url, e=e)
+                    for url,e in zip(urls, exceptions)]
+        raise NameResolveError("All Sesame queries failed. Unable to "
+                               "retrieve coordinates. See errors per URL "
+                               "below: \n {}".format("\n".join(messages)))
 
     ra, dec = _parse_response(resp_data)
 
diff --git a/astropy/coordinates/transformations.py b/astropy/coordinates/transformations.py
index 87c5fc7..184c63d 100644
--- a/astropy/coordinates/transformations.py
+++ b/astropy/coordinates/transformations.py
@@ -763,10 +763,7 @@ class StaticMatrixTransform(CoordinateTransform):
             #think it has a valid distance
             newrep = newrep.represent_as(fromcoord.data.__class__)
 
-        frameattrs = dict([(attrnm, getattr(fromcoord, attrnm))
-                           for attrnm in self.overlapping_frame_attr_names])
-
-        return toframe.realize_frame(newrep, **frameattrs)
+        return toframe.realize_frame(newrep)
 
 
 class DynamicMatrixTransform(CoordinateTransform):
diff --git a/astropy/cosmology/scalar_inv_efuncs.c b/astropy/cosmology/scalar_inv_efuncs.c
index 6d5195b..8eb03a8 100644
--- a/astropy/cosmology/scalar_inv_efuncs.c
+++ b/astropy/cosmology/scalar_inv_efuncs.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -409,26 +438,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
diff --git a/astropy/cython_version.py b/astropy/cython_version.py
index ffb0b09..2cbaaf1 100644
--- a/astropy/cython_version.py
+++ b/astropy/cython_version.py
@@ -1,2 +1,2 @@
 # Generated file; do not modify
-cython_version = '0.25.1'
+cython_version = '0.25.2'
diff --git a/astropy/io/ascii/cparser.c b/astropy/io/ascii/cparser.c
index 52f5a51..c0cceed 100644
--- a/astropy/io/ascii/cparser.c
+++ b/astropy/io/ascii/cparser.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -414,26 +443,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -3542,7 +3551,7 @@ static PyObject *__pyx_gb_7astropy_2io_5ascii_7cparser_10FileString_10generator(
  */
     __pyx_cur_scope->__pyx_v_ptr = __pyx_cur_scope->__pyx_v_tmp;
   }
-  if (1); else __pyx_cur_scope = __pyx_cur_scope;
+  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
 
   /* "astropy/io/ascii/cparser.pyx":151
  *         return self.mmap[i]
@@ -7507,7 +7516,7 @@ static PyObject *__pyx_gb_7astropy_2io_5ascii_7cparser_7CParser_14_read_parallel
     __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (1); else __pyx_cur_scope = __pyx_cur_scope;
+  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
 
   /* function exit code */
   goto __pyx_L0;
@@ -7640,7 +7649,7 @@ static PyObject *__pyx_gb_7astropy_2io_5ascii_7cparser_7CParser_14_read_parallel
     __Pyx_DECREF(__pyx_t_4); __pyx_t_4 = 0;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (1); else __pyx_cur_scope = __pyx_cur_scope;
+  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
 
   /* function exit code */
   goto __pyx_L0;
@@ -7761,7 +7770,7 @@ static PyObject *__pyx_gb_7astropy_2io_5ascii_7cparser_7CParser_14_read_parallel
     goto __pyx_L0;
   }
   __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
-  if (1); else __pyx_cur_scope = __pyx_cur_scope;
+  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
 
   /* function exit code */
   goto __pyx_L0;
@@ -15609,7 +15618,7 @@ static PyObject *__pyx_gb_7astropy_2io_5ascii_7cparser_11_read_chunk_2generator4
     __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
   }
   __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
-  if (1); else __pyx_cur_scope = __pyx_cur_scope;
+  CYTHON_MAYBE_UNUSED_VAR(__pyx_cur_scope);
 
   /* function exit code */
   goto __pyx_L0;
@@ -26747,10 +26756,8 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P
     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
     PyObject *self = PyCFunction_GET_SELF(func);
-    PyObject *result;
-    int flags;
     assert(PyCFunction_Check(func));
-    assert(METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST));
+    assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
     assert(nargs >= 0);
     assert(nargs == 0 || args != NULL);
     /* _PyCFunction_FastCallDict() must not be called with an exception set,
@@ -29868,9 +29875,17 @@ bad:
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = powf(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2f(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_float(a);
                 theta = atan2f(a.imag, a.real);
@@ -30015,9 +30030,17 @@ bad:
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = pow(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_double(a);
                 theta = atan2(a.imag, a.real);
diff --git a/astropy/io/ascii/ecsv.py b/astropy/io/ascii/ecsv.py
index 095a7e0..e8e3dad 100644
--- a/astropy/io/ascii/ecsv.py
+++ b/astropy/io/ascii/ecsv.py
@@ -50,7 +50,7 @@ class EcsvHeader(basic.BasicHeader):
         for the *last* comment line as defining the column names.
         """
         if self.splitter.delimiter not in DELIMITERS:
-            raise ValueError('only space and comma are allowed for delimiter in ECVS format')
+            raise ValueError('only space and comma are allowed for delimiter in ECSV format')
 
         for col in self.cols:
             if len(getattr(col, 'shape', ())) > 1:
@@ -132,7 +132,7 @@ class EcsvHeader(basic.BasicHeader):
         if 'delimiter' in header:
             delimiter = header['delimiter']
             if delimiter not in DELIMITERS:
-                raise ValueError('only space and comma are allowed for delimiter in ECVS format')
+                raise ValueError('only space and comma are allowed for delimiter in ECSV format')
             self.splitter.delimiter = delimiter
             self.data.splitter.delimiter = delimiter
 
diff --git a/astropy/io/fits/convenience.py b/astropy/io/fits/convenience.py
index 4953fd3..31ddd7f 100644
--- a/astropy/io/fits/convenience.py
+++ b/astropy/io/fits/convenience.py
@@ -896,11 +896,11 @@ def _makehdu(data, header):
     if hdu.__class__ in (_BaseHDU, _ValidHDU):
         # The HDU type was unrecognized, possibly due to a
         # nonexistent/incomplete header
-        if ((isinstance(data, np.ndarray) and data.dtype.fields is not None)
-                or isinstance(data, np.recarray)):
-            hdu = BinTableHDU(data)
+        if ((isinstance(data, np.ndarray) and data.dtype.fields is not None) or
+                isinstance(data, np.recarray)):
+            hdu = BinTableHDU(data, header=header)
         elif isinstance(data, np.ndarray):
-            hdu = ImageHDU(data)
+            hdu = ImageHDU(data, header=header)
         else:
             raise KeyError('Data must be a numpy array.')
     return hdu
diff --git a/astropy/io/fits/hdu/compressed.py b/astropy/io/fits/hdu/compressed.py
index c8a3d93..e157024 100644
--- a/astropy/io/fits/hdu/compressed.py
+++ b/astropy/io/fits/hdu/compressed.py
@@ -1651,7 +1651,13 @@ class CompImageHDU(BinTableHDU):
             should_swap = not self.data.dtype.isnative
 
         if should_swap:
-            self.data.byteswap(True)
+
+            if self.data.flags.writeable:
+                self.data.byteswap(True)
+            else:
+                # For read-only arrays, there is no way around making
+                # a byteswapped copy of the data.
+                self.data = self.data.byteswap(False)
 
         try:
             nrows = self._header['NAXIS2']
diff --git a/astropy/io/fits/hdu/groups.py b/astropy/io/fits/hdu/groups.py
index 61e121c..1002a15 100644
--- a/astropy/io/fits/hdu/groups.py
+++ b/astropy/io/fits/hdu/groups.py
@@ -481,12 +481,18 @@ class GroupsHDU(PrimaryHDU, _TableLikeHDU):
                 should_swap = (byteorder in swap_types)
 
             if not fileobj.simulateonly:
+
                 if should_swap:
-                    output.byteswap(True)
-                    try:
-                        fileobj.writearray(output)
-                    finally:
+                    if output.flags.writeable:
                         output.byteswap(True)
+                        try:
+                            fileobj.writearray(output)
+                        finally:
+                            output.byteswap(True)
+                    else:
+                        # For read-only arrays, there is no way around making
+                        # a byteswapped copy of the data.
+                        fileobj.writearray(output.byteswap(False))
                 else:
                     fileobj.writearray(output)
 
@@ -518,7 +524,9 @@ class GroupsHDU(PrimaryHDU, _TableLikeHDU):
         """
 
         if self._has_data:
+
             # We have the data to be used.
+
             # Check the byte order of the data.  If it is little endian we
             # must swap it before calculating the datasum.
             # TODO: Maybe check this on a per-field basis instead of assuming
@@ -527,9 +535,16 @@ class GroupsHDU(PrimaryHDU, _TableLikeHDU):
                 self.data.dtype.fields[self.data.dtype.names[0]][0].str[0]
 
             if byteorder != '>':
-                byteswapped = True
-                d = self.data.byteswap(True)
-                d.dtype = d.dtype.newbyteorder('>')
+                if self.data.flags.writeable:
+                    byteswapped = True
+                    d = self.data.byteswap(True)
+                    d.dtype = d.dtype.newbyteorder('>')
+                else:
+                    # If the data is not writeable, we just make a byteswapped
+                    # copy and don't bother changing it back after
+                    d = self.data.byteswap(False)
+                    d.dtype = d.dtype.newbyteorder('>')
+                    byteswapped = False
             else:
                 byteswapped = False
                 d = self.data
diff --git a/astropy/io/fits/hdu/image.py b/astropy/io/fits/hdu/image.py
index 1bc5bab..abaa7c1 100644
--- a/astropy/io/fits/hdu/image.py
+++ b/astropy/io/fits/hdu/image.py
@@ -630,12 +630,18 @@ class _ImageBaseHDU(_ValidHDU):
                 should_swap = (byteorder in swap_types)
 
             if not fileobj.simulateonly:
+
                 if should_swap:
-                    output.byteswap(True)
-                    try:
-                        fileobj.writearray(output)
-                    finally:
+                    if output.flags.writeable:
                         output.byteswap(True)
+                        try:
+                            fileobj.writearray(output)
+                        finally:
+                            output.byteswap(True)
+                    else:
+                        # For read-only arrays, there is no way around making
+                        # a byteswapped copy of the data.
+                        fileobj.writearray(output.byteswap(False))
                 else:
                     fileobj.writearray(output)
 
@@ -800,6 +806,7 @@ class _ImageBaseHDU(_ValidHDU):
         """
 
         if self._has_data:
+
             # We have the data to be used.
             d = self.data
 
@@ -812,9 +819,16 @@ class _ImageBaseHDU(_ValidHDU):
             # Check the byte order of the data.  If it is little endian we
             # must swap it before calculating the datasum.
             if d.dtype.str[0] != '>':
-                byteswapped = True
-                d = d.byteswap(True)
-                d.dtype = d.dtype.newbyteorder('>')
+                if d.flags.writeable:
+                    byteswapped = True
+                    d = d.byteswap(True)
+                    d.dtype = d.dtype.newbyteorder('>')
+                else:
+                    # If the data is not writeable, we just make a byteswapped
+                    # copy and don't bother changing it back after
+                    d = d.byteswap(False)
+                    d.dtype = d.dtype.newbyteorder('>')
+                    byteswapped = False
             else:
                 byteswapped = False
 
diff --git a/astropy/io/fits/py3compat.py b/astropy/io/fits/py3compat.py
index 04d9996..f9029a8 100644
--- a/astropy/io/fits/py3compat.py
+++ b/astropy/io/fits/py3compat.py
@@ -1,7 +1,9 @@
 # Licensed under a 3-clause BSD style license - see PYFITS.rst
 
+import warnings
 from ...extern import six
 from ...utils.compat.numpycompat import NUMPY_LT_1_10
+from ...utils.exceptions import AstropyUserWarning
 
 if not six.PY2:
     # Stuff to do if Python 3
@@ -27,7 +29,14 @@ if not six.PY2:
 
     def decode_ascii(s):
         if isinstance(s, bytes):
-            return s.decode('ascii')
+            try:
+                return s.decode('ascii')
+            except UnicodeDecodeError:
+                warnings.warn('non-ASCII characters are present in the FITS '
+                              'file header and have been replaced by "?" '
+                              'characters', AstropyUserWarning)
+                s = s.decode('ascii', errors='replace')
+                return s.replace(u'\ufffd', '?')
         elif (isinstance(s, numpy.ndarray) and
               issubclass(s.dtype.type, numpy.bytes_)):
             # np.char.encode/decode annoyingly don't preserve the type of the
diff --git a/astropy/io/fits/scripts/fitsheader.py b/astropy/io/fits/scripts/fitsheader.py
index 6fad2e3..be3b7de 100644
--- a/astropy/io/fits/scripts/fitsheader.py
+++ b/astropy/io/fits/scripts/fitsheader.py
@@ -42,14 +42,11 @@ header that describes the compression.
 With Astropy installed, please run ``fitsheader --help`` to see the full usage
 documentation.
 """
-from __future__ import (absolute_import, division, print_function,
-                        unicode_literals)
+from __future__ import absolute_import, division, print_function
 
 import sys
 
 from ... import fits
-
-from .... import table
 from .... import log
 from ....extern.six.moves import range
 
@@ -135,17 +132,14 @@ class HeaderFormatter(object):
         for idx, hdu in enumerate(hdukeys):
             try:
                 cards = self._get_cards(hdu, keywords, compressed)
-
-                if idx > 0:  # Separate HDUs by a blank line
-                    result.append('\n')
-                result.append('# HDU {hdu} in {filename}:\n'.format(
-                              filename=self.filename,
-                              hdu=hdu
-                              ))
-                result.append('{0}\n'.format('\n'.join([str(c)
-                                                        for c in cards])))
             except ExtensionNotFoundException:
-                pass
+                continue
+
+            if idx > 0:  # Separate HDUs by a blank line
+                result.append('\n')
+            result.append('# HDU {} in {}:\n'.format(hdu, self.filename))
+            for c in cards:
+                result.append('{}\n'.format(c))
         return ''.join(result)
 
     def _get_cards(self, hdukey, keywords, compressed):
@@ -226,6 +220,7 @@ class TableHeaderFormatter(HeaderFormatter):
                 pass
 
         if tablerows:
+            from .... import table
             return table.Table(tablerows)
         return None
 
@@ -276,6 +271,7 @@ def print_headers_as_table(args):
     elif len(tables) == 1:
         resulting_table = tables[0]
     else:
+        from .... import table
         resulting_table = table.vstack(tables)
     # Print the string representation of the concatenated table
     resulting_table.write(sys.stdout, format=args.table)
diff --git a/astropy/io/fits/src/compressionmodule.c b/astropy/io/fits/src/compressionmodule.c
index d2137b4..ae4bff5 100644
--- a/astropy/io/fits/src/compressionmodule.c
+++ b/astropy/io/fits/src/compressionmodule.c
@@ -629,7 +629,8 @@ void configure_compression(fitsfile* fileptr, PyObject* header) {
                 get_header_float(header, keyword, &(Fptr->hcomp_scale),
                                  DEFAULT_HCOMP_SCALE);
             }
-        } else if (Fptr->zbitpix < 0 && 0 == strcmp(zname, "NOISEBIT")) {
+        }
+        if (Fptr->zbitpix < 0 && 0 == strcmp(zname, "NOISEBIT")) {
              get_header_float(header, keyword, &(Fptr->quantize_level),
                               DEFAULT_QUANTIZE_LEVEL);
              if (Fptr->quantize_level == 0.0) {
diff --git a/astropy/io/fits/tests/test_convenience.py b/astropy/io/fits/tests/test_convenience.py
index d204265..09a9823 100644
--- a/astropy/io/fits/tests/test_convenience.py
+++ b/astropy/io/fits/tests/test_convenience.py
@@ -43,7 +43,7 @@ class TestConvenience(FitsTestCase):
         header = fits.getheader(f)
         assert not f.closed
 
-    def test_table_to_hdu(self, tmpdir):
+    def test_table_to_hdu(self):
         table = Table([[1, 2, 3], ['a', 'b', 'c'], [2.3, 4.5, 6.7]],
                       names=['a', 'b', 'c'], dtype=['i', 'U1', 'f'])
         table['a'].unit = 'm/s'
@@ -56,5 +56,36 @@ class TestConvenience(FitsTestCase):
         assert hdu.header.index('TUNIT1') < hdu.header.index('TTYPE2')
 
         assert isinstance(hdu, fits.BinTableHDU)
-        filename = str(tmpdir.join('test_table_to_hdu.fits'))
+        filename = self.temp('test_table_to_hdu.fits')
         hdu.writeto(filename, overwrite=True)
+
+    def test_table_writeto_header(self):
+        """
+        Regression test for https://github.com/astropy/astropy/issues/5988
+        """
+        data = np.zeros((5, ), dtype=[('x', np.float), ('y', np.int)])
+        h_in = fits.Header()
+        h_in['ANSWER'] = (42.0, 'LTU&E')
+        filename = self.temp('tabhdr42.fits')
+        fits.writeto(filename, data=data, header=h_in, overwrite=True)
+        h_out = fits.getheader(filename, ext=1)
+        assert h_out['ANSWER'] == 42
+
+    def test_image_extension_update_header(self):
+        """
+        Test that _makehdu correctly includes the header. For example in the
+        fits.update convenience function.
+        """
+        filename = self.temp('twoextension.fits')
+
+        hdus = [fits.PrimaryHDU(np.zeros((10, 10))),
+                fits.ImageHDU(np.zeros((10, 10)))]
+
+        fits.HDUList(hdus).writeto(filename)
+
+        fits.update(filename,
+                    np.zeros((10, 10)),
+                    header=fits.Header([('WHAT', 100)]),
+                    ext=1)
+        h_out = fits.getheader(filename, ext=1)
+        assert h_out['WHAT'] == 100
diff --git a/astropy/io/fits/tests/test_header.py b/astropy/io/fits/tests/test_header.py
index 49d0166..7f5829c 100644
--- a/astropy/io/fits/tests/test_header.py
+++ b/astropy/io/fits/tests/test_header.py
@@ -1653,6 +1653,34 @@ class TestHeaderFunctions(FitsTestCase):
             assert str(w[0].message).startswith(
                 "Missing padding to end of the FITS block")
 
+    @pytest.mark.skipif('six.PY2')
+    def test_invalid_characters(self):
+        """
+        Test header with invalid characters
+        """
+
+        # Generate invalid file with non-ASCII character
+        h = fits.Header()
+        h['FOO'] = 'BAR'
+        h['COMMENT'] = 'hello'
+        hdul = fits.PrimaryHDU(header=h, data=np.arange(5))
+        hdul.writeto(self.temp('test.fits'))
+
+        with open(self.temp('test.fits'), 'rb') as f:
+            out = f.read()
+        out = out.replace(b'hello', u'héllo'.encode('latin1'))
+        out = out.replace(b'BAR', u'BÀR'.encode('latin1'))
+        with open(self.temp('test2.fits'), 'wb') as f2:
+            f2.write(out)
+
+        with catch_warnings() as w:
+            h = fits.getheader(self.temp('test2.fits'))
+            assert h['FOO'] ==  'B?R'
+            assert h['COMMENT'] ==  'h?llo'
+            assert len(w) == 1
+            assert str(w[0].message).startswith(
+                "non-ASCII characters are present in the FITS file")
+
     def test_unnecessary_move(self):
         """
         Regression test for https://aeon.stsci.edu/ssb/trac/pyfits/ticket/125
diff --git a/astropy/io/fits/tests/test_image.py b/astropy/io/fits/tests/test_image.py
index 860d79f..8a1d16a 100644
--- a/astropy/io/fits/tests/test_image.py
+++ b/astropy/io/fits/tests/test_image.py
@@ -10,6 +10,7 @@ import time
 import warnings
 
 import numpy as np
+from numpy.testing import assert_equal
 
 from ....extern.six.moves import range
 from ....io import fits
@@ -21,6 +22,13 @@ from .test_table import comparerecords
 
 from . import FitsTestCase
 
+try:
+    import scipy  # pylint: disable=W0611
+except ImportError:
+    HAS_SCIPY = False
+else:
+    HAS_SCIPY = True
+
 
 class TestImageFunctions(FitsTestCase):
     def test_constructor_name_arg(self):
@@ -1081,6 +1089,36 @@ class TestCompressedImage(FitsTestCase):
             assert fd[1].header['NAXIS2'] == chdu.header['NAXIS2']
             assert fd[1].header['BITPIX'] == chdu.header['BITPIX']
 
+    @pytest.mark.skipif('not HAS_SCIPY')
+    def test_comp_image_quantize_level(self):
+        """
+        Regression test for https://github.com/astropy/astropy/issues/5969
+
+        Test that quantize_level is used.
+
+        """
+        import scipy.misc
+        np.random.seed(42)
+        data = scipy.misc.ascent() + np.random.randn(512, 512)*10
+
+        fits.ImageHDU(data).writeto(self.temp('im1.fits'))
+        fits.CompImageHDU(data, compression_type='RICE_1', quantize_method=1,
+                          quantize_level=-1, dither_seed=5)\
+            .writeto(self.temp('im2.fits'))
+        fits.CompImageHDU(data, compression_type='RICE_1', quantize_method=1,
+                          quantize_level=-100, dither_seed=5)\
+            .writeto(self.temp('im3.fits'))
+
+        im1 = fits.getdata(self.temp('im1.fits'))
+        im2 = fits.getdata(self.temp('im2.fits'))
+        im3 = fits.getdata(self.temp('im3.fits'))
+
+        assert not np.array_equal(im2, im3)
+        assert np.isclose(np.min(im1 - im2), -0.5, atol=1e-3)
+        assert np.isclose(np.max(im1 - im2), 0.5, atol=1e-3)
+        assert np.isclose(np.min(im1 - im3), -50, atol=1e-1)
+        assert np.isclose(np.max(im1 - im3), 50, atol=1e-1)
+
     @ignore_warnings(AstropyPendingDeprecationWarning)
     def test_comp_image_hcompression_1_invalid_data(self):
         """
@@ -1725,3 +1763,34 @@ def test_bzero_mishandled_info(tmpdir):
     hdu.writeto(filename, clobber=True)
     hdul = fits.open(filename)
     hdul.info()
+
+
+def test_image_write_readonly(tmpdir):
+
+    # Regression test to make sure that we can write out read-only arrays (#5512)
+
+    x = np.array([1,2,3])
+    x.setflags(write=False)
+    ghdu = fits.ImageHDU(data=x)
+    ghdu.add_datasum()
+
+    filename = tmpdir.join('test.fits').strpath
+
+    ghdu.writeto(filename)
+
+    with fits.open(filename) as hdulist:
+        assert_equal(hdulist[1].data, [1, 2, 3])
+
+    # Same for compressed HDU
+    x = np.array([1.0, 2.0, 3.0])
+    x.setflags(write=False)
+    ghdu = fits.CompImageHDU(data=x)
+    # add_datasum does not work for CompImageHDU
+    # ghdu.add_datasum()
+
+    filename = tmpdir.join('test2.fits').strpath
+
+    ghdu.writeto(filename)
+
+    with fits.open(filename) as hdulist:
+        assert_equal(hdulist[1].data, [1.0, 2.0, 3.0])
diff --git a/astropy/modeling/src/projections.c b/astropy/modeling/src/projections.c
index 003aab6..63d292e 100644
--- a/astropy/modeling/src/projections.c
+++ b/astropy/modeling/src/projections.c
@@ -141,7 +141,7 @@ static PyObject *do_work(struct prjprm *prj, PyObject *in[2],
 
 
 static PyObject*
-Py_sflx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_ceax2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -151,20 +151,24 @@ Py_sflx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":sflx2s",
+                        "d" 
+                        ":ceax2s",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, sflset, sflx2s);
+  return do_work(&prj, in, ceaset, ceax2s);
 }
 
 
 static PyObject*
-Py_sfls2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_ceas2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -174,22 +178,26 @@ Py_sfls2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":sfls2x",
+                        "d" 
+                        ":ceas2x",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, sflset, sfls2x);
+  return do_work(&prj, in, ceaset, ceas2x);
 }
 
 
 
 
 static PyObject*
-Py_aitx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_parx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -200,19 +208,19 @@ Py_aitx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":aitx2s",
+                        ":parx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, aitset, aitx2s);
+  return do_work(&prj, in, parset, parx2s);
 }
 
 
 static PyObject*
-Py_aits2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_pars2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -223,21 +231,21 @@ Py_aits2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":aits2x",
+                        ":pars2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, aitset, aits2x);
+  return do_work(&prj, in, parset, pars2x);
 }
 
 
 
 
 static PyObject*
-Py_stgx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_merx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -248,19 +256,19 @@ Py_stgx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":stgx2s",
+                        ":merx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, stgset, stgx2s);
+  return do_work(&prj, in, merset, merx2s);
 }
 
 
 static PyObject*
-Py_stgs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_mers2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -271,21 +279,21 @@ Py_stgs2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":stgs2x",
+                        ":mers2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, stgset, stgs2x);
+  return do_work(&prj, in, merset, mers2x);
 }
 
 
 
 
 static PyObject*
-Py_molx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_stgx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -296,19 +304,19 @@ Py_molx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":molx2s",
+                        ":stgx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, molset, molx2s);
+  return do_work(&prj, in, stgset, stgx2s);
 }
 
 
 static PyObject*
-Py_mols2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_stgs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -319,21 +327,21 @@ Py_mols2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":mols2x",
+                        ":stgs2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, molset, mols2x);
+  return do_work(&prj, in, stgset, stgs2x);
 }
 
 
 
 
 static PyObject*
-Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sinx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -343,8 +351,8 @@ Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" "d" 
-                        ":szpx2s",
+                        "d" "d" 
+                        ":sinx2s",
                         &in[0], &in[1]
                         
                         ,
@@ -353,22 +361,18 @@ Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
                         
                         
                         &prj.pv[1 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[2 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, szpset, szpx2s);
+  return do_work(&prj, in, sinset, sinx2s);
 }
 
 
 static PyObject*
-Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sins2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -378,8 +382,8 @@ Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" "d" 
-                        ":szps2x",
+                        "d" "d" 
+                        ":sins2x",
                         &in[0], &in[1]
                         
                         ,
@@ -388,24 +392,20 @@ Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
                         
                         
                         &prj.pv[1 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[2 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, szpset, szps2x);
+  return do_work(&prj, in, sinset, sins2x);
 }
 
 
 
 
 static PyObject*
-Py_parx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_tanx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -416,19 +416,19 @@ Py_parx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":parx2s",
+                        ":tanx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, parset, parx2s);
+  return do_work(&prj, in, tanset, tanx2s);
 }
 
 
 static PyObject*
-Py_pars2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_tans2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -439,21 +439,21 @@ Py_pars2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":pars2x",
+                        ":tans2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, parset, pars2x);
+  return do_work(&prj, in, tanset, tans2x);
 }
 
 
 
 
 static PyObject*
-Py_ceax2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_pcox2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -463,24 +463,20 @@ Py_ceax2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" 
-                        ":ceax2s",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
                         
+                        ":pcox2s",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, ceaset, ceax2s);
+  return do_work(&prj, in, pcoset, pcox2s);
 }
 
 
 static PyObject*
-Py_ceas2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_pcos2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -490,26 +486,22 @@ Py_ceas2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" 
-                        ":ceas2x",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
                         
+                        ":pcos2x",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, ceaset, ceas2x);
+  return do_work(&prj, in, pcoset, pcos2x);
 }
 
 
 
 
 static PyObject*
-Py_cscx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_xphx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -520,19 +512,19 @@ Py_cscx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":cscx2s",
+                        ":xphx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, cscset, cscx2s);
+  return do_work(&prj, in, xphset, xphx2s);
 }
 
 
 static PyObject*
-Py_cscs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_xphs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -543,21 +535,21 @@ Py_cscs2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":cscs2x",
+                        ":xphs2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, cscset, cscs2x);
+  return do_work(&prj, in, xphset, xphs2x);
 }
 
 
 
 
 static PyObject*
-Py_copx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_zeax2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -567,28 +559,20 @@ Py_copx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":copx2s",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
+                        ":zeax2s",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, copset, copx2s);
+  return do_work(&prj, in, zeaset, zeax2s);
 }
 
 
 static PyObject*
-Py_cops2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_zeas2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -598,30 +582,22 @@ Py_cops2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":cops2x",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
+                        ":zeas2x",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, copset, cops2x);
+  return do_work(&prj, in, zeaset, zeas2x);
 }
 
 
 
 
 static PyObject*
-Py_sinx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_aitx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -631,28 +607,20 @@ Py_sinx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":sinx2s",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
+                        ":aitx2s",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, sinset, sinx2s);
+  return do_work(&prj, in, aitset, aitx2s);
 }
 
 
 static PyObject*
-Py_sins2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_aits2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -662,30 +630,22 @@ Py_sins2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":sins2x",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
+                        ":aits2x",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, sinset, sins2x);
+  return do_work(&prj, in, aitset, aits2x);
 }
 
 
 
 
 static PyObject*
-Py_arcx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_qscx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -696,19 +656,19 @@ Py_arcx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":arcx2s",
+                        ":qscx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, arcset, arcx2s);
+  return do_work(&prj, in, qscset, qscx2s);
 }
 
 
 static PyObject*
-Py_arcs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_qscs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -719,21 +679,21 @@ Py_arcs2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":arcs2x",
+                        ":qscs2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, arcset, arcs2x);
+  return do_work(&prj, in, qscset, qscs2x);
 }
 
 
 
 
 static PyObject*
-Py_azpx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_coox2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -744,7 +704,7 @@ Py_azpx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         "d" "d" 
-                        ":azpx2s",
+                        ":coox2s",
                         &in[0], &in[1]
                         
                         ,
@@ -759,12 +719,12 @@ Py_azpx2s(PyObject* __, PyObject* args, PyObject* kwds)
     return NULL;
   }
 
-  return do_work(&prj, in, azpset, azpx2s);
+  return do_work(&prj, in, cooset, coox2s);
 }
 
 
 static PyObject*
-Py_azps2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_coos2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -775,7 +735,7 @@ Py_azps2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         "d" "d" 
-                        ":azps2x",
+                        ":coos2x",
                         &in[0], &in[1]
                         
                         ,
@@ -790,14 +750,14 @@ Py_azps2x(PyObject* __, PyObject* args, PyObject* kwds)
     return NULL;
   }
 
-  return do_work(&prj, in, azpset, azps2x);
+  return do_work(&prj, in, cooset, coos2x);
 }
 
 
 
 
 static PyObject*
-Py_xphx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_arcx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -808,19 +768,19 @@ Py_xphx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":xphx2s",
+                        ":arcx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, xphset, xphx2s);
+  return do_work(&prj, in, arcset, arcx2s);
 }
 
 
 static PyObject*
-Py_xphs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_arcs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -831,21 +791,21 @@ Py_xphs2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":xphs2x",
+                        ":arcs2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, xphset, xphs2x);
+  return do_work(&prj, in, arcset, arcs2x);
 }
 
 
 
 
 static PyObject*
-Py_airx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_azpx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -855,24 +815,28 @@ Py_airx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" 
-                        ":airx2s",
+                        "d" "d" 
+                        ":azpx2s",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, airset, airx2s);
+  return do_work(&prj, in, azpset, azpx2s);
 }
 
 
 static PyObject*
-Py_airs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_azps2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -882,26 +846,30 @@ Py_airs2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" 
-                        ":airs2x",
+                        "d" "d" 
+                        ":azps2x",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, airset, airs2x);
+  return do_work(&prj, in, azpset, azps2x);
 }
 
 
 
 
 static PyObject*
-Py_hpxx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_tscx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -911,28 +879,20 @@ Py_hpxx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":hpxx2s",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
+                        ":tscx2s",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, hpxset, hpxx2s);
+  return do_work(&prj, in, tscset, tscx2s);
 }
 
 
 static PyObject*
-Py_hpxs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_tscs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -942,30 +902,22 @@ Py_hpxs2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":hpxs2x",
-                        &in[0], &in[1]
-                        
-                        ,
-                        &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
+                        ":tscs2x",
+                        &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, hpxset, hpxs2x);
+  return do_work(&prj, in, tscset, tscs2x);
 }
 
 
 
 
 static PyObject*
-Py_merx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_molx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -976,19 +928,19 @@ Py_merx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":merx2s",
+                        ":molx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, merset, merx2s);
+  return do_work(&prj, in, molset, molx2s);
 }
 
 
 static PyObject*
-Py_mers2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_mols2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -999,21 +951,21 @@ Py_mers2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":mers2x",
+                        ":mols2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, merset, mers2x);
+  return do_work(&prj, in, molset, mols2x);
 }
 
 
 
 
 static PyObject*
-Py_cypx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_airx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1023,28 +975,24 @@ Py_cypx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":cypx2s",
+                        "d" 
+                        ":airx2s",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, cypset, cypx2s);
+  return do_work(&prj, in, airset, airx2s);
 }
 
 
 static PyObject*
-Py_cyps2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_airs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1054,30 +1002,26 @@ Py_cyps2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":cyps2x",
+                        "d" 
+                        ":airs2x",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, cypset, cyps2x);
+  return do_work(&prj, in, airset, airs2x);
 }
 
 
 
 
 static PyObject*
-Py_coox2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cypx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1088,7 +1032,7 @@ Py_coox2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         "d" "d" 
-                        ":coox2s",
+                        ":cypx2s",
                         &in[0], &in[1]
                         
                         ,
@@ -1103,12 +1047,12 @@ Py_coox2s(PyObject* __, PyObject* args, PyObject* kwds)
     return NULL;
   }
 
-  return do_work(&prj, in, cooset, coox2s);
+  return do_work(&prj, in, cypset, cypx2s);
 }
 
 
 static PyObject*
-Py_coos2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cyps2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1119,7 +1063,7 @@ Py_coos2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         "d" "d" 
-                        ":coos2x",
+                        ":cyps2x",
                         &in[0], &in[1]
                         
                         ,
@@ -1134,14 +1078,14 @@ Py_coos2x(PyObject* __, PyObject* args, PyObject* kwds)
     return NULL;
   }
 
-  return do_work(&prj, in, cooset, coos2x);
+  return do_work(&prj, in, cypset, cyps2x);
 }
 
 
 
 
 static PyObject*
-Py_pcox2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_codx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1151,20 +1095,28 @@ Py_pcox2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":pcox2s",
+                        "d" "d" 
+                        ":codx2s",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, pcoset, pcox2s);
+  return do_work(&prj, in, codset, codx2s);
 }
 
 
 static PyObject*
-Py_pcos2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cods2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1174,22 +1126,30 @@ Py_pcos2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":pcos2x",
+                        "d" "d" 
+                        ":cods2x",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, pcoset, pcos2x);
+  return do_work(&prj, in, codset, cods2x);
 }
 
 
 
 
 static PyObject*
-Py_codx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_bonx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1199,28 +1159,24 @@ Py_codx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":codx2s",
+                        "d" 
+                        ":bonx2s",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, codset, codx2s);
+  return do_work(&prj, in, bonset, bonx2s);
 }
 
 
 static PyObject*
-Py_cods2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_bons2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1230,30 +1186,26 @@ Py_cods2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" "d" 
-                        ":cods2x",
+                        "d" 
+                        ":bons2x",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
-                        ,
-                        
-                        
-                        &prj.pv[1 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, codset, cods2x);
+  return do_work(&prj, in, bonset, bons2x);
 }
 
 
 
 
 static PyObject*
-Py_tanx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_hpxx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1263,20 +1215,28 @@ Py_tanx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":tanx2s",
+                        "d" "d" 
+                        ":hpxx2s",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, tanset, tanx2s);
+  return do_work(&prj, in, hpxset, hpxx2s);
 }
 
 
 static PyObject*
-Py_tans2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_hpxs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1286,22 +1246,30 @@ Py_tans2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":tans2x",
+                        "d" "d" 
+                        ":hpxs2x",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, tanset, tans2x);
+  return do_work(&prj, in, hpxset, hpxs2x);
 }
 
 
 
 
 static PyObject*
-Py_coex2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_copx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1312,7 +1280,7 @@ Py_coex2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         "d" "d" 
-                        ":coex2s",
+                        ":copx2s",
                         &in[0], &in[1]
                         
                         ,
@@ -1327,12 +1295,12 @@ Py_coex2s(PyObject* __, PyObject* args, PyObject* kwds)
     return NULL;
   }
 
-  return do_work(&prj, in, coeset, coex2s);
+  return do_work(&prj, in, copset, copx2s);
 }
 
 
 static PyObject*
-Py_coes2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cops2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1343,7 +1311,7 @@ Py_coes2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         "d" "d" 
-                        ":coes2x",
+                        ":cops2x",
                         &in[0], &in[1]
                         
                         ,
@@ -1358,14 +1326,14 @@ Py_coes2x(PyObject* __, PyObject* args, PyObject* kwds)
     return NULL;
   }
 
-  return do_work(&prj, in, coeset, coes2x);
+  return do_work(&prj, in, copset, cops2x);
 }
 
 
 
 
 static PyObject*
-Py_zeax2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_coex2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1375,20 +1343,28 @@ Py_zeax2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":zeax2s",
+                        "d" "d" 
+                        ":coex2s",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, zeaset, zeax2s);
+  return do_work(&prj, in, coeset, coex2s);
 }
 
 
 static PyObject*
-Py_zeas2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_coes2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1398,22 +1374,30 @@ Py_zeas2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        
-                        ":zeas2x",
+                        "d" "d" 
+                        ":coes2x",
                         &in[0], &in[1]
                         
+                        ,
+                        &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        
+                        
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, zeaset, zeas2x);
+  return do_work(&prj, in, coeset, coes2x);
 }
 
 
 
 
 static PyObject*
-Py_qscx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sflx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1424,19 +1408,19 @@ Py_qscx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":qscx2s",
+                        ":sflx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, qscset, qscx2s);
+  return do_work(&prj, in, sflset, sflx2s);
 }
 
 
 static PyObject*
-Py_qscs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_sfls2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1447,21 +1431,21 @@ Py_qscs2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":qscs2x",
+                        ":sfls2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, qscset, qscs2x);
+  return do_work(&prj, in, sflset, sfls2x);
 }
 
 
 
 
 static PyObject*
-Py_bonx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_szpx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1471,24 +1455,32 @@ Py_bonx2s(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" 
-                        ":bonx2s",
+                        "d" "d" "d" 
+                        ":szpx2s",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[2 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, bonset, bonx2s);
+  return do_work(&prj, in, szpset, szpx2s);
 }
 
 
 static PyObject*
-Py_bons2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_szps2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1498,26 +1490,34 @@ Py_bons2x(PyObject* __, PyObject* args, PyObject* kwds)
 
   if (!PyArg_ParseTuple(args,
                         "OO"
-                        "d" 
-                        ":bons2x",
+                        "d" "d" "d" 
+                        ":szps2x",
                         &in[0], &in[1]
                         
                         ,
                         &prj.pv[0 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[1 + 1]
+                        ,
+                        
+                        
+                        &prj.pv[2 + 1]
                         
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, bonset, bons2x);
+  return do_work(&prj, in, szpset, szps2x);
 }
 
 
 
 
 static PyObject*
-Py_tscx2s(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cscx2s(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1528,19 +1528,19 @@ Py_tscx2s(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":tscx2s",
+                        ":cscx2s",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, tscset, tscx2s);
+  return do_work(&prj, in, cscset, cscx2s);
 }
 
 
 static PyObject*
-Py_tscs2x(PyObject* __, PyObject* args, PyObject* kwds)
+Py_cscs2x(PyObject* __, PyObject* args, PyObject* kwds)
 {
   PyObject* in[2] = { NULL, NULL };
 
@@ -1551,14 +1551,14 @@ Py_tscs2x(PyObject* __, PyObject* args, PyObject* kwds)
   if (!PyArg_ParseTuple(args,
                         "OO"
                         
-                        ":tscs2x",
+                        ":cscs2x",
                         &in[0], &in[1]
                         
                         )) {
     return NULL;
   }
 
-  return do_work(&prj, in, tscset, tscs2x);
+  return do_work(&prj, in, cscset, cscs2x);
 }
 
 
@@ -1572,15 +1572,21 @@ Py_tscs2x(PyObject* __, PyObject* args, PyObject* kwds)
 static PyMethodDef module_methods[] = {
   
   
-  {"sflx2s", (PyCFunction)Py_sflx2s, METH_VARARGS, NULL},
+  {"ceax2s", (PyCFunction)Py_ceax2s, METH_VARARGS, NULL},
   
-  {"sfls2x", (PyCFunction)Py_sfls2x, METH_VARARGS, NULL},
+  {"ceas2x", (PyCFunction)Py_ceas2x, METH_VARARGS, NULL},
   
   
   
-  {"aitx2s", (PyCFunction)Py_aitx2s, METH_VARARGS, NULL},
+  {"parx2s", (PyCFunction)Py_parx2s, METH_VARARGS, NULL},
   
-  {"aits2x", (PyCFunction)Py_aits2x, METH_VARARGS, NULL},
+  {"pars2x", (PyCFunction)Py_pars2x, METH_VARARGS, NULL},
+  
+  
+  
+  {"merx2s", (PyCFunction)Py_merx2s, METH_VARARGS, NULL},
+  
+  {"mers2x", (PyCFunction)Py_mers2x, METH_VARARGS, NULL},
   
   
   
@@ -1590,81 +1596,81 @@ static PyMethodDef module_methods[] = {
   
   
   
-  {"molx2s", (PyCFunction)Py_molx2s, METH_VARARGS, NULL},
+  {"sinx2s", (PyCFunction)Py_sinx2s, METH_VARARGS, NULL},
   
-  {"mols2x", (PyCFunction)Py_mols2x, METH_VARARGS, NULL},
+  {"sins2x", (PyCFunction)Py_sins2x, METH_VARARGS, NULL},
   
   
   
-  {"szpx2s", (PyCFunction)Py_szpx2s, METH_VARARGS, NULL},
+  {"tanx2s", (PyCFunction)Py_tanx2s, METH_VARARGS, NULL},
   
-  {"szps2x", (PyCFunction)Py_szps2x, METH_VARARGS, NULL},
+  {"tans2x", (PyCFunction)Py_tans2x, METH_VARARGS, NULL},
   
   
   
-  {"parx2s", (PyCFunction)Py_parx2s, METH_VARARGS, NULL},
+  {"pcox2s", (PyCFunction)Py_pcox2s, METH_VARARGS, NULL},
   
-  {"pars2x", (PyCFunction)Py_pars2x, METH_VARARGS, NULL},
+  {"pcos2x", (PyCFunction)Py_pcos2x, METH_VARARGS, NULL},
   
   
   
-  {"ceax2s", (PyCFunction)Py_ceax2s, METH_VARARGS, NULL},
+  {"xphx2s", (PyCFunction)Py_xphx2s, METH_VARARGS, NULL},
   
-  {"ceas2x", (PyCFunction)Py_ceas2x, METH_VARARGS, NULL},
+  {"xphs2x", (PyCFunction)Py_xphs2x, METH_VARARGS, NULL},
   
   
   
-  {"cscx2s", (PyCFunction)Py_cscx2s, METH_VARARGS, NULL},
+  {"zeax2s", (PyCFunction)Py_zeax2s, METH_VARARGS, NULL},
   
-  {"cscs2x", (PyCFunction)Py_cscs2x, METH_VARARGS, NULL},
+  {"zeas2x", (PyCFunction)Py_zeas2x, METH_VARARGS, NULL},
   
   
   
-  {"copx2s", (PyCFunction)Py_copx2s, METH_VARARGS, NULL},
+  {"aitx2s", (PyCFunction)Py_aitx2s, METH_VARARGS, NULL},
   
-  {"cops2x", (PyCFunction)Py_cops2x, METH_VARARGS, NULL},
+  {"aits2x", (PyCFunction)Py_aits2x, METH_VARARGS, NULL},
   
   
   
-  {"sinx2s", (PyCFunction)Py_sinx2s, METH_VARARGS, NULL},
+  {"qscx2s", (PyCFunction)Py_qscx2s, METH_VARARGS, NULL},
   
-  {"sins2x", (PyCFunction)Py_sins2x, METH_VARARGS, NULL},
+  {"qscs2x", (PyCFunction)Py_qscs2x, METH_VARARGS, NULL},
   
   
   
-  {"arcx2s", (PyCFunction)Py_arcx2s, METH_VARARGS, NULL},
+  {"coox2s", (PyCFunction)Py_coox2s, METH_VARARGS, NULL},
   
-  {"arcs2x", (PyCFunction)Py_arcs2x, METH_VARARGS, NULL},
+  {"coos2x", (PyCFunction)Py_coos2x, METH_VARARGS, NULL},
   
   
   
-  {"azpx2s", (PyCFunction)Py_azpx2s, METH_VARARGS, NULL},
+  {"arcx2s", (PyCFunction)Py_arcx2s, METH_VARARGS, NULL},
   
-  {"azps2x", (PyCFunction)Py_azps2x, METH_VARARGS, NULL},
+  {"arcs2x", (PyCFunction)Py_arcs2x, METH_VARARGS, NULL},
   
   
   
-  {"xphx2s", (PyCFunction)Py_xphx2s, METH_VARARGS, NULL},
+  {"azpx2s", (PyCFunction)Py_azpx2s, METH_VARARGS, NULL},
   
-  {"xphs2x", (PyCFunction)Py_xphs2x, METH_VARARGS, NULL},
+  {"azps2x", (PyCFunction)Py_azps2x, METH_VARARGS, NULL},
   
   
   
-  {"airx2s", (PyCFunction)Py_airx2s, METH_VARARGS, NULL},
+  {"tscx2s", (PyCFunction)Py_tscx2s, METH_VARARGS, NULL},
   
-  {"airs2x", (PyCFunction)Py_airs2x, METH_VARARGS, NULL},
+  {"tscs2x", (PyCFunction)Py_tscs2x, METH_VARARGS, NULL},
   
   
   
-  {"hpxx2s", (PyCFunction)Py_hpxx2s, METH_VARARGS, NULL},
+  {"molx2s", (PyCFunction)Py_molx2s, METH_VARARGS, NULL},
   
-  {"hpxs2x", (PyCFunction)Py_hpxs2x, METH_VARARGS, NULL},
+  {"mols2x", (PyCFunction)Py_mols2x, METH_VARARGS, NULL},
   
   
   
-  {"merx2s", (PyCFunction)Py_merx2s, METH_VARARGS, NULL},
+  {"airx2s", (PyCFunction)Py_airx2s, METH_VARARGS, NULL},
   
-  {"mers2x", (PyCFunction)Py_mers2x, METH_VARARGS, NULL},
+  {"airs2x", (PyCFunction)Py_airs2x, METH_VARARGS, NULL},
   
   
   
@@ -1674,27 +1680,27 @@ static PyMethodDef module_methods[] = {
   
   
   
-  {"coox2s", (PyCFunction)Py_coox2s, METH_VARARGS, NULL},
+  {"codx2s", (PyCFunction)Py_codx2s, METH_VARARGS, NULL},
   
-  {"coos2x", (PyCFunction)Py_coos2x, METH_VARARGS, NULL},
+  {"cods2x", (PyCFunction)Py_cods2x, METH_VARARGS, NULL},
   
   
   
-  {"pcox2s", (PyCFunction)Py_pcox2s, METH_VARARGS, NULL},
+  {"bonx2s", (PyCFunction)Py_bonx2s, METH_VARARGS, NULL},
   
-  {"pcos2x", (PyCFunction)Py_pcos2x, METH_VARARGS, NULL},
+  {"bons2x", (PyCFunction)Py_bons2x, METH_VARARGS, NULL},
   
   
   
-  {"codx2s", (PyCFunction)Py_codx2s, METH_VARARGS, NULL},
+  {"hpxx2s", (PyCFunction)Py_hpxx2s, METH_VARARGS, NULL},
   
-  {"cods2x", (PyCFunction)Py_cods2x, METH_VARARGS, NULL},
+  {"hpxs2x", (PyCFunction)Py_hpxs2x, METH_VARARGS, NULL},
   
   
   
-  {"tanx2s", (PyCFunction)Py_tanx2s, METH_VARARGS, NULL},
+  {"copx2s", (PyCFunction)Py_copx2s, METH_VARARGS, NULL},
   
-  {"tans2x", (PyCFunction)Py_tans2x, METH_VARARGS, NULL},
+  {"cops2x", (PyCFunction)Py_cops2x, METH_VARARGS, NULL},
   
   
   
@@ -1704,27 +1710,21 @@ static PyMethodDef module_methods[] = {
   
   
   
-  {"zeax2s", (PyCFunction)Py_zeax2s, METH_VARARGS, NULL},
-  
-  {"zeas2x", (PyCFunction)Py_zeas2x, METH_VARARGS, NULL},
-  
-  
-  
-  {"qscx2s", (PyCFunction)Py_qscx2s, METH_VARARGS, NULL},
+  {"sflx2s", (PyCFunction)Py_sflx2s, METH_VARARGS, NULL},
   
-  {"qscs2x", (PyCFunction)Py_qscs2x, METH_VARARGS, NULL},
+  {"sfls2x", (PyCFunction)Py_sfls2x, METH_VARARGS, NULL},
   
   
   
-  {"bonx2s", (PyCFunction)Py_bonx2s, METH_VARARGS, NULL},
+  {"szpx2s", (PyCFunction)Py_szpx2s, METH_VARARGS, NULL},
   
-  {"bons2x", (PyCFunction)Py_bons2x, METH_VARARGS, NULL},
+  {"szps2x", (PyCFunction)Py_szps2x, METH_VARARGS, NULL},
   
   
   
-  {"tscx2s", (PyCFunction)Py_tscx2s, METH_VARARGS, NULL},
+  {"cscx2s", (PyCFunction)Py_cscx2s, METH_VARARGS, NULL},
   
-  {"tscs2x", (PyCFunction)Py_tscs2x, METH_VARARGS, NULL},
+  {"cscs2x", (PyCFunction)Py_cscs2x, METH_VARARGS, NULL},
   
   
   {NULL}  /* Sentinel */
diff --git a/astropy/stats/lombscargle/implementations/cython_impl.c b/astropy/stats/lombscargle/implementations/cython_impl.c
index acc2cdf..e0c823a 100644
--- a/astropy/stats/lombscargle/implementations/cython_impl.c
+++ b/astropy/stats/lombscargle/implementations/cython_impl.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -416,26 +445,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -20513,10 +20522,8 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P
     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
     PyObject *self = PyCFunction_GET_SELF(func);
-    PyObject *result;
-    int flags;
     assert(PyCFunction_Check(func));
-    assert(METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST));
+    assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
     assert(nargs >= 0);
     assert(nargs == 0 || args != NULL);
     /* _PyCFunction_FastCallDict() must not be called with an exception set,
@@ -22804,9 +22811,17 @@ __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = powf(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2f(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_float(a);
                 theta = atan2f(a.imag, a.real);
@@ -22951,9 +22966,17 @@ __pyx_capsule_create(void *p, CYTHON_UNUSED const char *sig)
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = pow(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_double(a);
                 theta = atan2(a.imag, a.real);
diff --git a/astropy/table/_column_mixins.c b/astropy/table/_column_mixins.c
index 1c8974e..d86d69f 100644
--- a/astropy/table/_column_mixins.c
+++ b/astropy/table/_column_mixins.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -409,26 +438,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -2036,10 +2045,8 @@ static CYTHON_INLINE PyObject * __Pyx_PyCFunction_FastCall(PyObject *func_obj, P
     PyCFunctionObject *func = (PyCFunctionObject*)func_obj;
     PyCFunction meth = PyCFunction_GET_FUNCTION(func);
     PyObject *self = PyCFunction_GET_SELF(func);
-    PyObject *result;
-    int flags;
     assert(PyCFunction_Check(func));
-    assert(METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST));
+    assert(METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)));
     assert(nargs >= 0);
     assert(nargs == 0 || args != NULL);
     /* _PyCFunction_FastCallDict() must not be called with an exception set,
diff --git a/astropy/table/_np_utils.c b/astropy/table/_np_utils.c
index 06107bf..4c4c9cc 100644
--- a/astropy/table/_np_utils.c
+++ b/astropy/table/_np_utils.c
@@ -1,4 +1,4 @@
-/* Generated by Cython 0.25.1 */
+/* Generated by Cython 0.25.2 */
 
 #define PY_SSIZE_T_CLEAN
 #include "Python.h"
@@ -7,7 +7,7 @@
 #elif PY_VERSION_HEX < 0x02060000 || (0x03000000 <= PY_VERSION_HEX && PY_VERSION_HEX < 0x03020000)
     #error Cython requires Python 2.6+ or Python 3.2+.
 #else
-#define CYTHON_ABI "0_25_1"
+#define CYTHON_ABI "0_25_2"
 #include <stddef.h>
 #ifndef offsetof
   #define offsetof(type, member) ( (size_t) & ((type*)0) -> member )
@@ -190,7 +190,7 @@
 #endif
 #if CYTHON_FAST_PYCCALL
 #define __Pyx_PyFastCFunction_Check(func)\
-    ((PyCFunction_Check(func) && METH_FASTCALL == PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))
+    ((PyCFunction_Check(func) && (METH_FASTCALL == (PyCFunction_GET_FLAGS(func) & ~(METH_CLASS | METH_STATIC | METH_COEXIST)))))
 #else
 #define __Pyx_PyFastCFunction_Check(func) 0
 #endif
@@ -343,10 +343,39 @@
     #define CYTHON_RESTRICT
   #endif
 #endif
+#ifndef CYTHON_UNUSED
+# if defined(__GNUC__)
+#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
+#     define CYTHON_UNUSED __attribute__ ((__unused__))
+#   else
+#     define CYTHON_UNUSED
+#   endif
+# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
+#   define CYTHON_UNUSED __attribute__ ((__unused__))
+# else
+#   define CYTHON_UNUSED
+# endif
+#endif
+#ifndef CYTHON_MAYBE_UNUSED_VAR
+#  if defined(__cplusplus)
+     template<class T> void CYTHON_MAYBE_UNUSED_VAR( const T& ) { }
+#  else
+#    define CYTHON_MAYBE_UNUSED_VAR(x) (void)(x)
+#  endif
+#endif
+#ifndef CYTHON_NCP_UNUSED
+# if CYTHON_COMPILING_IN_CPYTHON
+#  define CYTHON_NCP_UNUSED
+# else
+#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
+# endif
+#endif
 #define __Pyx_void_to_None(void_result) ((void)(void_result), Py_INCREF(Py_None), Py_None)
 
 #ifndef CYTHON_INLINE
-  #if defined(__GNUC__)
+  #if defined(__clang__)
+    #define CYTHON_INLINE __inline__ __attribute__ ((__unused__))
+  #elif defined(__GNUC__)
     #define CYTHON_INLINE __inline__
   #elif defined(_MSC_VER)
     #define CYTHON_INLINE __inline
@@ -413,26 +442,6 @@ static CYTHON_INLINE float __PYX_NAN() {
 #define CYTHON_WITHOUT_ASSERTIONS
 #endif
 
-#ifndef CYTHON_UNUSED
-# if defined(__GNUC__)
-#   if !(defined(__cplusplus)) || (__GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 4))
-#     define CYTHON_UNUSED __attribute__ ((__unused__))
-#   else
-#     define CYTHON_UNUSED
-#   endif
-# elif defined(__ICC) || (defined(__INTEL_COMPILER) && !defined(_MSC_VER))
-#   define CYTHON_UNUSED __attribute__ ((__unused__))
-# else
-#   define CYTHON_UNUSED
-# endif
-#endif
-#ifndef CYTHON_NCP_UNUSED
-# if CYTHON_COMPILING_IN_CPYTHON
-#  define CYTHON_NCP_UNUSED
-# else
-#  define CYTHON_NCP_UNUSED CYTHON_UNUSED
-# endif
-#endif
 typedef struct {PyObject **p; const char *s; const Py_ssize_t n; const char* encoding;
                 const char is_unicode; const char is_str; const char intern; } __Pyx_StringTabEntry;
 
@@ -7606,9 +7615,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = powf(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2f(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_float(a);
                 theta = atan2f(a.imag, a.real);
@@ -7753,9 +7770,17 @@ static void __Pyx_ReleaseBuffer(Py_buffer *view) {
             if (a.imag == 0) {
                 if (a.real == 0) {
                     return a;
+                } else if (b.imag == 0) {
+                    z.real = pow(a.real, b.real);
+                    z.imag = 0;
+                    return z;
+                } else if (a.real > 0) {
+                    r = a.real;
+                    theta = 0;
+                } else {
+                    r = -a.real;
+                    theta = atan2(0, -1);
                 }
-                r = a.real;
-                theta = 0;
             } else {
                 r = __Pyx_c_abs_double(a);
                 theta = atan2(a.imag, a.real);
diff --git a/astropy/table/pprint.py b/astropy/table/pprint.py
index e82e1a6..5ff5ef2 100644
--- a/astropy/table/pprint.py
+++ b/astropy/table/pprint.py
@@ -20,7 +20,7 @@ __all__ = []
 
 def default_format_func(format_, val):
     if isinstance(val, bytes):
-        return val.decode('utf-8')
+        return val.decode('utf-8', errors='replace')
     else:
         return text_type(val)
 
diff --git a/astropy/table/tests/test_pprint.py b/astropy/table/tests/test_pprint.py
index 38a1fc7..d252ef3 100644
--- a/astropy/table/tests/test_pprint.py
+++ b/astropy/table/tests/test_pprint.py
@@ -684,3 +684,13 @@ def test_auto_format_func():
 
     qt = QTable(t)
     qt.pformat()  # Generates exception prior to #5802
+
+
+def test_decode_replace():
+    """
+    Test printing a bytestring column with a value that fails
+    decoding to utf-8 and gets replaced by U+FFFD.  See
+    https://docs.python.org/3/library/codecs.html#codecs.replace_errors
+    """
+    t = Table([[b'Z\xf0']])
+    assert t.pformat() == [u'col0', u'----', u'  Z\ufffd']
diff --git a/astropy/units/format/fits.py b/astropy/units/format/fits.py
index d63965f..f2ac8ce 100644
--- a/astropy/units/format/fits.py
+++ b/astropy/units/format/fits.py
@@ -33,13 +33,21 @@ class Fits(generic.Generic):
         names = {}
         deprecated_names = set()
 
+        # Note about deprecated units: before v2.0, several units were treated
+        # as deprecated (G, barn, erg, Angstrom, angstrom). However, in the
+        # FITS 3.0 standard, these units are explicitly listed in the allowed
+        # units, but deprecated in the IAU Style Manual (McNally 1988). So
+        # after discussion (https://github.com/astropy/astropy/issues/2933),
+        # these units have been removed from the lists of deprecated units and
+        # bases.
+
         bases = [
             'm', 'g', 's', 'rad', 'sr', 'K', 'A', 'mol', 'cd',
             'Hz', 'J', 'W', 'V', 'N', 'Pa', 'C', 'Ohm', 'S',
             'F', 'Wb', 'T', 'H', 'lm', 'lx', 'a', 'yr', 'eV',
-            'pc', 'Jy', 'mag', 'R', 'bit', 'byte'
+            'pc', 'Jy', 'mag', 'R', 'bit', 'byte', 'G', 'barn'
         ]
-        deprecated_bases = ['G', 'barn']
+        deprecated_bases = []
         prefixes = [
             'y', 'z', 'a', 'f', 'p', 'n', 'u', 'm', 'c', 'd',
             '', 'da', 'h', 'k', 'M', 'G', 'T', 'P', 'E', 'Z', 'Y']
@@ -63,9 +71,9 @@ class Fits(generic.Generic):
             'deg', 'arcmin', 'arcsec', 'mas', 'min', 'h', 'd', 'Ry',
             'solMass', 'u', 'solLum', 'solRad', 'AU', 'lyr', 'count',
             'ct', 'photon', 'ph', 'pixel', 'pix', 'D', 'Sun', 'chan',
-            'bin', 'voxel', 'adu', 'beam'
+            'bin', 'voxel', 'adu', 'beam', 'erg', 'Angstrom', 'angstrom'
         ]
-        deprecated_units = ['erg', 'Angstrom', 'angstrom']
+        deprecated_units = []
 
         for unit in simple_units + deprecated_units:
             names[unit] = getattr(u, unit)
diff --git a/astropy/units/function/core.py b/astropy/units/function/core.py
index 3115436..67bde8c 100644
--- a/astropy/units/function/core.py
+++ b/astropy/units/function/core.py
@@ -17,7 +17,7 @@ __all__ = ['FunctionUnitBase', 'FunctionQuantity']
 SUPPORTED_UFUNCS = set(getattr(np.core.umath, ufunc) for ufunc in (
     'isfinite', 'isinf', 'isnan', 'sign', 'signbit',
     'rint', 'floor', 'ceil', 'trunc', 'power',
-    '_ones_like', 'ones_like') if hasattr(np.core.umath, ufunc))
+    '_ones_like', 'ones_like', 'positive') if hasattr(np.core.umath, ufunc))
 
 # TODO: the following could work if helper changed relative to Quantity:
 # - spacing should return dimensionless, not same unit
diff --git a/astropy/units/quantity.py b/astropy/units/quantity.py
index 23fbcd7..99355bb 100644
--- a/astropy/units/quantity.py
+++ b/astropy/units/quantity.py
@@ -267,14 +267,22 @@ class Quantity(np.ndarray):
                 # the second parts adds possible trailing .+-, which will break
                 # the float function below and ensure things like 1.2.3deg
                 # will not work.
-                v = re.match(r'\s*[+-]?((\d+\.?\d*)|(\.\d+))([eE][+-]?\d+)?'
-                             r'[.+-]?', value)
+                pattern = (r'\s*[+-]?'
+                           r'((\d+\.?\d*)|(\.\d+)|([nN][aA][nN])|'
+                           r'([iI][nN][fF]([iI][nN][iI][tT][yY]){0,1}))'
+                           r'([eE][+-]?\d+)?'
+                           r'[.+-]?')
+
+                v = re.match(pattern, value)
+                unit_string = None
                 try:
                     value = float(v.group())
+
                 except Exception:
                     raise TypeError('Cannot parse "{0}" as a {1}. It does not '
                                     'start with a number.'
                                     .format(value, cls.__name__))
+
                 unit_string = v.string[v.end():].strip()
                 if unit_string:
                     value_unit = Unit(unit_string)
@@ -384,6 +392,8 @@ class Quantity(np.ndarray):
         # the unit the output from the ufunc will have.
         if function in UFUNC_HELPERS:
             converters, result_unit = UFUNC_HELPERS[function](function, *units)
+            if function.nout > 1:
+                result_unit = result_unit[context[2]]
         else:
             raise TypeError("Unknown ufunc {0}.  Please raise issue on "
                             "https://github.com/astropy/astropy"
@@ -600,18 +610,14 @@ class Quantity(np.ndarray):
                         obj_array = None
 
                 # Re-compute the output using the ufunc
-                if function.nin == 1:
-                    if function.nout == 1:
-                        out = function(inputs[0], obj_array)
-                    else:  # 2-output function (np.modf, np.frexp); 1 input
-                        if context[2] == 0:
-                            out, _ = function(inputs[0], obj_array, None)
-                        else:
-                            _, out = function(inputs[0], None, obj_array)
+                if context[2] == 0:
+                    inputs.append(obj_array)
                 else:
-                    out = function(inputs[0], inputs[1], obj_array)
-
+                    inputs += [None, obj_array]
+                out = function(*inputs)
                 if obj_array is None:
+                    if function.nout > 1:
+                        out = out[context[2]]
                     obj = self._new_view(out, result_unit)
 
             if result_unit is None:  # return a plain array
@@ -979,12 +985,14 @@ class Quantity(np.ndarray):
         """ Division between `Quantity` objects. """
         return self.__rtruediv__(other)
 
-    def __divmod__(self, other):
-        other_value = self._to_own_unit(other)
-        result_tuple = divmod(self.value, other_value)
+    if not hasattr(np, 'divmod'):  # NUMPY_LT_1_13
+        # In numpy 1.13, divmod goes via a ufunc and thus works without change.
+        def __divmod__(self, other):
+            other_value = self._to_own_unit(other)
+            result_tuple = divmod(self.value, other_value)
 
-        return (self._new_view(result_tuple[0], dimensionless_unscaled),
-                self._new_view(result_tuple[1]))
+            return (self._new_view(result_tuple[0], dimensionless_unscaled),
+                    self._new_view(result_tuple[1]))
 
     def __pow__(self, other):
         if isinstance(other, Fraction):
diff --git a/astropy/units/quantity_helper.py b/astropy/units/quantity_helper.py
index d55230f..534cc47 100644
--- a/astropy/units/quantity_helper.py
+++ b/astropy/units/quantity_helper.py
@@ -41,6 +41,8 @@ UNSUPPORTED_UFUNCS = set([np.bitwise_and, np.bitwise_or,
                           np.bitwise_xor, np.invert, np.left_shift,
                           np.right_shift, np.logical_and, np.logical_or,
                           np.logical_xor, np.logical_not])
+if isinstance(getattr(np, 'isnat', None), np.ufunc):
+    UNSUPPORTED_UFUNCS |= {np.isnat}
 
 # SINGLE ARGUMENT UFUNCS
 
@@ -72,6 +74,9 @@ UFUNC_HELPERS[np.rint] = helper_invariant
 UFUNC_HELPERS[np.floor] = helper_invariant
 UFUNC_HELPERS[np.ceil] = helper_invariant
 UFUNC_HELPERS[np.trunc] = helper_invariant
+# positive only was added in numpy 1.13
+if isinstance(getattr(np, 'positive', None), np.ufunc):
+    UFUNC_HELPERS[np.positive] = helper_invariant
 
 # ufuncs handled as special cases
 
@@ -109,7 +114,21 @@ UFUNC_HELPERS[np.log] = helper_dimensionless_to_dimensionless
 UFUNC_HELPERS[np.log10] = helper_dimensionless_to_dimensionless
 UFUNC_HELPERS[np.log2] = helper_dimensionless_to_dimensionless
 UFUNC_HELPERS[np.log1p] = helper_dimensionless_to_dimensionless
-UFUNC_HELPERS[np.modf] = helper_dimensionless_to_dimensionless
+
+
+def helper_modf(f, unit):
+    if unit is None:
+        return [None], (dimensionless_unscaled, dimensionless_unscaled)
+
+    try:
+        return ([get_converter(unit, dimensionless_unscaled)],
+                (dimensionless_unscaled, dimensionless_unscaled))
+    except UnitsError:
+        raise TypeError("Can only apply '{0}' function to "
+                        "dimensionless quantities"
+                        .format(f.__name__))
+
+UFUNC_HELPERS[np.modf] = helper_modf
 
 
 # ufuncs that require dimensionless input and give output in radians
@@ -180,14 +199,14 @@ UFUNC_HELPERS[np.tanh] = helper_radian_to_dimensionless
 
 
 # ufuncs that require dimensionless_unscaled input and return non-quantities
-def helper_dimensionless_to_none(f, unit):
+def helper_frexp(f, unit):
     if not unit.is_unity():
         raise TypeError("Can only apply '{0}' function to "
                         "unscaled dimensionless quantities"
                         .format(f.__name__))
-    return [None], None
+    return [None], (None, None)
 
-UFUNC_HELPERS[np.frexp] = helper_dimensionless_to_none
+UFUNC_HELPERS[np.frexp] = helper_frexp
 
 # TWO ARGUMENT UFUNCS
 
@@ -342,3 +361,10 @@ def helper_twoarg_floor_divide(f, unit1, unit2):
     return converters, dimensionless_unscaled
 
 UFUNC_HELPERS[np.floor_divide] = helper_twoarg_floor_divide
+# divmod only was added in numpy 1.13
+if isinstance(getattr(np, 'divmod', None), np.ufunc):
+    def helper_divmod(f, unit1, unit2):
+        converters, result_unit = get_converters_and_unit(f, unit1, unit2)
+        return converters, (dimensionless_unscaled, result_unit)
+
+    UFUNC_HELPERS[np.divmod] = helper_divmod
diff --git a/astropy/units/tests/test_format.py b/astropy/units/tests/test_format.py
index b5e9d12..f696097 100644
--- a/astropy/units/tests/test_format.py
+++ b/astropy/units/tests/test_format.py
@@ -358,14 +358,7 @@ def test_deprecated_did_you_mean_units():
     try:
         u.Unit('ANGSTROM', format='fits')
     except ValueError as e:
-        assert 'angstrom (deprecated)' in six.text_type(e)
-        assert 'Angstrom (deprecated)' in six.text_type(e)
-        assert '10**-1 nm' in six.text_type(e)
-
-    with catch_warnings() as w:
-        u.Unit('Angstrom', format='fits')
-    assert len(w) == 1
-    assert '10**-1 nm' in six.text_type(w[0].message)
+        assert 'Did you mean Angstrom or angstrom?' in six.text_type(e)
 
     try:
         u.Unit('crab', format='ogip')
diff --git a/astropy/units/tests/test_quantity.py b/astropy/units/tests/test_quantity.py
index 5f69a67..4b1b023 100644
--- a/astropy/units/tests/test_quantity.py
+++ b/astropy/units/tests/test_quantity.py
@@ -84,6 +84,42 @@ class TestQuantityCreation(object):
         with pytest.raises(ValueError):  # Until @mdboom fixes the errors in units
             q1 = u.Quantity(11.412, unit="testingggg")
 
+    def test_nan_inf(self):
+        # Not-a-number
+        q = u.Quantity('nan', unit='cm')
+        assert np.isnan(q.value)
+
+        q = u.Quantity('NaN', unit='cm')
+        assert np.isnan(q.value)
+
+        q = u.Quantity('-nan', unit='cm') # float() allows this
+        assert np.isnan(q.value)
+
+        q = u.Quantity('nan cm')
+        assert np.isnan(q.value)
+        assert q.unit == u.cm
+
+        # Infinity
+        q = u.Quantity('inf', unit='cm')
+        assert np.isinf(q.value)
+
+        q = u.Quantity('-inf', unit='cm')
+        assert np.isinf(q.value)
+
+        q = u.Quantity('inf cm')
+        assert np.isinf(q.value)
+        assert q.unit == u.cm
+
+        q = u.Quantity('Infinity', unit='cm') # float() allows this
+        assert np.isinf(q.value)
+
+        # make sure these strings don't parse...
+        with pytest.raises(TypeError):
+            q = u.Quantity('', unit='cm')
+
+        with pytest.raises(TypeError):
+            q = u.Quantity('spam', unit='cm')
+
     def test_unit_property(self):
         # test getting and setting 'unit' attribute
         q1 = u.Quantity(11.4, unit=u.meter)
diff --git a/astropy/units/tests/test_quantity_ufuncs.py b/astropy/units/tests/test_quantity_ufuncs.py
index 084fc41..545ec66 100644
--- a/astropy/units/tests/test_quantity_ufuncs.py
+++ b/astropy/units/tests/test_quantity_ufuncs.py
@@ -233,17 +233,23 @@ class TestQuantityMathFuncs(object):
         assert np.all(function(np.arange(3.) * u.m, 2. * u.s) ==
                       function(np.arange(3.), 2.) * u.m / u.s)
 
-    def test_divmod_and_floor_divide(self):
+    def test_floor_divide_remainder_and_divmod(self):
         inch = u.Unit(0.0254 * u.m)
         dividend = np.array([1., 2., 3.]) * u.m
         divisor = np.array([3., 4., 5.]) * inch
         quotient = dividend // divisor
+        remainder = dividend % divisor
         assert_allclose(quotient.value, [13., 19., 23.])
         assert quotient.unit == u.dimensionless_unscaled
-        quotient2, remainder = divmod(dividend, divisor)
-        assert np.all(quotient2 == quotient)
         assert_allclose(remainder.value, [0.0094, 0.0696, 0.079])
         assert remainder.unit == dividend.unit
+        quotient2 = np.floor_divide(dividend, divisor)
+        remainder2 = np.remainder(dividend, divisor)
+        assert np.all(quotient2 == quotient)
+        assert np.all(remainder2 == remainder)
+        quotient3, remainder3 = divmod(dividend, divisor)
+        assert np.all(quotient3 == quotient)
+        assert np.all(remainder3 == remainder)
 
         with pytest.raises(TypeError):
             divmod(dividend, u.km)
@@ -251,6 +257,17 @@ class TestQuantityMathFuncs(object):
         with pytest.raises(TypeError):
             dividend // u.km
 
+        with pytest.raises(TypeError):
+            dividend % u.km
+
+        if hasattr(np, 'divmod'):  # not NUMPY_LT_1_13
+            quotient4, remainder4 = np.divmod(dividend, divisor)
+            assert np.all(quotient4 == quotient)
+            assert np.all(remainder4 == remainder)
+            with pytest.raises(TypeError):
+                np.divmod(dividend, u.km)
+
+
     def test_sqrt_scalar(self):
         assert np.sqrt(4. * u.m) == 2. * u.m ** 0.5
 
@@ -472,10 +489,12 @@ class TestQuantityMathFuncs(object):
 
 class TestInvariantUfuncs(object):
 
+    # np.positive was only added in numpy 1.13.
     @pytest.mark.parametrize(('ufunc'), [np.absolute, np.fabs,
                                          np.conj, np.conjugate,
                                          np.negative, np.spacing, np.rint,
-                                         np.floor, np.ceil])
+                                         np.floor, np.ceil] +
+                             [np.positive] if hasattr(np, 'positive') else [])
     def test_invariant_scalar(self, ufunc):
 
         q_i = 4.7 * u.m
@@ -685,6 +704,28 @@ class TestInplaceUfuncs(object):
         assert_allclose(s.value, np.arctan2(1., 2.))
         assert s.unit is u.radian
 
+    @pytest.mark.skipif("not hasattr(np, 'divmod')")
+    @pytest.mark.parametrize(('value'), [1., np.arange(10.)])
+    def test_two_argument_two_output_ufunc_inplace(self, value):
+        v = value * u.m
+        divisor = 70.*u.cm
+        v_copy = v.copy()
+        tmp = v.copy()
+        # cannot use out1, out2 keywords with numpy 1.7
+        check = np.divmod(v, divisor, tmp, v)
+        assert check[0] is tmp and check[1] is v
+        assert tmp.unit == u.dimensionless_unscaled
+        assert v.unit == v_copy.unit
+        # can also replace in last position if no scaling is needed
+        v2 = v_copy.to(divisor.unit)
+        check2 = np.divmod(v2, divisor, v2, tmp)
+        assert check2[0] is v2 and check2[1] is tmp
+        assert v2.unit == u.dimensionless_unscaled
+        assert tmp.unit == divisor.unit
+        # but cannot replace input with first output if scaling is needed
+        with pytest.raises(TypeError):
+            np.divmod(v_copy, divisor, v_copy, tmp)
+
     def test_ufunc_inplace_non_contiguous_data(self):
         # ensure inplace works also for non-contiguous data (closes #1834)
         s = np.arange(10.) * u.m
diff --git a/astropy/utils/iers/iers.py b/astropy/utils/iers/iers.py
index 1ecb701..7b542a4 100644
--- a/astropy/utils/iers/iers.py
+++ b/astropy/utils/iers/iers.py
@@ -559,6 +559,7 @@ class IERS_Auto(IERS_A):
         """
         if not conf.auto_download:
             cls.iers_table = IERS.open()
+            return cls.iers_table
 
         if cls.iers_table is not None:
 
diff --git a/astropy/utils/iers/tests/test_iers.py b/astropy/utils/iers/tests/test_iers.py
index 33f5aeb..2e95dc7 100644
--- a/astropy/utils/iers/tests/test_iers.py
+++ b/astropy/utils/iers/tests/test_iers.py
@@ -149,9 +149,16 @@ class TestIERS_A():
         assert status3 == iers.FROM_IERS_A_PREDICTION
         assert ut1_utc3 != 0.
 
+
 class TestIERS_Auto():
 
     @remote_data
+    def test_no_auto_download(self):
+        with iers.conf.set_temp('auto_download', False):
+            t = iers.IERS_Auto.open()
+        assert type(t) is iers.IERS_B
+
+    @remote_data
     def test_simple(self):
         iers_a_file_1 = os.path.join(os.path.dirname(__file__), 'finals2000A-2016-02-30-test')
         iers_a_file_2 = os.path.join(os.path.dirname(__file__), 'finals2000A-2016-04-30-test')
diff --git a/astropy/utils/introspection.py b/astropy/utils/introspection.py
index a0cf5d7..18c02f6 100644
--- a/astropy/utils/introspection.py
+++ b/astropy/utils/introspection.py
@@ -8,6 +8,7 @@ from __future__ import (absolute_import, division, print_function,
 
 
 import inspect
+import re
 import types
 
 from ..extern import six
@@ -154,6 +155,13 @@ def minversion(module, version, inclusive=True, version_path='__version__'):
         from pkg_resources import parse_version
     except ImportError:
         from distutils.version import LooseVersion as parse_version
+        # LooseVersion raises a TypeError when strings like dev, rc1 are part
+        # of the version number. Match the dotted numbers only. Regex taken
+        # from PEP440, https://www.python.org/dev/peps/pep-0440/, Appendix B
+        expr = '^([1-9]\\d*!)?(0|[1-9]\\d*)(\\.(0|[1-9]\\d*))*'
+        m = re.match(expr, version)
+        if m:
+            version = m.group(0)
 
     if inclusive:
         return parse_version(have_version) >= parse_version(version)
diff --git a/astropy/utils/tests/test_introspection.py b/astropy/utils/tests/test_introspection.py
index ea11932..36a9f90 100644
--- a/astropy/utils/tests/test_introspection.py
+++ b/astropy/utils/tests/test_introspection.py
@@ -9,7 +9,7 @@ from ...extern import six
 from ...tests.helper import pytest
 from .. import introspection
 from ..introspection import (find_current_module, find_mod_objs,
-                             isinstancemethod)
+                             isinstancemethod, minversion)
 
 
 def test_pkg_finder():
@@ -92,3 +92,26 @@ def test_isinstancemethod():
     assert not isinstancemethod(MyClass, MyClass.another_classmethod)
     assert not isinstancemethod(MyClass, MyClass.a_staticmethod)
     assert isinstancemethod(MyClass, MyClass.an_instancemethod)
+
+
+def _minversion_test():
+    from types import ModuleType
+    test_module = ModuleType(str("test_module"))
+    test_module.__version__ = '0.12.2'
+    good_versions = ['0.12', '0.12.1', '0.12.0.dev']
+    bad_versions = ['1', '1.2rc1']
+    for version in good_versions:
+        assert minversion(test_module, version)
+    for version in bad_versions:
+        assert not minversion(test_module, version)
+
+
+def test_minversion():
+    import sys
+    if 'pkg_resources' in sys.modules:
+        pkg_resources_saved = sys.modules['pkg_resources']
+        # Force ImportError for pkg_resources in minversion()
+        sys.modules['pkg_resource'] = None
+        _minversion_test()
+        sys.modules['pkg_resource'] = pkg_resources_saved
+    _minversion_test()
diff --git a/astropy/version.py b/astropy/version.py
index e8af34d..033680a 100644
--- a/astropy/version.py
+++ b/astropy/version.py
@@ -1,17 +1,17 @@
-# Autogenerated by Astropy's setup.py on 2017-03-30 22:47:25.701378
+# Autogenerated by Astropy's setup.py on 2017-05-29 22:26:26.178421
 from __future__ import unicode_literals
 import datetime
 
-version = "1.3.2"
-githash = "698ea94934068163e79ee2d632152aabc72611f3"
+version = "1.3.3"
+githash = "7c6752495d1320efc7b1994e15cbcccd6e6d0b16"
 
 
 major = 1
 minor = 3
-bugfix = 2
+bugfix = 3
 
 release = True
-timestamp = datetime.datetime(2017, 3, 30, 22, 47, 25, 701378)
+timestamp = datetime.datetime(2017, 5, 29, 22, 26, 26, 178421)
 debug = False
 
 try:
diff --git a/astropy/visualization/interval.py b/astropy/visualization/interval.py
index f1249fb..8cd8746 100644
--- a/astropy/visualization/interval.py
+++ b/astropy/visualization/interval.py
@@ -93,10 +93,10 @@ class ManualInterval(BaseInterval):
     ----------
     vmin : float, optional
         The minimum value in the scaling.  Defaults to the image
-        minimum.
+        minimum (ignoring NaNs)
     vmax : float, optional
         The maximum value in the scaling.  Defaults to the image
-        maximum.
+        maximum (ignoring NaNs)
     """
 
     def __init__(self, vmin=None, vmax=None):
@@ -104,8 +104,8 @@ class ManualInterval(BaseInterval):
         self.vmax = vmax
 
     def get_limits(self, values):
-        vmin = self.vmin or np.min(values)
-        vmax = self.vmax or np.max(values)
+        vmin = np.nanmin(values) if self.vmin is None else self.vmin
+        vmax = np.nanmax(values) if self.vmax is None else self.vmax
         return vmin, vmax
 
 
diff --git a/astropy/visualization/tests/test_interval.py b/astropy/visualization/tests/test_interval.py
index d439d07..4b9f568 100644
--- a/astropy/visualization/tests/test_interval.py
+++ b/astropy/visualization/tests/test_interval.py
@@ -20,6 +20,7 @@ class TestInterval(object):
         np.testing.assert_allclose(vmax, +15.)
 
     def test_manual_defaults(self):
+
         interval = ManualInterval(vmin=-10.)
         vmin, vmax = interval.get_limits(self.data)
         np.testing.assert_allclose(vmin, -10.)
@@ -30,6 +31,22 @@ class TestInterval(object):
         np.testing.assert_allclose(vmin, np.min(self.data))
         np.testing.assert_allclose(vmax, 15.)
 
+    def test_manual_zero_limit(self):
+        # Regression test for a bug that caused ManualInterval to compute the
+        # limit (min or max) if it was set to zero.
+        interval = ManualInterval(vmin=0, vmax=0)
+        vmin, vmax = interval.get_limits(self.data)
+        np.testing.assert_allclose(vmin, 0)
+        np.testing.assert_allclose(vmax, 0)
+
+    def test_manual_defaults_with_nan(self):
+        interval = ManualInterval()
+        data = np.copy(self.data)
+        data[0] = np.nan
+        vmin, vmax = interval.get_limits(self.data)
+        np.testing.assert_allclose(vmin, -20)
+        np.testing.assert_allclose(vmax, +60)
+
     def test_minmax(self):
         interval = MinMaxInterval()
         vmin, vmax = interval.get_limits(self.data)
diff --git a/astropy/visualization/wcsaxes/core.py b/astropy/visualization/wcsaxes/core.py
index 676cfa6..d4f103b 100644
--- a/astropy/visualization/wcsaxes/core.py
+++ b/astropy/visualization/wcsaxes/core.py
@@ -352,11 +352,11 @@ class WCSAxes(Axes):
 
         self._drawn = True
 
-    def set_xlabel(self, label):
-        self.coords[self._x_index].set_axislabel(label)
+    def set_xlabel(self, label, labelpad=1, **kwargs):
+        self.coords[self._x_index].set_axislabel(label, minpad=labelpad, **kwargs)
 
-    def set_ylabel(self, label):
-        self.coords[self._y_index].set_axislabel(label)
+    def set_ylabel(self, label, labelpad=1, **kwargs):
+        self.coords[self._y_index].set_axislabel(label, minpad=labelpad, **kwargs)
 
     def get_xlabel(self):
         return self.coords[self._x_index].get_axislabel()
diff --git a/astropy/visualization/wcsaxes/formatter_locator.py b/astropy/visualization/wcsaxes/formatter_locator.py
index f1679b1..6a11c1f 100644
--- a/astropy/visualization/wcsaxes/formatter_locator.py
+++ b/astropy/visualization/wcsaxes/formatter_locator.py
@@ -238,6 +238,12 @@ class AngleFormatterLocator(BaseFormatterLocator):
 
         else:
 
+            # In the special case where value_min is the same as value_max, we
+            # don't locate any ticks. This can occur for example when taking a
+            # slice for a cube (along the dimension sliced).
+            if value_min == value_max:
+                return [] * u.deg, 0 * u.arcsec
+
             if self.spacing is not None:
 
                 # spacing was manually specified
@@ -409,6 +415,12 @@ class ScalarFormatterLocator(BaseFormatterLocator):
             return self.values, 1.1 * self._unit
         else:
 
+            # In the special case where value_min is the same as value_max, we
+            # don't locate any ticks. This can occur for example when taking a
+            # slice for a cube (along the dimension sliced).
+            if value_min == value_max:
+                return [] * self._unit, 0 * self._unit
+
             if self.spacing is not None:
 
                 # spacing was manually specified
diff --git a/astropy/visualization/wcsaxes/tests/datasets.py b/astropy/visualization/wcsaxes/tests/datasets.py
index 0be6fb5..3386b98 100644
--- a/astropy/visualization/wcsaxes/tests/datasets.py
+++ b/astropy/visualization/wcsaxes/tests/datasets.py
@@ -4,6 +4,7 @@
 
 import time
 
+from ....extern.six.moves import urllib
 from ....utils.data import download_file
 from ....io import fits
 
@@ -25,7 +26,7 @@ def fetch_hdu(filename, cache=True):
     for retry in range(MAX_RETRIES):
         try:
             path = download_file(URL + filename, cache=cache, timeout=30)
-        except:
+        except urllib.error.URLError:
             if retry == MAX_RETRIES - 1:
                 raise
             else:
diff --git a/astropy/visualization/wcsaxes/tests/test_images.py b/astropy/visualization/wcsaxes/tests/test_images.py
index f5229c9..cb422f0 100644
--- a/astropy/visualization/wcsaxes/tests/test_images.py
+++ b/astropy/visualization/wcsaxes/tests/test_images.py
@@ -17,6 +17,7 @@ from ..patches import SphericalCircle
 from .. import WCSAxes
 from . import datasets
 from ....tests.image_tests import IMAGE_REFERENCE_DIR
+from ..frame import EllipticalFrame
 
 
 class BaseImageTests(object):
@@ -522,3 +523,16 @@ class TestBasic(BaseImageTests):
         ax.coords[1].set_ticklabel_visible(False)
 
         return fig
+
+    @remote_data(source='astropy')
+    @pytest.mark.mpl_image_compare(baseline_dir=IMAGE_REFERENCE_DIR,
+                                   tolerance=1.5)
+    def test_elliptical_frame(self):
+
+        # Regression test for a bug (astropy/astropy#6063) that caused labels to
+        # be incorrectly simplified.
+
+        wcs = WCS(self.msx_header)
+        fig = plt.figure(figsize=(5, 3))
+        ax = fig.add_axes([0.2, 0.2, 0.6, 0.6], projection=wcs, frame_class=EllipticalFrame)
+        return fig
diff --git a/astropy/visualization/wcsaxes/tests/test_misc.py b/astropy/visualization/wcsaxes/tests/test_misc.py
index 7ff2167..4d0618f 100644
--- a/astropy/visualization/wcsaxes/tests/test_misc.py
+++ b/astropy/visualization/wcsaxes/tests/test_misc.py
@@ -3,6 +3,7 @@
 from __future__ import print_function, division, absolute_import
 
 import os
+import warnings
 
 import numpy as np
 import matplotlib.pyplot as plt
@@ -103,3 +104,85 @@ def test_plot_coord_transform():
     c = SkyCoord(359.76045223*u.deg, 0.26876217*u.deg)
     with pytest.raises(TypeError):
         ax.plot_coord(c, 'o', transform=ax.get_transform('galactic'))
+
+
+def test_set_label_properties():
+
+    # Regression test to make sure that arguments passed to
+    # set_xlabel/set_ylabel are passed to the underlying coordinate helpers
+
+    ax = plt.subplot(1, 1, 1, projection=WCS(TARGET_HEADER))
+
+    ax.set_xlabel('Test x label', labelpad=2, color='red')
+    ax.set_ylabel('Test y label', labelpad=3, color='green')
+
+    assert ax.coords[0].axislabels.get_text() == 'Test x label'
+    assert ax.coords[0].axislabels.get_minpad('b') == 2
+    assert ax.coords[0].axislabels.get_color() == 'red'
+
+    assert ax.coords[1].axislabels.get_text() == 'Test y label'
+    assert ax.coords[1].axislabels.get_minpad('l') == 3
+    assert ax.coords[1].axislabels.get_color() == 'green'
+
+
+GAL_HEADER = fits.Header.fromstring("""
+SIMPLE  =                    T / conforms to FITS standard
+BITPIX  =                  -32 / array data type
+NAXIS   =                    3 / number of array dimensions
+NAXIS1  =                   31
+NAXIS2  =                 2881
+NAXIS3  =                  480
+EXTEND  =                    T
+CTYPE1  = 'DISTMOD '
+CRVAL1  =                  3.5
+CDELT1  =                  0.5
+CRPIX1  =                  1.0
+CTYPE2  = 'GLON-CAR'
+CRVAL2  =                180.0
+CDELT2  =               -0.125
+CRPIX2  =                  1.0
+CTYPE3  = 'GLAT-CAR'
+CRVAL3  =                  0.0
+CDELT3  =                0.125
+CRPIX3  =                241.0
+""", sep='\n')
+
+def test_slicing_warnings(tmpdir):
+
+    # Regression test to make sure that no warnings are emitted by the tick
+    # locator for the sliced axis when slicing a cube.
+
+    # Scalar case
+
+    wcs3d = WCS(naxis=3)
+    wcs3d.wcs.ctype = ['x', 'y', 'z']
+    wcs3d.wcs.cunit = ['deg', 'deg', 'km/s']
+    wcs3d.wcs.crpix = [614.5, 856.5, 333]
+    wcs3d.wcs.cdelt = [6.25, 6.25, 23]
+    wcs3d.wcs.crval = [0., 0., 1.]
+
+    with warnings.catch_warnings(record=True) as warning_lines:
+        warnings.resetwarnings()
+        ax = plt.subplot(1, 1, 1, projection=wcs3d, slices=('x', 'y', 1))
+        plt.savefig(tmpdir.join('test.png').strpath)
+
+    # For easy debugging if there are indeed warnings
+    for warning in warning_lines:
+        print(warning)
+
+    assert len(warning_lines) == 0
+
+    # Angle case
+
+    wcs3d = WCS(GAL_HEADER)
+
+    with warnings.catch_warnings(record=True) as warning_lines:
+        warnings.resetwarnings()
+        ax = plt.subplot(1, 1, 1, projection=wcs3d, slices=('x', 'y', 2))
+        plt.savefig(tmpdir.join('test.png').strpath)
+
+    # For easy debugging if there are indeed warnings
+    for warning in warning_lines:
+        print(warning)
+
+    assert len(warning_lines) == 0
diff --git a/astropy/visualization/wcsaxes/ticklabels.py b/astropy/visualization/wcsaxes/ticklabels.py
index f48f733..88be27f 100644
--- a/astropy/visualization/wcsaxes/ticklabels.py
+++ b/astropy/visualization/wcsaxes/ticklabels.py
@@ -70,14 +70,17 @@ class TickLabels(Text):
                     t1 = self.text[axis][i]
                     continue
                 start = 0
-                for j in range(len(t1)):
+                # In the following loop, we need to ignore the last character,
+                # hence the len(t1) - 1. This is because if we have two strings
+                # like 13d14m15s we want to make sure that we keep the last
+                # part (15s) even if the two labels are identical.
+                for j in range(len(t1) - 1):
                     if t1[j] != t2[j]:
                         break
                     if t1[j] not in '-0123456789.':
                         start = j + 1
-                if start == 0:
-                    t1 = self.text[axis][i]
-                else:
+                t1 = self.text[axis][i]
+                if start != 0:
                     self.text[axis][i] = self.text[axis][i][start:]
 
     def set_visible_axes(self, visible_axes):
@@ -105,6 +108,12 @@ class TickLabels(Text):
 
             for i in range(len(self.world[axis])):
 
+                # In the event that the label is empty (which is not expected
+                # but could happen in unforeseen corner cases), we should just
+                # skip to the next label.
+                if self.text[axis][i] == '':
+                    continue
+
                 self.set_text(self.text[axis][i])
 
                 x, y = self.pixel[axis][i]
diff --git a/docs/conf.py b/docs/conf.py
index 14685aa..819c5f3 100644
--- a/docs/conf.py
+++ b/docs/conf.py
@@ -72,7 +72,7 @@ check_sphinx_version("1.2.1")
 del intersphinx_mapping['astropy']
 
 # add any custom intersphinx for astropy
-intersphinx_mapping['pytest'] = ('http://pytest.org/latest/', None)
+intersphinx_mapping['pytest'] = ('https://pytest.org/en/latest/', None)
 intersphinx_mapping['ipython'] = ('http://ipython.readthedocs.io/en/stable/', None)
 intersphinx_mapping['pandas'] = ('http://pandas.pydata.org/pandas-docs/stable/', None)
 
@@ -94,7 +94,7 @@ rst_epilog += """
 
 .. Astropy
 .. _Astropy: http://astropy.org
-.. _`Astropy mailing list`: http://mail.scipy.org/mailman/listinfo/astropy
+.. _`Astropy mailing list`: https://mail.python.org/mailman/listinfo/astropy
 .. _`astropy-dev mailing list`: http://groups.google.com/group/astropy-dev
 """.format(astropy)
 
@@ -226,7 +226,7 @@ try:
     extensions += ["sphinx_gallery.gen_gallery"]
 
     sphinx_gallery_conf = {
-        'mod_example_dir': 'generated/modules', # path to store the module using example template
+        'backreferences_dir': 'generated/modules', # path to store the module using example template
         'filename_pattern': '^((?!skip_).)*$', # execute all examples except those that start with "skip_"
         'examples_dirs': '..{}examples'.format(os.sep), # path to the examples scripts
         'gallery_dirs': 'generated/examples', # path to save gallery generated examples
diff --git a/docs/coordinates/angles.rst b/docs/coordinates/angles.rst
index 06e828a..692db13 100644
--- a/docs/coordinates/angles.rst
+++ b/docs/coordinates/angles.rst
@@ -17,7 +17,7 @@ Creation
 
 The creation of an |Angle| object is quite flexible and supports a wide
 variety of input object types and formats.  The type of the input angle(s)
-can an array, scalar, tuple, string, `~astropy.units.Quantity` or another
+can be an array, scalar, tuple, string, `~astropy.units.Quantity` or another
 |Angle|.  This is best illustrated with a number of examples of valid ways
 to create an |Angle|::
 
@@ -53,7 +53,7 @@ Representation
 ^^^^^^^^^^^^^^
 
 The |Angle| object also supports a variety of ways of representing the value
-of the angle, both as a floating point number as a string::
+of the angle, both as a floating point number and as a string::
 
     >>> a = Angle(1, u.radian)
     >>> a
diff --git a/docs/credits.rst b/docs/credits.rst
index 9adaed7..16f8638 100644
--- a/docs/credits.rst
+++ b/docs/credits.rst
@@ -226,8 +226,7 @@ Other Credits
 * Kyle Barbary for designing the Astropy logos and documentation themes.
 * Andrew Pontzen and the `pynbody <https://github.com/pynbody/pynbody>`_ team
   (For code that grew into :mod:`astropy.units`)
-* Everyone on `astropy-dev <http://groups.google.com/group/astropy-dev>`_
-  and the `astropy mailing list <http://mail.scipy.org/mailman/listinfo/astropy>`_
+* Everyone on the `astropy-dev mailing list`_ and the `Astropy mailing list`_
   for contributing to many discussions and decisions!
 
 (If you have contributed to the Astropy project and your name is missing,
diff --git a/docs/development/testguide.rst b/docs/development/testguide.rst
index f11b730..1ca0890 100644
--- a/docs/development/testguide.rst
+++ b/docs/development/testguide.rst
@@ -18,8 +18,7 @@ The testing framework used by Astropy (and affiliated packages using the
 :doc:`package template <affiliated-packages>`) is the `pytest`_ framework,
 accessed through the ``python setup.py test`` command.
 
-.. _pytest: http://pytest.org/latest/
-.. _pytest.main: http://pytest.org/latest/builtin.html#pytest.main
+.. _pytest: https://pytest.org/en/latest/
 
 .. note::
 
@@ -58,10 +57,10 @@ through with the ``--args`` argument::
     > python setup.py test --args "-x"
 
 `pytest`_ will look for files that `look like tests
-<http://pytest.org/latest/goodpractises.html#conventions-for-python-test-discovery>`_
+<https://pytest.org/en/latest/goodpractises.html#conventions-for-python-test-discovery>`_
 in the current directory and all recursive directories then run all the code that
 `looks like tests
-<http://pytest.org/latest/goodpractises.html#conventions-for-python-test-discovery>`_
+<https://pytest.org/en/latest/goodpractises.html#conventions-for-python-test-discovery>`_
 within those files.
 
 Turn on PEP8 checking by passing ``--pep8`` to the ``test`` command. This will
@@ -109,7 +108,7 @@ internet. To turn these tests on use the ``remote_data`` flag::
     astropy.test(package='io.fits', remote_data=True)
 
 In addition, the ``test`` function supports any of the options that can be
-passed to `pytest.main() <http://pytest.org/latest/builtin.html#pytest.main>`_,
+passed to `pytest.main() <https://pytest.org/en/latest/builtin.html#pytest.main>`_,
 and convenience options ``verbose=`` and ``pastebin=``.
 
 Enable PEP8 compliance testing with ``pep8=True`` in the call to
@@ -255,7 +254,7 @@ Writing tests
  * ``test_`` prefixed functions and methods
 
 Consult the `test discovery rules
-<http://pytest.org/latest/goodpractises.html#conventions-for-python-test-discovery>`_
+<https://pytest.org/en/latest/goodpractises.html#conventions-for-python-test-discovery>`_
 for detailed information on how to name files and tests so that they are
 automatically discovered by `pytest`_.
 
@@ -419,7 +418,7 @@ Tests that create files
 Tests may often be run from directories where users do not have write
 permissions so tests which create files should always do so in
 temporary directories. This can be done with the `pytest tmpdir
-function argument <http://pytest.org/latest/tmpdir.html>`_ or with
+function argument <https://pytest.org/en/latest/tmpdir.html>`_ or with
 Python's built-in `tempfile module
 <http://docs.python.org/library/tempfile.html#module-tempfile>`_.
 
@@ -603,7 +602,7 @@ Using pytest helper functions
 -----------------------------
 
 If your tests need to use `pytest helper functions
-<http://pytest.org/latest/builtin.html#pytest-helpers>`_, such as
+<https://pytest.org/en/latest/builtin.html#pytest-helpers>`_, such as
 ``pytest.raises``, import ``pytest`` into your test module like so::
 
     from ...tests.helper import pytest
diff --git a/docs/development/workflow/git_links.inc b/docs/development/workflow/git_links.inc
index 53dac13..744e00b 100644
--- a/docs/development/workflow/git_links.inc
+++ b/docs/development/workflow/git_links.inc
@@ -51,7 +51,7 @@
 .. _deleting master on github: http://matthew-brett.github.com/pydagogue/gh_delete_master.html
 .. _rebase without tears: http://matthew-brett.github.com/pydagogue/rebase_without_tears.html
 .. _resolving a merge: http://schacon.github.com/git/user-manual.html#resolving-a-merge
-.. _ipython git workflow: http://mail.scipy.org/pipermail/ipython-dev/2010-October/006746.html
+.. _ipython git workflow: https://mail.python.org/pipermail/ipython-dev/2010-October/005632.html
 .. _ipython notebook on using git in science: http://nbviewer.ipython.org/github/fperez/reprosw/blob/master/Version%20Control.ipynb
 
 .. other stuff
diff --git a/docs/development/workflow/known_projects.inc b/docs/development/workflow/known_projects.inc
index 5bc1c4f..8e12421 100644
--- a/docs/development/workflow/known_projects.inc
+++ b/docs/development/workflow/known_projects.inc
@@ -8,37 +8,17 @@
 .. numpy
 .. _numpy: http://numpy.scipy.org
 .. _`numpy github`: http://github.com/numpy/numpy
-.. _`numpy mailing list`: http://mail.scipy.org/mailman/listinfo/numpy-discussion
+.. _`numpy mailing list`: http://mail.python.org/mailman/listinfo/numpy-discussion
 
 .. scipy
 .. _scipy: http://www.scipy.org
 .. _`scipy github`: http://github.com/scipy/scipy
-.. _`scipy mailing list`: http://mail.scipy.org/mailman/listinfo/scipy-dev
-
-.. nipy
-.. _nipy: http://nipy.org/nipy
-.. _`nipy github`: http://github.com/nipy/nipy
-.. _`nipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel
+.. _`scipy mailing list`: http://mail.python.org/mailman/listinfo/scipy-dev
 
 .. ipython
 .. _ipython: http://ipython.scipy.org
 .. _`ipython github`: http://github.com/ipython/ipython
-.. _`ipython mailing list`: http://mail.scipy.org/mailman/listinfo/IPython-dev
-
-.. dipy
-.. _dipy: http://nipy.org/dipy
-.. _`dipy github`: http://github.com/Garyfallidis/dipy
-.. _`dipy mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel
-
-.. nibabel
-.. _nibabel: http://nipy.org/nibabel
-.. _`nibabel github`: http://github.com/nipy/nibabel
-.. _`nibabel mailing list`: http://mail.scipy.org/mailman/listinfo/nipy-devel
-
-.. marsbar
-.. _marsbar: http://marsbar.sourceforge.net
-.. _`marsbar github`: http://github.com/matthew-brett/marsbar
-.. _`MarsBaR mailing list`: https://lists.sourceforge.net/lists/listinfo/marsbar-users
+.. _`ipython mailing list`: http://mail.python.org/mailman/listinfo/IPython-dev
 
 .. pip
 .. _pip: http://www.pip-installer.org/en/latest/
@@ -54,7 +34,7 @@
 .. _conda: http://conda.pydata.org/docs/
 
 .. pytest
-.. _py.test: http://pytest.org/latest/
+.. _py.test: https://pytest.org/en/latest/
 
 .. pychecker
-.. _pychecker: https://pypi.python.org/pypi/PyChecker
\ No newline at end of file
+.. _pychecker: https://pypi.python.org/pypi/PyChecker
diff --git a/docs/index.rst b/docs/index.rst
index 1cb19ef..9744fd7 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -59,6 +59,7 @@ User Documentation
    install
    getting_started
    Example gallery <generated/examples/index>
+   Tutorials <http://tutorials.astropy.org/>
 
 **Core data structures and transformations**
 
@@ -127,7 +128,7 @@ Getting help
 ************
 
 If you want to get help or discuss issues with other Astropy users, you can sign
-up for the `astropy mailing list`_. Alternatively, the `astropy-dev mailing
+up for the `Astropy mailing list`_. Alternatively, the `astropy-dev mailing
 list`_ is where you should go to discuss more technical aspects of Astropy with
 the developers. You can also email the astropy developers privately at
 `feedback at astropy.org`_...but remember that questions you ask
@@ -145,7 +146,7 @@ create a new issue on the Astropy `GitHub issue page
 account <https://github.com>`_ on GitHub if you do not have one.
 
 If you prefer not to create a GitHub account, please report the issue to either
-the `astropy mailing list`_, the `astropy-dev mailing list`_ or sending a
+the `Astropy mailing list`_, the `astropy-dev mailing list`_ or sending a
 private email to the astropy core developers at
 `feedback at astropy.org <mailto:feedback at astropy.org>`_.
 
@@ -228,5 +229,4 @@ Indices and Tables
 * :ref:`modindex`
 * :ref:`search`
 
-.. _astropy mailing list: http://mail.scipy.org/mailman/listinfo/astropy
 .. _feedback at astropy.org: mailto:feedback at astropy.org
diff --git a/docs/install.rst b/docs/install.rst
index 2cc60a0..4c8df70 100644
--- a/docs/install.rst
+++ b/docs/install.rst
@@ -349,7 +349,7 @@ system package in an inconsistent state.
 
 As the best course of action at this point depends largely on the individual
 system and how it is configured, if you are not sure yourself what do please
-ask on the Astropy mailing list.
+ask on the `Astropy mailing list`_.
 
 
 The Windows installer can't find Python in the registry
diff --git a/docs/io/fits/usage/table.rst b/docs/io/fits/usage/table.rst
index 5e39bb6..49efd60 100644
--- a/docs/io/fits/usage/table.rst
+++ b/docs/io/fits/usage/table.rst
@@ -123,7 +123,7 @@ the input table is generated:
     >>> from astropy.io import fits
     >>> t = fits.open('table.fits')
     >>> tbdata = t[1].data
-    >>> mask = tbdata.['magnitude'] > 5
+    >>> mask = tbdata['magnitude'] > 5
     >>> newtbdata = tbdata[mask]
     >>> hdu = fits.BinTableHDU(data=newtbdata)
     >>> hdu.writeto('newtable.fits')
diff --git a/docs/io/misc.rst b/docs/io/misc.rst
index b30a812..4ad47dd 100644
--- a/docs/io/misc.rst
+++ b/docs/io/misc.rst
@@ -1,6 +1,6 @@
-**********************************************
-Miscellaneous Input/Output (`astropy.io.misc`)
-**********************************************
+*****************************************************
+Miscellaneous: HDF5, YAML, pickle (`astropy.io.misc`)
+*****************************************************
 
 The `astropy.io.misc` module contains miscellaneous input/output routines that
 do not fit elsewhere, and are often used by other Astropy sub-packages. For
diff --git a/docs/units/format.rst b/docs/units/format.rst
index 09ce729..7d9d607 100644
--- a/docs/units/format.rst
+++ b/docs/units/format.rst
@@ -198,7 +198,7 @@ Normally, passing an unrecognized unit string raises an exception::
     ...
   ValueError: 'Angstroem' did not parse as fits unit: At col 0, Unit
   'Angstroem' not supported by the FITS standard. Did you mean
-  10**-1 nm, Angstrom (deprecated) or angstrom (deprecated)?
+  Angstrom or angstrom?
 
 However, the `~astropy.units.Unit` constructor has the keyword
 argument ``parse_strict`` that can take one of three values to control
diff --git a/setup.py b/setup.py
index eb7d983..62f4b6e 100755
--- a/setup.py
+++ b/setup.py
@@ -23,7 +23,7 @@ import astropy
 NAME = 'astropy'
 
 # VERSION should be PEP386 compatible (http://www.python.org/dev/peps/pep-0386)
-VERSION = '1.3.2'
+VERSION = '1.3.3'
 
 # Indicates if this version is a release version
 RELEASE = 'dev' not in VERSION

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



More information about the Debian-astro-commits mailing list