neoStructures.NeoAll(spikesorting_dirpath, spikesorting_filename, probe_filepath, signal_dirpath=[], event_filepath=[], event_csv_sep=';', fig_dirpath=[], save_fig=0, srate=30000, t_max=-1)¶Contain spike sorting data from Spyking-Circus results file. Create one Neo Segment per unit.
Methods
channelpos2elec(channel_pos) |
From the channel (micro-wire) position, return the corresponding electrode’s number and name |
channelpos2tetrode(channel_pos) |
From the channel (micro-wire) position, return the information about the tetrode of this channel |
create_epochs_around_events(event_name, …) |
Create Neo Epochs objects around events specified by event name. |
create_event_list(event_times, event_names) |
Create Neo Event objects for each event specified by event_times and event_names. |
elecnum2channelpos(elec_num) |
From the electrode’s number return the electrode’s channels position and name |
get_spikerate_change_ratio_on_epochs(…) |
Compute the mean spikerate on all target and reference epochs, calcul the ratio of these two, for each unit |
getunitpreferredchannelname(unit_name) |
Get the preferred channel of a unit from the unit’s name |
plot_crosscorrelogram(unit_pos_a, unit_pos_b) |
Plot the cross-correlogram between spiketrains of units specified by unit_pos_a and unit_pos_b |
plot_isi([unit_pos, bin_duration_ms, …]) |
Plot the Inter-Spike Intervals histogram for unit specified by unit_pos |
plot_raw_unit_shape(unit_pos, …[, sep, …]) |
Get the raw signal of each action potential for the unit specified by unit_pos. |
plot_spikerate_change_ratio_on_epochs(…[, …]) |
Plot the mean spikerate ratio between 2 epochs. |
plot_spikerate_evolution([unit_pos, …]) |
Plot the spikerate evolution across all the segment duration for units specified by unit_pos |
plot_spikerate_evolution_group(grp_index[, …]) |
Plot the spike rate evolution across all the length of the segment of all units of the channel index specified by grp_index. |
plot_unit_shape([unit_pos, plot_mean, ax]) |
Plot the shape of unit specified by unit_pos |
read_event_file(event_filepath[, event_csv_sep]) |
Read the event file, specified by event_filepath and add the event to each segments using the neoStructures.NeoAll.create_event_list() method. |
reject_spikes_around_events(event_name, …) |
Reject spikes around events specified by event_name. |
save(dirpath[, filename]) |
Save the instance as a pickle (.p) file The filename is appended with the currendt date and time |
subfun_plot_unit_shape(unit_pos[, …]) |
Sub-routine for plotting shape of the unit |
| export_spike_file_time |
channelpos2elec(channel_pos)¶From the channel (micro-wire) position, return the corresponding electrode’s number and name
| Parameters: |
|
|---|---|
| Returns: |
|
channelpos2tetrode(channel_pos)¶From the channel (micro-wire) position, return the information about the tetrode of this channel
| Parameters: |
|
|---|---|
| Returns: |
|
create_epochs_around_events(event_name, time_offset, epoch_duration, epoch_names)¶Create Neo Epochs objects around events specified by event name. The epoch times start at the event time plus an possible offset time_offset, the duration is specified by epoch_duration. Epochs are added to all segments
| Parameters: |
|
|---|
create_event_list(event_times, event_names, segment_pos=-1)¶Create Neo Event objects for each event specified by event_times and event_names. Add these events to all segments specified by segment_pos
| Parameters: |
|
|---|
elecnum2channelpos(elec_num)¶From the electrode’s number return the electrode’s channels position and name
| Parameters: |
|
|---|---|
| Returns: |
|
export_spike_file_time(artefact_free_periods_filepath, output_path, unit_pos=[], sep=';')¶get_spikerate_change_ratio_on_epochs(epoch_name_target, epoch_name_ref)¶Compute the mean spikerate on all target and reference epochs, calcul the ratio of these two, for each unit
| Parameters: |
|
|---|---|
| Returns: |
|
getunitpreferredchannelname(unit_name)¶Get the preferred channel of a unit from the unit’s name
| Parameters: |
|
|---|---|
| Returns: |
|
plot_crosscorrelogram(unit_pos_a, unit_pos_b, bin_time=array(1.) * ms, max_lag_time=array(80.) * ms, smooth_time=array(10.) * ms, merge_plots=0, same_yscale=0, fill_under_plot=0, do_stat=0, n_surrogates=100, normal_dist_sd=array(10.) * ms, do_plot=1)¶Plot the cross-correlogram between spiketrains of units specified by unit_pos_a and unit_pos_b
| Parameters: |
|
|---|---|
| Returns: |
|
plot_isi(unit_pos=-1, bin_duration_ms=1, tmax_ms=100, logscale=0)¶Plot the Inter-Spike Intervals histogram for unit specified by unit_pos
| Parameters: |
|
|---|
plot_raw_unit_shape(unit_pos, signal_dirpath, artefact_free_periods_filepath, sep=';', fir_order=400, iir_type='bessel', iir_order=2, fn_hz=[300, 3000], half_duration=0.0018, realign=False, plot_mean_shape=True, plot_density_plot=True)¶Get the raw signal of each action potential for the unit specified by unit_pos.
This allows to investigate the filtering effects on the shape of the unit.
| Parameters: |
|
|---|
plot_spikerate_change_ratio_on_epochs(epoch_name_target, epoch_name_ref, plot_ratio_only=0, single_plot=1, merge_plot=0)¶Plot the mean spikerate ratio between 2 epochs. Call the method get_spikerate_change_ratio_on_epochs.
| Parameters: |
|
|---|---|
| Returns: |
|
plot_spikerate_evolution(unit_pos=-1, sigma_gauss_kernel=array(30.) * s, merge_plots=0, norm_spikerate=0, plot_events=1)¶Plot the spikerate evolution across all the segment duration for units specified by unit_pos
| Parameters: |
|
|---|
plot_spikerate_evolution_group(grp_index, sigma_gauss_kernel=array(30.) * s, merge_plots=0, norm_spikerate=0, mean_plot=0, plot_events=1)¶Plot the spike rate evolution across all the length of the segment of all units of the channel index specified by grp_index. The spike rate is computed using the Elephant module
| Parameters: |
|
|---|
plot_unit_shape(unit_pos=-1, plot_mean=0, ax=[])¶Plot the shape of unit specified by unit_pos
| Parameters: |
|
|---|
read_event_file(event_filepath, event_csv_sep=';')¶Read the event file, specified by event_filepath and add the event to each segments using the
neoStructures.NeoAll.create_event_list() method. This can be done directly when instanciating the
NeoAll instance by providin the event_filepath parameter or by calling this function.
| Parameters: |
|
|---|
reject_spikes_around_events(event_name, time_pre, time_post)¶Reject spikes around events specified by event_name.
All spikes occuring in the window [t_event-time_pre < t < t_event+time_post] will be rejected, for each event.
Modify the spiketrains of the segments in which an event is defined.
| Parameters: |
|
|---|
save(dirpath, filename=[])¶Save the instance as a pickle (.p) file The filename is appended with the currendt date and time
| Parameters: |
|
|---|
subfun_plot_unit_shape(unit_pos, plot_mean=0, ax=[], raster_plot_call=0)¶Sub-routine for plotting shape of the unit
| Parameters: |
|
|---|
neoStructures.NeoEpoch(neoAll, event_filepath, event_csv_sep=';', time_pre=1, time_post=1)¶NeoEpoch instances are created from a NeoAll instance. The spiketrains contained in the NeoAll instance are
divided into epochs from an event file. Spikes occuring around each event are kept ([time_pre, ``time_post]).
NeoEpoch contains a list of Neo Segments. Each segment represent one epoch. Each segment contains as many Neo
SpikeTrain as there are units. Each segment also contain a Neo AnalogSignal instance representing the LFP signal
associated with the spiketrains.
Methods
channelpos2elec(channel_pos) |
From the channel (micro-wire) position, return the corresponding electrode’s number and name |
channelpos2tetrode(channel_pos) |
From the channel (micro-wire) position, return the information about the tetrode of this channel |
elecnum2channelpos(elec_num) |
From the electrode’s number return the electrode’s channels position and name |
getunitpreferredchannelname(unit_name) |
Get the preferred channel of a unit from the unit’s name |
plot_crosscorrelogram_around_events(…[, …]) |
Plot the cross-correlogram around the events of neoEpoch. Compute the shift-predictor to give a significance |
plot_rasterplot([unit_pos, bin_duration, …]) |
Plot the PSTH (peri/post stimulus time histogram) for selected units. |
save(dirpath[, filename]) |
Save the instance as a pickle (.p) file The filename is appended with the currendt date and time |
subfun_plot_unit_shape(unit_pos[, …]) |
Sub-routine for plotting shape of the unit |
channelpos2elec(channel_pos)¶From the channel (micro-wire) position, return the corresponding electrode’s number and name
| Parameters: |
|
|---|---|
| Returns: |
|
channelpos2tetrode(channel_pos)¶From the channel (micro-wire) position, return the information about the tetrode of this channel
| Parameters: |
|
|---|---|
| Returns: |
|
elecnum2channelpos(elec_num)¶From the electrode’s number return the electrode’s channels position and name
| Parameters: |
|
|---|---|
| Returns: |
|
getunitpreferredchannelname(unit_name)¶Get the preferred channel of a unit from the unit’s name
| Parameters: |
|
|---|---|
| Returns: |
|
plot_crosscorrelogram_around_events(unit_pos_a, unit_pos_b, bin_time=array(1.) * ms, max_lag_time=array(80.) * ms, n_repets=100, plot_superpose=1)¶n_repets times. The interval plotted
is equal to the mean +/- 2 times the standard deviation.| Parameters: |
|
|---|
plot_rasterplot(unit_pos=-1, bin_duration=0.01, sigma_gauss_kernel=array(20.) * ms, plot_unit_shape=1, plot_event_signal=1)¶Plot the PSTH (peri/post stimulus time histogram) for selected units. A gaussian kernel is used for
estimating the instantaneous firing rate. Plot the figure if save_fig is True, in fig_dirpath_raster
| Parameters: |
|
|---|
save(dirpath, filename=[])¶Save the instance as a pickle (.p) file The filename is appended with the currendt date and time
| Parameters: |
|
|---|
subfun_plot_unit_shape(unit_pos, plot_mean=0, ax=[], raster_plot_call=0)¶Sub-routine for plotting shape of the unit
| Parameters: |
|
|---|
neoStructures.NeoMother¶Superclass of NeoAll and NeoEpoch (both NeoAll and NeoEpoch inherits from NeoMother). Used to define methods for both NeoAll and NeoEpochs
Methods
channelpos2elec(channel_pos) |
From the channel (micro-wire) position, return the corresponding electrode’s number and name |
channelpos2tetrode(channel_pos) |
From the channel (micro-wire) position, return the information about the tetrode of this channel |
elecnum2channelpos(elec_num) |
From the electrode’s number return the electrode’s channels position and name |
getunitpreferredchannelname(unit_name) |
Get the preferred channel of a unit from the unit’s name |
subfun_plot_unit_shape(unit_pos[, …]) |
Sub-routine for plotting shape of the unit |
channelpos2elec(channel_pos)¶From the channel (micro-wire) position, return the corresponding electrode’s number and name
| Parameters: |
|
|---|---|
| Returns: |
|
channelpos2tetrode(channel_pos)¶From the channel (micro-wire) position, return the information about the tetrode of this channel
| Parameters: |
|
|---|---|
| Returns: |
|
elecnum2channelpos(elec_num)¶From the electrode’s number return the electrode’s channels position and name
| Parameters: |
|
|---|---|
| Returns: |
|
getunitpreferredchannelname(unit_name)¶Get the preferred channel of a unit from the unit’s name
| Parameters: |
|
|---|---|
| Returns: |
|
subfun_plot_unit_shape(unit_pos, plot_mean=0, ax=[], raster_plot_call=0)¶Sub-routine for plotting shape of the unit
| Parameters: |
|
|---|
neoStructures.realign_spike_trace(spike_trace, spike_trace_filtered=[], resample_factor=5, interp_method='cubic', half_extremum_win=15)¶Re-align the spike trace so that the extremum in on the center of the window. The extremum position is computed on the filtered spike trace. Before taking the extremum, the filtered spike trace is upsampled and interpolated. The returned spike trace is the upsampled and interpolated trace, aligned on the center of the window.
| Parameters: |
|
|---|---|
| Returns: |
|