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

Home » Public Forums » archive » Re: IDL Error GCPC data
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: IDL Error GCPC data [message #69250 is a reply to message #69249] Thu, 24 December 2009 11:07 Go to previous messageGo to previous message
David Fanning is currently offline  David Fanning
Messages: 11724
Registered: August 2001
Senior Member
sampton writes:

> Yes I know that I'm missing a lot it's my first steeps with IDL ;)

OK, then. Expected. :-)

> As of the file name no I just want to mention that there is a binary
> data file and the real name is: gpcp_v2.1_psg.1979
> and the year extension changes from 1979 to 2009.

I don't know what you mean by 'changing the year extension',
since there is nothing like that in your code. Your code opens
the file you supply it and reads a structure out of it. If this
is what you have in mind, then the command you would use is:

IDL> read_v2_1, 'gpcp_v2.1_psg.1979', struct

This *assumes* the file is located in your current IDL directory.
Almost always a *bad* assumption, as it turns out. But we will
save that for a future lesson.

Your code then goes to a lot of trouble to do some byte swapping,
in needed. This can be MUCH more easily done by using the
SWAP_IF_*** keywords on the OPENR command. Look up the OPENR
statement in the on-line help.

> you suggested: .COMPILE do I have to include the file name in the
> path or just the command ?

If your file is named correctly, and is located somewhere in
your IDL path, then you just have to supply the "root" name
of the file:

IDL> .compile tvimage

Cheers,

David
--
David Fanning, Ph.D.
Fanning Software Consulting, Inc.
Coyote's Guide to IDL Programming: http://www.dfanning.com/
Sepore ma de ni thui. ("Perhaps thou speakest truth.")
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: fitting contours with ellipse
Next Topic: Re: Reducing a set of curves to a mean curve

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

Current Time: Fri Oct 10 00:53:49 PDT 2025

Total time taken to generate the page: 1.03977 seconds