elephant.test.test_icsd module

iCSD testing suite

class 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

test_DeltaiCSD_00()[source]

test using standard SI units

test_DeltaiCSD_01()[source]

test using non-standard SI units 1

test_DeltaiCSD_02()[source]

test using non-standard SI units 2

test_DeltaiCSD_03()[source]

test using non-standard SI units 3

test_DeltaiCSD_04()[source]

test non-continous z_j array

test_SplineiCSD_00()[source]

test using standard SI units

test_SplineiCSD_01()[source]

test using standard SI units, deep electrode coordinates

test_SplineiCSD_02()[source]

test using non-standard SI units

test_SplineiCSD_03()[source]

test using standard SI units

test_SplineiCSD_04()[source]

test using standard SI units

test_StandardCSD_00()[source]

test using standard SI units

test_StandardCSD_01()[source]

test using non-standard SI units 1

test_StandardCSD_02()[source]

test using non-standard SI units 2

test_StandardCSD_03()[source]

test using non-standard SI units 3

test_StepiCSD_01()[source]

test using non-standard SI units 1

test_StepiCSD_02()[source]

test using non-standard SI units 2

test_StepiCSD_03()[source]

test using non-standard SI units 3

test_StepiCSD_units_00()[source]

test using standard SI units

test_StepiCSD_units_04()[source]

test non-continous z_j array

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

elephant.test.test_icsd.suite()[source]