Home »
Public Forums »
archive »
IDL hangs with Bessel Function
IDL hangs with Bessel Function [message #2103] |
Thu, 02 June 1994 06:22 |
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
****************************************
|
|
|
Current Time: Wed Oct 08 15:06:47 PDT 2025
Total time taken to generate the page: 0.00577 seconds