allensdk.brain_observatory.drifting_gratings module¶
-
class
allensdk.brain_observatory.drifting_gratings.
DriftingGratings
(data_set, **kwargs)[source]¶ Bases:
allensdk.brain_observatory.stimulus_analysis.StimulusAnalysis
Perform tuning analysis specific to drifting gratings stimulus.
Parameters: - data_set: BrainObservatoryNwbDataSet object
-
get_peak
()[source]¶ Computes metrics related to each cell’s peak response condition.
Returns: - Pandas data frame containing the following columns (_dg suffix is
- for drifting grating):
- ori_dg (orientation)
- tf_dg (temporal frequency)
- reliability_dg
- osi_dg (orientation selectivity index)
- dsi_dg (direction selectivity index)
- peak_dff_dg (peak dF/F)
- ptest_dg
- p_run_dg
- run_modulation_dg
- cv_dg (circular variance)
-
get_response
()[source]¶ Computes the mean response for each cell to each stimulus condition. Return is a (# orientations, # temporal frequencies, # cells, 3) np.ndarray. The final dimension contains the mean response to the condition (index 0), standard error of the mean of the response to the condition (index 1), and the number of trials with a significant response (p < 0.05) to that condition (index 2).
Returns: - Numpy array storing mean responses.
-
number_ori
¶
-
number_tf
¶
-
orivals
¶
-
plot_direction_selectivity
(si_range=[0, 1.5], n_hist_bins=50, color='#ccccdd', p_value_max=0.05, peak_dff_min=3)[source]¶
-
plot_orientation_selectivity
(si_range=[0, 1.5], n_hist_bins=50, color='#ccccdd', p_value_max=0.05, peak_dff_min=3)[source]¶
-
plot_preferred_direction
(include_labels=False, si_range=[0, 1.5], color='#ccccdd', p_value_max=0.05, peak_dff_min=3)[source]¶
-
plot_preferred_temporal_frequency
(si_range=[0, 1.5], color='#ccccdd', p_value_max=0.05, peak_dff_min=3)[source]¶
-
reshape_response_array
()[source]¶ Returns: response array in cells x stim x repetition for noise correlations
-
tfvals
¶