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

Home » Public Forums » archive » Re: How to know where IDL found the source of one procedure?
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: How to know where IDL found the source of one procedure? [message #28273] Sat, 01 December 2001 12:06 Go to next message
kashyap is currently offline  kashyap
Messages: 26
Registered: April 1993
Junior Member
at least in Solaris2.8/tcsh, you can make that a one-liner, thusly:

cauvery 105> find `echo $IDL_DIR/lib/ $IDL_PATH | sed 's/[+:]/ /g'` -name hist\*.pro -print
/soft/idl-asc/idl_5.1/idl/lib/hist_2d.pro
/soft/idl-asc/idl_5.1/idl/lib/hist_equal.pro
/soft/idl-asc/idl_5.1/idl/lib/obsolete/hist_equal_ct.pro
/soft/idl-asc/idl_5.1/idl/lib/obsolete/hist_equal_int.pro

(some systems append the standard IDL_PATH to preset IDL_PATH after idl
is invoked, hence the "$IDL_DIR/lib/ $IDL_PATH")

vinay

ps: good choice of machine name, btw.

In article <9u8o5g$na5$1@news.wrc.xerox.com>, Surendar Jeyadev <jeyadev@wrc.xerox.com> wrote:
>
> How about not using IDL?!
>
> How do I find all procedures that start with "hist"? This is how I will do
> it.
>
> kaveri 38% set aa = `echo $WAVE_PATH | sed 's/:/ /g' `
> kaveri 39% find $aa -name "hist*.pro" -print
> /import/pvwave-6.0/wave/lib/std/hist_equal.pro
> /import/pvwave-6.0/wave/lib/std/hist_equal_ct.pro
> /import/pvwave-6.0/wave/lib/user/hist_equal_int.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
> /import/pvwave-6.0/wave/lib/std/hist_equal.pro
> /import/pvwave-6.0/wave/lib/std/hist_equal_ct.pro
> /import/pvwave-6.0/wave/lib/user/hist_equal_int.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
> /import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
>
> No doubt, there is an one-liner, but I am not an expert!
>
>> Lot's of easy things are hard in IDL. (A filled
>> contour plot comes to mind.) But this is balanced
>> by the myried hard things that are incredibly
>> easy. :-)
>
> You can say that again, dear sir!
> --
>
> Surendar Jeyadev jeyadev@wrc.xerox.com


--
____________________________________________________________ __________________
kashyap@head-cfa.harvard.edu 617 495 7173 [CfA/P-146] 617 496 7173 [F]
Re: How to know where IDL found the source of one procedure? [message #28277 is a reply to message #28273] Fri, 30 November 2001 11:54 Go to previous messageGo to next message
jeyadev is currently offline  jeyadev
Messages: 78
Registered: February 1995
Member
In article <MPG.166f3506d3ccd4ee98979e@news.frii.com>,
David Fanning <david@dfanning.com> wrote:
> Xiangyun Qiu (qiuxiang@msu.edu) writes:
>
>> I think <which> is just what I need. I want to use the path as a variable in
>> 'test.sav' so that I can
>> make up other paths. I thought about the same way to search for it in the
>> !PATH, just couldn't believe
>> there is no easier way to extract it.

How about not using IDL?!

How do I find all procedures that start with "hist"? This is how I will do
it.

kaveri 38% set aa = `echo $WAVE_PATH | sed 's/:/ /g' `
kaveri 39% find $aa -name "hist*.pro" -print
/import/pvwave-6.0/wave/lib/std/hist_equal.pro
/import/pvwave-6.0/wave/lib/std/hist_equal_ct.pro
/import/pvwave-6.0/wave/lib/user/hist_equal_int.pro
/import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
/import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
/import/pvwave-6.0/wave/lib/std/hist_equal.pro
/import/pvwave-6.0/wave/lib/std/hist_equal_ct.pro
/import/pvwave-6.0/wave/lib/user/hist_equal_int.pro
/import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
/import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro
/import/pvwave-6.0/wave/lib/user/guitools/demo/hist_plot_ini t.pro
/import/pvwave-6.0/wave/lib/user/guitools/demo/histo_equal_i nit.pro

No doubt, there is an one-liner, but I am not an expert!

> Lot's of easy things are hard in IDL. (A filled
> contour plot comes to mind.) But this is balanced
> by the myried hard things that are incredibly
> easy. :-)

