How to use the elephant.icsd.icsd.CSD.__init__ function in elephant

To help you get started, we’ve selected a few elephant examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github NeuralEnsemble / elephant / elephant / icsd / icsd.py View on Github external
at each contact
        sigma : float * quantity.Quantity
            conductivity of tissue in units of S/m or 1/(ohm*m)
        sigma_top : float * quantity.Quantity
            conductivity on top of tissue in units of S/m or 1/(ohm*m)
        tol : float
            tolerance of numerical integration
        f_type : str
            type of spatial filter, must be a scipy.signal filter design method
        f_order : list
            settings for spatial filter, arg passed to  filter design function
        num_steps : int
            number of data points for the spatially upsampled LFP/CSD data

        '''
        CSD.__init__(self, lfp, f_type, f_order)

        try:
            assert(diam.units == coord_electrode.units)
        except AssertionError as ae:
            print('units of coord_electrode ({}) and diam ({}) differ'.format(coord_electrode.units,
                                                                                  diam.units))
            raise
        try:
            assert(np.all(np.diff(coord_electrode) > 0))
        except AssertionError as ae:
            print('values of coord_electrode not continously increasing')
            raise ae

        try:
            assert(diam.size == 1 or diam.size == coord_electrode.size)
            if diam.size == coord_electrode.size:
github NeuralEnsemble / elephant / elephant / icsd / icsd.py View on Github external
at each contact
        h : float or np.ndarray * quantity.Quantity
            assumed thickness of the source cylinders at all or each contact
        sigma : float * quantity.Quantity
            conductivity of tissue in units of S/m or 1/(ohm*m)
        sigma_top : float * quantity.Quantity
            conductivity on top of tissue in units of S/m or 1/(ohm*m)
        tol : float
            tolerance of numerical integration
        f_type : str
            type of spatial filter, must be a scipy.signal filter design method
        f_order : list
            settings for spatial filter, arg passed to  filter design function

        '''
        CSD.__init__(self, lfp, f_type, f_order)

        try:
            assert(diam.units == coord_electrode.units)
        except AssertionError as ae:
            print('units of coord_electrode ({}) and diam ({}) differ'.format(coord_electrode.units,
                                                                                  diam.units))
            raise ae
        try:
            assert(np.all(np.diff(coord_electrode) > 0))
        except AssertionError as ae:
            print('values of coord_electrode not continously increasing')
            raise ae

        try:
            assert(diam.size == 1 or diam.size == coord_electrode.size)
            if diam.size == coord_electrode.size:
github NeuralEnsemble / elephant / elephant / icsd / icsd.py View on Github external
----------
        lfp : np.ndarray * quantity.Quantity
            LFP signal of shape (# channels, # time steps) in units of V
        coord_electrode : np.ndarray * quantity.Quantity
            depth of evenly spaced electrode contact points of shape
            (# contacts, ) in units of m, must be monotonously increasing
        sigma : float * quantity.Quantity
            conductivity of tissue in units of S/m or 1/(ohm*m)
        vaknin_el : bool
            flag for using method of Vaknin to endpoint electrodes
        f_type : str
            type of spatial filter, must be a scipy.signal filter design method
        f_order : list
            settings for spatial filter, arg passed to  filter design function
        '''
        CSD.__init__(self, lfp, f_type, f_order)

        self.name = 'Standard CSD method'
        self.coord_electrode = coord_electrode
        self.sigma = sigma
        self.vaknin_el = vaknin_el

        try:
            assert(np.all(np.diff(np.diff(coord_electrode)))==0)
        except AssertionError as ae:
            print('coord_electrode not monotonously varying')
            raise ae

        if vaknin_el:
            #extend array of lfps by duplicating potential at endpoint contacts
            if lfp.ndim == 1:
                self.lfp = np.empty((lfp.shape[0]+2, )) * lfp.units
github NeuralEnsemble / elephant / elephant / icsd / icsd.py View on Github external
depth of evenly spaced electrode contact points of shape
            (# contacts, ) in units of m
        diam : float * quantity.Quantity
            diamater of the assumed circular planar current sources centered
            at each contact
        sigma : float * quantity.Quantity
            conductivity of tissue in units of S/m or 1/(ohm*m)
        sigma_top : float * quantity.Quantity
            conductivity on top of tissue in units of S/m or 1/(ohm*m)
        f_type : str
            type of spatial filter, must be a scipy.signal filter design method
        f_order : list
            settings for spatial filter, arg passed to  filter design function

        '''
        CSD.__init__(self, lfp)

        try:
            assert(diam.units == coord_electrode.units)
        except AssertionError as ae:
            print('units of coord_electrode ({}) and diam ({}) differ'.format(coord_electrode.units,
                                                                                  diam.units))
            raise ae

        try:
            assert(np.all(np.diff(coord_electrode) > 0))
        except AssertionError as ae:
            print('values of coord_electrode not continously increasing')
            raise ae

        try:
            assert(diam.size == 1 or diam.size == coord_electrode.size)