def get_cell(neuron_name): """ Function that loads a cell using the name of the neuron. """ nrn_full = os.path.join(dir_model, neuron_name) cell_list = blue_brain.load_model(nrn_full, suppress=True) cell = cell_list[0] cell.tstartms = 0 cell.tstopms = 200 # Find the principal component axes and rotate cell. axes = LFPy_util.data_extraction.find_major_axes() # Aligns y to axis[0] and x to axis[1] LFPy_util.rotation.alignCellToAxes(cell, axes[0], axes[1]) return cell
def get_cell(neuron_name): """ Function that loads a cell using the name of the neuron. """ nrn_full = os.path.join(DIR_MODELS, neuron_name) cell_list = blue_brain.load_model(nrn_full, suppress=True) cell = cell_list[0] cell.tstartms = 0 cell.tstopms = 200 # Find the principal component axes and rotate cell. axes = LFPy_util.data_extraction.find_major_axes() # A quickfix for flipping axes so the neurons lie in # the same direction. Not a very elegant solution. for i, axis in enumerate(axes): if axis.sum() < 0: axes[i] = -axis # Aligns y to axis[0] and x to axis[1] LFPy_util.rotation.alignCellToAxes(cell, axes[0], axes[1]) return cell