You can say that again, dear sir!
--

Surendar Jeyadev jeyadev@wrc.xerox.com
Re: How to know where IDL found the source of one procedure? [message #28306 is a reply to message #28277] Wed, 28 November 2001 21:07 Go to previous messageGo to next message
Pavel A. Romashkin is currently offline  Pavel A. Romashkin
Messages: 531
Registered: November 2000
Senior Member
I know this is silly, but WHY would one need this? Isn't the whole idea of a
program in IDL path that you have a correct version and run it?

"Xiangyun Qiu" <qiuxiang@msu.edu> wrote in message
news:3C0568C1.DDEA79B1@msu.edu...
> Hi, all,
>
> Sorry for asking this question if it has been posted before, I tried to
> search this
> subject in the newsgroup, but failed.
>
> Let's suppose we put several identical "test.sav" files in different
> directories, all these
> directly are included in IDL searching path, but we have no idea about
> their order.
>
> If we fire up 'IDL', and execute "test", is there an easy way to know
> which 'test.sav' IDL
> first found and execute?
>
> Many thanks in advances,
>
> Xiangyun
>
Re: How to know where IDL found the source of one procedure? [message #28308 is a reply to message #28306] Wed, 28 November 2001 17:09 Go to previous messageGo to next message
Mark Hadfield is currently offline  Mark Hadfield
Messages: 783
Registered: May 1995
Senior Member
From: "William Thompson" <thompson@orpheus.nascom.nasa.gov>
> There is a "which" routine available in
>
> ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/help/
>
> It acts like the "which" command in Unix....

And also a built-in FILE_WHICH routine, introduced in 5.4.

---
Mark Hadfield
m.hadfield@niwa.cri.nz http://katipo.niwa.cri.nz/~hadfield
National Institute for Water and Atmospheric Research



--
Posted from clam.niwa.cri.nz [202.36.29.1]
via Mailgate.ORG Server - http://www.Mailgate.ORG
Re: How to know where IDL found the source of one procedure? [message #28309 is a reply to message #28308] Wed, 28 November 2001 17:03 Go to previous messageGo to next message
Xiangyun Qiu is currently offline  Xiangyun Qiu
Messages: 6
Registered: November 2001
Junior Member
Craig Markwardt wrote:

> David Fanning <david@dfanning.com> writes:
>
>> Xiangyun Qiu (qiuxiang@msu.edu) writes:
>>
>>> Let's suppose we put several identical "test.sav" files in different
>>> directories, all these
>>> directly are included in IDL searching path, but we have no idea about
>>> their order.
>>>
>>> If we fire up 'IDL', and execute "test", is there an easy way to know
>>> which 'test.sav' IDL
>>> first found and execute?
>>
>> IDL> Help, /Source
>
> The ability for HELP to give the path to a SAVE file appears in IDL
> 5.3. Before that the source name appears blank.
>
> If you want to predict ahead of time which "test.sav" will be used,
> you should know they are searched in they order they appear in !PATH.
>
> Craig
>
> --
> ------------------------------------------------------------ --------------
> Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
> Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
> ------------------------------------------------------------ --------------

I also tried using help, /source_files ( this is my first time using
procedure <help> :-( )
it is more convenient, however the IDL documentation doesn't recommend
extracting
information as variables from the output. It's very handy for sure!

Thanks all,

Xiangyun
  • Attachment: qiuxiang.vcf
    (Size: 0.22KB, Downloaded 141 times)
Re: How to know where IDL found the source of one procedure? [message #28310 is a reply to message #28309] Wed, 28 November 2001 16:53 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Xiangyun Qiu (qiuxiang@msu.edu) writes:

> I think <which> is just what I need. I want to use the path as a variable in
> 'test.sav' so that I can
> make up other paths. I thought about the same way to search for it in the
> !PATH, just couldn't believe
> there is no easier way to extract it.

Lot's of easy things are hard in IDL. (A filled
contour plot comes to mind.) But this is balanced
by the myried hard things that are incredibly
easy. :-)

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: How to know where IDL found the source of one procedure? [message #28311 is a reply to message #28310] Wed, 28 November 2001 16:49 Go to previous messageGo to next message
Xiangyun Qiu is currently offline  Xiangyun Qiu
Messages: 6
Registered: November 2001
Junior Member
William Thompson wrote:
There is a "which" routine available in

>
> ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/help/
>
> It acts like the "which" command in Unix. There's also a /all option, to find
> all the instances in the path.
>
> Bill Thompson

I think <which> is just what I need. I want to use the path as a variable in
'test.sav' so that I can
make up other paths. I thought about the same way to search for it in the
!PATH, just couldn't believe
there is no easier way to extract it.

Thanks,

Xiangyun
  • Attachment: qiuxiang.vcf
    (Size: 0.22KB, Downloaded 128 times)
Re: How to know where IDL found the source of one procedure? [message #28312 is a reply to message #28311] Wed, 28 November 2001 15:50 Go to previous messageGo to next message
Craig Markwardt is currently offline  Craig Markwardt
Messages: 1869
Registered: November 1996
Senior Member
David Fanning <david@dfanning.com> writes:

> Xiangyun Qiu (qiuxiang@msu.edu) writes:
>
>> Let's suppose we put several identical "test.sav" files in different
>> directories, all these
>> directly are included in IDL searching path, but we have no idea about
>> their order.
>>
>> If we fire up 'IDL', and execute "test", is there an easy way to know
>> which 'test.sav' IDL
>> first found and execute?
>
> IDL> Help, /Source

The ability for HELP to give the path to a SAVE file appears in IDL
5.3. Before that the source name appears blank.

If you want to predict ahead of time which "test.sav" will be used,
you should know they are searched in they order they appear in !PATH.

Craig

--
------------------------------------------------------------ --------------
Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu
Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response
------------------------------------------------------------ --------------
Re: How to know where IDL found the source of one procedure? [message #28313 is a reply to message #28312] Wed, 28 November 2001 15:34 Go to previous messageGo to next message
thompson is currently offline  thompson
Messages: 584
Registered: August 1991
Senior Member
Xiangyun Qiu <qiuxiang@msu.edu> writes:

> Let's suppose we put several identical "test.sav" files in different
> directories, all these
> directly are included in IDL searching path, but we have no idea about
> their order.

> If we fire up 'IDL', and execute "test", is there an easy way to know
> which 'test.sav' IDL
> first found and execute?

There is a "which" routine available in

ftp://sohoftp.nascom.nasa.gov/solarsoft/gen/idl/help/

It acts like the "which" command in Unix. There's also a /all option, to find
all the instances in the path.

Bill Thompson
Re: How to know where IDL found the source of one procedure? [message #28314 is a reply to message #28313] Wed, 28 November 2001 15:16 Go to previous messageGo to next message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
Xiangyun Qiu (qiuxiang@msu.edu) writes:

> Let's suppose we put several identical "test.sav" files in different
> directories, all these
> directly are included in IDL searching path, but we have no idea about
> their order.
>
> If we fire up 'IDL', and execute "test", is there an easy way to know
> which 'test.sav' IDL
> first found and execute?

IDL> Help, /Source

Cheers,

David

--
David W. Fanning, Ph.D.
Fanning Software Consulting
Phone: 970-221-0438, E-mail: david@dfanning.com
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Toll-Free IDL Book Orders: 1-888-461-0155
Re: How to know where IDL found the source of one procedure? [message #28363 is a reply to message #28273] Mon, 03 December 2001 05:42 Go to previous message
Struan Gray is currently offline  Struan Gray
Messages: 178
Registered: December 1995
Senior Member
Surendar Jeyadev, jeyadev@wrc.xerox.com writes:
>
> How do I find all procedures that start with "hist"?

Upgrade to 5.5 and use FILE_SEARCH.


Struan
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: Setting history size in idlwave
Next Topic: Re: Sparse matrix algorithms

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

Current Time: Wed Oct 08 14:52:27 PDT 2025

Total time taken to generate the page: 0.00504 seconds