From def48f19099710781238a20523f16fceb01943d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fran=C3=A7ois=20Orieux?= Date: Tue, 12 Nov 2013 15:36:29 +0100 Subject: [PATCH] Rename deconvolution to restoration --- .../{plot_deconvolution.py => plot_restoration.py} | 6 +++--- skimage/{deconvolution => restoration}/__init__.py | 4 ++-- .../tests/camera_rl.npy | Bin .../tests/camera_unsup.npy | Bin .../tests/camera_wiener.npy | Bin .../tests/test_deconvolution.py | 8 ++++---- skimage/{deconvolution => restoration}/uft.py | 2 +- skimage/{deconvolution => restoration}/wiener.py | 0 8 files changed, 10 insertions(+), 10 deletions(-) rename doc/examples/{plot_deconvolution.py => plot_restoration.py} (90%) rename skimage/{deconvolution => restoration}/__init__.py (94%) rename skimage/{deconvolution => restoration}/tests/camera_rl.npy (100%) rename skimage/{deconvolution => restoration}/tests/camera_unsup.npy (100%) rename skimage/{deconvolution => restoration}/tests/camera_wiener.npy (100%) rename skimage/{deconvolution => restoration}/tests/test_deconvolution.py (84%) rename skimage/{deconvolution => restoration}/uft.py (99%) rename skimage/{deconvolution => restoration}/wiener.py (100%) diff --git a/doc/examples/plot_deconvolution.py b/doc/examples/plot_restoration.py similarity index 90% rename from doc/examples/plot_deconvolution.py rename to doc/examples/plot_restoration.py index f2b5afa4..7cb7c1ca 100644 --- a/doc/examples/plot_deconvolution.py +++ b/doc/examples/plot_restoration.py @@ -30,7 +30,7 @@ data learning. This is not common and based on the following publication import numpy as np import matplotlib.pyplot as plt -from skimage import color, data, deconvolution +from skimage import color, data, restoration lena = color.rgb2gray(data.lena()) from scipy.signal import convolve2d as conv2 @@ -38,7 +38,7 @@ psf = np.ones((5, 5)) / 25 lena = conv2(lena, psf, 'same') lena += 0.1 * lena.std() * np.random.standard_normal(lena.shape) -deconvolued, _ = deconvolution.unsupervised_wiener(lena, psf) +deconvolued, _ = restoration.unsupervised_wiener(lena, psf) fig, ax = plt.subplots(nrows=1, ncols=2, figsize=(8, 5)) @@ -50,7 +50,7 @@ ax[0].set_title('Data') ax[1].imshow(deconvolued, vmax=lena.max()) ax[1].axis('off') -ax[1].set_title('Self tuned deconvolution') +ax[1].set_title('Self tuned restoration') fig.subplots_adjust(wspace=0.02, hspace=0.2, top=0.9, bottom=0.05, left=0, right=1) diff --git a/skimage/deconvolution/__init__.py b/skimage/restoration/__init__.py similarity index 94% rename from skimage/deconvolution/__init__.py rename to skimage/restoration/__init__.py index 9d3bdbc0..78767c00 100644 --- a/skimage/deconvolution/__init__.py +++ b/skimage/restoration/__init__.py @@ -1,8 +1,8 @@ # -*- coding: utf-8 -*- -"""Skimage module for image deconvolution +"""Skimage module for image restoration This module implement various algorithm of the literature for image -deconvolution. +restoration. References ---------- diff --git a/skimage/deconvolution/tests/camera_rl.npy b/skimage/restoration/tests/camera_rl.npy similarity index 100% rename from skimage/deconvolution/tests/camera_rl.npy rename to skimage/restoration/tests/camera_rl.npy diff --git a/skimage/deconvolution/tests/camera_unsup.npy b/skimage/restoration/tests/camera_unsup.npy similarity index 100% rename from skimage/deconvolution/tests/camera_unsup.npy rename to skimage/restoration/tests/camera_unsup.npy diff --git a/skimage/deconvolution/tests/camera_wiener.npy b/skimage/restoration/tests/camera_wiener.npy similarity index 100% rename from skimage/deconvolution/tests/camera_wiener.npy rename to skimage/restoration/tests/camera_wiener.npy diff --git a/skimage/deconvolution/tests/test_deconvolution.py b/skimage/restoration/tests/test_deconvolution.py similarity index 84% rename from skimage/deconvolution/tests/test_deconvolution.py rename to skimage/restoration/tests/test_deconvolution.py index 6ccce3a2..cb395227 100644 --- a/skimage/deconvolution/tests/test_deconvolution.py +++ b/skimage/restoration/tests/test_deconvolution.py @@ -5,7 +5,7 @@ from scipy.signal import convolve2d import skimage from skimage.data import camera -from skimage import deconvolution +from skimage import restoration test_img = skimage.img_as_float(camera()) @@ -15,7 +15,7 @@ def test_wiener(): data = convolve2d(test_img, psf, 'same') np.random.seed(0) data += 0.1 * data.std() * np.random.standard_normal(data.shape) - deconvolved = deconvolution.wiener(data, psf, 0.05) + deconvolved = restoration.wiener(data, psf, 0.05) path = pjoin(dirname(abspath(__file__)), 'camera_wiener.npy') np.testing.assert_allclose(deconvolved, np.load(path), rtol=1e-3) @@ -26,7 +26,7 @@ def test_unsupervised_wiener(): data = convolve2d(test_img, psf, 'same') np.random.seed(0) data += 0.1 * data.std() * np.random.standard_normal(data.shape) - deconvolved, _ = deconvolution.unsupervised_wiener(data, psf) + deconvolved, _ = restoration.unsupervised_wiener(data, psf) path = pjoin(dirname(abspath(__file__)), 'camera_unsup.npy') np.testing.assert_allclose(deconvolved, np.load(path), rtol=1e-3) @@ -37,7 +37,7 @@ def test_richardson_lucy(): data = convolve2d(test_img, psf, 'same') np.random.seed(0) data += 0.1 * data.std() * np.random.standard_normal(data.shape) - deconvolved = deconvolution.richardson_lucy(data, psf, 5) + deconvolved = restoration.richardson_lucy(data, psf, 5) path = pjoin(dirname(abspath(__file__)), 'camera_rl.npy') np.testing.assert_allclose(deconvolved, np.load(path), rtol=1e-3) diff --git a/skimage/deconvolution/uft.py b/skimage/restoration/uft.py similarity index 99% rename from skimage/deconvolution/uft.py rename to skimage/restoration/uft.py index a592f8d7..25593af1 100644 --- a/skimage/deconvolution/uft.py +++ b/skimage/restoration/uft.py @@ -1,7 +1,7 @@ # -*- coding: utf-8 -*- # uft.py --- Unitary fourier transform -# Copyright (c) 2011, 2012, 2013 Fran��ois Orieux +# Copyright (c) 2011, 2012, 2013 François Orieux # Permission is hereby granted, free of charge, to any person # obtaining a copy of this software and associated documentation files diff --git a/skimage/deconvolution/wiener.py b/skimage/restoration/wiener.py similarity index 100% rename from skimage/deconvolution/wiener.py rename to skimage/restoration/wiener.py