Hi all,
Maybe my calculus is screwy, but this doesn't make sense to me.
Here's my issue:
I have two astronomical images (of stars). I've fit an average PSF as
a Moffat profile for each of the two images. I want to find the
optimal convolution kernel to match the two psfs, so I call on my old
friend Mr. Fourier. If MA is the Moffat profile for image A and MB is
the Moffat profile for image B (both 2d), and K is my optimal kernel,
then I can do this:
MA ** K = MB --> ** is convolution in this scenario
F(MA**K) = F(MB) --> F() is the Fourier transform
F(MA) * F(K) = F(MB)
K = F^-1(F(MB)/F(MA))
With me so far? So I do this in IDL.
IDL> ma = moffat(params_a)
IDL> mb = moffat(params_b)
IDL> fma = fft(ma) & fmb = fft(mb)
IDL> k = fft(fma/fmb,/inverse)
IDL> mc = convol(ma,k)
What I get, however, is that MC is a 2d delta function. Why...? It
happens with 2d Gaussians, as well. Thanks for your help!
--Gray
|
|
0
|
|
|
|
Reply
|
Gray
|
12/2/2010 5:35:24 PM |
|
On Dec 3, 6:35=A0am, Gray <grayliketheco...@gmail.com> wrote:
> Hi all,
>
> Maybe my calculus is screwy, but this doesn't make sense to me.
> Here's my issue:
>
> I have two astronomical images (of stars). =A0I've fit an average PSF as
> a Moffat profile for each of the two images. =A0I want to find the
> optimal convolution kernel to match the two psfs, so I call on my old
> friend Mr. Fourier. =A0If MA is the Moffat profile for image A and MB is
> the Moffat profile for image B (both 2d), and K is my optimal kernel,
> then I can do this:
>
> MA ** K =3D MB --> ** is convolution in this scenario
> F(MA**K) =3D F(MB) =A0--> =A0F() is the Fourier transform
> F(MA) * F(K) =3D F(MB)
> K =3D F^-1(F(MB)/F(MA))
>
> With me so far? =A0So I do this in IDL.
> IDL> ma =3D moffat(params_a)
> IDL> mb =3D moffat(params_b)
> IDL> fma =3D fft(ma) & fmb =3D fft(mb)
> IDL> k =3D fft(fma/fmb,/inverse)
> IDL> mc =3D convol(ma,k)
>
> What I get, however, is that MC is a 2d delta function. =A0Why...? =A0It
> happens with 2d Gaussians, as well. =A0Thanks for your help!
>
Hmm, not sure what Moffat does, but maybe the division by fmb terms
with small amplitudes could be the problem? What happens if you add a
small constant to fmb? If you want to match the OTF of the two images
could you just convolve a with the psf of b and convolve b with the
psf of a?
Hope this helps
MC
|
|
0
|
|
|
|
Reply
|
MC
|
12/3/2010 10:23:16 AM
|
|
Gray wrote:
> Hi all,
>
> Maybe my calculus is screwy, but this doesn't make sense to me.
> Here's my issue:
>
> I have two astronomical images (of stars). I've fit an average PSF as
> a Moffat profile for each of the two images. I want to find the
> optimal convolution kernel to match the two psfs, so I call on my old
> friend Mr. Fourier. If MA is the Moffat profile for image A and MB is
> the Moffat profile for image B (both 2d), and K is my optimal kernel,
> then I can do this:
>
> MA ** K = MB --> ** is convolution in this scenario
> F(MA**K) = F(MB) --> F() is the Fourier transform
> F(MA) * F(K) = F(MB)
> K = F^-1(F(MB)/F(MA))
>
> With me so far? So I do this in IDL.
> IDL> ma = moffat(params_a)
> IDL> mb = moffat(params_b)
> IDL> fma = fft(ma) & fmb = fft(mb)
> IDL> k = fft(fma/fmb,/inverse)
> IDL> mc = convol(ma,k)
>
> What I get, however, is that MC is a 2d delta function. Why...? It
> happens with 2d Gaussians, as well. Thanks for your help!
>
> --Gray
In principle, your approach is right. First of all make sure the PSF MA is wider
than MB otherwise deconvolution won't give anything meaningful. Furthermore,
deconvolution of real images is tricky because of the presence of noise. I guess
you want to match the PSFs to do image subtraction. If so this paper might
provide some more information on the subject (in fact I think it describes the
most sophisticated method at present)
http://esoads.eso.org/cgi-bin/nph-data_query?bibcode=2008MNRAS.386L..77B&db_key=AST&link_type=ABSTRACT&high=44a4d6a73417468
The author provides the IDL code (http://www.danidl.co.uk/index.html) provided
you pay the subscription rate.
You may try the ISIS code for free (http://www2.iap.fr/users/alard/package.html).
Bringfried
|
|
0
|
|
|
|
Reply
|
Bringfried
|
12/3/2010 10:57:47 AM
|
|
On Dec 3, 5:23=A0am, MC <morefl...@gmail.com> wrote:
> On Dec 3, 6:35=A0am, Gray <grayliketheco...@gmail.com> wrote:
>
>
>
>
>
>
>
>
>
> > Hi all,
>
> > Maybe my calculus is screwy, but this doesn't make sense to me.
> > Here's my issue:
>
> > I have two astronomical images (of stars). =A0I've fit an average PSF a=
s
> > a Moffat profile for each of the two images. =A0I want to find the
> > optimal convolution kernel to match the two psfs, so I call on my old
> > friend Mr. Fourier. =A0If MA is the Moffat profile for image A and MB i=
s
> > the Moffat profile for image B (both 2d), and K is my optimal kernel,
> > then I can do this:
>
> > MA ** K =3D MB --> ** is convolution in this scenario
> > F(MA**K) =3D F(MB) =A0--> =A0F() is the Fourier transform
> > F(MA) * F(K) =3D F(MB)
> > K =3D F^-1(F(MB)/F(MA))
>
> > With me so far? =A0So I do this in IDL.
> > IDL> ma =3D moffat(params_a)
> > IDL> mb =3D moffat(params_b)
> > IDL> fma =3D fft(ma) & fmb =3D fft(mb)
> > IDL> k =3D fft(fma/fmb,/inverse)
> > IDL> mc =3D convol(ma,k)
>
> > What I get, however, is that MC is a 2d delta function. =A0Why...? =A0I=
t
> > happens with 2d Gaussians, as well. =A0Thanks for your help!
>
> Hmm, not sure what Moffat does, but maybe the division by fmb terms
> with small amplitudes could be the problem? What happens if you add a
> small constant to fmb? If you want to match the OTF of the two images
> could you just convolve a with the psf of b and convolve b with the
> psf of a?
>
> Hope this helps
> MC
(I thought I posted this this morning, but it never showed up)
This is certainly what's going on. I tried this with some Gaussians,
but used
fma/(fmb > 1e-10)
instead inside the k=3Dfft(...) line, and it changed from nonsense to
working beautifully. Outside of the support of the Moffat fit to b,
you're just getting amplified numerical noise. Try looking at the
difference between those ratios (with TVIMAGE or SURFACE or something)
and you'll see what's going on.
-Jeremy.
|
|
0
|
|
|
|
Reply
|
Jeremy
|
12/3/2010 6:06:53 PM
|
|
|
3 Replies
439 Views
(page loaded in 0.058 seconds)
Similiar Articles: Convolution Kernel - comp.lang.idl-pvwaveHi all, Maybe my calculus is screwy, but this doesn't make sense to me. Here's my issue: I have two astronomical images (of stars). I've fit a... Convolution with non-constant Kernel? - comp.lang.idl-pvwave ...Hi, I wonder if there is an easy way to perform convolution on an array with non-constant kernel. The IDL built-in CONVOL function requires the ke... Convolution of Z-transform 2D filter kernel with 2D matrix - comp ...Hello-- In a paper that I am reading, I am given a 2D filter kernel described in Z-transform format as C(Z_t, Z_x) = B(1/Z_t) - (Z_x)( B(Z_t) ... Image convolution, low & high pass filters - comp.soft-sys.matlab ...Convolution Kernel - comp.lang.idl-pvwave Image convolution, low & high pass filters - comp.soft-sys.matlab ... If you start using bigger kernels and the convolution takes ... 2D Convolution using FFTW - comp.dspNumerical inversion of Z-transform? - comp.dsp I _think_ that you can do this numerically using ... Convolution of Z-transform 2D filter kernel with 2D matrix - comp ... ... Matlab polar to cartesian with density compensation - comp.soft ...Convolution Kernel - comp.lang.idl-pvwave Matlab polar to cartesian with density compensation - comp.soft ..... is sampled in a polar way the lower frequencies have a ... z-transform on pixel data - comp.soft-sys.matlabFilter object from z transform equation? - comp.soft-sys.matlab ... z-transform on pixel data - comp.soft-sys.matlab Convolution of Z-transform 2D filter kernel with 2D ... Image processing edge finding algorithm - comp.soft-sys.matlab ...Well then you can use the convolution code I gave you. Convolution basically multiplies the kernel by the image in a sliding window and gives you the result. Windowed sinc - comp.dspIn any case I don't see that it matters because, in the end, one is going to do the equivalent of a time domain convolution and the kernel of that convolution applies ... sum without transposing - comp.soft-sys.matlabConvolution with non-constant Kernel? - comp.lang.idl-pvwave ... sum without transposing - comp.soft-sys.matlab Convolution with non-constant Kernel? - comp.lang.idl ... Convolution - Wikipedia, the free encyclopediaIn mathematics and, in particular, functional analysis, convolution is a mathematical operation on two functions f and g, producing a third function that is typically ... Convolution Kernels - Molecular Expressions: Images from the ...Interactive Java Tutorials Convolution Kernels. Many of the most powerful image processing algorithms rely upon a process known as convolution (or spatial convolution ... 7/29/2012 7:13:18 PM
|