[hdf-compass] 240/295: Merge branch 'bag_lib_updates' into ticket_118
Ghislain Vaillant
ghisvail-guest at moszumanska.debian.org
Sun May 8 10:35:49 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 57de222d1cf277c8ef0d44a19dfefdf5a9f864ba
Merge: 945c238 e5bad51
Author: giumas <giumas at yahoo.it>
Date: Sat Nov 7 12:26:51 2015 -0500
Merge branch 'bag_lib_updates' into ticket_118
hdf_compass/bag_model/model.py | 11 +----------
1 file changed, 1 insertion(+), 10 deletions(-)
diff --cc hdf_compass/bag_model/model.py
index 805af94,26a35e7..cb345fe
--- a/hdf_compass/bag_model/model.py
+++ b/hdf_compass/bag_model/model.py
@@@ -633,60 -498,10 +633,51 @@@ class BAGMetadataXml(compass_model.Xml)
@property
def validation(self):
""" Collect a message string with the result of the validation """
- msg = str()
-
- msg += "XML input source: %s\nValidation output: " % self.key
- if self.store.f.validate_metadata():
- msg += "VALID"
- else:
- msg += "INVALID\nReasons:\n"
- for err_msg in self.store.f.meta_errors:
- msg += " - %s\n" % err_msg
- return msg
+ return self.store.f.validation_info()
-class BAGUncertainty(compass_model.Array):
+class BAGUncertaintyArray(compass_model.Array):
+ """ Represents an uncertainty array. """
+ class_kind = "BAG Uncertainty [array]"
+
+ @staticmethod
+ def can_handle(store, key):
+ return (key == "/BAG_root/uncertainty") and (key in store) and (isinstance(store.f[key], h5py.Dataset))
+
+ def __init__(self, store, key):
+ self._store = store
+ self._key = key
+ self._dset = store.f.uncertainty(mask_nan=True)
+
+ @property
+ def key(self):
+ return self._key
+
+ @property
+ def store(self):
+ return self._store
+
+ @property
+ def display_name(self):
+ return pp.basename(self.key)
+
+ @property
+ def description(self):
+ return 'Dataset "%s"' % (self.display_name,)
+
+ @property
+ def shape(self):
+ return self._dset.shape
+
+ @property
+ def dtype(self):
+ return self._dset.dtype
+
+ def __getitem__(self, args):
+ return self._dset[args]
+
+
+class BAGUncertainty(compass_model.GeoArray):
""" Represents a BAG uncertainty. """
class_kind = "BAG Uncertainty"
--
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