%load_ext autoreload
%autoreload 2
plot_2d_fit
[source]
plot_2d_fit
(sta
,param_d
,QI
=None
,fit_f
=sum_of_2D_gaussian
,imshow_args
={'vmin': -1, 'vmax': 1, 'cmap': 'gray'}
)
2D STA plotting helper function to quickly check results.
params:
- sta: Frame fitted containing the 2D STA
- param_d: Parameter dictionary of the fit for fit_f
- fit_f: Function used for the fit
- imshow_args: Parameters for imshow
return:
- the two axes list
plot_tSTA_fit
[source]
plot_tSTA_fit
(sta
,param_d
,QI
=None
,fit_f
=sum_of_gaussian
,frame_rate
=60
,ax
=None
)
Helper function to visualize the temporal STA fit.
params:
- sta: STA of the cell`
- param_d: Parameter dictionary of the fit for fit_f
- QI: Quality index of the fit
- fit_f: Function used for the fit to plot
- ax: Axis where to plot the figure. If None, a new figure is created
return:
- The axis of the figure
plot_chirpam_fit
[source]
plot_chirpam_fit
(cell_mean
,param_d
,QI
=None
,fit_f
=sinexp_sigm
,start
=420
,stop
=960
,ax
=None
)
Helper function to visualize the fit of a cell response to a chirp_am stimulus.
params:
- cell_mean: Cell's mean response to the stimulus
- param_d: Parameter dictionary of the fit for fit_f
- QI: Quality index of the fit
- fit_f: Function used for the fit
- start: Where the fit started in index of cell_mean
- stop: Where the fit stopped in index of cell_mean
- ax: Axis where to plot the figure. If None, a new figure of size (50,2) is created
return:
- The axis of the figure
plot_chirp_freq_epoch_fit
[source]
plot_chirp_freq_epoch_fit
(cell_mean
,param_d_l
,fit_f
=sin_exponent
,QI_l
=[None, None, None, None, None]
,freqs
=[1.875, 3.75, 7.5, 15, 30]
,durations
=[2, 2, 2, 1, 1]
,start
=360
,sampling_rate
=60
,ax
=None
)
Helper function to visualize the fit of a cell response to a chirp_freq_epoch stimulus.
params:
- cell_mean: Cell's mean response to the stimulus
- param_d_l: Parameters dictionary list of the fits for fit_f
- QI_l: Quality index list of the fits
- fit_f: Function used for the fit
- freqs: Frequency list of the epochs in Hz
- durations: Duration list of the epochs
- start: Where the fit started in index of cell_mean
- sampling_rate: Sampling rate of the response in Hz
- ax: Axis where to plot the figure. If None, a new figure of size (50,2) is created
return:
- The axis of the figure
plot_transient_fit
[source]
plot_transient_fit
(cell_mean
,param_d
,peak
,start
=0
,stop
=None
,QI
=None
,fit_f
=exponential_decay
,sampling_rate
=60
,ax
=None
)
Helper function to visualize the transiency fit of a cell response to the ON-OFF stimulus.
params:
- cell_mean: Cell's mean response to the stimulus. start and stop parameters must correspond to where the fit was done in the given cell_mean
- param_d: Parameter dictionary of the fit for fit_f
- peak: Peak returned by `modelling.fit_transiency`, where the response decay begin
- start: Start position in cell_mean of the fitted cell_mean
- stop: Stop position in cell_mean of the fitted cell_mean. If None, it is set to len(cell_mean)
- QI: Quality index of the fit
- fit_f: Function used for the fit to plot
- sampling_rate: Sampling rate of the response in Hz
- ax: Axis where to plot the figure. If None, a new figure is created
return:
- The axis of the figure
plot_nonlinearity_fit
[source]
plot_nonlinearity_fit
(nonlinearity
,param_d
,QI
=None
,fit_f
=sigmoid
,ax
=None
)
Helper function to visualize the nonlinearity fit.
params:
- nonlinearity: Cell's nonlinearity computed by `processing.process_nonlinearity`
- param_d: Parameter dictionary of the fit for fit_f
- QI: Quality index of the fit
- fit_f: Function used for the fit to plot
- ax: Axis where to plot the figure. If None, a new figure is created
return:
- The axis of the figure
plot_ds_wheel
[source]
plot_ds_wheel
(ds_dict
,cell_idx
,ax
=None
,arrow_params
={'width': 0.13, 'length_includes_head': True, 'lw': 2, 'zorder': 5, 'alpha': 0.5, 'edgecolor': 'black'}
)
Polar plot for direction and orientation response of a cell processed by processing.direction_selectivity
.
params:
- ds_dict: The dictionary containing the cells DS and OS
- cell_idx: The index of the cell in the response
- ax: The axis for the plot. If None, a new plot is created
- arrow_params: Parameters for the arrow of the preferred orientation and direction (from the p_values)
return:
- The axis of the plot
plot_ds_wave_wheel
[source]
plot_ds_wave_wheel
(response_tuple
,cell_idx
,n_angle
=10
,ax
=None
,arrow_params
={'width': 0.13, 'length_includes_head': True, 'lw': 2, 'zorder': 5, 'alpha': 0.5, 'edgecolor': 'black'}
,moving_distance_th
=1
)
plot_fl_bars
[source]
plot_fl_bars
(sta
,pval
=None
,ax
=None
,imshow_params
={'cmap': 'gray', 'vmin': -1, 'vmax': 1, 'aspect': 'auto', 'interpolation': 'nearest'}
)
Plot the response to a 1D spatial stimulus like Flickering_bars.
params:
- sta: The STA to the 1D stimulus
- pval: p-value of the response (float)
- ax: The axis for the plot. If None, a new plot is created
- imshow_params: Parameters for the plotted image
return:
- The axis of the figure
plot_t_sta
[source]
plot_t_sta
(sta
,pval
=None
,frame_rate
=60
,ax
=None
)
Plot the STA response of a cell to a fullfield stimulus.
params:
- sta: The t-STA of the cell
- pval: p-value of the response (float)
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_chirp
[source]
plot_chirp
(stim_inten
,spike_bins
,smooth
=True
,n_repeats
=None
,frame_rate
=60
,ax
=None
)
Plot the response to a chirp stimulus (but could be any repeated stimulus, non-shuffled). The response is plotted with seaborn's lineplot.
params:
- stim_inten: The whole stimulus intensity
- spike_bins: The cell's response to the whole stimulus
- n_repeats: Number of stimulus repetitions. If None, it will try to guess it.
- smooth: Flag to smooth or not the cell's response
- frame_rate: Frame rate of the stimulus
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_spike_template
[source]
plot_spike_template
(cluster_composition
,phy_dict
,shanks_idx
,ax
=None
)
Plot the spike template obtained with phy for a silicone probe.
params:
- cluster_composition: List of phy format clusters corresponding to that cell
- phy_dict: Phy result dictionnary
- shanks_idx: Idx of shanks for the channels obtained with `utils.get_shank_channels`
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_spike_template_kilo
[source]
plot_spike_template_kilo
(cluster_composition
,phy_dict
,shanks_idx
,multiplication_factor_spike_template
,ax
=None
)
Plot the spike template obtained with phy for a silicone probe.
params:
- cluster_composition: List of phy format clusters corresponding to that cell
- phy_dict: Phy result dictionnary
- shanks_idx: Idx of shanks for the channels obtained with `utils.get_shank_channels`
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_spike_template_MEA
[source]
plot_spike_template_MEA
(cluster_composition
,templates
,channel_positions
,ax
=None
)
Plot the spike template obtained with phy for a micro electrode array.
params:
- cluster_composition: List of phy format clusters corresponding to that cell
- templates: All templates of phy format
- channel_positions: Positions of the channels by idx from phy format
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_autocorrelogram
[source]
plot_autocorrelogram
(cluster
,spike_times
,spike_clusters
,bin_ms
=0.001
,sampling_rate
=30000
,tails
=30
,ax
=None
)
Plot the cell's response autocorrelogram
params:
- cluster: Cluster id of the cell
- spike_times: Times of all spikes in phy format
- spike_clusters: cluster associated to the spikes in phy format
- bin_ms: Size of the autocorrelogram bin in ms
- sampling_rate: Sampling rate of the electrophysiology
- tails: Size of the tails for the autocorrelogram
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_spike_amplitudes
[source]
plot_spike_amplitudes
(cluster
,spike_templates
,spike_clusters
,spike_times
,amplitudes
,n_max_dots
=5000
,ax
=None
)
Plot a subset of all spikes amplitudes of a cell.
params:
- cluster: Cluster id of the cell
- spike_templates: Original templates id in phy format
- spike_times: Times of all spikes in phy format
- spike_clusters: cluster associated to the spikes in phy format
- amplitudes: Spike amplitudes in phy format
- n_max_dots: Max limit for the number of spikes to not overload the plot
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_spike_amplitudes_kilo
[source]
plot_spike_amplitudes_kilo
(reM
,cluster
,spike_templates
,spike_clusters
,spike_times
,amplitudes
,n_max_dots
=10000
,ax
=None
)
Plot a subset of all spikes amplitudes of a cell.
params:
- cluster: Cluster id of the cell
- spike_templates: Original templates id in phy format
- spike_times: Times of all spikes in phy format
- spike_clusters: cluster associated to the spikes in phy format
- amplitudes: Spike amplitudes in phy format
- n_max_dots: Max limit for the number of spikes to not overload the plot
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_calcium_trace
[source]
plot_calcium_trace
(cell_trace
,ax
=None
)
Plot the calcium trace of a cell.
params:
- cell_trace: Calcium trace of a cell
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_stim_epochs_to_ephy
[source]
plot_stim_epochs_to_ephy
(reM
,y_pos
,ax
=None
)
Add the stimulus epochs to a spike response of a cell.
params:
- reM: The Record_Master containing the synchronized stimuli
- y_pos: The y position of the stimuli
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_stim_epochs_to_calcium
[source]
plot_stim_epochs_to_calcium
(reM
,y_pos
,ax
=None
)
Add the stimulus epochs to a calcium response of a cell.
params:
- reM: The Record_Master containing the synchronized stimuli
- y_pos: The y position of the stimuli
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_cell_spatial
[source]
plot_cell_spatial
(cell_spatial
,ax
=None
)
Plot the cell spatial mask obtained with CaImAn.
params:
- cell_spatial: The 2D image of the cell
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_stim_recap_table
[source]
plot_stim_recap_table
(df
,ax
=None
)
Plot the recap table obtained with utils.stim_recap_df
params:
- df: the dataframe of the stim recap
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_composed_A_masks
[source]
plot_composed_A_masks
(A_matrix
,shape
=None
,ax
=None
)
Plot in a single image the spatial mask of all cell of a record, obtained with CaImAn.
params:
- A_matrix: the A matrix given by CaImAn (h*w, n_cell) or the 2D reshaped A_matrix (n_cell, h, w)
- ax: The axis for the plot. If None, a new plot is created
- shape: Shape of a single cell image if A_matrix is native, e.g. (256, 256). If None, it assumes it's a square and tries to guess the shape.
return:
- The axis of the plot
plot_sta_positions
[source]
plot_sta_positions
(stas
,ax
=None
)
Plot in a single image all 2D STAs of a single record. The STA are fitted with a gaussian, and plotted as ellipses.
params:
- stas: All STAs of the cells of shape (n_cell, t, height, width)
- ax: The axis for the plot. If None, a new plot is created
return:
- The axis of the plot
plot_2d_sta
[source]
plot_2d_sta
(sta
,gs
=None
,pval
=None
,title
='Checkerboard'
)
Plot a single 2D STA or an iterable of 2D STAs
params:
- sta: Array of shape (h, w) or of shape (n_sta, h, w)
- gs: GridSpec for the plotting. If None, defined automatically
- pval: Minimal p-value of the whole
- title: Title to give to the GridSpec
return:
- the GridSpec
plt.figure()
to_plot = np.random.rand(24,10,32)*2-1
gs = plot_2d_sta(to_plot, gs=gridspec.GridSpec(6, 4), pval=0.008)
plot_dome_flat
[source]
plot_dome_flat
(sph_pos
,ax
=None
, **scatter_args
)
Plot the dome LED as flat.
params:
- sph_pos: Spherical coordinates of the LED (e.g. obtained with `leddome.get_dome_positions`)
- ax: The axis for the plot. Needs to be polar projection. If None, a new plot is created
- scatter_args: Args for the scatter plot, such as the dots individual colors
return:
- The axis of the plot
plot_dome_checker
[source]
plot_dome_checker
(sta
,s
=20
,gs
=None
,pval
=None
,title
='Checkerboard'
,led_position
='default'
)
Plot a single 2D STA or an iterable of 2D STAs for the LED dome
params:
- sta: Array of shape (h, w) or of shape (n_sta, h, w)
- s: The dot size
- gs: GridSpec for the plotting. If None, defined automatically
- pval: Minimal p-value of the whole
- title: Title to give to the GridSpec
- led_position: Led position to plot, in shape (4,237,3)
return:
- the GridSpec
plot_omitted_response
[source]
plot_omitted_response
(response_d_ON
,response_d_OFF
,cell_idx
,n_fr_cycle
=8
,gs
=None
)
Plotting of the averaged response to omitted stimuli (ON & OFF).
params:
- response_d_ON: Dictionnary of the response to ON omitted stimuli (from utils.group_omitted_epochs)
- response_d_OFF: Dictionnary of the response to OFF omitted stimuli
- cell_idx: index of the cell to plot
- n_fr_cycle: Number of frame of (flash + interval between flashes)
- gs: Gridspec where to plot the ON and OFF responses. Should have len == 2
return:
- the GridSpec
plot_sta_pixelcorr
[source]
plot_sta_pixelcorr
(sta
,stim_name
=None
,ax_corr
=None
,ax_hist
=None
)
Plot the correlation matrix between the sta's pixels, and their value distribution with a histogram.
return:
- The axis of the two plots, (ax_corr, ax_hist)
plot_svd
[source]
plot_svd
(sta
,ax
=None
)
Plot a histogram of the singular value decomposition of an STA. params:
- sta: The STA to decompose
return:
- The axis of the figure
plot_nonlin
[source]
plot_nonlin
(nonlinearity
,bins
,label
=None
,ax
=None
)
Plot a nonlinearity with the bins that were used (in L2 norm) params:
- nonlinearity: The nonlinearity to plot
- bins: Bins used by [`process_nonlinearity`](/theonerig/processing.html#process_nonlinearity) to make that nonlinearity
- label: Label of this trace
- ax: Axis where to plot the figure. If None, a new figure is created
return:
- The axis of the figure
plot_crosscorr_spikes_behav
[source]
plot_crosscorr_spikes_behav
(behav
,corr_behav_lag
,p_value_peak
,offset_peak
,null_dist_behav
,fps
=60
,seconds
=30
,color_line
='black'
,title
='visual stim'
,ax
=None
)
Cross-correlation with lag plotting helper function.
params:
- behav: String with name of behavioral signal to be analysed
- corr_behav_lag: Array of values of the cross-correlation between behavioral signal and spiking signal (output of 'utils.cross_corr_with_lag')
- p_value_peak: P-value of the peak correlation between behavioral signal and spiking signal (output of 'utils.cross_corr_with_lag')
- offset_peak: Offset value in seconds of the peak correlation value from the centered correlation value (output of 'utils.cross_corr_with_lag')
- null_dist_behav: Null distribution of correlation values (output of 'utils.cross_corr_with_lag')
- fps: Sampling rate
- seconds: Window in seconds of the correlation lag
- color_line: Color of plotted line
- title: Title of the plot
- ax: The axis for the plot
return:
- The axis of the figure
configure_pyplot_recap
[source]
configure_pyplot_recap
(small_size
=14
,medium_size
=18
,bigger_size
=24
)
Set the fontsize and other style of matplotlib and seaborn for the recap plots. Call sns.set() and plt.rcdefaults() to restore defaults parameters.
plot_recap_vivo_ephy
[source]
plot_recap_vivo_ephy
(title_dict
,reM
,phy_dict
,cluster_ids
,df_stim
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl
=None
,fl_bars
=None
,chirp_am
=None
,chirp_fm
=None
,moving_gratings
=None
,water
=None
,export_path
='./recap_plot.pdf'
,show_time
=True
)
Plot the recap pdf of in vivo electrophy records.
params:
- title_dict: A dictionnary containing the str info for the title: keys(condition, date, record_name, record_id)
- reM: The record master object of the record
- phy_dict: A dictionnary containing the results from phy (see utils.phy_results_dict())
- cluster_ids: A list of the cluster id used by phy, to plot. Usually the cells classified as good.
- df_stim: Stimulus dataframe recap of their syncronisation obtained with `utils.stim_recap_df`
- cell_db_ids: A list of the database ids of the cells corresponding to cluster_ids.
- checkerboard: A matrix of STA of cells to the checkerboard stimulus of shape (n_cell, 16, height, width)
- fullfield_fl: A matrix of STA of cells to the fullfield_flicker stimulus of shape (n_cell, 16)
- fl_bars: A matrix of STA of cells to the flickering_bars stimulus of shape (n_cell, 16, height, width)
- chirp_am: A tuple of the chirp_am obtained from a pipe, where [0] is the stimulus and [1] the cells response
- chirp_fm: Same as chirp_am but for a chirp_fm stimulus
- moving_gratings: The dict of response obtained from `utils.group_direction_response`
- water: A matrix of STA of cells to the water stimulus of shape (n_cell, 16, height, width)
- export_path: The path for a pdf file to be exported. If None, the plot is displayed.
plot_recap_vivo_ephy_kilo
[source]
plot_recap_vivo_ephy_kilo
(title_dict
,reM
,phy_dict
,cluster_ids
,df_stim
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl
=None
,fl_bars
=None
,chirp_am
=None
,chirp_fm
=None
,moving_gratings
=None
,water
=None
,export_path
='./recap_plot.pdf'
)
Plot the recap pdf of in vivo electrophy records for spike sorting run with Kilosort2.
params:
- title_dict: A dictionnary containing the str info for the title: keys(condition, date, record_name, record_id)
- reM: The record master object of the record
- phy_dict: A dictionnary containing the results from phy (see utils.phy_results_dict())
- cluster_ids: A list of the cluster id used by phy, to plot. Usually the cells classified as good.
- df_stim: Stimulus dataframe recap of their syncronisation obtained with `utils.stim_recap_df`
- cell_db_ids: A list of the database ids of the cells corresponding to cluster_ids.
- checkerboard: A matrix of STA of cells to the checkerboard stimulus of shape (n_cell, 16, height, width)
- fullfield_fl: A matrix of STA of cells to the fullfield_flicker stimulus of shape (n_cell, 16)
- fl_bars: A matrix of STA of cells to the flickering_bars stimulus of shape (n_cell, 16, height, width)
- chirp_am: A tuple of the chirp_am obtained from a pipe, where [0] is the stimulus and [1] the cells response
- chirp_fm: Same as chirp_am but for a chirp_fm stimulus
- moving_gratings: The dict of response obtained from `utils.group_direction_response`
- water: A matrix of STA of cells to the water stimulus of shape (n_cell, 16, height, width)
- export_path: The path for a pdf file to be exported. If None, the plot is displayed.
plot_recap_vivo_calcium
[source]
plot_recap_vivo_calcium
(title_dict
,reM
,A_matrix
,cell_traces
,df_stim
,cell_indexes
=None
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl
=None
,fl_bars
=None
,chirp_am
=None
,chirp_fm
=None
,moving_gratings
=None
,water
=None
,export_path
='./recap_plot.pdf'
)
Plot the recap pdf of in vivo calcium records.
params:
- title_dict: A dictionnary containing the str info for the title: keys(condition, date, record_name, record_id)
- reM: The record master object of the record
- A_matrix: A matrix of the cell spatial components obtained from CaImAn
- cell_traces: Cells raw traces (C or S_matrix from CaImAn)
- df_stim: Stimulus dataframe recap of their syncronisation obtained with `utils.stim_recap_df`
- cell_indexes: A list of the indexes of the cell to plot. Leave to None for plotting all of them.
- cell_db_ids: A list of the database ids of the cells corresponding to cluster_ids.
- checkerboard: A matrix of STA of cells to the checkerboard stimulus of shape (n_cell, 64, height, width)
- fullfield_fl: A matrix of STA of cells to the fullfield_flicker stimulus of shape (n_cell, 64)
- chirp_am: A tuple of the chirp_am obtained from a pipe, where [0] is the stimulus and [1] the cells response
- chirp_fm: Same as chirp_am but for a chirp_fm stimulus
- moving_gratings: The dict of response obtained from `utils.group_direction_response`
- water: A matrix of STA of cells to the water stimulus of shape (n_cell, 16, height, width)
- export_path: The path for a pdf file to be exported. If None, the plot is displayed.
plot_recap_vitro_ephy
[source]
plot_recap_vitro_ephy
(title_dict
,reM
,phy_dict
,cluster_ids
,df_stim
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl
=None
,fl_bars
=None
,chirp_am
=None
,chirp_fm
=None
,moving_gratings
=None
,export_path
='./recap_plot.pdf'
)
Plot the recap pdf of in vitro electrophy records.
params:
- title_dict: A dictionnary containing the str info for the title: keys(condition, date, record_name, record_id)
- reM: The record master object of the record
- phy_dict: A dictionnary containing the results from phy (see utils.phy_results_dict())
- cluster_ids: A list of the cluster id used by phy, to plot. Usually the cells classified as good.
- df_stim: Stimulus dataframe recap of their syncronisation obtained with `utils.stim_recap_df`
- cell_db_ids: A list of the database ids of the cells corresponding to cluster_ids.
- checkerboard: A matrix of STA of cells to the checkerboard stimulus of shape (n_cell, 16, height, width)
- fullfield_fl: A matrix of STA of cells to the fullfield_flicker stimulus of shape (n_cell, 16)
- fl_bars: A matrix of STA of cells to the flickering_bars stimulus of shape (n_cell, 16, height, width)
- chirp_am: A tuple of the chirp_am obtained from a pipe, where [0] is the stimulus and [1] the cells response
- chirp_fm: Same as chirp_am but for a chirp_fm stimulus
- moving_gratings: The dict of response obtained from `utils.group_direction_response`
- export_path: The path for a pdf file to be exported. If None, the plot is displayed.
plot_recap_vivo_ephy_dome
[source]
plot_recap_vivo_ephy_dome
(title_dict
,reM
,phy_dict
,cluster_ids
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl_100Hz
=None
,fullfield_fl_200Hz
=None
,chirp_fm
=None
,wave
=None
,export_path
='./recap_plot.pdf'
)
Plot the recap pdf of in vivo electrophy records with the LED dome as stimuluation device.
params:
- title_dict: A dictionnary containing the str info for the title: keys(condition, date, record_name, record_id)
- reM: The record master object of the record
- phy_dict: A dictionnary containing the results from phy (see utils.phy_results_dict())
- cluster_ids: A list of the cluster id used by phy, to plot. Usually the cells classified as good.
- df_stim: Stimulus dataframe recap of their syncronisation obtained with `utils.stim_recap_df`
- cell_db_ids: A list of the database ids of the cells corresponding to cluster_ids.
- checkerboard: A matrix of STA of cells to the checkerboard stimulus of shape (n_cell, Hw>=8, height, width)
- fullfield_fl_100Hz: A matrix of STA of cells to the fullfield_flicker at 100Hz stimulus of shape (n_cell, Hw)
- fullfield_fl_200Hz: A matrix of STA of cells to the fullfield_flicker at 200Hz stimulus of shape (n_cell, Hw)
- chirp_fm: A tuple of the chirp_fm obtained from a pipe, where [0] is the stimulus and [1] the cells response
- wave: The dict of response obtained from `utils.wave_direction_selectivity`
- export_path: The path for a pdf file to be exported. If None, the plot is displayed.
plot_recap_vivo_ephy_corr_behav
[source]
plot_recap_vivo_ephy_corr_behav
(title_dict
,reM
,phy_dict
,cluster_ids
,df_stim
,behavs
,conversion_factor_treadmill
=6.25
,removeslowdrifts
=True
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl
=None
,fl_bars
=None
,chirp_am
=None
,chirp_fm
=None
,moving_gratings
=None
,water
=None
,export_path
='./recap_plot_corr_behav.pdf'
)
Plot the recap pdf of in vivo electrophy records.
params:
- title_dict: A dictionary containing the str info for the title: keys(condition, date, record_name, record_id)
- reM: The record master object of the record
- phy_dict: A dictionary containing the results from phy (see utils.phy_results_dict())
- cluster_ids: A list of the cluster id used by phy, to plot. Usually the cells classified as good.
- df_stim: Stimulus dataframe recap of their syncronisation obtained with `utils.stim_recap_df`
- behavs: A list with behavioral signal names from reM to plot the correlation with spiking signal
- conversion_factor_treadmill: The value to convert the treadmill signal into cm/s
- removeslowdrifts: Boolean:
False - does not remove slow drifts from the signal, for the correlation analysis;
True - removes slow drifts by extracting a specified percentile within moving window from the signal, for the correlation analysis.
- cell_db_ids: A list of the database ids of the cells corresponding to cluster_ids.
- checkerboard: A matrix of STA of cells to the checkerboard stimulus of shape (n_cell, 16, height, width)
- fullfield_fl: A matrix of STA of cells to the fullfield_flicker stimulus of shape (n_cell, 16)
- fl_bars: A matrix of STA of cells to the flickering_bars stimulus of shape (n_cell, 16, height, width)
- chirp_am: A tuple of the chirp_am obtained from a pipe, where [0] is the stimulus and [1] the cells response
- chirp_fm: Same as chirp_am but for a chirp_fm stimulus
- moving_gratings: The dict of response obtained from `utils.group_direction_response`
- water: A matrix of STA of cells to the water stimulus of shape (n_cell, 16, height, width)
- export_path: The path for a pdf file to be exported. If None, the plot is displayed.
plot_recap_wholeField
[source]
plot_recap_wholeField
(title_dict
,reM
,phy_dict
,cluster_ids
,df_stim
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl
=None
,chirp_am
=None
,nonlin_fff
=None
,nonlin_chk
=None
,chirp_fm
=None
,water
=None
,export_path
='./wholefield_recap_plot.pdf'
)
Plot the recap pdf of cells for wholefieldness evaluation
params:
plot_recap_wholeField_dome
[source]
plot_recap_wholeField_dome
(title_dict
,reM
,phy_dict
,cluster_ids
,cell_db_ids
=None
,checkerboard
=None
,fullfield_fl
=None
,chirp_am
=None
,nonlin_fff
=None
,nonlin_chk
=None
,chirp_fm
=None
,water
=None
,export_path
='./wholefield_recap_plot.pdf'
)
Plot the recap pdf of cells for wholefieldness evaluation (with LED dome)
params:
plot_recap_wholeField_vitroHiroki
[source]
plot_recap_wholeField_vitroHiroki
(title_dict
,cells_idxs
,checkerboard
=None
,nonlin_chk
=None
,export_path
='./wholefield_recap_plot.pdf'
)
Plot the recap pdf of vitroHirokiChecker cells for wholefieldness evaluation
params:
- title_dict: A dictionnary containing the str info for the title: keys(condition, date, record_name, record_id)
- cells_idx: A list of the cells index to plot
- checkerboard: A matrix of STA of cells to the checkerboard stimulus of shape (n_cell, 16, height, width)
- export_path: The path for a pdf file to be exported. If None, the plot is displayed.