elephant.current_source_density.estimate_csd¶
- elephant.current_source_density.estimate_csd(lfp, coordinates='coordinates', method=None, process_estimate=True, **kwargs)[source]¶
Function call to compute the current source density (CSD) from extracellular potential recordings (local field potentials - LFP) using laminar electrodes or multi-contact electrodes with 2D or 3D geometries.
- Parameters:
- lfp
neo.core.AnalogSignal
Positions of electrodes can be added as an array annotation
- coordinatesarray-like Quantity or string
Specifies the corresponding spatial coordinates of the electrodes. Coordinates can be directly supplied by a NxM array-like Quantity with dimension of space, where M is the number of signals in ‘lfp’, and N is equal to the dimensionality of the method. Alternatively, if coordinates is a string, the function will fetch the coordinates, supplied in the same format, as annotation of ‘lfp’ by that name. Default: ‘coordinates’
- methodstring
Pick a method corresponding to the setup, in this implementation For Laminar probe style (1D), use ‘KCSD1D’ or ‘StandardCSD’, or ‘DeltaiCSD’ or ‘StepiCSD’ or ‘SplineiCSD’ For MEA probe style (2D), use ‘KCSD2D’, or ‘MoIKCSD’ For array of laminar probes (3D), use ‘KCSD3D’ Defaults to None
- process_estimatebool
In the py_iCSD_toolbox this corresponds to the filter_csd - the parameters are passed as kwargs here ie., f_type and f_order In the kcsd methods this corresponds to cross_validate - the parameters are passed as kwargs here ie., lambdas and Rs Defaults to True
- kwargsparameters to each method
The parameters corresponding to the method chosen See the documentation of the individual method Default is {} - picks the best parameters,
- lfp
- Returns:
- Estimated CSD
neo.AnalogSignal object annotated with the spatial coordinates
- Raises:
- AttributeError
No units specified for electrode spatial coordinates
- ValueError
Invalid function arguments, wrong method name, or mismatching coordinates
- TypeError
Invalid cv_param argument passed