Reading ASCII X-Y data, bypassing header lines

Have a suggestion for improving DPlot or a question about existing features? Let us know

Moderator: DPlotAdmin

Post Reply
Bob Clancy
Posts: 1
Joined: Fri Feb 11, 2005 2:22 pm
Location: Albuquerque, NM

Reading ASCII X-Y data, bypassing header lines

Post by Bob Clancy »

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
User avatar
DPlotAdmin
Posts: 2312
Joined: Tue Jun 24, 2003 9:34 pm
Location: Vicksburg, Mississippi
Contact:

Post by DPlotAdmin »

Any suggestions?
Notepad :D

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
Post Reply