[SciPy-user] read ascii data
Wed Dec 12 07:55:49 CST 2007
I am a new python/scipy user, but my first question is what type of grid data are you working with. I am not sure how you are defining 'grid' in other words. If you are working with spatial raster data, there is a library called GDAL. If the data has no spatial content you may try PIL library.
I have also worked with reading comma delimited ascii files and you could also enumerate and skip all lines except for those you are interested in pretty easily and quickly.
These are a few ideas, but which method you should select likely depends on the format of the data as well as what you plan on doing with the data that you are reading.
I hope this gives you some ideas,
----- Original Message ----
From: Christoph Scheit <email@example.com>
Sent: Wednesday, December 12, 2007 3:57:14 AM
Subject: [SciPy-user] read ascii data
I have a file containing ascii data related to a block-structured grid.
I could use readtxt, but I would like to have the possibility to read
a certain range of rows out of the file. Lets say I have ten blocks in
and each block 10 rows of data.
So in one read I would like to read for instance line 30 to line 39
I can use skip rows, but how can I limit the loadtxt to the upper
Is there something already available or do I have to do it on my own?
Thanks in advance,
SciPy-user mailing list
Looking for last minute shopping deals?
Find them fast with Yahoo! Search. http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the SciPy-user