netpyne.plotting.plotLFPSpectrogram
Functions:
|
Function to produce a plot of LFP electrode spectrograms |
- netpyne.plotting.plotLFPSpectrogram.plotLFPSpectrogram(SpectData=None, axis=None, timeRange=None, electrodes=['avg', 'all'], pop=None, NFFT=256, noverlap=128, nperseg=256, minFreq=1, maxFreq=100, stepFreq=1, smooth=0, logy=False, normSignal=False, normPSD=False, filtFreq=False, filtOrder=3, detrend=False, transformMethod='morlet', returnPlotter=False, **kwargs)[source]
Function to produce a plot of LFP electrode spectrograms
- NetPyNE Options:
sim (NetPyNE sim object) – The sim object from which to get data.
Default:
Noneuses the current NetPyNE sim object- Parameters:
SpectData (dict, str) –
The data necessary to plot the LFP spectrogram.
Default:
Noneusesanalysis.prepareSpectrogramto produceSpectDatausing the current NetPyNE sim object.If a str it must represent a file path to previously saved data.
axis (matplotlib axis) –
The axis to plot into, allowing overlaying of plots.
Default:
Noneproduces a new figure and axis.timeRange (list) –
Time range to include in the raster:
[min, max].Default:
Noneuses the entire simulationelectrodes (list) –
A list of the electrodes to plot from.
Default:
['avg', 'all']plots each electrode as well as their averagepop (str) –
A population name to calculate PSD from.
Default:
Noneuses all populations.NFFT (int (power of 2)) – Number of data points used in each block for the PSD and time-freq FFT. Default:
256noverlap (int (<nperseg)) – Number of points of overlap between segments for PSD and time-freq. Default:
128nperseg (int) – Length of each segment for time-freq. Default:
256minFreq (float) – Minimum frequency shown in plot for PSD and time-freq. Default:
1maxFreq (float) – Maximum frequency shown in plot for PSD and time-freq. Default:
100stepFreq (float) – Step frequency. Default:
1smooth (int) – Window size for smoothing LFP; no smoothing if
0Default:0logy (bool) –
Whether to use a log axis.
Default:
FalsenormSignal (bool) –
Whether to normalize the LFP data.
Default:
FalsenormPSD (bool) –
Whether to normalize the PSD data.
Default:
FalsefiltFreq (int or list) –
Frequency for low-pass filter (int) or frequencies for bandpass filter in a list: [low, high]
Default:
Nonedoes not filter the datafiltOrder (int) –
Order of the filter defined by filtFreq.
Default:
3detrend (bool) –
Whether to detrend the data.
Default:
FalsetransformMethod (str) –
The transformation method to use, either ‘morlet’ or ‘fft’.
Default:
'morlet'returnPlotter (bool) –
Whether to return the figure or the NetPyNE MetaFig object.
Default:
Falsereturns the figure.
- Plot Options:
showFig (bool) – Whether to show the figure.
Default:
FalsesaveFig (bool) – Whether to save the figure.
Default:
Falseoverwrite (bool) – whether to overwrite existing figure files.
Default:
Trueoverwrites the figure fileOptions:
Falseadds a number to the file name to prevent overwritinglegendKwargs (dict) – a dict containing any or all legend kwargs. These include
'title','loc','fontsize','bbox_to_anchor','borderaxespad', and'handlelength'.rcParams (dict) – a dict containing any or all matplotlib rcParams. To see all options, execute
import matplotlib; print(matplotlib.rcParams)in Python. Any options in this dict will be used for this current figure and then returned to their prior settings.title (str) – the axis title
xlabel (str) – label for x-axis
ylabel (str) – label for y-axis
- Returns:
LFPSpectrogramPlot – By default, returns the figure. If
returnPlotterisTrue, instead returns the NetPyNE MetaFig.- Return type:
matplotlib figure