How do I find the L0 regularization events for a particular cell ID?

64 Views Asked by At

This is a question about the Allen Brain Observatory API.

I am trying to find both the ROI mask and L0 regularization events for each cell in a particular experiment. I know how to get the ROI mask information given a particular cell ID, but I don't know how to get the L0 regularization events. As far as I can tell, the return value of get_ophys_experiment_events() is an [N_cells,N_times]-sized array with no information about particular cell IDs.

I've looked through the API and done some googling and haven't found anything.

The following code gets the ROI mask for the first cell in a particular experiment:

from allensdk.core.brain_observatory_cache import BrainObservatoryCache

boc = BrainObservatoryCache(manifest_file='boc/manifest.json')

data_set = boc.get_ophys_experiment_data(510221121)

cid = data_set.get_cell_specimen_ids()[0]

roi_mask = data_set.get_roi_mask(cell_specimen_ids=[cid])

The following code gets the events associated with the same experiment:

events = boc.get_ophys_experiment_events(ophys_experiment_id=510221121)

However, I don't know which row in the events variable corresponds to the ID stored in cid.

Is there a way to do this?

1

There are 1 best solutions below

1
On BEST ANSWER

A similar question has been answered in the Allen Brain Map Community Forum https://community.brain-map.org/t/how-can-i-get-the-l0-regularization-events-for-a-specific-cell-id/261