From aa67fcf6144dc816585c11d460aaf2ca0caabfb1 Mon Sep 17 00:00:00 2001
From: Marco Selig <mselig@ncg-02.MPA-Garching.MPG.DE>
Date: Wed, 5 Jun 2013 13:44:01 +0200
Subject: [PATCH] version update.

---
 README.rst     |  7 ++++---
 nifty_core.py  | 25 +++++++++++++------------
 nifty_power.py | 10 +++++-----
 3 files changed, 22 insertions(+), 20 deletions(-)

diff --git a/README.rst b/README.rst
index 5846a74e2..68bedc884 100644
--- a/README.rst
+++ b/README.rst
@@ -96,7 +96,7 @@ Requirements
 Download
 ........
 
-The latest release is tagged **v0.3.0** and is available as a source package
+The latest release is tagged **v0.4.0** and is available as a source package
 at `<https://github.com/mselig/nifty/tags>`_. The current version can be
 obtained by cloning the repository::
 
@@ -128,8 +128,9 @@ References
 ..........
 
 .. [1] Selig et al., "NIFTY - Numerical Information Field Theory - a
-    versatile Python library for signal inference", submitted to A&A, 2013;
-    `arXiv:1301.4499 <http://www.arxiv.org/abs/1301.4499>`_
+    versatile Python library for signal inference",
+    `A&A, vol. 554, id. A26 <http://dx.doi.org/10.1051/0004-6361/201321236>`_,
+    2013; `arXiv:1301.4499 <http://www.arxiv.org/abs/1301.4499>`_
 
 Release Notes
 -------------
diff --git a/nifty_core.py b/nifty_core.py
index 830629890..9061d3fe5 100644
--- a/nifty_core.py
+++ b/nifty_core.py
@@ -107,7 +107,8 @@
     References
     ----------
     .. [#] Selig et al., "NIFTY -- Numerical Information Field Theory --
-        a versatile Python library for signal inference", submitted to A&A,
+        a versatile Python library for signal inference",
+        `A&A, vol. 554, id. A26 <http://dx.doi.org/10.1051/0004-6361/201321236>`_,
         2013; `arXiv:1301.4499 <http://www.arxiv.org/abs/1301.4499>`_
 
 """
@@ -483,7 +484,7 @@ class _about(object): ## nifty support class for global settings
 
         """
         ## version
-        self._version = "0.3.97" ## FIXME: release veriosn 0.4.0 << REFERENCE + README
+        self._version = "0.4.0"
 
         ## switches and notifications
         self._errors = notification(default=True,ccode=notification._code)
@@ -1107,7 +1108,7 @@ class space(object):
 
     def get_power_undex(self,pindex=None): ## TODO: remove in future version
         """
-            **DEPRECATED** Provides the unindexing list for an indexed power spectrum.
+            **DEPRECATED** Provides the Unindexing array for an indexed power spectrum.
 
             Parameters
             ----------
@@ -1117,13 +1118,13 @@ class space(object):
 
             Returns
             -------
-            pundex : list
-                Unindexing list undoing power indexing.
+            pundex : numpy.ndarray
+                Unindexing array undoing power indexing.
 
             Notes
             -----
-            Indexing with the unindexing list undoes the indexing with the
-            indexing array; i.e., ``x == x[pindex][pundex]``.
+            Indexing with the unindexing array undoes the indexing with the
+            indexing array; i.e., ``power == power[pindex].flatten()[pundex]``.
 
             See also
             --------
@@ -1174,7 +1175,7 @@ class space(object):
             Provides one-dimensional arrays containing the scales of the
             spectral bands and the numbers of modes per scale, and an array
             giving for each component of a field the corresponding index of a
-            power spectrum as well as an unindexing list.
+            power spectrum as well as an Unindexing array.
 
             Parameters
             ----------
@@ -1201,16 +1202,16 @@ class space(object):
             pindex : numpy.ndarray
                 Indexing array giving the power spectrum index for each
                 represented mode.
-            pundex : list
-                Unindexing list undoing power spectrum indexing.
+            pundex : numpy.ndarray
+                Unindexing array undoing power spectrum indexing.
 
             Notes
             -----
             The ``kindex`` and ``rho`` are each one-dimensional arrays.
             The indexing array is of the same shape as a field living in this
             space and contains the indices of the associated bands.
-            Indexing with the unindexing list undoes the indexing with the
-            indexing array; i.e., ``power == power[pindex][pundex]``.
+            Indexing with the unindexing array undoes the indexing with the
+            indexing array; i.e., ``power == power[pindex].flatten()[pundex]``.
 
             See also
             --------
diff --git a/nifty_power.py b/nifty_power.py
index ed0a26558..eb66838cc 100644
--- a/nifty_power.py
+++ b/nifty_power.py
@@ -64,8 +64,8 @@ def weight_power(domain,spec,power=1,pindex=None,pundex=None,**kwargs):
         pindex : ndarray, *optional*
             Indexing array giving the power spectrum index for each
             represented mode.
-        pundex : list, *optional*
-            Unindexing list undoing power indexing.
+        pundex : ndarray, *optional*
+            Unindexing array undoing power indexing.
 
         Returns
         -------
@@ -265,7 +265,7 @@ def _calc_laplace(kindex): ## > computes Laplace operator and integrand
     klim = len(kindex)
     L = np.zeros((klim,klim))
     I = np.zeros(klim)
-    for jj in range(2,klim-1): ## leave out {0,1,kmax}
+    for jj in xrange(2,klim-1): ## leave out {0,1,kmax}
         L[jj,jj-1] = 2/(dl2[jj-1]*dl1[jj-1])
         L[jj,jj] = -2/dl2[jj-1]*(1/dl1[jj]+1/dl1[jj-1])
         L[jj,jj+1] = 2/(dl2[jj-1]*dl1[jj])
@@ -317,8 +317,8 @@ def infer_power(m,domain=None,Sk=None,D=None,pindex=None,pundex=None,kindex=None
         pindex : numpy.ndarray, *optional*
             Indexing array giving the power spectrum index for each
             represented mode (default: None).
-        pundex : list, *optional*
-            Unindexing list undoing power indexing.
+        pundex : ndarray, *optional*
+            Unindexing array undoing power indexing.
         kindex : numpy.ndarray, *optional*
             Scale corresponding to each band in the power spectrum
             (default: None).
-- 
GitLab