netpyne.analysis.csd

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

Functions:

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

Function to bandpass filter data

vakninCorrection(x)

Function to perform the Vaknin correction for CSD analysis

removeMean(x[, ax])

Function to subtract the mean from an array or list

prepareCSD([sim, timeRange, electrodes, ...])

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

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.vakninCorrection(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

netpyne.analysis.csd.prepareCSD(sim=None, timeRange=None, electrodes=['avg', 'all'], 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

  • timeRange (list) – List of length two, with timeRange[0] as beginning of desired timeRange, and timeRange[1] as the end Default: None retrieves timeRange = [0, sim.cfg.duration]

  • electrodes (list of electrodes to look at CSD data) – Default: [‘avg’, ‘all’]

  • 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 –> True

  • 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