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

Home » Public Forums » archive » IDL hangs with Bessel Function
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Switch to threaded view of this topic Create a new topic Submit Reply
IDL hangs with Bessel Function [message #2103] Thu, 02 June 1994 06:22
price is currently offline  price
Messages: 2
Registered: June 1994
Junior Member
I have discovered a very odd behavior of IDL/Macintosh when using a Bessel J
function. I would appreciate any insight into what is going on.

I am running on a Mac Quadra 660av with system 7.1 and have allocated
15Mbyte of memory to idl. I am trying to calculate a diffraction pattern
using the beselj routine from idl.

I define a 64x64 array of numbers using the dist routine

r=shift(dist(64),32,32)

If I now calculate the corresponding bessel function in the following way
the calculation takes about 5 seconds.

inten=beselj(r,1) 5 seconds

If I add a coefficient to r the calculation also takes 5 seconds

inten=beselj(r*1.35956,1) 5 seconds

If I define a variable ar=1.35956 and calculate it still takes 5 seconds

inten=beselj(r*ar,1) 5 seconds

Now, if I define a variable ar=!pi*.15*95./64./.5145 which is equal to
1.35956 and proceed as above the program starts calculating and never stops
( I have waited up to 10 minutes without any results). I then have to crash
the routine to get back to the finder

inten=beselj(r*ar,1) where ar=!pi*.15*95./64./.5145

I have tried defining r*ar outside the bessel function but it doesn't do any
good. I have tried defining ar by using 3.14159 instead of !pi and this
doesn't do any good. Have I discoverd some strange bug in the language or
am I missing something?

I am not new to IDL. I have been using in on a VAX for the past 8 years
without problems of this sort. I just got the Mac version a few months ago
and this problem has appeared.

Any suggestions or solutions would be greatly appreciated.



****************************************
Tom Price
MIT Lincoln Lab
244 Wood St
HW45-291
Group 94 Laser and Sensor Applications
e-mail: price@ll.mit.edu

****************************************
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Need more symbols for WAVE plots
Next Topic: Re: Finding Common Elements in Two Arrays

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

Current Time: Wed Oct 08 15:06:47 PDT 2025

Total time taken to generate the page: 0.00577 seconds