[hdf-compass] 10/295: Updated to allow for 'cellsize' value to be read

Ghislain Vaillant ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:20 UTC 2016


This is an automated email from the git hooks/post-receive script.

ghisvail-guest pushed a commit to branch debian/master
in repository hdf-compass.

commit 556218effcef7b28b9fa8161831874ce82a3626c
Author: Matt Comerford <matthew.comerford at colorado.edu>
Date:   Wed Jun 25 15:45:32 2014 -0600

    Updated to allow for 'cellsize' value to be read
---
 asc_model/__init__.py | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/asc_model/__init__.py b/asc_model/__init__.py
index 445cfde..21cad87 100644
--- a/asc_model/__init__.py
+++ b/asc_model/__init__.py
@@ -127,7 +127,7 @@ class ASCFile(compass_model.Array):
 	def __init__(self, store, key):
 		self._store = store
 		self._key = key
-		self.data = np.loadtxt(self._key, skiprows=5, unpack=True)
+		self.data = np.loadtxt(self._key, skiprows=6, unpack=True)
 
 	@property
 	def key(self):
@@ -168,9 +168,10 @@ class Attributes(compass_model.KeyValue):
 	def __init__(self, store, key):
 		self._store = store
 		self._key = key 
-		self.data = {'NODATA Value': float(linecache.getline(self._key, 5).lstrip("NODATA_value")),
-			'yllcorner': float(linecache.getline(self._key, 4).lstrip("yllcorner")),
-			'xllcorner': float(linecache.getline(self._key, 3).lstrip("xllcorner"))}
+		self.data = {'NODATA Value': float(linecache.getline(self._key, 6).lstrip("NODATA_value")),
+		  'cellsize': float(linecache.getline(self._key, 5).lstrip("cellsize")),
+		  'yllcorner': float(linecache.getline(self._key, 4).lstrip("yllcorner")),
+		  'xllcorner': float(linecache.getline(self._key, 3).lstrip("xllcorner"))}
 
 	@property
 	def key(self):

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/hdf-compass.git



More information about the debian-science-commits mailing list