[python-dtcwt] 407/497: fix up references to biort/qshift in docs
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:33 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 5567c7fa5f22622ba9ce2f1c9006a02a5c903833
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Mon Feb 10 19:40:28 2014 +0000
fix up references to biort/qshift in docs
---
dtcwt/coeffs.py | 6 +++---
dtcwt/compat.py | 48 +++++++++++++++++++++---------------------
dtcwt/numpy/transform3d.py | 52 ++++++++++++++++++++++++----------------------
3 files changed, 54 insertions(+), 52 deletions(-)
diff --git a/dtcwt/coeffs.py b/dtcwt/coeffs.py
index dfa07c9..215d2bf 100644
--- a/dtcwt/coeffs.py
+++ b/dtcwt/coeffs.py
@@ -47,7 +47,7 @@ def biort(name):
wavelet filters.
:raises IOError: if name does not correspond to a set of wavelets known to the library.
- :raises ValueError: if name specifies a :py:func:`qshift` wavelet.
+ :raises ValueError: if name specifies a :py:func:`dtcwt.coeffs.qshift` wavelet.
"""
if name == 'near_sym_b_bp':
@@ -64,7 +64,7 @@ def qshift(name):
============ ============================================
Name Wavelet
============ ============================================
- qshift_06 Quarter Sample Shift Orthogonal (Q-Shift) 10,10 tap filters,
+ qshift_06 Quarter Sample Shift Orthogonal (Q-Shift) 10,10 tap filters,
(only 6,6 non-zero taps).
qshift_a Q-shift 10,10 tap filters,
(with 10,10 non-zero taps, unlike qshift_06).
@@ -81,7 +81,7 @@ def qshift(name):
wavelet filters.
:raises IOError: if name does not correspond to a set of wavelets known to the library.
- :raises ValueError: if name specifies a :py:func:`biort` wavelet.
+ :raises ValueError: if name specifies a :py:func:`dtcwt.coeffs.biort` wavelet.
"""
if name == 'qshift_b_bp':
diff --git a/dtcwt/compat.py b/dtcwt/compat.py
index 1774732..82e96a8 100644
--- a/dtcwt/compat.py
+++ b/dtcwt/compat.py
@@ -35,15 +35,15 @@ def dtwavexfm(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include_
:param X: 1D real array or 2D real array whose columns are to be transformed
:param nlevels: Number of levels of wavelet decomposition
- :param biort: Level 1 wavelets to use. See :py:func:`biort`.
- :param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
+ :param biort: Level 1 wavelets to use. See :py:func:`dtcwt.coeffs.biort`.
+ :param qshift: Level >= 2 wavelets to use. See :py:func:`dtcwt.coeffs.qshift`.
:returns Yl: The real lowpass image from the final level
:returns Yh: A tuple containing the (N, M, 6) shape complex highpass subimages for each level.
:returns Yscale: If *include_scale* is True, a tuple containing real lowpass coefficients for every scale.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift` functions. Otherwise, they are
interpreted as tuples of vectors giving filter coefficients. In the *biort*
case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
@@ -73,8 +73,8 @@ def dtwaveifm(Yl, Yh, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, gain_mask=None
:param Yl: The real lowpass subband from the final level
:param Yh: A sequence containing the complex highpass subband for each level.
- :param biort: Level 1 wavelets to use. See :py:func:`biort`.
- :param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
+ :param biort: Level 1 wavelets to use. See :py:func:`dtcwt.coeffs.biort`.
+ :param qshift: Level >= 2 wavelets to use. See :py:func:`dtcwt.coeffs.qshift`.
:param gain_mask: Gain to be applied to each subband.
:returns Z: Reconstructed real array.
@@ -84,10 +84,10 @@ def dtwaveifm(Yl, Yh, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, gain_mask=None
*gain_mask* is all ones. Note that *l* is 0-indexed.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
- interpreted as tuples of vectors giving filter coefficients. In the *biort*
- case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
- be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift` functions.
+ Otherwise, they are interpreted as tuples of vectors giving filter
+ coefficients. In the *biort* case, this should be (h0o, g0o, h1o, g1o). In
+ the *qshift* case, this should be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
Example::
@@ -109,15 +109,15 @@ def dtwavexfm2(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, include
:param X: 2D real array
:param nlevels: Number of levels of wavelet decomposition
- :param biort: Level 1 wavelets to use. See :py:func:`biort`.
- :param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
+ :param biort: Level 1 wavelets to use. See :py:func:`dtcwt.coeffs.biort`.
+ :param qshift: Level >= 2 wavelets to use. See :py:func:`dtcwt.coeffs.qshift`.
:returns Yl: The real lowpass image from the final level
:returns Yh: A tuple containing the complex highpass subimages for each level.
:returns Yscale: If *include_scale* is True, a tuple containing real lowpass coefficients for every scale.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift` functions. Otherwise, they are
interpreted as tuples of vectors giving filter coefficients. In the *biort*
case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
@@ -148,8 +148,8 @@ def dtwaveifm2(Yl,Yh,biort=DEFAULT_BIORT,qshift=DEFAULT_QSHIFT,gain_mask=None):
:param Yl: The real lowpass subband from the final level
:param Yh: A sequence containing the complex highpass subband for each level.
- :param biort: Level 1 wavelets to use. See :py:func:`biort`.
- :param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
+ :param biort: Level 1 wavelets to use. See :py:func:`dtcwt.coeffs.biort`.
+ :param qshift: Level >= 2 wavelets to use. See :py:func:`dtcwt.coeffs.qshift`.
:param gain_mask: Gain to be applied to each subband.
:returns Z: Reconstructed real array
@@ -160,7 +160,7 @@ def dtwaveifm2(Yl,Yh,biort=DEFAULT_BIORT,qshift=DEFAULT_QSHIFT,gain_mask=None):
zero-indexed.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift` functions. Otherwise, they are
interpreted as tuples of vectors giving filter coefficients. In the *biort*
case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
@@ -192,8 +192,8 @@ def dtwavexfm3(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT,
:param X: 3D real array-like object
:param nlevels: Number of levels of wavelet decomposition
- :param biort: Level 1 wavelets to use. See :py:func:`biort`.
- :param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
+ :param biort: Level 1 wavelets to use. See :py:func:`dtcwt.coeffs.biort`.
+ :param qshift: Level >= 2 wavelets to use. See :py:func:`dtcwt.coeffs.qshift`.
:param ext_mode: Extension mode. See below.
:param discard_level_1: True if level 1 high-pass bands are to be discarded.
@@ -205,7 +205,7 @@ def dtwavexfm3(X, nlevels=3, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT,
coefficients for direction d at level l where d and l are both 0-indexed.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift` functions. Otherwise, they are
interpreted as tuples of vectors giving filter coefficients. In the *biort*
case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
@@ -251,17 +251,17 @@ def dtwaveifm3(Yl, Yh, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, ext_mode=4):
:param Yl: The real lowpass subband from the final level
:param Yh: A sequence containing the complex highpass subband for each level.
- :param biort: Level 1 wavelets to use. See :py:func:`biort`.
- :param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
+ :param biort: Level 1 wavelets to use. See :py:func:`dtcwt.coeffs.biort`.
+ :param qshift: Level >= 2 wavelets to use. See :py:func:`dtcwt.coeffs.qshift`.
:param ext_mode: Extension mode. See below.
:returns Z: Reconstructed real image matrix.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
- interpreted as tuples of vectors giving filter coefficients. In the *biort*
- case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
- be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift` functions.
+ Otherwise, they are interpreted as tuples of vectors giving filter
+ coefficients. In the *biort* case, this should be (h0o, g0o, h1o, g1o). In
+ the *qshift* case, this should be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
There are two values for *ext_mode*, either 4 or 8. If *ext_mode* = 4,
check whether 1st level is divisible by 2 (if not we raise a
diff --git a/dtcwt/numpy/transform3d.py b/dtcwt/numpy/transform3d.py
index dd3a5fa..a9aa0a4 100644
--- a/dtcwt/numpy/transform3d.py
+++ b/dtcwt/numpy/transform3d.py
@@ -16,7 +16,7 @@ class Transform3d(object):
"""
An implementation of the 3D DT-CWT via NumPy. *biort* and *qshift* are the
wavelets which parameterise the transform. Valid values are documented in
- :py:func:`dtcwt.compat.dtwavexfm3`.
+ :py:func:`dtcwt.coeffs.biort` and :py:func:`dtcwt.coeffs.qshift`.
"""
def __init__(self, biort=DEFAULT_BIORT, qshift=DEFAULT_QSHIFT, ext_mode=4):
@@ -39,22 +39,23 @@ class Transform3d(object):
:param X: 3D real array-like object
:param nlevels: Number of levels of wavelet decomposition
- :param biort: Level 1 wavelets to use. See :py:func:`biort`.
- :param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
+ :param biort: Level 1 wavelets to use. See :py:func:`dtcwt.coeffs.biort`.
+ :param qshift: Level >= 2 wavelets to use. See :py:func:`dtcwt.coeffs.qshift`.
:param discard_level_1: True if level 1 high-pass bands are to be discarded.
- :returns Yl: The real lowpass image from the final level
- :returns Yh: A tuple containing the complex highpass subimages for each level.
+ :returns: a :py:class:`dtcwt.Pyramid` instance
- Each element of *Yh* is a 4D complex array with the 4th dimension having
- size 28. The 3D slice ``Yh[l][:,:,:,d]`` corresponds to the complex higpass
- coefficients for direction d at level l where d and l are both 0-indexed.
+ Each element of the Pyramid *highpasses* tuple is a 4D complex array
+ with the 4th dimension having size 28. The 3D slice ``[l][:,:,:,d]``
+ corresponds to the complex higpass coefficients for direction d at
+ level l where d and l are both 0-indexed.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
- interpreted as tuples of vectors giving filter coefficients. In the *biort*
- case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
- be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift`
+ functions. Otherwise, they are interpreted as tuples of vectors giving
+ filter coefficients. In the *biort* case, this should be (h0o, g0o,
+ h1o, g1o). In the *qshift* case, this should be (h0a, h0b, g0a, g0b,
+ h1a, h1b, g1a, g1b).
There are two values for *ext_mode*, either 4 or 8. If *ext_mode* = 4,
check whether 1st level is divisible by 2 (if not we raise a
@@ -68,9 +69,10 @@ class Transform3d(object):
If *discard_level_1* is True the highpass coefficients at level 1 will not be
discarded. (And, in fact, will never be calculated.) This turns the
transform from being 8:1 redundant to being 1:1 redundant at the cost of
- no-longer allowing perfect reconstruction. If this option is selected then
- `Yh[0]` will be `None`. Note that :py:func:`dtwaveifm3` will accepts
- `Yh[0]` being `None` and will treat it as being zero.
+ no-longer allowing perfect reconstruction. If this option is selected
+ then the first element of the *highpasses* tuple will be `None`. Note
+ that :py:func:`dtcwt.Transform3d.inverse` will accept the first element
+ being `None` and will treat it as being zero.
.. codeauthor:: Rich Wareham <rjw57 at cantab.net>, Aug 2013
.. codeauthor:: Huizhong Chen, Jan 2009
@@ -128,23 +130,23 @@ class Transform3d(object):
else:
return Pyramid(Yl, tuple(Yh))
- def inverse(self, td_signal):
+ def inverse(self, pyramid):
"""Perform an *n*-level dual-tree complex wavelet (DTCWT) 3D
reconstruction.
- :param Yl: The real lowpass subband from the final level
- :param Yh: A sequence containing the complex highpass subband for each level.
+ :param pyramid: The :py:class:`dtcwt.Pyramid`-like instance representing the transformed signal.
:param biort: Level 1 wavelets to use. See :py:func:`biort`.
:param qshift: Level >= 2 wavelets to use. See :py:func:`qshift`.
:param ext_mode: Extension mode. See below.
- :returns Z: Reconstructed real image matrix.
+ :returns: Reconstructed real image matrix.
If *biort* or *qshift* are strings, they are used as an argument to the
- :py:func:`biort` or :py:func:`qshift` functions. Otherwise, they are
- interpreted as tuples of vectors giving filter coefficients. In the *biort*
- case, this should be (h0o, g0o, h1o, g1o). In the *qshift* case, this should
- be (h0a, h0b, g0a, g0b, h1a, h1b, g1a, g1b).
+ :py:func:`dtcwt.coeffs.biort` or :py:func:`dtcwt.coeffs.qshift`
+ functions. Otherwise, they are interpreted as tuples of vectors giving
+ filter coefficients. In the *biort* case, this should be (h0o, g0o,
+ h1o, g1o). In the *qshift* case, this should be (h0a, h0b, g0a, g0b,
+ h1a, h1b, g1a, g1b).
There are two values for *ext_mode*, either 4 or 8. If *ext_mode* = 4,
check whether 1st level is divisible by 2 (if not we raise a
@@ -160,8 +162,8 @@ class Transform3d(object):
.. codeauthor:: Nick Kingsbury, Cambridge University, July 1999.
"""
- Yl = td_signal.lowpass
- Yh = td_signal.highpasses
+ Yl = pyramid.lowpass
+ Yh = pyramid.highpasses
# Try to load coefficients if biort is a string parameter
if len(self.biort) == 4:
--
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