app.utils.util.sort_neurons_by_brain_region¶
- sort_neurons_by_brain_region(all_data, session_id)[source]¶
Sort the neurons by index based on the brain regions they belong to.
- Parameters
all_data (np.ndarray) – A 2-d numpy array that contains data from all sessions.
session_id (int) – Integer that denotes a particular session.
- Returns
a tuple of 3 values: idx of last neuron in a region, name of region, and a sorted index array of neurons clubbed by all brain regions.
- Return type