miv_simulator.plotting#
Functions
|
Remove top and right axes from pyplot axes object. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Plot cell morphology and optionally synapse locations. |
|
|
|
Plot coordinates |
|
|
|
Shows graph edges using Mayavi |
|
Line plot of intracellular state variable (default: v). |
|
Line plot of LFP state variable (default: v). |
|
Line plot of LFP power spectrogram. |
|
Raster plot of target cell intracellular trace + spike raster of presynaptic inputs. |
|
Plot vertex distribution with respect to arc distance for a single postsynaptic cell. |
|
|
|
Spatial raster plot of network spike times. |
|
Plots spike histogram. |
|
Raster plot of network spike times. |
|
|
|
|
|
- miv_simulator.plotting.save_figure(file_name_prefix, fig=None, **kwargs)[source]#
- Parameters:
file_name_prefix –
fig – :class:’plt.Figure’
kwargs – dict
- miv_simulator.plotting.plot_graph(x, y, z, start_idx, end_idx, edge_scalars=None, edge_color=None, **kwargs)[source]#
Shows graph edges using Mayavi
- Parameters:
- x: ndarray
x coordinates of the points
- y: ndarray
y coordinates of the points
- z: ndarray
z coordinates of the points
- edge_scalars: ndarray, optional
optional data to give the color of the edges.
- kwargs:
extra keyword arguments are passed to quiver3d.
- miv_simulator.plotting.clean_axes(axes, left=True, right=False)[source]#
Remove top and right axes from pyplot axes object. :type axes: :param axes: list of pyplot.Axes :param top: bool :type left: :param left: bool :type right: :param right: bool
- miv_simulator.plotting.plot_coordinates(coords_path, population, namespace, index=0, graph_type='scatter', bin_size=0.01, xyz=False, **kwargs)[source]#
Plot coordinates
- Parameters:
coords_path –
namespace –
population –
- miv_simulator.plotting.plot_spike_raster(input_path, namespace_id, include=['eachPop'], time_range=None, time_variable='t', max_spikes=1000000, labels='legend', pop_rates=True, spike_hist=None, spike_hist_bin=5, include_artificial=True, marker='.', **kwargs)[source]#
Raster plot of network spike times. Returns the figure handle.
input_path: file with spike data namespace_id: attribute namespace for spike events time_range ([start:stop]): Time range of spikes shown; if None shows all (default: None) time_variable: Name of variable containing spike times (default: ‘t’) max_spikes (int): maximum number of spikes that will be plotted (default: 1e6) labels = (‘legend’, ‘overlay’): Show population labels in a legend or overlayed on one side of raster (default: ‘legend’) pop_rates = (True|False): Include population rates (default: False) spike_hist (None|’overlay’|’subplot’): overlay line over raster showing spike histogram (spikes/bin) (default: False) spike_hist_bin (int): Size of bin in ms to use for histogram (default: 5) marker (char): Marker for each spike (default: ‘|’)
- miv_simulator.plotting.plot_spike_histogram(input_path, namespace_id, config_path=None, include=['eachPop'], time_variable='t', time_range=None, pop_rates=False, bin_size=5, smooth=0, quantity='rate', include_artificial=True, progress=False, overlay=True, graph_type='bar', **kwargs)[source]#
Plots spike histogram. Returns figure handle.
- Parameters:
- input_pathstr
file with spike data
- namespace_id
attribute namespace for spike events
- config_pathOptional[str]
config_path
- includeList[str] ([“eachPop”, <population name>])
List of data series to include. (default: [“eachPop”] expands to the name of each population)
- time_variablestr
Name of variable containing spike times (default: “t”)
- time_rangeOptional[Tuple[int,int]] ([start:stop])
Time range of spikes shown. If None shows all. (default: None)
- pop_ratesbool
pop_rates
- bin_sizeint
Size in ms of each bin (default: 5)
- smoothfloat
smooth
- quantitystr (“rate”, “count”)
Quantity of y axis (firing rate in Hz, or spike count) (default: “rate”)
- include_artificialbool
include_artificial
- progressbool
progress
- overlaybool
Whether to overlay the data lines or plot in separate subplots (default: True)
- graph_typestr (“line”, “bar”)
Type of graph to use (line graph or bar plot) (default: “line”)
- miv_simulator.plotting.plot_lfp(input_path, config_path=None, time_range=None, compute_psd=False, window_size=4096, frequency_range=(0, 400.0), overlap=0.9, bandpass_filter=False, dt=None, **kwargs)[source]#
Line plot of LFP state variable (default: v). Returns figure handle.
config: path to model configuration file input_path: file with LFP trace data time_range ([start:stop]): Time range of spikes shown; if None shows all (default: None)
- miv_simulator.plotting.plot_lfp_spectrogram(input_path, config_path=None, time_range=None, window_size=4096, overlap=0.9, frequency_range=(0, 400.0), dt=None, **kwargs)[source]#
Line plot of LFP power spectrogram. Returns figure handle.
config: path to model configuration file input_path: file with LFP trace data time_range ([start:stop]): Time range of spikes shown; if None shows all (default: None)
- miv_simulator.plotting.plot_biophys_cell_tree(env, biophys_cell, node_filters={'swc_types': ['apical', 'basal']}, plot_synapses=False, synapse_filters=None, syn_source_threshold=0.0, line_width=8.0, plot_method='neuron', **kwargs)[source]#
Plot cell morphology and optionally synapse locations.
- miv_simulator.plotting.plot_2D_rate_map(x, y, rate_map, x0=None, y0=None, peak_rate=None, title=None, fft_vmax=10.0, density_bin_size=10.0, **kwargs)[source]#
- Parameters:
x – array
y – array
rate_map – array
peak_rate – float
title – str
- miv_simulator.plotting.plot_2D_histogram(hist, x_edges, y_edges, norm=None, ylabel=None, xlabel=None, title=None, cbar_label=None, cbar=True, vmin=0.0, vmax=None, **kwargs)[source]#
- Parameters:
hist – ndarray
x_edges – ndarray
y_edges – ndarray
norm – ndarray; optionally normalize hist by nonzero elements of norm array
ylabel – str
xlabel – str
title – str
cbar_label – str
cbar – bool
vmin – float
vmax – float
- miv_simulator.plotting.plot_intracellular_state(input_path, namespace_ids, include=['eachPop'], time_range=None, time_variable='t', state_variable='v', max_units=1, gid_set=None, n_trials=1, labels='legend', lowpass_plot=None, reduce=False, distance=False, **kwargs)[source]#
Line plot of intracellular state variable (default: v). Returns the figure handle.
input_path: file with state data namespace_ids: attribute namespaces time_range ([start:stop]): Time range of spikes shown; if None shows all (default: None) time_variable: Name of variable containing spike times (default: ‘t’) state_variable: Name of state variable (default: ‘v’) max_units (int): maximum number of units from each population that will be plotted (default: 1) labels = (‘legend’, ‘overlay’): Show population labels in a legend or overlayed on one side of raster (default: ‘legend’)
- miv_simulator.plotting.plot_network_clamp(input_path, spike_namespace, intracellular_namespace, gid, target_input_features_path=None, target_input_features_namespace=None, target_input_features_arena_id=None, target_input_features_trajectory_id=None, config_file=None, config_prefix='', include='eachPop', include_artificial=True, time_range=None, time_variable='t', intracellular_variable='v', labels='overlay', pop_rates=True, all_spike_hist=False, spike_hist_bin=5, lowpass_plot_type='overlay', n_trials=-1, marker='.', opt_seed=None, **kwargs)[source]#
Raster plot of target cell intracellular trace + spike raster of presynaptic inputs. Returns the figure handle.
input_path: file with spike data spike_namespace: attribute namespace for spike events intracellular_namespace: attribute namespace for intracellular trace target_input_features_path: optional file with input features target_input_features_namespaces: optional attribute namespace for input features config_path: path to network configuration file; required when target_input_features_path is given time_range ([start:stop]): Time range of spikes shown; if None shows all (default: None) time_variable: Name of variable containing spike times (default: ‘t’) labels = (‘legend’, ‘overlay’): Show population labels in a legend or overlayed on one side of raster (default: ‘legend’) pop_rates = (True|False): Include population rates (default: False) spike_hist_bin (int): Size of bin in ms to use for histogram (default: 5) marker (char): Marker for each spike (default: ‘.’)
- miv_simulator.plotting.plot_single_vertex_dist(env, connectivity_path, coords_path, distances_namespace, target_gid, destination, source, extent_type='local', direction='in', bin_size=20.0, normed=False, comm=None, **kwargs)[source]#
Plot vertex distribution with respect to arc distance for a single postsynaptic cell.
- Parameters:
env –
connectivity_path –
coords_path –
distances_namespace –
target_gid –
destination –
source –
- miv_simulator.plotting.plot_spatial_spike_raster(input_path, namespace_id, coords_path, distances_namespace='Arc Distances', include=['eachPop'], time_step=5.0, time_range=None, time_variable='t', include_artificial=True, max_spikes=1000000, marker='o', **kwargs)[source]#
Spatial raster plot of network spike times. Returns the figure handle.
input_path: file with spike data namespace_id: attribute namespace for spike events time_range ([start:stop]): Time range of spikes shown; if None shows all (default: None) time_variable: Name of variable containing spike times (default: ‘t’) max_spikes (int): maximum number of spikes that will be plotted (default: 1e6) labels = (‘legend’, ‘overlay’): Show population labels in a legend or overlayed on one side of raster (default: ‘legend’) marker (char): Marker for each spike (default: ‘|’)