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

Home » Public Forums » archive » Re: interpolation for resizing
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: interpolation for resizing [message #64166 is a reply to message #64163] Tue, 02 December 2008 15:28 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
bryan.s.hong@gmail.com writes:

> I have a 100 X 100 spatial image to be resized to 1000*1000.
> The data of this image is surface temperature and includes some part
> of ocean.
> Because I want to exclude data of ocean area during interpolation, I'm
> trying to resize it using "interpolate".
> But I cannot understand the IDL help pages for the 'interpolate'.
> Could anyone help me with a simple command line for this job?

I don't think this is what you want to do.
Just use CONGRID (or REBIN) to resize your
image. (CONGRID uses INTERPOLATE to do the
interpolation, so you can see how it is done,
if you read the code.) Then mask out your ocean
pixels in the usual way, with the WHERE function.

bigImage = Congrid(image, 1000, 1000)
oceanPixels = Where(bigimage EQ 9999, count)
IF count GT 0 THEN image[oceanPixels] = 0

Cheers,

David
--
David Fanning, Ph.D.
Coyote's Guide to IDL Programming (www.dfanning.com)
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[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
Previous Topic: Irregular Satellite data plotting
Next Topic: Assigning Coordinates in NetCDF

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

Current Time: Tue Dec 02 21:54:33 PST 2025

Total time taken to generate the page: 3.05088 seconds