@@ -0,0 +1,860 @@
+# -*- coding: utf-8 -*-%0A%22%22%22%0ACreated on Sun Dec 13 12:50:28 2015%0A%0A@author: ilyass.tabiai@gmail.com%0A@author: rolland.delorme@gmail.com%0A@author: diehl@ins.uni-bonn.de%0A%22%22%22%0Aimport csv%0Aimport numpy as np%0A%0Aclass dic_reader_2D():%0A %0A  def __init__(self,path):%0A    self.data = %5B%5D%0A    self.read(path)%0A    self.sortdata()%0A  %0A  def read(self,path):%0A      with open(path,'rb') as csvfile:%0A%09csvreader = csv.reader(csvfile, delimiter=',')%0A%09next(csvreader,None)%0A%09for row in csvreader:%0A%09   self.data.append(np.array(map(float, row)))%0A%09    %0A  def sortX(self,item):%0A      return item%5B0%5D%0A      %0A  def sortY(self,item):%0A      return item%5B1%5D%0A  %0A  def sortZ(self,item):%0A      return item%5B2%5D%0A      %0A  def sortdata(self):%0A    self.data.sort(key = lambda x: (x%5B13%5D, x%5B14%5D))%0A    print len(self.data)%0A    for i in range(0,len(self.data)):%0A      print self.data%5Bi%5D%0A    %0A  %0A  %0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A%0A

Add the reder for two dimensional dic csv