Пример #1
0
	def __init__(self, filename):
		cdf = CDF(filename)
		self.rho = zip(cdf[0], cdf[1], cdf[2])
		self.rho = [array(r) for r in self.rho]

		self.alpha = zip(cdf[3], cdf[4], cdf[5], cdf[6], cdf[7], cdf[8], cdf[9], cdf[10], cdf[11])
		self.alpha = [apply(mat,[group(a,3)]) for a in self.alpha]
Пример #2
0
	def __init__(self,rho,alpha=None):
	  	#print rho[0][0]
		self.rho = [array(r) for r in rho]
		#print self.rho[:10]
		if alpha != None:
			self.alpha = [apply(mat,[group(a,3)]) for a in alpha]