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

Home » Public Forums » archive » array dimensions
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: array dimensions [message #24639 is a reply to message #24591] Tue, 10 April 2001 07:08 Go to previous messageGo to previous message
Paul van Delst is currently offline  Paul van Delst
Messages: 364
Registered: March 1997
Senior Member
"Richard G. French" wrote:
>
> Paul van Delst wrote:
>>
>> IF ( n GT 1 ) THEN SMOOTH( array, n )
>>
>> ?
> That's fine if you want this to be on a single line, but there are
> plenty
> of times when SMOOTH(array, n) is in a plot command, or in part of a
> complex
> expression. I think the argument about rebin is exactly similar - of
> course,
> you can do the checking ahead of time, but who wants to add this check
> for every time you do dynamic smoothing? adds lots of unneeded hair to
> the code. Smoothing by 1 is not the same as dividing by zero. It is like
> convolving with a one-element array, which IDL is perfectly willing to
> do without complaining and dying.

Fair enough. Complaining and dying is a decidedly poor response. I guess it would be nice
to be able to put a

IF ( n LE 1 ) THEN RETURN, array

or

IF ( n LE 1 ) THEN BEGIN
MESSAGE, 'N < or = 1, exiting...'
RETURN, array
ENDIF

as the first executable statement(s) in a smooth.pro, if it existed for users to meddle
with. I just checked the IDL documentation and it doesn't state that n=1 is invalid. In
fact, it is implicitly valid since it is an odd number. So, wouldn't the problem with
SMOOTH when n=1 be a bug ... that RSI should fix?

paulv

--
Paul van Delst A little learning is a dangerous thing;
CIMSS @ NOAA/NCEP Drink deep, or taste not the Pierian spring;
Ph: (301)763-8000 x7274 There shallow draughts intoxicate the brain,
Fax:(301)763-8545 And drinking largely sobers us again.
paul.vandelst@noaa.gov Alexander Pope.
[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: Re: IDL and DLL under windows
Next Topic: Re: Dual head displays

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

Current Time: Wed Oct 08 15:28:29 PDT 2025

Total time taken to generate the page: 0.00442 seconds