[python-dtcwt] 358/497: fix examples to use new API
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Tue Jul 21 18:06:26 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 48c0deff3cb009421744a3d829a40e6f358bbac1
Author: Rich Wareham <rjw57 at cam.ac.uk>
Date: Fri Feb 7 14:50:22 2014 +0000
fix examples to use new API
---
docs/2dtransform.rst | 4 ++--
docs/registration.rst | 4 ++--
docs/variant.rst | 12 ++++++------
dtcwt/plotting.py | 4 ++--
4 files changed, 12 insertions(+), 12 deletions(-)
diff --git a/docs/2dtransform.rst b/docs/2dtransform.rst
index 63de4ec..28dff58 100644
--- a/docs/2dtransform.rst
+++ b/docs/2dtransform.rst
@@ -15,8 +15,8 @@ wavelet coefficients:
figure(1)
imshow(lena, cmap=cm.gray, clim=(0,1))
- import dtcwt.numpy as backend
- transform = backend.Transform2d()
+ import dtcwt
+ transform = dtcwt.Transform2d()
# Compute two levels of dtcwt with the defaul wavelet family
lena_t = transform.forward(lena, nlevels=2)
diff --git a/docs/registration.rst b/docs/registration.rst
index 05adb57..bc979ac 100644
--- a/docs/registration.rst
+++ b/docs/registration.rst
@@ -288,9 +288,9 @@ To register the images we first take the DTCWT:
.. ipython::
:doctest:
- In [5]: import dtcwt.numpy as backend
+ In [5]: import dtcwt
- In [6]: transform = backend.Transform2d()
+ In [6]: transform = dtcwt.Transform2d()
In [7]: ref_t = transform.forward(ref, nlevels=6)
diff --git a/docs/variant.rst b/docs/variant.rst
index 002a76f..c334739 100644
--- a/docs/variant.rst
+++ b/docs/variant.rst
@@ -29,8 +29,8 @@ Usage is very similar to the standard 2-D transform function, but one uses the
.. code:: python
- import dtcwt.numpy as backend
- transform = backend.Transform2d(biort='near_sym_bp', qshift='qshift_bp')
+ import dtcwt
+ transform = dtcwt.Transform2d(biort='near_sym_bp', qshift='qshift_bp')
# .. load image and select number of levels ...
@@ -56,10 +56,10 @@ Working on the Lena image, the standard 2-D DTCWT achieves perfect reconstructio
.. plot::
:include-source: true
- import dtcwt.numpy as backend
+ import dtcwt
# Use the standard 2-D DTCWT
- transform = backend.Transform2d(biort='near_sym_b', qshift='qshift_b')
+ transform = dtcwt.Transform2d(biort='near_sym_b', qshift='qshift_b')
# Forward transform
image = datasets.lena()
@@ -80,10 +80,10 @@ Using the modified wavelets yields the following result:
.. plot::
:include-source: true
- import dtcwt.numpy as backend
+ import dtcwt
# Use the modified 2-D DTCWT
- transform = backend.Transform2d(biort='near_sym_b_bp', qshift='qshift_b_bp')
+ transform = dtcwt.Transform2d(biort='near_sym_b_bp', qshift='qshift_b_bp')
# Forward transform
image = datasets.lena()
diff --git a/dtcwt/plotting.py b/dtcwt/plotting.py
index b5e8de0..c45e0cc 100644
--- a/dtcwt/plotting.py
+++ b/dtcwt/plotting.py
@@ -34,12 +34,12 @@ def overlay_quiver_DTCWT(image, vectorField, level, offset):
.. plot::
:include-source: true
+ import dtcwt
import dtcwt.plotting as plotting
- import dtcwt.numpy as backend
lena = datasets.lena()
- transform2d = backend.Transform2d()
+ transform2d = dtcwt.Transform2d()
lena_t = transform2d.forward(lena, nlevels=3)
plotting.overlay_quiver_DTCWT(lena, lena_t.highpasses[-1], 3, 0.5)
--
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