comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Scale the psf on images.
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: Scale the psf on images. [message #89969 is a reply to message #89968] Mon, 12 January 2015 01:17 Go to previous messageGo to previous message
rryan%stsci.edu is currently offline  rryan%stsci.edu
Messages: 16
Registered: October 2014
Junior Member
I think you might be missing something... Or maybe I am. But let's run down the procedure to make sure we're clear with each other.

(1) take first image of sky.
(2) compute PSF from the first image.

(3) take second image of sky
(4) compute PSF from the second image

Now you want to subtract the second image from the first to look for something that changed? But you want to correct for the PSF? Is that what you're doing? If so, then I think you've misunderstood a few things. What you need to do is compute the *transformation kernel* between the first and second image. In principle that kernel is the ratio of the FFTs of the PSFs. But in practice that is very noisy for a host of reasons, and I'm fairly sure is not what is normally done (at least not with empirical PSFs). But for a quick and dirty thing, this is probably the best you're going to get... So in pseudo code you're looking at something like this:

im1 = image 1 of the target
psf1 = psf of image 1
im2 = image 2 of the target
psf2 = psf of image 2

Now compute the kernel.

p1 = Fourier transform of PSF1
p2= Fourier transform of psf2

kernel= inverse fourier transform of (p1/p2)

im2_prime = convolve(img2, kernel)

diff = im1 - img2_prime

now inspect the diff image. YOu can short cut a few things by not using convolve and working with the FFTs yourself, but either way there are all sorts of gotchas along this path, so be careful.

Good luck
Russell




On Monday, January 12, 2015 at 9:15:23 AM UTC+1, anes.tz...@gmail.com wrote:
> Hi
>
> I would like to perform a live test during an upcoming observing run. I want to take a series of frames on various sources and check for variability on them. I would like to make the image subtraction as accurate as possible, thus I think that image subtraction should take place after the psf of the frames is matched.
>
> Which technique you think is the best? I tried with the convolve script but the result is not good.
>
> imconv = convolve( image1, image2, FT_PSF = psf)
>
> image 1 the science frame and image is the psf frame that I created through iraf.
>
> Any suggestions are appreciated
>
> Thanks a lot.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Bring back FINDFILE() !
Next Topic: debugging with new variables (dictionary, hash, ...)

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 15:59:01 PDT 2025

Total time taken to generate the page: 0.00610 seconds