iCSD testing suite
elephant.test.test_icsd.
TestICSD
(methodName='runTest')[source]¶Bases: unittest.case.TestCase
Set of test functions for each CSD estimation method comparing estimate to LFPs calculated with known ground truth CSD
Methods
elephant.test.test_icsd.
get_lfp_of_cylinders
(z_j=array([0., 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, 0.0008, 0.0009, 0.001, 0.0011, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.0017, 0.0018, 0.0019, 0.002 ]) * m, z_i=array([0.0008, 0.001, 0.0012]) * m, C_i=array([-0.5, 1., -0.5]) * A/m**3, R_i=array([0.001, 0.001, 0.001]) * m, h_i=array([0.0001, 0.0001, 0.0001]) * m, sigma=array(0.3) * S/m, plot=True)[source]¶Compute the lfp of spatially separated disks with a given current source density
elephant.test.test_icsd.
get_lfp_of_disks
(z_j=array([0., 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, 0.0008, 0.0009, 0.001, 0.0011, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.0017, 0.0018, 0.0019, 0.002 ]) * m, z_i=array([0.0008, 0.001, 0.0012]) * m, C_i=array([-0.5, 1., -0.5]) * A/m**2, R_i=array([0.001, 0.001, 0.001]) * m, sigma=array(0.3) * S/m, plot=True)[source]¶Compute the lfp of spatially separated disks with a given current source density
elephant.test.test_icsd.
get_lfp_of_planes
(z_j=array([0., 0.0001, 0.0002, 0.0003, 0.0004, 0.0005, 0.0006, 0.0007, 0.0008, 0.0009, 0.001, 0.0011, 0.0012, 0.0013, 0.0014, 0.0015, 0.0016, 0.0017, 0.0018, 0.0019, 0.002 ]) * m, z_i=array([0.0008, 0.001, 0.0012]) * m, C_i=array([-0.5, 1., -0.5]) * A/m**2, sigma=array(0.3) * S/m, plot=True)[source]¶Compute the lfp of spatially separated planes with given current source density
elephant.test.test_icsd.
potential_of_cylinder
(z_j, z_i=array(0.) * m, C_i=array(1.) * A/m**3, R_i=array(0.001) * m, h_i=array(0.1) * m, sigma=array(0.3) * S/m)[source]¶Return potential of cylinder in horizontal plane with constant homogeneous current source density at a vertical offset z_j.
Notes
Sympy can’t deal with eq. 11 in Pettersen et al 2006, J neurosci Meth, so we numerically evaluate it in this function.
Tested with
>>>from sympy import * >>>C_i, z_i, h, z_j, z_j, sigma, R = symbols(‘C_i z_i h z z_j sigma R’) >>>C_i*integrate(1/(2*sigma)*(sqrt((z-z_j)**2 + R**2) - abs(z-z_j)), (z, z_i-h/2, z_i+h/2))
elephant.test.test_icsd.
potential_of_disk
(z_j, z_i=array(0.) * m, C_i=array(1.) * A/m**2, R_i=array(0.001) * m, sigma=array(0.3) * S/m)[source]¶Return potential of circular disk in horizontal plane with constant current source density at a vertical offset z_j.
elephant.test.test_icsd.
potential_of_plane
(z_j, z_i=array(0.) * m, C_i=array(1.) * A/m**2, sigma=array(0.3) * S/m)[source]¶Return potential of infinite horizontal plane with constant current source density at a vertical offset z_j.
Notes
The potential is 0 at the plane, as the potential goes to infinity for large distances