How can I get the L0 regularization events for a specific cell ID?

As I understand it, get_ophys_experiment_events returns an [N_cells,N_times]-sized array of events. I would like to combine information available through the cell ID, such as an individual cell’s ROI mask, with that individual cell’s event array. I don’t see how to find the row in the event array which corresponds to a given cell ID.

Thanks!
-Elliott

1 Like

Hi Elliot,

Welcome to the forum!

short version:
get_cell_specimen_ids returns a list of cell specimen ids in the same order as the rows of the events array.

slightly longer version:
The index of a cell id in the list returned by BrainObservatoryNwbDataset.get_cell_specimen_ids is the same as the row index of the events array (as returned by get_ophys_experiment_events) containing that cell’s events. If you have some cells of interest, you can use BrainObservatoryNwbDataset.get_cell_specimen_indices to extract indices for those cells.

Nile

1 Like

Nile,
Wonderful! That’s easy. Thanks for your quick response!
-Elliott