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

Home » Public Forums » archive » What is like CONGRID, but averages on reduction?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
What is like CONGRID, but averages on reduction? [message #5108] Tue, 10 October 1995 00:00 Go to previous message
grunes is currently offline  grunes
Messages: 68
Registered: September 1993
Member
Subject: What is like CONGRID, but averages on reduction?

I need to reduce the size of an array by an arbitrary (non-integral)
factor, using an averaging algorithm. Is there such a routine
in IDL and/or PV-WAVE?

When I display an image that is larger than the window, I use:

A=REBIN(A,XSZ,YSZ)
or
A=CONGRID(A,XSZ,YSZ)

The problem with REBIN is that XSZ and YSZ must be integral factors
of the size of A. This means that I often can not take advantage
of the whole screen. But it is able to average things down (as
long as I don't set /SAMPLE), so bright and dark points don't get
lost.

The problem with CONGRID is that it sometimes misses bright or
dark spots altogether. For example:
A=INTARR(9,9)
A(3,3)=1
PRINT,CONGRID(A,4,4)
or
PRINT,CONGRID(A,4,4,/INTERP)
misses the bright point, because CONGRID can interpolate or use
nearest neighbor, but cannot average.

Thanks in advance.
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Previous Topic: Re: Using _extra for all routines?
Next Topic: Re: HELP: IDL Function/Variable Problem

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

Current Time: Wed Oct 08 17:26:30 PDT 2025

Total time taken to generate the page: 0.00442 seconds