def __init__(self, fromid, toid, dx, dy, dz=None, textTable=None): """ vector: fromid id of stand point toid id of target dx, dy, dz coordinate differences """ if textTable == None: textTable = obs_vector_stdev_table() super(ObsVector, self).__init__(tag="vec", fromid=fromid, toid=toid, textTable=textTable) self.dx, self.dy, self.dz = dx, dy, dz if dz is None: self._dim = 2 else: self._dim = 3
def __init__(self, covmat=None, textTable=None): if textTable==None: textTable = obs_vector_stdev_table() super(ObsClusterVector, self).__init__(covmat=covmat, textTable=textTable)
cl.append_obs(v1) cl.append_obs(v2) print cl.make_gama_xml() print cl from gizela.data.obs_table import obs_vector_table cl.textTable = obs_vector_table() print cl cl.covmat = CovMat(6,5) #cl.covmat.stdev = (0.01, 0.02, 0.03, 0.04, 0.05, 0.06) #cl.covmat.var = (0.01, 0.02, 0.03, 0.04, 0.05) cl.covmat.data = [[1,2,3,4,5,6], [2,3,4,5,6], [3,4,5,6], [4,5,6], [5,6], [6]] print cl.make_gama_xml() cl.textTable = obs_vector_stdev_table() print cl # iterator print "\n".join(["from=%s to=%s" % (obs.fromid, obs.toid) for obs in cl]) #covmat of vectors print v1.covmat.data print v2.covmat.data cm = CovMat(3,2) cm.data = [[0.1, 0.2, 0.3],[0.2, 0.3],[0.3]] v1.covmat = cm print cl.covmat.data # transformation #from gizela.tran.Tran3D import Tran3D