#iterate over each cell type, and create populationulation object
for i, y in enumerate(params.y):
    #create population:
    pop = Population(
            #parent class
            cellParams = params.yCellParams[y],
            rand_rot_axis = params.rand_rot_axis[y],
            simulationParams = params.simulationParams,
            populationParams = params.populationParams[y],
            y = y,
            layerBoundaries = params.layerBoundaries,
            electrodeParams = params.electrodeParams,
            savelist = params.savelist,
            savefolder = params.savefolder,
            calculateCSD = params.calculateCSD,
            dt_output = params.dt_output, 
            POPULATIONSEED = SIMULATIONSEED + i,
            #daughter class kwargs
            X = params.X,
            networkSim = networkSim,
            k_yXL = params.k_yXL[y],
            synParams = params.synParams[y],
            synDelayLoc = params.synDelayLoc[y],
            synDelayScale = params.synDelayScale[y],
            J_yX = params.J_yX[y],
            tau_yX = params.tau_yX[y],
            recordSingleContribFrac = params.recordSingleContribFrac,
        )
    #run population simulation and collect the data
    pop.run()
    pop.collect_data()
예제 #2
0
if properrun:
    #iterate over each cell type, and create populationulation object
    for i, Y in enumerate(PS.X):
        #create population:
        pop = Population(
                cellParams = PS.cellParams[Y],
                rand_rot_axis = PS.rand_rot_axis[Y],
                simulationParams = PS.simulationParams,
                populationParams = PS.populationParams[Y],
                y = Y,
                layerBoundaries = PS.layerBoundaries,
                electrodeParams = PS.electrodeParams,
                savelist = PS.savelist,
                savefolder = PS.savefolder,
                calculateCSD = PS.calculateCSD,
                dt_output = PS.dt_output, 
                POPULATIONSEED = SIMULATIONSEED + i,
                X = PS.X,
                networkSim = networkSim,
                k_yXL = PS.k_yXL[Y],
                synParams = PS.synParams[Y],
                synDelayLoc = PS.synDelayLoc[Y],
                synDelayScale = PS.synDelayScale[Y],
                J_yX = PS.J_yX[Y],
                tau_yX = PS.tau_yX[Y],
            )
    
        #run population simulation and collect the data
        pop.run()
        pop.collect_data()
    

    #iterate over each cell type, and create populationulation object
    for i, Y in enumerate(PSET['X']):
        #create population:
        pop = Population(
                cellParams = PSET['cellParams'][Y],
                rand_rot_axis = PSET['rand_rot_axis'][Y],
                simulationParams = PSET['simulationParams'],
                populationParams = PSET['populationParams'][Y],
                y = Y,
                layerBoundaries = PSET['layerBoundaries'],
                electrodeParams = PSET['electrodeParams'],
                savelist = PSET['savelist'],
                savefolder = output_path,
                calculateCSD = PSET['calculateCSD'],
                dt_output = PSET['dt_output'],
                POPULATIONSEED = SIMULATIONSEED + i,
                X = PSET['X'],
                networkSim = networkSim,
                k_yXL = PSET['k_yXL'][Y],
                synParams = PSET['synParams'][Y],
                synDelayLoc = PSET['synDelayLoc'][Y],
                synDelayScale = PSET['synDelayScale'][Y],
                J_yX = PSET['J_yX'][Y],
                tau_yX = PSET['tau_yX'][Y],
            )

        #run population simulation and collect the data
        pop.run()
        pop.collect_data()
예제 #4
0
#iterate over each cell type, and create populationulation object
for i, y in enumerate(params.y):
    #create population:
    pop = Population(
            #parent class
            cellParams = params.yCellParams[y],
            rand_rot_axis = params.rand_rot_axis[y],
            simulationParams = params.simulationParams,
            populationParams = params.populationParams[y],
            y = y,
            layerBoundaries = params.layerBoundaries,
            electrodeParams = params.electrodeParams,
            savelist = params.savelist,
            savefolder = params.savefolder,
            calculateCSD = params.calculateCSD,
            dt_output = params.dt_output, 
            POPULATIONSEED = SIMULATIONSEED + i,
            #daughter class kwargs
            X = params.X,
            networkSim = networkSim,
            k_yXL = params.k_yXL[y],
            synParams = params.synParams[y],
            synDelayLoc = params.synDelayLoc[y],
            synDelayScale = params.synDelayScale[y],
            J_yX = params.J_yX[y],
            tau_yX = params.tau_yX[y],
            recordSingleContribFrac = params.recordSingleContribFrac,
        )
    #run population simulation and collect the data
    pop.run()
    pop.collect_data()
예제 #5
0
    def __init__(
            self,
            topology_connections={
                'EX': {
                    'edge_wrap': True,
                    'extent': [4000., 4000.],
                    'allow_autapses': True,
                    'kernel': {
                        'exponential': {
                            'a': 1.,
                            'c': 0.0,
                            'tau': 300.
                        }
                    },
                    'mask': {
                        'circular': {
                            'radius': 2000.
                        }
                    },
                    'delays': {
                        'linear': {
                            'c': 1.,
                            'a': 2.
                        }
                    },
                },
                'IN': {
                    'edge_wrap': True,
                    'extent': [4000., 4000.],
                    'allow_autapses': True,
                    'kernel': {
                        'exponential': {
                            'a': 1.,
                            'c': 0.0,
                            'tau': 300.
                        }
                    },
                    'mask': {
                        'circular': {
                            'radius': 2000.
                        }
                    },
                    'delays': {
                        'linear': {
                            'c': 1.,
                            'a': 2.
                        }
                    },
                },
            },
            **kwargs):
        '''
        Initialization of class TopoPopulation, for dealing with networks
        created using the NEST topology library (distance dependent
        connectivity). 
        
        Inherited of class hybridLFPy.Population
        
        Arguments
        ---------
        topology_connections : dict
            nested dictionary with topology-connection parameters for each
            presynaptic population
        
        
        Returns
        -------
        object : populations.TopoPopulation
            population object with connections, delays, positions, simulation
            methods
            
        See also
        --------
        hybridLFPy.Population
        
        '''
        #set networkSim attribute so that monkey-patched methods can work
        self.networkSim = kwargs['networkSim']
        self.topology_connections = topology_connections

        #initialize parent class
        Population.__init__(self, **kwargs)