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

Home » Public Forums » archive » READF: Input conversion error. Unit: 103,
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
READF: Input conversion error. Unit: 103, [message #91315] Mon, 29 June 2015 08:50
Priyadarsini Sivaraj is currently offline  Priyadarsini Sivaraj
Messages: 15
Registered: June 2015
Junior Member
Hi All,

I am a new user to IDL.I have to read data from given ASCII files and store it in a new structure,with the following elements:
NumROI-vector
Name-String
Color- 3 element vector
NumPoints-integer
Records-integer
Points- Two dimensional vector.
This is the program I have written, but unfortunately an error pops up saying,'READF: Input conversion error. Unit: 103,'
Is there anything I can do to handle this..?I am very new to IDL..Please do help me out.

PRO ROI_GraH
p =MAKE_ARRAY(5,198,value=1)
ROIs = CREATE_STRUCT('NumROI',[1],'Name','a','Color','1,1,1','NumPo ints',[1],'Records',[1],'Points',p[*,*])
OPENR, lun1,'C:\Users\PRSIV1\IDLWorkspace84\Trial\2013_IEEE_GRSS_DF _Contest_Samples_TR(1).txt', /GET_LUN

header = STRARR(12)
READF, lun1, header
ROIs.NumROI=STRMID(header(3),18)
ROIs.Name=STRMID(header(9),12)
ROIs.NumPoints=STRMID(header(11),13)
ROIs.Color=STRMID(header(10),17)

pt = []
id=1;

points = [id , x, y, lat, lon]
WHILE ~EOF(lun1) DO BEGIN

READF, lun1, id, x, y, lat, lon
pt = [id,x,y,lat,lon]
;print, pt
points = [points , pt]

ENDWHILE

points=REFORM(points , [ 5 , 198 ] , /OVERWRITE)

coords=points(1:2,*)
PRINT, coords


END
[Message index]
 
Read Message
Previous Topic: Identifying outliers in data
Next Topic: map_set doesn't return a map

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

Current Time: Wed Oct 08 15:17:19 PDT 2025

Total time taken to generate the page: 0.00403 seconds