Re: READCOL compilation error [message #41772] |
Wed, 08 December 2004 07:06 |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Evelien Vanhollebeke writes:
> Yes I am an astronomer and yes I always use the PostScript device. I
> couldn't find how you can save the plots on the computer display to a ps
> file, that could come in very handy. So if you can tell me where to find
> it...
Well, you could start by looking at any program
on my web page. :-)
Well written programs don't need much of anything special to
be done to them to get them to display in PostScript.
I've pretty much devoted a career to advocating writing
device-independent IDL programs. (Probably why I feel so
weary.) Most of what I know about the subject is already
on my web page, and the whole second half of my book is
devoted to nothing else. I think the information is out
there somewhere.
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: READCOL compilation error [message #41775 is a reply to message #41772] |
Wed, 08 December 2004 00:24  |
Evelien Vanhollebeke
Messages: 2 Registered: December 2004
|
Junior Member |
|
|
David Fanning wrote:
>
>
> Uh, well. We don't normally use the PostScript device as a display
> device. (Actually, this seems to be common in astronomy. Are you an
> astronomer?) Most of us look at plots on the computer display.
> Then, when we see something we like, we make a PostScript file
> of it. You will get the hang of it soon. :-)
>
> Cheers,
>
> David
>
Yes I am an astronomer and yes I always use the PostScript device. I
couldn't find how you can save the plots on the computer display to a ps
file, that could come in very handy. So if you can tell me where to find
it...
Cheers,
Evelien
--
Evelien Vanhollebeke
Instituut voor Sterrenkunde
http://www.ster.kuleuven.ac.be
|
|
|
Re: READCOL compilation error [message #41777 is a reply to message #41775] |
Tue, 07 December 2004 17:43  |
newbie16
Messages: 11 Registered: December 2004
|
Junior Member |
|
|
Hi Bob,
Talk about a small world...I even had you as my TA in optics one year
as an undergrad...
Anyways, I left after my MSc and tried research on Bay St. for a bit
and an opportunity came up at Western for me to start PhD on Earthquake
simulations. I'm about a year and a half into it and am enjoying the
project a lot. I had out to San Fran next week for the AGU and am
trying to get some quality figures out for my Poster...a little
stressful, but thats how it goes, eh? As of today, I had never written
anything in IDL and am finally getting the output I need.
Lalu says Hi, and mentioned that now that I'm starting to use IDL, it
would be a good exercise for me to learn IDL by writing up the
S-Transform as a .pro file....I'll save that for after the
hoildays...and don;t help! (I should learn this on my own.)
I hope all is well. I hear the S-Transform is finding more and more
applications everyday.
Cheers,
t.
|
|
|
Re: READCOL compilation error [message #41778 is a reply to message #41777] |
Tue, 07 December 2004 17:42  |
newbie16
Messages: 11 Registered: December 2004
|
Junior Member |
|
|
Hi Bob,
Talk about a small world...I even had you as my TA in optics one year
as an undergrad...
Anyways, I left after my MSc and tried research on Bay St. for a bit
and an opportunity came up at Western for me to start PhD on Earthquake
simulations. I'm about a year and a half into it and am enjoying the
project a lot. I had out to San Fran next week for the AGU and am
trying to get some quality figures out for my Poster...a little
stressful, but thats how it goes, eh? As of today, I had never written
anything in IDL and am finally getting the output I need.
Lalu says Hi, and mentioned that now that I'm starting to use IDL, it
would be a good exercise for me to learn IDL by writing up the
S-Transform as a .pro file....I'll save that for after the
hoildays...and don;t help! (I should learn this on my own.)
I hope all is well. I hear the S-Transform is finding more and more
applications everyday.
Cheers,
t.
|
|
|
|
|
Re: READCOL compilation error [message #41784 is a reply to message #41782] |
Tue, 07 December 2004 12:06  |
newbie16
Messages: 11 Registered: December 2004
|
Junior Member |
|
|
Thanks for the advice and links, they have been helpful...I guess I was
so used to using FORTRAN that I figured I had to compile as well!
As for PS output, I have to include the figure in a poster, (next week
at the AGU in San Fran)...I thought I would cut to the chase and get
output immediately I could include in my Poster.
I think I will start little slower with my first procedure and go from
there.
--> For Bob,
Are you THE Bob Stockwell of S-Transform fame??? I did my Masters with
Lalu in 2001!
Cheers and thanks again,
Tyler
|
|
|
Re: READCOL compilation error [message #41787 is a reply to message #41784] |
Tue, 07 December 2004 11:18  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Tyler writes:
> I am intend to use the READCOL function to open and read the data, but
> I can't seem to compile the READCOL program. (I assumed I have to
> compile READCOL first before i can call it in my own procedure.)
No, this is entirely wrong. If you have to compile
*any* procedure or function in IDL in order to run
it, the procedure or function is written incorrectly.
Here are some guidelines:
http://www.dfanning.com/tips/namefiles.html
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: READCOL compilation error [message #41788 is a reply to message #41787] |
Tue, 07 December 2004 11:14  |
David Fanning
Messages: 11724 Registered: August 2001
|
Senior Member |
|
|
Tyler writes:
> I hope someone can help me out here. First off, I am an IDL virgin,
Oooh, a... Oh, never mind. :-(
> and making my first plots as of today...So I apologize if my question
> is trivial, but there doesn;t seem to be an answer posted for the
> compliation error i get.
>
> Presently, I am trying to contour up some data [x,y,z] and have it
> stored in an ASCII file xyz.dat.
>
> I am intend to use the READCOL function to open and read the data, but
> I can't seem to compile the READCOL program. (I assumed I have to
> compile READCOL first before i can call it in my own procedure.)
> Anyways, I get the following error:
>
> ================================ SNIP
> ====================================
>
> [thayes@somemachine ~virIDL]$ idl
> IDL Version 6.0 (linux x86 m32). (c) 2003, Research Systems, Inc.
>
> IDL> .compile READCOL
>
> tst = strnumber(var[i],val,hex=hex[i]) ;Valid
> number?
> ^
> % Syntax error.
> At: /home/thayes/virIDL/READCOL.pro, Line 244
> % 1 Compilation error(s) in module READCOL.
> IDL>
> ================================ SNIP
> ====================================
>
> I have absolutely NO IDEA what is wrong here....Have I downloaded the
> wrong version? The one I have was last modified in May 2002.
No, you have the right version. But you don't have all
the programs you need. Look at the header to READCOL and
you will find a section entitled "Procedures Called". You
will need all those other routines, too. In fact, just go
download the whole NASA Astronomy library. You could do
a LOT worse and you will probably learn something by reading
some well-written code!
http://idlastro.gsfc.nasa.gov/homepage.html
> Cheers and thanks in advance for any help or advice you may have.
Get a good book. There are a couple. :-)
> PS - My actual procedure to create the contoured data set, which calls
> READCOL is also given at the end of the posting. Any suggestions are
> greatly appreciated!
Uh, well. We don't normally use the PostScript device as a display
device. (Actually, this seems to be common in astronomy. Are you an
astronomer?) Most of us look at plots on the computer display.
Then, when we see something we like, we make a PostScript file
of it. You will get the hang of it soon. :-)
Cheers,
David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
|
|
|
Re: READCOL compilation error [message #41789 is a reply to message #41788] |
Tue, 07 December 2004 11:06  |
R.G.Stockwell
Messages: 163 Registered: October 2004
|
Senior Member |
|
|
"Tyler" <newbie16@hotmail.com> wrote in message
news:f393b55a.0412071054.3ca1e6d3@posting.google.com...
...
> ================================ SNIP
> ====================================
>
> [thayes@somemachine ~virIDL]$ idl
> IDL Version 6.0 (linux x86 m32). (c) 2003, Research Systems, Inc.
>
> IDL> .compile READCOL
>
> tst = strnumber(var[i],val,hex=hex[i]) ;Valid
> number?
> ^
> % Syntax error.
> At: /home/thayes/virIDL/READCOL.pro, Line 244
> % 1 Compilation error(s) in module READCOL.
> IDL>
> ================================ SNIP
> ====================================
Offhand, I'd say you may have a problem with your path,
and IDL cannot find the function strnumber().
Try:
IDL> .comp strnumber
and see what happens. (does IDL find it? if so, run the code again.
If not, check your path !PATH and add the appropriate folders).
My guess is that IDL cannot find the function, and therefore interprets
strnumber as an array, and the hex=hex is a syntax error.
Cheers,
bob
PS I think strnumber is a function in the astronomy library, so it doesn't
come with IDL.
|
|
|