[python-dtcwt] 349/497: rename TransformDomainSignal -> Pyramid
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:24 UTC 2015
This is an automated email from the git hooks/post-receive script.
ghisvail-guest pushed a commit to branch debian/sid
in repository python-dtcwt.
commit 9bed166652b25965e4878d243c487c90fa713c2b
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Fri Feb 7 14:14:42 2014 +0000
rename TransformDomainSignal -> Pyramid
---
docs/backends.rst | 4 ++--
dtcwt/__init__.py | 4 ++--
dtcwt/numpy/__init__.py | 4 ++--
dtcwt/numpy/transform2d.py | 14 +++++++-------
dtcwt/opencl/__init__.py | 4 ++--
dtcwt/opencl/transform2d.py | 18 +++++++++---------
dtcwt/registration.py | 8 ++++----
dtcwt/transform2d.py | 4 ++--
8 files changed, 30 insertions(+), 30 deletions(-)
diff --git a/docs/backends.rst b/docs/backends.rst
index df4efa9..3e11be6 100644
--- a/docs/backends.rst
+++ b/docs/backends.rst
@@ -59,8 +59,8 @@ example, to compute the 2D DT-CWT of the 2D real array in *X*::
>>> imshow(Y.subbands[-1][:,:,0]) # Show first coarsest scale subband
In this case *Y* is an instance of a class which behaves like
-:py:class:`dtcwt.TransformDomainSignal`. Backends are free to
+:py:class:`dtcwt.Pyramid`. Backends are free to
return whatever result they like as long as the result can be used like this
base class. (For example, the OpenCL backend returns a
-:py:class:`dtcwt.opencl.TransformDomainSignal` instance which
+:py:class:`dtcwt.opencl.Pyramid` instance which
keeps the device-side results available.)
diff --git a/dtcwt/__init__.py b/dtcwt/__init__.py
index 194926a..2594a37 100644
--- a/dtcwt/__init__.py
+++ b/dtcwt/__init__.py
@@ -1,6 +1,6 @@
-from .numpy import Transform2d, TransformDomainSignal
+from .numpy import Transform2d, Pyramid
__all__ = [
'Transform2d',
- 'TransformDomainSignal',
+ 'Pyramid',
]
diff --git a/dtcwt/numpy/__init__.py b/dtcwt/numpy/__init__.py
index 77691d4..ebf1edf 100644
--- a/dtcwt/numpy/__init__.py
+++ b/dtcwt/numpy/__init__.py
@@ -4,9 +4,9 @@ be available.
"""
-from .transform2d import TransformDomainSignal, Transform2d
+from .transform2d import Pyramid, Transform2d
__all__ = [
- 'TransformDomainSignal',
+ 'Pyramid',
'Transform2d',
]
diff --git a/dtcwt/numpy/transform2d.py b/dtcwt/numpy/transform2d.py
index 21b487e..bd5a2ab 100644
--- a/dtcwt/numpy/transform2d.py
+++ b/dtcwt/numpy/transform2d.py
@@ -14,7 +14,7 @@ from dtcwt.numpy.lowlevel import LowLevelBackendNumPy
# Use the NumPy low-level backend
_BACKEND = LowLevelBackendNumPy()
-class TransformDomainSignal(object):
+class Pyramid(object):
"""A representation of a transform domain signal.
Backends are free to implement any class which respects this interface for
@@ -69,7 +69,7 @@ class Transform2d(object):
:param X: 2D real array
:param nlevels: Number of levels of wavelet decomposition
- :returns: A :py:class:`dtcwt.TransformDomainSignal` compatible object representing the transform-domain signal
+ :returns: A :py:class:`dtcwt.Pyramid` compatible object representing the transform-domain signal
.. codeauthor:: Rich Wareham <rjw57 at cantab.net>, Aug 2013
.. codeauthor:: Nick Kingsbury, Cambridge University, Sept 2001
@@ -121,9 +121,9 @@ class Transform2d(object):
if nlevels == 0:
if include_scale:
- return TransformDomainSignal(X, (), ())
+ return Pyramid(X, (), ())
else:
- return TransformDomainSignal(X, ())
+ return Pyramid(X, ())
# initialise
Yh = [None,] * nlevels
@@ -207,15 +207,15 @@ class Transform2d(object):
'The rightmost column has been duplicated, prior to decomposition.')
if include_scale:
- return TransformDomainSignal(Yl, tuple(Yh), tuple(Yscale))
+ return Pyramid(Yl, tuple(Yh), tuple(Yscale))
else:
- return TransformDomainSignal(Yl, tuple(Yh))
+ return Pyramid(Yl, tuple(Yh))
def inverse(self, td_signal, gain_mask=None):
"""Perform an *n*-level dual-tree complex wavelet (DTCWT) 2D
reconstruction.
- :param td_signal: A :py:class:`dtcwt.TransformDomainSignal`-like class holding the transform domain representation to invert.
+ :param td_signal: A :py:class:`dtcwt.Pyramid`-like class holding the transform domain representation to invert.
:param gain_mask: Gain to be applied to each subband.
:returns: A numpy-array compatible instance with the reconstruction.
diff --git a/dtcwt/opencl/__init__.py b/dtcwt/opencl/__init__.py
index 3622819..80e799f 100644
--- a/dtcwt/opencl/__init__.py
+++ b/dtcwt/opencl/__init__.py
@@ -4,9 +4,9 @@ PyOpenCL be installed.
"""
-from .transform2d import TransformDomainSignal, Transform2d
+from .transform2d import Pyramid, Transform2d
__all__ = [
- 'TransformDomainSignal',
+ 'Pyramid',
'Transform2d',
]
diff --git a/dtcwt/opencl/transform2d.py b/dtcwt/opencl/transform2d.py
index ab253e7..f166eb5 100644
--- a/dtcwt/opencl/transform2d.py
+++ b/dtcwt/opencl/transform2d.py
@@ -11,7 +11,7 @@ from dtcwt.opencl.lowlevel import colfilter, coldfilt, colifilt
from dtcwt.opencl.lowlevel import axis_convolve, axis_convolve_dfilter, q2c
from dtcwt.opencl.lowlevel import to_device, to_queue, to_array, empty
-from dtcwt.numpy import TransformDomainSignal
+from dtcwt.numpy import Pyramid
from dtcwt.numpy import Transform2d as Transform2dNumPy
try:
@@ -28,13 +28,13 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
else:
return r.lowpass, r.subbands
-class TransformDomainSignal(object):
+class Pyramid(object):
"""
An interface-compatible version of
- :py:class:`dtcwt.TransformDomainSignal` where the initialiser
+ :py:class:`dtcwt.Pyramid` where the initialiser
arguments are assumed to by :py:class:`pyopencl.array.Array` instances.
- The attributes defined in :py:class:`dtcwt.TransformDomainSignal`
+ The attributes defined in :py:class:`dtcwt.Pyramid`
are implemented via properties. The original OpenCL arrays may be accessed
via the ``cl_...`` attributes.
@@ -111,7 +111,7 @@ class Transform2d(Transform2dNumPy):
:param X: 2D real array
:param nlevels: Number of levels of wavelet decomposition
- :returns: A :py:class:`dtcwt.TransformDomainSignal` compatible object representing the transform-domain signal
+ :returns: A :py:class:`dtcwt.Pyramid` compatible object representing the transform-domain signal
.. note::
@@ -182,9 +182,9 @@ class Transform2d(Transform2dNumPy):
if nlevels == 0:
if include_scale:
- return TransformDomainSignal(X, (), ())
+ return Pyramid(X, (), ())
else:
- return TransformDomainSignal(X, ())
+ return Pyramid(X, ())
# initialise
Yh = [None,] * nlevels
@@ -278,6 +278,6 @@ class Transform2d(Transform2dNumPy):
'The rightmost column has been duplicated, prior to decomposition.')
if include_scale:
- return TransformDomainSignal(Yl, tuple(Yh), tuple(Yscale))
+ return Pyramid(Yl, tuple(Yh), tuple(Yscale))
else:
- return TransformDomainSignal(Yl, tuple(Yh))
+ return Pyramid(Yl, tuple(Yh))
diff --git a/dtcwt/registration.py b/dtcwt/registration.py
index fb5ce62..20f7d52 100644
--- a/dtcwt/registration.py
+++ b/dtcwt/registration.py
@@ -106,7 +106,7 @@ def qtildematrices(t_ref, t_target, levels):
:returns: a tuple of :math:`\tilde{Q}` matrices for each index in *levels*
Both *t_ref* and *t_target* should be
- :py:class:`dtcwt.TransformDomainSignal`-compatible objects.
+ :py:class:`dtcwt.Pyramid`-compatible objects.
Indices in *levels* are 0-based.
The returned matrices are NxMx27 where NxM is the shape of the
@@ -250,7 +250,7 @@ def warptransform(t, avecs, levels, method=None):
:param levels: a sequence of 0-based indices specifying which levels to act on
*t* should be a
- :py:class:`dtcwt.TransformDomainSignal`-compatible instance.
+ :py:class:`dtcwt.Pyramid`-compatible instance.
The *method* parameter is interpreted as in :py:func:`dtcwt.sampling.rescale` and
is the sampling method used to resize *avecs* to *shape*.
@@ -269,7 +269,7 @@ def warptransform(t, avecs, levels, method=None):
warped_subbands[l] = warphighpass(warped_subbands[l], avecs, method=method)
# Clone the transform
- return dtcwt.numpy.TransformDomainSignal(t.lowpass, tuple(warped_subbands), t.scales)
+ return dtcwt.numpy.Pyramid(t.lowpass, tuple(warped_subbands), t.scales)
def estimatereg(source, reference, regshape=None):
"""
@@ -279,7 +279,7 @@ def estimatereg(source, reference, regshape=None):
:param reference: transformed reference image
The *reference* and *source* parameters should support the same API as
- :py:class:`dtcwt.TransformDomainSignal`.
+ :py:class:`dtcwt.Pyramid`.
The local affine distortion is estimated at at 8x8 pixel scales.
Return a NxMx6 array where the 6-element vector at (N,M) corresponds to the
diff --git a/dtcwt/transform2d.py b/dtcwt/transform2d.py
index 4eaa971..49fb53d 100644
--- a/dtcwt/transform2d.py
+++ b/dtcwt/transform2d.py
@@ -10,7 +10,7 @@ from dtcwt.defaults import DEFAULT_BIORT, DEFAULT_QSHIFT
from dtcwt.lowlevel import colfilter, coldfilt, colifilt
from dtcwt.utils import appropriate_complex_type_for, asfarray
-from dtcwt.numpy import Transform2d, TransformDomainSignal
+from dtcwt.numpy import Transform2d, Pyramid
def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include_scale=False):
"""Perform a *n*-level DTCWT-2D decompostion on a 2D matrix *X*.
@@ -85,7 +85,7 @@ def dtwaveifm2(Yl,Yh,biort=DEFAULT_BIORT,qshift=DEFAULT_QSHIFT,gain_mask=None):
"""
trans = Transform2d(biort, qshift)
- res = trans.inverse(TransformDomainSignal(Yl, Yh), gain_mask=gain_mask)
+ res = trans.inverse(Pyramid(Yl, Yh), gain_mask=gain_mask)
return res
# BACKWARDS COMPATIBILITY: add a dtwave{i,x}fm2b function which is a copy of
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/python-dtcwt.git
More information about the debian-science-commits
mailing list