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

Home » Public Forums » archive » IDL string input HELP!!
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
IDL string input HELP!! [message #40056] Mon, 12 July 2004 09:15 Go to next message
RichW is currently offline  RichW
Messages: 1
Registered: July 2004
Junior Member
I have a IDL program that reads in ASCII data and is to plot 2 columns of
the 8 that are in the file. Right now, I am using makeplot & read_ascii in
my code, which is fine except when it wants to read in the times - which
are given in the form HH:MM:SS.MS. When IDL outputs the ASCII data in a
terminal window, the time will come up as HH.0000, which is not good. It
was recommend to me to read in the date as a string, but I didn't work. I
am sure I messed it up. Any help or suggestions would be appreciated. Here
is the code that I have so far:

PRO makeplot, ac_ho_mfi_86586_revised
a = read_ascii(ac_ho_mfi_86586_revised)
print, a.field1
x = a.field1(1, *)
y = a.field1(3, *)
plot, x, y, psym = 4

end
Re: IDL string input HELP!! [message #40185 is a reply to message #40056] Wed, 14 July 2004 09:59 Go to previous message
btt is currently offline  btt
Messages: 345
Registered: December 2000
Senior Member
RichW wrote:

> I have a IDL program that reads in ASCII data and is to plot 2 columns of
> the 8 that are in the file. Right now, I am using makeplot & read_ascii in
> my code, which is fine except when it wants to read in the times - which
> are given in the form HH:MM:SS.MS. When IDL outputs the ASCII data in a
> terminal window, the time will come up as HH.0000, which is not good. It
> was recommend to me to read in the date as a string, but I didn't work. I
> am sure I messed it up. Any help or suggestions would be appreciated. Here
> is the code that I have so far:
>
> PRO makeplot, ac_ho_mfi_86586_revised
> a = read_ascii(ac_ho_mfi_86586_revised)
> print, a.field1
> x = a.field1(1, *)
> y = a.field1(3, *)
> plot, x, y, psym = 4
>
> end
>

Hi,

I suggest that you look at the ASCII_TEMPLATE function to define your data file.
Assign 'string' to the timestamp column. Once you read in the data using the
template, your will have to transform HH:MM:SS to a numerical value - search
with GOOGLE on this newsgroup for time transformations.

Ben
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic: IDL FFT Source Code
Next Topic: Re: fsc_surface update

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

Current Time: Fri Oct 10 20:47:33 PDT 2025

Total time taken to generate the page: 0.32091 seconds