netpyne.analysis.csd

Module with functions to extract and plot CSD info from LFP data

Functions:

prepareCSD([sim, pop, dt, sampr, ...])

Function to prepare data for plotting of current source density (CSD) data

getbandpass(lfps, sampr[, minf, maxf])

Function to bandpass filter data

Vaknin(x)

Function to perform the Vaknin correction for CSD analysis

removemean(x[, ax])

Function to subtract the mean from an array or list

netpyne.analysis.csd.prepareCSD(sim=None, pop=None, dt=None, sampr=None, spacing_um=None, minf=0.05, maxf=300, vaknin=True, norm=False, saveData=True, getAllData=True, **kwargs)[source]

Function to prepare data for plotting of current source density (CSD) data

Parameters
  • sim (NetPyNE object) – Default: None

  • pop (str) – Retrieves CSD data from a specific cell population Default: None retrieves overall CSD data

  • dt (float or int) – Time between recording points (ms). Default: None uses sim.cfg.recordStep from the current NetPyNE sim object.

  • sampr (float or int) – Sampling rate for data recording (Hz). Default: None uses 1.0/sim.cfg.recordStep from the current NetPyNE sim object.

  • spacing_um (float or int) – Electrode contact spacing in units of microns. Default: None pulls the information from the current NetPyNE sim object. If the data is empirical, defaults to 100 (microns).

  • minf (float or int) – Minimum frequency for bandpassing the LFP data. Default: 0.05

  • maxf (float or int) – Maximum frequency for bandpassing the LFP data. Default: 300

  • vaknin (bool) – Allows CSD to be performed on all N contacts instead of N-2 contacts Default: True

  • norm (bool) – Subtracts the mean from the CSD data Default: False

  • saveData (bool) – Saves CSD data to sim object Default: True

  • getAllData (bool) – Returns CSDData as well as LFPData, sampr, spacing_um, and dt Default: True

netpyne.analysis.csd.getbandpass(lfps, sampr, minf=0.05, maxf=300)[source]

Function to bandpass filter data

Parameters
  • lfps (list or array) – LFP signal data arranged spatially in a column. Default: required

  • sampr (float) – The data sampling rate. Default: required

  • minf (float) – The high-pass filter frequency (Hz). Default: 0.05

  • maxf (float) – The low-pass filter frequency (Hz). Default: 300

Returns

data – The bandpass-filtered data.

Return type

array

netpyne.analysis.csd.Vaknin(x)[source]

Function to perform the Vaknin correction for CSD analysis

Allows CSD to be performed on all N contacts instead of N-2 contacts (see Vaknin et al (1988) for more details).

Parameters

x (array) – Data to be corrected. Default: required

Returns

data – The corrected data.

Return type

array

netpyne.analysis.csd.removemean(x, ax=1)[source]

Function to subtract the mean from an array or list

Parameters
  • x (array) – Data to be processed. Default: required

  • ax (int) – The axis to remove the mean across. Default: 1

Returns

data – The processed data.

Return type

array