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

Home » Public Forums » archive » how to read date as structure
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
how to read date as structure [message #94828] Mon, 30 October 2017 10:23 Go to previous message
limiqt is currently offline  limiqt
Messages: 27
Registered: October 2013
Junior Member
Hi,

I wonder if someone could show me how to read a data with dates as structure.

I need to read thousands of files each with thounsands of lines e like this one:

FileIn1:

2015-06-01 11:02:28 -17.8620 -34.3080 -12.1940
2015-06-01 11:02:29 -12.4835 -24.4790 -8.8535
2015-06-01 11:02:30 -10.9240 -22.0480 -7.8587
2015-06-01 11:02:31 -11.6355 -22.9650 -8.0603
2015-06-01 11:02:32 -12.7080 -26.4340 -8.5855
2015-06-01 11:02:33 -12.4525 -24.8820 -8.4100
2015-06-01 11:02:34 -11.2980 -23.5610 -7.9932
2015-06-01 11:02:44 8.8110 12.8375 4.2657
2015-06-01 11:03:00 -5.4033 -10.9245 -3.4665
2015-06-01 11:03:01 -9.4730 -19.0120 -5.6915


I done this:

==========
Pro ReadMyData

FileIn='FileIn1'
Close, /All
nlines=File_lines(FileIn)

datastruct={MyDate:' ', MyTime:' ', var1:0.0, var2:0.0, var3:0.0}
Mydata=Replicate(datastruct, nlines)
Mydata.MyDate = STRING(Mydata.MyDate, FORMAT = '(A10)')
Mydata.MyTime = STRING(Mydata.MyTime, FORMAT = '(A10)')

OpenR,lun, FileIn,/Get_Lun
ReadF,lun, dataw
Free_Lun, lun

End
=====
But i get the error message: READF: Input conversion error. Unit: 100.

I will appreciate any assistance.

Thanks
[Message index]
 
Read Message
Read Message
Previous Topic: mpfit
Next Topic: idl-coyote github repository maintenance

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

Current Time: Wed Oct 08 09:15:51 PDT 2025

Total time taken to generate the page: 0.00345 seconds