netpyne.analysis.interactive module

Module for production of interactive plots

netpyne.analysis.interactive.applyTheme(kwargs)[source]
netpyne.analysis.interactive.iplotRaster(include=['allCells'], timeRange=None, maxSpikes=100000000.0, orderBy='gid', orderInverse=False, popRates=False, spikeHist=False, spikeHistBin=5, syncLines=False, marker='circle', markerSize=3, popColors=None, saveData=None, saveFig=None, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotRaster>

Parameters:
  • include (list) – Cells to include in the plot. Default: ['allCells'] plots all cells Options: ['all'] plots all cells and stimulations, ['allNetStims'] plots just stimulations, ['popName1'] plots a single population, ['popName1', 'popName2'] plots multiple populations, [120] plots a single cell, [120, 130] plots multiple cells, [('popName1', 56)] plots a cell from a specific population, [('popName1', [0, 1]), ('popName2', [4, 5, 6])], plots cells from multiple populations

  • timeRange (list [start, stop]) – Time range to plot. Default: None plots entire time range Options: <option> <description of option>

  • maxSpikes (int) – Maximum number of spikes to be plotted. Default: 1e8 Options: <option> <description of option>

  • orderBy (str) – Unique numeric cell property by which to order the y-axis. Default: 'gid' orders by cell ID Options: 'y' orders by cell y-location, 'ynorm' orders by cell normalized y-location

  • orderInverse (bool) – Inverts the y-axis order if True. Default: False Options: <option> <description of option>

  • popRates (bool) – Include population firing rates on plot if True. Default: False Options: <option> <description of option>

  • spikeHist (bool) – Include spike histogram (spikes/bin) on plot if True. Default: False Options: <option> <description of option>

  • spikeHistBin (int) – Size of bin in ms to use for spike histogram. Default: 5 Options: <option> <description of option>

  • syncLines (bool) – Calculate synchrony measure and plot vertical lines for each spike to evidence synchrony if True. Default: False Options: <option> <description of option>

  • marker (str) – Bokeh marker for each spike. Default: 'circle' Options: <option> <description of option>

  • markerSize (int) – Size of Bokeh marker for each spike. Default: 3 Options: <option> <description of option>

  • popColors (dict) – Dictionary with custom color (value) used for each population (key). Default: None uses standard colors Options: <option> <description of option>

  • saveData (bool or str) – Whether and where to save the data used to generate the plot. Default: False Options: True autosaves the data, '/path/filename.ext' saves to a custom path and filename, valid file extensions are '.pkl' and '.json'

  • saveFig (bool or str) – Whether and where to save the figure. Default: False Options: True autosaves the figure, '/path/filename.html' saves to a custom path and filename, only valid file extension is '.html'

  • showFig (bool) – Shows the figure if True. Default: True Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotDipole(expData={'label': 'Experiment', 'x': [], 'y': []}, dpl=None, t=None, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotDipole>

Parameters:
  • expData (dict) – <Short description of expData> Default: {'label': 'Experiment', 'x': [], 'y': []} Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotDipoleSpectrogram(expData={'label': 'Experiment', 'x': [], 'y': []}, dpl=None, minFreq=1, maxFreq=80, stepFreq=1, norm=True, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotDipoleSpectrogram>

Parameters:
  • expData (dict) – <Short description of expData> Default: {'label': 'Experiment', 'x': [], 'y': []} Options: <option> <description of option>

  • minFreq (int) – <Short description of minFreq> Default: 1 Options: <option> <description of option>

  • maxFreq (int) – <Short description of maxFreq> Default: 80 Options: <option> <description of option>

  • stepFreq (int) – <Short description of stepFreq> Default: 1 Options: <option> <description of option>

  • norm (bool) – <Short description of norm> Default: True Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotDipolePSD(expData={'label': 'Experiment', 'x': [], 'y': []}, minFreq=1, maxFreq=80, stepFreq=1, norm=True, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotDipolePSD>

Parameters:
  • expData (dict) – <Short description of expData> Default: {'label': 'Experiment', 'x': [], 'y': []} Options: <option> <description of option>

  • minFreq (int) – <Short description of minFreq> Default: 1 Options: <option> <description of option>

  • maxFreq (int) – <Short description of maxFreq> Default: 80 Options: <option> <description of option>

  • stepFreq (int) – <Short description of stepFreq> Default: 1 Options: <option> <description of option>

  • norm (bool) – <Short description of norm> Default: True Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotSpikeHist(include=['allCells', 'eachPop'], legendLabels=[], timeRange=None, binSize=5, overlay=True, yaxis='rate', popColors=[], norm=False, smooth=None, filtFreq=False, filtOrder=3, saveData=None, saveFig=None, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotSpikeHist>

Parameters:
  • include (list) – <Short description of include> Default: ['allCells', 'eachPop'] Options: <option> <description of option>

  • legendLabels (list) – <Short description of legendLabels> Default: [] Options: <option> <description of option>

  • timeRange (<None?>) – <Short description of timeRange> Default: None Options: <option> <description of option>

  • binSize (int) – <Short description of binSize> Default: 5 Options: <option> <description of option>

  • overlay (bool) – <Short description of overlay> Default: True Options: <option> <description of option>

  • yaxis (str) – <Short description of yaxis> Default: 'rate' Options: <option> <description of option>

  • popColors (list) – <Short description of popColors> Default: [] Options: <option> <description of option>

  • norm (bool) – <Short description of norm> Default: False Options: <option> <description of option>

  • smooth (<None?>) – <Short description of smooth> Default: None Options: <option> <description of option>

  • filtFreq (bool) – <Short description of filtFreq> Default: False Options: <option> <description of option>

  • filtOrder (int) – <Short description of filtOrder> Default: 3 Options: <option> <description of option>

  • saveData (<None?>) – <Short description of saveData> Default: None Options: <option> <description of option>

  • saveFig (<None?>) – <Short description of saveFig> Default: None Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotRatePSD(include=['allCells', 'eachPop'], timeRange=None, binSize=5, maxFreq=100, NFFT=256, noverlap=128, smooth=0, overlay=True, ylim=None, popColors={}, saveData=None, saveFig=None, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotRatePSD>

Parameters:
  • include (list) – <Short description of include> Default: ['allCells', 'eachPop'] Options: <option> <description of option>

  • timeRange (<None?>) – <Short description of timeRange> Default: None Options: <option> <description of option>

  • binSize (int) – <Short description of binSize> Default: 5 Options: <option> <description of option>

  • maxFreq (int) – <Short description of maxFreq> Default: 100 Options: <option> <description of option>

  • NFFT (int) – <Short description of NFFT> Default: 256 Options: <option> <description of option>

  • noverlap (int) – <Short description of noverlap> Default: 128 Options: <option> <description of option>

  • smooth (int) – <Short description of smooth> Default: 0 Options: <option> <description of option>

  • overlay (bool) – <Short description of overlay> Default: True Options: <option> <description of option>

  • ylim (<None?>) – <Short description of ylim> Default: None Options: <option> <description of option>

  • popColors (dict) – <Short description of popColors> Default: {} Options: <option> <description of option>

  • saveData (<None?>) – <Short description of saveData> Default: None Options: <option> <description of option>

  • saveFig (<None?>) – <Short description of saveFig> Default: None Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotTraces(include=None, timeRange=None, overlay=False, oneFigPer='cell', rerun=False, colors=None, ylim=None, axis='on', fontSize=12, figSize=(10, 8), saveData=None, saveFig=None, showFig=True, ylabel=None, linkAxes=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotTraces>

Parameters:
  • include (<None?>) – <Short description of include> Default: None Options: <option> <description of option>

  • timeRange (<None?>) – <Short description of timeRange> Default: None Options: <option> <description of option>

  • overlay (bool) – <Short description of overlay> Default: False Options: <option> <description of option>

  • oneFigPer (str) – <Short description of oneFigPer> Default: 'cell' Options: <option> <description of option>

  • rerun (bool) – <Short description of rerun> Default: False Options: <option> <description of option>

  • colors (<None?>) – <Short description of colors> Default: None Options: <option> <description of option>

  • ylim (<None?>) – <Short description of ylim> Default: None Options: <option> <description of option>

  • axis (str) – <Short description of axis> Default: 'on' Options: <option> <description of option>

  • fontSize (int) – <Short description of fontSize> Default: 12 Options: <option> <description of option>

  • figSize (tuple) – <Short description of figSize> Default: (10, 8) Options: <option> <description of option>

  • saveData (<None?>) – <Short description of saveData> Default: None Options: <option> <description of option>

  • saveFig (<None?>) – <Short description of saveFig> Default: None Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: True Options: <option> <description of option>

  • ylabel (<None?>) – <Short description of ylabel> Default: None Options: <option> <description of option>

  • linkAxes (bool) – <Short description of linkAxes> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotLFP(electrodes=['avg', 'all'], plots=['timeSeries', 'PSD', 'spectrogram'], timeRange=None, NFFT=256, noverlap=128, nperseg=256, minFreq=1, maxFreq=100, stepFreq=1, smooth=0, separation=1.0, includeAxon=True, logx=False, logy=False, normSignal=False, normPSD=False, normSpec=False, overlay=False, filtFreq=False, filtOrder=3, detrend=False, transformMethod='morlet', colors=None, saveData=None, saveFig=None, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotLFP>

Parameters:
  • electrodes (list) – <Short description of electrodes> Default: ['avg', 'all'] Options: <option> <description of option>

  • plots (list) – <Short description of plots> Default: ['timeSeries', 'PSD', 'spectrogram'] Options: <option> <description of option>

  • timeRange (<None?>) – <Short description of timeRange> Default: None Options: <option> <description of option>

  • NFFT (int) – <Short description of NFFT> Default: 256 Options: <option> <description of option>

  • noverlap (int) – <Short description of noverlap> Default: 128 Options: <option> <description of option>

  • nperseg (int) – <Short description of nperseg> Default: 256 Options: <option> <description of option>

  • minFreq (int) – <Short description of minFreq> Default: 1 Options: <option> <description of option>

  • maxFreq (int) – <Short description of maxFreq> Default: 100 Options: <option> <description of option>

  • stepFreq (int) – <Short description of stepFreq> Default: 1 Options: <option> <description of option>

  • smooth (int) – <Short description of smooth> Default: 0 Options: <option> <description of option>

  • separation (float) – <Short description of separation> Default: 1.0 Options: <option> <description of option>

  • includeAxon (bool) – <Short description of includeAxon> Default: True Options: <option> <description of option>

  • logx (bool) – <Short description of logx> Default: False Options: <option> <description of option>

  • logy (bool) – <Short description of logy> Default: False Options: <option> <description of option>

  • normSignal (bool) – <Short description of normSignal> Default: False Options: <option> <description of option>

  • normPSD (bool) – <Short description of normPSD> Default: False Options: <option> <description of option>

  • normSpec (bool) – <Short description of normSpec> Default: False Options: <option> <description of option>

  • overlay (bool) – <Short description of overlay> Default: False Options: <option> <description of option>

  • filtFreq (bool) – <Short description of filtFreq> Default: False Options: <option> <description of option>

  • filtOrder (int) – <Short description of filtOrder> Default: 3 Options: <option> <description of option>

  • detrend (bool) – <Short description of detrend> Default: False Options: <option> <description of option>

  • transformMethod (str) – <Short description of transformMethod> Default: 'morlet' Options: <option> <description of option>

  • colors (<None?>) – <Short description of colors> Default: None Options: <option> <description of option>

  • saveData (<None?>) – <Short description of saveData> Default: None Options: <option> <description of option>

  • saveFig (<None?>) – <Short description of saveFig> Default: None Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotConn(includePre=['all'], includePost=['all'], feature='strength', orderBy='gid', figSize=(10, 10), groupBy='pop', groupByIntervalPre=None, groupByIntervalPost=None, removeWeightNorm=False, graphType='matrix', synOrConn='syn', synMech=None, connsFile=None, tagsFile=None, clim=None, fontSize=12, saveData=None, saveFig=None, showFig=False, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotConn>

Parameters:
  • includePre (list) – <Short description of includePre> Default: ['all'] Options: <option> <description of option>

  • includePost (list) – <Short description of includePost> Default: ['all'] Options: <option> <description of option>

  • feature (str) – <Short description of feature> Default: 'strength' Options: <option> <description of option>

  • orderBy (str) – <Short description of orderBy> Default: 'gid' Options: <option> <description of option>

  • figSize (tuple) – <Short description of figSize> Default: (10, 10) Options: <option> <description of option>

  • groupBy (str) – <Short description of groupBy> Default: 'pop' Options: <option> <description of option>

  • groupByIntervalPre (<None?>) – <Short description of groupByIntervalPre> Default: None Options: <option> <description of option>

  • groupByIntervalPost (<None?>) – <Short description of groupByIntervalPost> Default: None Options: <option> <description of option>

  • removeWeightNorm (bool) – <Short description of removeWeightNorm> Default: False Options: <option> <description of option>

  • graphType (str) – <Short description of graphType> Default: 'matrix' Options: <option> <description of option>

  • synOrConn (str) – <Short description of synOrConn> Default: 'syn' Options: <option> <description of option>

  • synMech (<None?>) – <Short description of synMech> Default: None Options: <option> <description of option>

  • connsFile (<None?>) – <Short description of connsFile> Default: None Options: <option> <description of option>

  • tagsFile (<None?>) – <Short description of tagsFile> Default: None Options: <option> <description of option>

  • clim (<None?>) – <Short description of clim> Default: None Options: <option> <description of option>

  • fontSize (int) – <Short description of fontSize> Default: 12 Options: <option> <description of option>

  • saveData (<None?>) – <Short description of saveData> Default: None Options: <option> <description of option>

  • saveFig (<None?>) – <Short description of saveFig> Default: None Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: False Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplot2Dnet(include=['allCells'], view='xy', showConns=True, popColors=None, tagsFile=None, figSize=(12, 12), fontSize=12, saveData=None, saveFig=None, showFig=True, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplot2Dnet>

Parameters:
  • include (list) – List of presynaptic cells to include. Default: ['allCells'] Options: ['all'] plots all cells and stimulations, ['allNetStims'] plots just stimulations, ['popName1'] plots a single population, ['popName1', 'popName2'] plots multiple populations, [120] plots a single cell, [120, 130] plots multiple cells, [('popName1', 56)] plots a cell from a specific population, [('popName1', [0, 1]), ('popName2', [4, 5, 6])], plots cells from multiple populations

  • view (str) – Perspective of view. Default: 'xy' front view, Options: 'xz' top-down view

  • showConns (bool) – Whether to show connections or not. Default: True Options: <option> <description of option>

  • popColors (dict) – Dictionary with custom color (value) used for each population (key). Default: None uses standard colors Options: <option> <description of option>

  • tagsFile (str) – Path to a saved tags file to use in connectivity plot. Default: None Options: <option> <description of option>

  • figSize (list [width, height]) – Size of figure in inches. Default: (12, 12) Options: <option> <description of option>

  • fontSize (int) – Font size on figure. Default: 12 Options: <option> <description of option>

  • saveData (bool or str) – Whether and where to save the data used to generate the plot. Default: False Options: True autosaves the data, '/path/filename.ext' saves to a custom path and filename, valid file extensions are '.pkl' and '.json'

  • saveFig (bool or str) – Whether and where to save the figure. Default: False Options: True autosaves the figure, '/path/filename.ext' saves to a custom path and filename, valid file extensions are '.png', '.jpg', '.eps', and '.tiff'

  • showFig (bool) – Shows the figure if True. Default: True Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotRxDConcentration(speciesLabel, regionLabel, plane='xy', saveFig=None, showFig=True, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotRxDConcentration>

Parameters:
  • speciesLabel (<type>) – <Short description of speciesLabel> Default: required

  • regionLabel (<type>) – <Short description of regionLabel> Default: required

  • plane (str) – <Short description of plane> Default: 'xy' Options: <option> <description of option>

  • saveFig (<None?>) – <Short description of saveFig> Default: None Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: True Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotSpikeStats(include=['eachPop', 'allCells'], statDataIn={}, timeRange=None, graphType='boxplot', stats=['rate', 'isicv'], bins=50, histlogy=False, histlogx=False, histmin=0.0, density=False, includeRate0=False, legendLabels=None, normfit=False, histShading=True, xlim=None, popColors={}, saveData=None, saveFig=None, showFig=True, **kwargs)[source]

Function for/to <short description of netpyne.analysis.interactive.iplotSpikeStats>

Parameters:
  • include (list) – <Short description of include> Default: ['eachPop', 'allCells'] Options: <option> <description of option>

  • statDataIn (dict) – <Short description of statDataIn> Default: {} Options: <option> <description of option>

  • timeRange (<None?>) – <Short description of timeRange> Default: None Options: <option> <description of option>

  • graphType (str) – <Short description of graphType> Default: 'boxplot' Options: <option> <description of option>

  • stats (list) – <Short description of stats> Default: ['rate', 'isicv'] Options: <option> <description of option>

  • bins (int) – <Short description of bins> Default: 50 Options: <option> <description of option>

  • histlogy (bool) – <Short description of histlogy> Default: False Options: <option> <description of option>

  • histlogx (bool) – <Short description of histlogx> Default: False Options: <option> <description of option>

  • histmin (float) – <Short description of histmin> Default: 0.0 Options: <option> <description of option>

  • density (bool) – <Short description of density> Default: False Options: <option> <description of option>

  • includeRate0 (bool) – <Short description of includeRate0> Default: False Options: <option> <description of option>

  • legendLabels (<None?>) – <Short description of legendLabels> Default: None Options: <option> <description of option>

  • normfit (bool) – <Short description of normfit> Default: False Options: <option> <description of option>

  • histShading (bool) – <Short description of histShading> Default: True Options: <option> <description of option>

  • xlim (<None?>) – <Short description of xlim> Default: None Options: <option> <description of option>

  • popColors (dict) – <Short description of popColors> Default: {} Options: <option> <description of option>

  • saveData (<None?>) – <Short description of saveData> Default: None Options: <option> <description of option>

  • saveFig (<None?>) – <Short description of saveFig> Default: None Options: <option> <description of option>

  • showFig (bool) – <Short description of showFig> Default: True Options: <option> <description of option>

  • kwargs (<type>) – <Short description of kwargs> Default: required

netpyne.analysis.interactive.iplotGranger(cells1=None, cells2=None, spks1=None, spks2=None, label1=None, label2=None, timeRange=None, binSize=5, showFig=True, saveFig=False, **kwargs)[source]

Function to plot the Granger Causality between two groups of cells

Parameters:
  • cells1 (list) – Subset of cells from which to obtain spike train 1. Default: None Options: ['all'] plots all cells and stimulations, ['allNetStims'] plots just stimulations, ['popName1'] plots a single population, ['popName1', 'popName2'] plots multiple populations, [120] plots a single cell, [120, 130] plots multiple cells, [('popName1', 56)] plots a cell from a specific population, [('popName1', [0, 1]), ('popName2', [4, 5, 6])], plots cells from multiple populations

  • cells2 (list) – Subset of cells from which to obtain spike train 2. Default: None Options: same as for cells1

  • spks1 (list) – Spike train 1; list of spike times; if omitted then obtains spikes from cells1. Default: None

  • spks2 (list) – Spike train 2; list of spike times; if omitted then obtains spikes from cells2. Default: None

  • label1 (str) – Label for spike train 1 to use in plot. Default: None

  • label2 (str) – Label for spike train 2 to use in plot. Default: None

  • timeRange (list [min, max]) – Range of time to calculate nTE in ms. Default: None uses the entire simulation time range

  • binSize (int) – Bin size used to convert spike times into histogram. Default: 5

  • showFig (bool) – Shows the figure if True. Default: True

  • saveFig (bool or str) – Whether and where to save the figure. Default: False Options: True autosaves the figure, '/path/filename.ext' saves to a custom path and filename, valid file extensions are '.png', '.jpg', '.eps', and '.tiff'