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

Home » Public Forums » archive » FFT with NANs in an array
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: FFT with NANs in an array [message #49453 is a reply to message #49342] Wed, 26 July 2006 15:47 Go to previous message
R is currently offline  R
Messages: 4
Registered: May 2000
Junior Member
<adisn123@yahoo.com> wrote in message
news:1153418459.663699.178520@i42g2000cwa.googlegroups.com.. .
> Hi,
>
> I'm trying to fourier transform a spacial domain image to frequency
> domain using FFT function in IDL.
>
> My image has quite a bit of NANs in an array, about 5%.
>
> When I use FFT into the image, it doesn't give me any errors, but when
> I inversely fourier transform after
>
> filtering, it gives a little funky result.
>
> How do I make FFT ignore NANs in their job or filtering?
>

I would interpolate the the image to remove the nans,
then FTT, apply the filter, inverse fft, and then re-insert all the nans.

Special care needs to be taken when interpolating, depending on
how many points are missing. If they are single pixels, (i.e. mostly
surrounded
by data) then a simple bilinear interpolation would be fine. If you have
large
areas of nan, then you will want to handle that interpolation better.
Also look out for nans at the edge of the image, as the interpolation
might give some extreme funkiness.

Also, take care of the wrap around effects that are inherent in the FFT
routines.


Do you have a time series of images? If so, perhaps you can interpolate
in time as well as just in space.


Cheers,
bob
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: IDLgrPolygon with different colors for shading and lines
Next Topic: Re: IDL_IDLBridge in Virtual Machine

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

Current Time: Fri Oct 10 04:29:32 PDT 2025

Total time taken to generate the page: 0.00196 seconds