elephant.current_source_density_src.icsd module — Elephant 0.5.0 documentation

# elephant.current_source_density_src.icsd module

py-iCSD toolbox! Translation of the core functionality of the CSDplotter MATLAB package to python.

The methods were originally developed by Klas H. Pettersen, as described in: Klas H. Pettersen, Anna Devor, Istvan Ulbert, Anders M. Dale, Gaute T. Einevoll, Current-source density estimation based on inversion of electrostatic forward solution: Effects of finite extent of neuronal activity and conductivity discontinuities, Journal of Neuroscience Methods, Volume 154, Issues 1-2, 30 June 2006, Pages 116-133, ISSN 0165-0270, http://dx.doi.org/10.1016/j.jneumeth.2005.12.005. (http://www.sciencedirect.com/science/article/pii/S0165027005004541)

The method themselves are implemented as callable subclasses of the base CSD class object, which sets some common attributes, and a basic function for calculating the iCSD, and a generic spatial filter implementation.

The raw- and filtered CSD estimates are returned as Quantity arrays.

Requires pylab environment to work, i.e numpy+scipy+matplotlib, with the addition of quantities (http://pythonhosted.org/quantities) and neo (https://pythonhosted.org/neo)-

Original implementation from CSDplotter-0.1.1 (http://software.incf.org/software/csdplotter) by Klas. H. Pettersen 2005.

Written by: - Espen.Hagen@umb.no, 2010, - e.hagen@fz-juelich.de, 2015-2016

class `elephant.current_source_density_src.icsd.` `CSD`(lfp, f_type='gaussian', f_order=(3, 1))

  Bases: `object`

  Base iCSD class

  Methods

  `filter_csd`(csd, filterfunction='convolve')

    Spatial filtering of the CSD estimate, using an N-point filter

  `get_csd`()

    Perform the CSD estimate from the LFP and forward matrix F, i.e as CSD=F**-1*LFP

    Returns: | csd : np.ndarray * quantity.Quantity Array with the csd estimate

class `elephant.current_source_density_src.icsd.` `DeltaiCSD`(lfp, coord_electrode, **kwargs)

  Bases: `elephant.current_source_density_src.icsd.CSD`

  delta-iCSD method

  Methods

  `get_f_matrix`()

    Calculate the F-matrix

  `parameters`(**kwargs)

    Defining the default values of the method passed as kwargs Parameters ———- **kwargs

    > Same as those passed to initialize the Class

class `elephant.current_source_density_src.icsd.` `SplineiCSD`(lfp, coord_electrode, **kwargs)

  Bases: `elephant.current_source_density_src.icsd.CSD`

  spline iCSD method

  Methods

  `get_csd`()

    Calculate the iCSD using the spline iCSD method

    Returns: | csd : np.ndarray * quantity.Quantity Array with csd estimate

  `get_f_matrix`()

    Calculate the F-matrix for cubic spline iCSD method

  `parameters`(**kwargs)

    Defining the default values of the method passed as kwargs Parameters ———- **kwargs

    > Same as those passed to initialize the Class

class `elephant.current_source_density_src.icsd.` `StandardCSD`(lfp, coord_electrode, **kwargs)

  Bases: `elephant.current_source_density_src.icsd.CSD`

  Standard CSD method with and without Vaknin electrodes

  Methods

  `get_csd`()

    Perform the iCSD calculation, i.e: iCSD=F_inv*LFP

    Returns: | csd : np.ndarray * quantity.Quantity Array with the csd estimate

  `get_f_inv_matrix`()

    Calculate the inverse F-matrix for the standard CSD method

  `parameters`(**kwargs)

    Defining the default values of the method passed as kwargs Parameters ———- **kwargs

    > Same as those passed to initialize the Class

class `elephant.current_source_density_src.icsd.` `StepiCSD`(lfp, coord_electrode, **kwargs)

  Bases: `elephant.current_source_density_src.icsd.CSD`

  step-iCSD method

  Methods

  `get_f_matrix`()

    Calculate F-matrix for step iCSD method

  `parameters`(**kwargs)

    Defining the default values of the method passed as kwargs Parameters ———- **kwargs

    > Same as those passed to initialize the Class