Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
function afunction, X, TF
; afunction - Implements the blurring linear operator via FFT
; This function applies the blurring operator A to the
; reconstruction x of the unknown object in the Fourier space, by
; componentwise multiplication of the two FFTs and then by transforming
; back the result by an IFFT.
;
; SYNOPSIS
; out = afunction(x, TF)
;
; INPUT
; x (double) - reconstruction
; TF (dcomplex) - Fourier transform of the blurring operator A
;
; OUTPUT
; out (double) - vectorized blurred version of x
;
; ------------------------------------------------------------------------------
;
; This software is developed within the research project
;
; PRISMA - Optimization methods and software for inverse problems
; http://www.unife.it/prisma
;
; funded by the Italian Ministry for University and Research (MIUR), under
; the PRIN2008 initiative, grant n. 2008T5KA4L, 2010-2012. This software is
; part of the package "IRMA - Image Reconstruction in Microscopy and Astronomy"
; currently under development within the PRISMA project.
;
; Version: 1.0
; Date: July 2011
; Authors:
; Roberto Cavicchioli, Marco Prato, Luca Zanni
; Dept. of Pure Appl. Math., Univ. of Modena and Reggio Emilia, Italy
; roberto.cavicchioli@unimore.it, marco.prato@unimore.it, luca.zanni@unimore.it
; Mario Bertero, Patrizia Boccacci
; DISI (Dipartimento di Informatica e Scienze dell'Informazione), University of Genova, Italy
; bertero@disi.unige.it, boccacci@disi.unige.it
;
; Software homepage: http://www.unife.it/prisma/software
;
; Copyright (C) 2011 by M. Bertero, P. Boccacci, R. Cavicchioli, M. Prato, L. Zanni.
; ------------------------------------------------------------------------------
; COPYRIGHT NOTIFICATION
;
; Permission to copy and modify this software and its documentation for
; internal research use is granted, provided that this notice is retained
; thereon and on all copies or modifications. The authors and their
; respective Universities makes no representations as to the suitability
; and operability of this software for any purpose. It is provided "as is"
; without express or implied warranty. Use of this software for commercial
; purposes is expressly prohibited without contacting the authors.
;
; This program is free software; you can redistribute it and/or modify it
; under the terms of the GNU General Public License as published by the
; Free Software Foundation; either version 3 of the License, or (at your
; option) any later version.
;
; This program is distributed in the hope that it will be useful, but
; WITHOUT ANY WARRANTY; without even the implied warranty of
; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
; See the GNU General Public License for more details.
;
; You should have received a copy of the GNU General Public License along
; with this program; if not, either visite http://www.gnu.org/licenses/
; or write to
; Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
; ==============================================================================
dimTF = size(TF,/dimensions)
if (n_elements(dimTF) eq 2) then dimTF = [dimTF,1]
dimX = size(X,/dimensions)
out = dblarr(dimTF)
if (n_elements(dimX) gt 2) then begin
for i = 0, dimTF[2]-1 do begin
out[*,*,i] = real_part(fft(reform(TF[*,*,i])*fft(reform(X[*,*,i])),/inverse))
endfor
endif else begin
x_t = fft(X)
for i = 0, dimTF[2]-1 do begin
out[*,*,i] = real_part(fft(reform(TF[*,*,i])*x_t,/inverse))
endfor
endelse
return, out
END
; ==============================================================================
; End of afunction.pro file - IRMA package
; ==============================================================================