""" import numpy import mozaik from mozaik.core import BaseComponent from mozaik import load_component from mozaik.tools.distribution_parametrization import PyNNDistribution from parameters import ParameterSet, UniformDist from pyNN import space from pyNN.errors import NothingToWriteError from string import Template from neo.core.spiketrain import SpikeTrain import quantities as pq logger = mozaik.getMozaikLogger() class Sheet(BaseComponent): """ Sheet is an abstraction of a 2D continuouse sheet of neurons, roughly corresponding to the PyNN Population class with the added spatial structure. The spatial position of all cells is kept within the PyNN Population object. Each sheet is assumed to be centered around (0,0) origin, corresponding to whatever excentricity the model is looking at. The internal representation of space is degrees of visual field. Thus x,y coordinates of a cell in all sheets correspond to the degrees of visual field this cell is away from the origin. However, the sheet and derived classes/methods are supposed to accept parameters in units that are most natural for the given parameter and recalculate these into the internal degrees of visual field representation.
""" This module contains wrapper for the neo Segment, that add extra functionality to the class. Within mozaik the data are stored and passed in this format. Most of the included functionality should in future be provided directly by neo. When this happens most of this code should become irrelevant and the rest should be merged into the :mod:`.datastore` module. """ from neo.core.segment import Segment import numpy import cPickle import quantities as qt import mozaik logger = mozaik.getMozaikLogger() class MozaikSegment(Segment): """ This class extends Neo segment with several convenience functions. The most important function is that it allows lazy loading of the data. It should be moved to datastore.py once the NeoNeurotoolsWrapper is obsolete and this file should be discarded. """ def __init__(self, segment, identifier,null=False): """ """ self.init = True Segment.__init__(self, name=segment.name,
import matplotlib import time import pylab from mozaik.experiment import * from pyNN import nest as sim from model import VogelsAbbott from mozaik.controller import run_experiments, setup_experiments, setup_logging from mozaik.framework.population_selector import RCRandomPercentage from mozaik.visualization.plotting import * from mozaik.analysis.technical import NeuronAnnotationsToPerNeuronValues from mozaik.storage.datastore import Hdf5DataStore,PickledDataStore from NeuroTools.parameters import ParameterSet from mozaik.storage.queries import * import mozaik logger = mozaik.getMozaikLogger("Mozaik") if True: params = setup_experiments('FFI',sim) jens_model = VogelsAbbott(sim,params) l4exc_kick = RCRandomPercentage(jens_model.sheets["V1_Exc_L4"],ParameterSet({'percentage': 20.0})) l4inh_kick = RCRandomPercentage(jens_model.sheets["V1_Inh_L4"],ParameterSet({'percentage': 20.0})) experiment_list = [ #Lets kick the network up into activation PoissonNetworkKick(jens_model,duration=70*7,sheet_list=["V1_Exc_L4","V1_Inh_L4"],recording_configuration_list=[l4exc_kick,l4inh_kick],lambda_list=[100,100]), #Spontaneous Activity NoStimulation(jens_model,duration=70*7), ] data_store = run_experiments(jens_model,experiment_list) #jens_model.connectors['V1L4ExcL4ExcConnection'].store_connections(data_store)