DPlot Forum Index DPlot
http://www.dplot.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

Reading ASCII X-Y data, bypassing header lines

 
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions
View previous topic :: View next topic  
Author Message
Bob Clancy



Joined: 11 Feb 2005
Posts: 1
Location: Albuquerque, NM

PostPosted: Fri Feb 11, 2005 2:39 pm    Post subject: Reading ASCII X-Y data, bypassing header lines Reply with quote

I'm a brand-new user, searched the forum, and tried the Dplot help... but couldn't come up with a way to do this simple thing: I have ascii XY or implicit-X files with up to 250 lines of header info that I need to skip over, either by parsing the characters or simply saying "skip 32 lines, then read the data". The last line also has the values "-999 -999 -999 -999", which I'd like to skip also, as that messes up the plot.

Any suggestions?
_________________
Bob C.
NM
Back to top
View user's profile Send private message Send e-mail
DPlotAdmin
Site Admin


Joined: 24 Jun 2003
Posts: 2310
Location: Vicksburg, Mississippi

PostPosted: Fri Feb 11, 2005 3:47 pm    Post subject: Reply with quote

Quote:
Any suggestions?


Notepad Very Happy

I can change things so that DPlot reads up to 250 lines before giving up (currently the limit is 50) but I'm a bit reluctant to do this. Reluctant mainly because when you drag-and-drop or "Open With" a file in Explorer, DPlot has to guess at the file format. So if I change the limit to 250 lines, that's 200 additional lines of text that DPlot will have to read to figure out that a file is not multiple columns of numbers, and this will effect all users. What I might do instead is offer an upper limit setting that in your case you'd set at 250 (or whatever). OR I might differentiate between opening a file with File>Open vs. drag-and-drop or Open With, and with File>Open present you with a few options if the first attempt to read the file fails.

For your "-999 -999 -999 -999" line, if you have no X values < -999 then the easiest thing to do is Edit>Truncate with the lower limit set to -998 and the upper limit set to some very large value. For the case of implict X values, Edit>Clip Y does the same thing.
_________________
Visualize Your Data
support@dplot.com
Back to top
View user's profile Send private message Send e-mail Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    DPlot Forum Index -> Suggestions/Questions All times are GMT - 5 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group