code: def getSomaPos(self):
          ''' Get soma position;
          Used to calculate seg coords for LFP calc (one per population cell; assumes same morphology)'''
          n3dsoma = 0
          r3dsoma = np.zeros(3)
          for sec in [sec for secName, sec in self.secs.items() if 'soma' in secName]:
              sec['hObj'].push()
              n3d = int(h.n3d())  # get number of n3d points in each section
              r3d = np.zeros((3, n3d))  # to hold locations of 3D morphology for the current section
              n3dsoma += n3d
  
              for i in range(n3d):
                  r3dsoma[0] += h.x3d(i)
                  r3dsoma[1] += h.y3d(i)
                  r3dsoma[2] += h.z3d(i)
  
              h.pop_section() 
          
          r3dsoma /= n3dsoma
  
          return r3dsomf getSomaPos(self):
          ''' Get soma position;
          Used to calculate seg coords for LFP calc (one per population cell; assumes same morphology)'''
          n3dsoma = 0
          r3dsoma = np.zeros(3)
          for sec in [sec for secName, sec in self.secs.items() if 'soma' in secName]:
              sec['hObj'].push()
              n3d = int(h.n3d())  # get number of n3d points in each section
              r3d = np.zeros((3, n3d))  # to hold locations of 3D morphology for the current section
              n3dsoma += n3d
  
              for i in range(n3d):
                  r3dsoma[0] += h.x3d(i)
                  r3dsoma[1] += h.y3d(i)
                  r3dsoma[2] += h.z3d(i)
  
              h.pop_section() 
          
          r3dsoma /= n3dsoma
  
          return r3dsoma
docs: Get soma position;
          Used to calculate seg coords for LFP calc (one per population cell; assumes same morphology)