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

Home » Public Forums » archive » Re: IDL Astronomy Library: Some procedures doesn't work?
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
Re: IDL Astronomy Library: Some procedures doesn't work? [message #82513] Wed, 19 December 2012 10:05 Go to next message
wlandsman is currently offline  wlandsman
Messages: 743
Registered: June 2000
Senior Member
On Wednesday, December 19, 2012 8:50:47 AM UTC-5, BlueSky wrote:

> IDL> psf_gaussian
> % Compiled module: PSF_GAUSSIAN.
> % Attempt to call undefined procedure/function: 'PSF_GAUSSIAN'.
> % Execution halted at: $MAIN$

For a long time I've felt that IDL gives a very confusing error message here. One sees the function compiled successfully, and then an immediate error message of "undefined procedure/function". I realize that one can have two distinct modules with the same name -- one a procedure and one a function. But it would be nice if the compilation message could say whether a procedure or function was compiled, e.g.

% Compiled function: PSF_GAUSSIAN.

and if the error message said whether it was a procedure or function call, e.g.

> % Attempt to call undefined procedure: 'PSF_GAUSSIAN'.

--Wayne
Re: IDL Astronomy Library: Some procedures doesn't work? [message #82514 is a reply to message #82513] Wed, 19 December 2012 06:03 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Nothingness writes:

> I have IDL and IDL Astronomy Library installed on server of my
> institute. Some procedures can be executed, like hastrom, ad2xy,
> correl_optimize, etc. However some others can't, like convolve,
> psf_gaussian, etc. Even though their locations are in the IDL paths
> and some of them (convolve and correl_optimize) are in the same
> directory. And they have the same permissions.
>
> Do you have any idea how to fix this?

Yes, call the procedures as procedures:

IDL> Junk

And call the functions as functions:

IDL> var = Junker()

Functions in IDL always return a value. You have to
provide a receptacle (variable) for the value of the
function to be returned in.

Cheers,

David

--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
Sepore ma de ni thue. ("Perhaps thou speakest truth.")
Re: IDL Astronomy Library: Some procedures doesn't work? [message #82578 is a reply to message #82513] Thu, 20 December 2012 12:10 Go to previous messageGo to next message
Mark Piper is currently offline  Mark Piper
Messages: 198
Registered: December 2009
Senior Member
On Wednesday, December 19, 2012 11:05:19 AM UTC-7, wlandsman wrote:
>
> For a long time I've felt that IDL gives a very confusing error message here. One sees the function compiled successfully, and then an immediate error message of "undefined procedure/function". I realize that one can have two distinct modules with the same name -- one a procedure and one a function. But it would be nice if the compilation message could say whether a procedure or function was compiled, e.g.
>
>
>
> % Compiled function: PSF_GAUSSIAN.
>
>
>
> and if the error message said whether it was a procedure or function call, e.g.
>
>
>
>> % Attempt to call undefined procedure: 'PSF_GAUSSIAN'.
>
>
>
> --Wayne

Hi Wayne,

Chris & I like this idea; his team is looking into it.

mp
Re: IDL Astronomy Library: Some procedures doesn't work? [message #82693 is a reply to message #82514] Tue, 08 January 2013 06:18 Go to previous message
Nothingness is currently offline  Nothingness
Messages: 2
Registered: December 2012
Junior Member
On Wednesday, December 19, 2012 10:03:29 PM UTC+8, David Fanning wrote:
> Nothingness writes:
>
>
>
>> I have IDL and IDL Astronomy Library installed on server of my
>
>> institute. Some procedures can be executed, like hastrom, ad2xy,
>
>> correl_optimize, etc. However some others can't, like convolve,
>
>> psf_gaussian, etc. Even though their locations are in the IDL paths
>
>> and some of them (convolve and correl_optimize) are in the same
>
>> directory. And they have the same permissions.
>
>>
>
>> Do you have any idea how to fix this?
>
>
>
> Yes, call the procedures as procedures:
>
>
>
> IDL> Junk
>
>
>
> And call the functions as functions:
>
>
>
> IDL> var = Junker()
>
>
>
> Functions in IDL always return a value. You have to
>
> provide a receptacle (variable) for the value of the
>
> function to be returned in.
>
>
>
> Cheers,
>
>
>
> David
>
>
>
> --
>
> David Fanning, Ph.D.
>
> Fanning Software Consulting, Inc.
>
> Coyote's Guide to IDL Programming: http://www.idlcoyote.com/
>
> Sepore ma de ni thue. ("Perhaps thou speakest truth.")

Hi David,
Thanks for the tips. The function psf_gaussian works properly when I input variables in, e.g. psf = psf_gaussian([12,23,19.2],npixel=50).
D
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: compare 2-d array with vector
Next Topic: IDL Astronomy Library: Some procedures doesn't work?

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

Current Time: Wed Oct 08 15:17:24 PDT 2025

Total time taken to generate the page: 0.00433 seconds