data_store) if withPGN and withFeedback_CxPGN: model.connectors['V1EffConnectionPGN'].store_connections( data_store) data_store.save() # or only load pickled data else: setup_logging() data_store = PickledDataStore(load=True, parameters=ParameterSet({ 'root_directory': 'ThalamoCorticalModel_data_____', 'store_stimuli': False }), replace=True) logger.info('Loaded data store') data_store.save() # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_test( data_store ) # perform_analysis_and_visualization( data_store, 'luminance', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'contrast', withPGN, withV1 ) perform_analysis_and_visualization(data_store, 'spatial_frequency', withPGN, withV1) # perform_analysis_and_visualization( data_store, 'temporal_frequency', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'size', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'orientation', withPGN, withV1 )
# -*- coding: utf-8 -*- """ """ import matplotlib matplotlib.use('Agg') import sys from mozaik.controller import setup_logging import mozaik from mozaik.storage.datastore import Hdf5DataStore,PickledDataStore from analysis_and_visualization import perform_analysis_and_visualization from parameters import ParameterSet from mozaik.controller import Global Global.root_directory = sys.argv[1]+'/' setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':sys.argv[1],'store_stimuli' : False}),replace=True) perform_analysis_and_visualization(data_store,gratings=False,cort_stim=True,nat_stim=False,tp=1,scale=True)
try: from mpi4py import MPI except ImportError: MPI = None if MPI: mpi_comm = MPI.COMM_WORLD MPI_ROOT = 0 logger = mozaik.getMozaikLogger() if True: data_store,model = run_workflow('FFI',PushPullCCModel,create_experiments) model.connectors['V1L4ExcL4ExcConnection'].store_connections(data_store) model.connectors['V1L4ExcL4InhConnection'].store_connections(data_store) model.connectors['V1L4InhL4ExcConnection'].store_connections(data_store) model.connectors['V1L4InhL4InhConnection'].store_connections(data_store) model.connectors['V1AffConnectionOn'].store_connections(data_store) model.connectors['V1AffConnectionOff'].store_connections(data_store) model.connectors['V1AffInhConnectionOn'].store_connections(data_store) model.connectors['V1AffInhConnectionOff'].store_connections(data_store) data_store.save() else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'FFI_test_____', 'store_stimuli' : False}),replace=True) logger.info('Loaded data store') data_store.save() if mpi_comm.rank == MPI_ROOT: perform_analysis_and_visualization(data_store)
# model.connectors['V1L4InhL4ExcConnection'].store_connections(data_store) # model.connectors['V1L4InhL4InhConnection'].store_connections(data_store) # model.connectors['V1L4ExcL4ExcConnectionRand'].store_connections(data_store) # model.connectors['V1L4ExcL4InhConnectionRand'].store_connections(data_store) # model.connectors['V1L4InhL4ExcConnectionRand'].store_connections(data_store) # model.connectors['V1L4InhL4InhConnectionRand'].store_connections(data_store) if withFeedback_CxLGN: model.connectors['V1EffConnectionOn'].store_connections(data_store) model.connectors['V1EffConnectionOff'].store_connections(data_store) if withPGN and withFeedback_CxPGN: model.connectors['V1EffConnectionPGN'].store_connections(data_store) data_store.save() # or only load pickled data else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'ThalamoCorticalModel_data_spontaneous_____', 'store_stimuli' : False}),replace=True) logger.info('Loaded data store') data_store.save() # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_test( data_store ) perform_analysis_and_visualization( data_store, 'subcortical_conn', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'luminance', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'contrast', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'spatial_frequency', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'temporal_frequency', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'size', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'orientation', withPGN, withV1 )
model.connectors['V1AffInhConnectionOn'].store_connections(data_store) model.connectors['V1AffInhConnectionOff'].store_connections(data_store) model.connectors['V1L4ExcL4ExcConnection'].store_connections(data_store) model.connectors['V1L4ExcL4InhConnection'].store_connections(data_store) model.connectors['V1L4InhL4ExcConnection'].store_connections(data_store) model.connectors['V1L4InhL4InhConnection'].store_connections(data_store) model.connectors['V1L4ExcL4ExcConnectionRand'].store_connections(data_store) model.connectors['V1L4ExcL4InhConnectionRand'].store_connections(data_store) model.connectors['V1L4InhL4ExcConnectionRand'].store_connections(data_store) model.connectors['V1L4InhL4InhConnectionRand'].store_connections(data_store) if withFeedback_CxLGN: model.connectors['V1EffConnectionOn'].store_connections(data_store) model.connectors['V1EffConnectionOff'].store_connections(data_store) if withPGN and withFeedback_CxPGN: model.connectors['V1EffConnectionPGN'].store_connections(data_store) data_store.save() # or only load pickled data else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'ThalamoCorticalModel_data_temporal_V1_____', 'store_stimuli' : False}),replace=True) logger.info('Loaded data store') data_store.save() # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_and_visualization( data_store, 'luminance', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'contrast', withPGN, withV1 ) # perform_analysis_and_visualization( data_store, 'spatial_frequency', withPGN, withV1 ) perform_analysis_and_visualization( data_store, 'temporal_frequency', withPGN, withV1 )
# -*- coding: utf-8 -*- """ """ import matplotlib matplotlib.use('Agg') from mpi4py import MPI from pyNN import nest import sys import mozaik.controller from mozaik.controller import run_workflow, setup_logging import mozaik from experiments import create_experiments,create_experiments_bar,create_experiments_short,create_experiments_old,create_experiments_old_short from model import SelfSustainedPushPull from mozaik.storage.datastore import Hdf5DataStore,PickledDataStore from analysis_and_visualization import perform_analysis_and_visualization from parameters import ParameterSet mpi_comm = MPI.COMM_WORLD data_store,model = run_workflow('MorganTaylorModel',SelfSustainedPushPull,create_experiments_old) data_store.save() if mpi_comm.rank == 0: print "Starting visualization" perform_analysis_and_visualization(data_store,gratings=True,bars=False,nat_movies=True)
""" import matplotlib matplotlib.use('Agg') from mpi4py import MPI from pyNN import nest import sys import mozaik.controller from mozaik.controller import run_workflow, setup_logging import mozaik from experiments import create_experiments,create_experiments_bar,create_experiments_short,create_experiments_old from model import SelfSustainedPushPull from mozaik.storage.datastore import Hdf5DataStore,PickledDataStore from analysis_and_visualization import perform_analysis_and_visualization from parameters import ParameterSet mpi_comm = MPI.COMM_WORLD if True: data_store,model = run_workflow('MorganTaylorModel',SelfSustainedPushPull,create_experiments) data_store.save() else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'MorganTaylorModel_visual_space_update=1ms_RF_resolution=1ms','store_stimuli' : False}),replace=True) if mpi_comm.rank == 0: print "Starting visualization" perform_analysis_and_visualization(data_store,gratings=True,bars=True) # data_store.save()
from analysis_and_visualization import perform_analysis_and_visualization_radius from parameters import ParameterSet from mozaik.controller import Global Global.root_directory = sys.argv[1]+'/' withPGN = True # withV1 = True # False for open-loop setup_logging() data_store = PickledDataStore(load=True, parameters=ParameterSet({'root_directory':sys.argv[1],'store_stimuli' : False}),replace=True) # perform_analysis_and_visualization( data_store, 'spatial_frequency', withPGN, withV1 ) perform_analysis_and_visualization( data_store, 'size', withPGN, withV1 ) # # Simple Analysis (just one group) # perform_analysis_and_visualization( data_store, 'cortical_map', withPGN, withV1 ) # perform_analysis_and_visualization_radius( data_store, 'size_radius', [[.0],[.0],[.0]], [.0,.5], withPGN, withV1 ) # perform_analysis_and_visualization_radius( data_store, 'size_radius', [[1.6],[.0],[.0]], [.0,.5], withPGN, withV1 ) # # Several Grouping Analysis # import numpy # step = .2 # for i in numpy.arange(step, 1.+step, step): # print i # perform_analysis_and_visualization_radius( data_store, 'size_radius', [[.0],[.0],[.0]], [i-step,i], withPGN, withV1 ) # # perform_analysis_and_visualization_radius( data_store, 'size_radius', [[1.6],[.0],[.0]], [i-step,i], withPGN, withV1 )
if MPI: mpi_comm = MPI.COMM_WORLD MPI_ROOT = 0 logger = mozaik.getMozaikLogger() # Manage what is executed # a set of variable here to manage the type of experiment and whether the pgn, cortex are there or not. withPGN = True # withV1 = True # open-loop withFeedback_CxPGN = True # closed loop withFeedback_CxLGN = True # closed loop # Model execution if True: data_store,model = run_workflow('ThalamoCorticalModel', ThalamoCorticalModel, create_experiments_contrast ) data_store.save() # or only load pickled data else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'ThalamoCorticalModel_data_contrast_closed_____', 'store_stimuli' : False}),replace=True) logger.info('Loaded data store') # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_and_visualization( data_store, 'luminance', withPGN, withV1 ) perform_analysis_and_visualization( data_store, 'contrast', withPGN, withV1 ) data_store.save()
withV1 = False # open-loop withFeedback_CxPGN = False # closed loop withFeedback_CxLGN = False # closed loop # Model execution if True: data_store, model = run_workflow('ThalamoCorticalModel', ThalamoCorticalModel, create_experiments_luminance) data_store.save() # or only load pickled data else: setup_logging() # data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'Deliverable/ThalamoCorticalModel_data_luminance_open_____', 'store_stimuli' : False}),replace=True) data_store = PickledDataStore( load=True, parameters=ParameterSet({ 'root_directory': 'ThalamoCorticalModel_data_luminance_open_____', 'store_stimuli': False }), replace=True) logger.info('Loaded data store') # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_test( data_store ) perform_analysis_and_visualization(data_store, 'luminance', withPGN, withV1) data_store.save()
create_experiments_size_nonoverlapping) data_store.save() # or only load pickled data else: setup_logging() data_store = PickledDataStore( load=True, parameters=ParameterSet({ 'root_directory': 'ThalamoCorticalModel_data_size_closed_nonoverlapping_____', 'store_stimuli': False }), replace=True) # data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'Deliverable/ThalamoCorticalModel_data_size_closed_____', 'store_stimuli' : False}),replace=True) # data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'Deliverable/ThalamoCorticalModel_data_size_feedforward_____', 'store_stimuli' : False}),replace=True) logger.info('Loaded data store') # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_test( data_store ) perform_analysis_and_visualization(data_store, 'size', withPGN, withV1) # perform_analysis_and_visualization( data_store, 'feedforward', withPGN, withV1 ) # import numpy # step = .2 # for i in numpy.arange(step, 3.+step, step): # perform_analysis_and_visualization_radius( data_store, 'size_radius', [i-step,i], withPGN, withV1 ) data_store.save()
""" import matplotlib matplotlib.use('Agg') from mpi4py import MPI from pyNN import nest import sys import mozaik.controller from mozaik.controller import run_workflow, setup_logging import mozaik from experiments import create_experiments,create_experiments_bar,create_experiments_short,create_experiments_old,create_experiments_old_short from model import SelfSustainedPushPull from mozaik.storage.datastore import Hdf5DataStore,PickledDataStore from analysis_and_visualization import perform_analysis_and_visualization from parameters import ParameterSet mpi_comm = MPI.COMM_WORLD if True: data_store,model = run_workflow('MorganTaylorModel',SelfSustainedPushPull,create_experiments_old_short) data_store.save() else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'MorganTaylorModel_visual_space_update=1ms_RF_resolution=1ms','store_stimuli' : False}),replace=True) if mpi_comm.rank == 0: print "Starting visualization" perform_analysis_and_visualization(data_store,gratings=True,bars=False,nat_movies=True) # data_store.save()
""" """ import matplotlib matplotlib.use('Agg') import sys from mozaik.controller import setup_logging import mozaik from mozaik.storage.datastore import Hdf5DataStore, PickledDataStore from analysis_and_visualization import perform_analysis_and_visualization from parameters import ParameterSet from mozaik.controller import Global Global.root_directory = sys.argv[1] + '/' setup_logging() data_store = PickledDataStore(load=True, parameters=ParameterSet({ 'root_directory': sys.argv[1], 'store_stimuli': False }), replace=True) perform_analysis_and_visualization(data_store, gratings=False, cort_stim=True, nat_stim=False, tp=1, scale=False, sharpness=True)
from parameters import ParameterSet #mpi_comm = MPI.COMM_WORLD logger = mozaik.getMozaikLogger() simulation_name = "VogelsAbbott2005" simulation_run_name, _, _, _, modified_parameters = parse_workflow_args() if True: data_store,model = run_workflow(simulation_name,VogelsAbbott,create_experiments) model.connectors['ExcExcConnection'].store_connections(data_store) else: setup_logging() data_store = PickledDataStore( load=True, parameters=ParameterSet( { "root_directory": result_directory_name( simulation_run_name, simulation_name, modified_parameters ), "store_stimuli": False, } ), replace=True, ) logger.info('Loaded data store') #if mpi_comm.rank == 0: print("Starting visualization") perform_analysis_and_visualization(data_store) data_store.save()
model.connectors['V1AffConnectionOff'].store_connections(data_store) model.connectors['V1AffInhConnectionOn'].store_connections(data_store) model.connectors['V1AffInhConnectionOff'].store_connections(data_store) model.connectors['V1L4ExcL4ExcConnection'].store_connections(data_store) model.connectors['V1L4ExcL4InhConnection'].store_connections(data_store) model.connectors['V1L4InhL4ExcConnection'].store_connections(data_store) model.connectors['V1L4InhL4InhConnection'].store_connections(data_store) model.connectors['V1L4ExcL4ExcConnectionRand'].store_connections(data_store) model.connectors['V1L4ExcL4InhConnectionRand'].store_connections(data_store) model.connectors['V1L4InhL4ExcConnectionRand'].store_connections(data_store) model.connectors['V1L4InhL4InhConnectionRand'].store_connections(data_store) if withFeedback_CxLGN: model.connectors['V1EffConnectionOn'].store_connections(data_store) model.connectors['V1EffConnectionOff'].store_connections(data_store) if withPGN and withFeedback_CxPGN: model.connectors['V1EffConnectionPGN'].store_connections(data_store) data_store.save() # or only load pickled data else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'ThalamoCorticalModel_data_contrast_____', 'store_stimuli' : False}),replace=True) logger.info('Loaded data store') data_store.save() # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_test( data_store ) # perform_analysis_and_visualization( data_store, 'luminance', withPGN, withV1 ) perform_analysis_and_visualization( data_store, 'contrast', withPGN, withV1 )
""" import matplotlib matplotlib.use('Agg') from mpi4py import MPI #from pyNN import nest import sys import mozaik.controller from mozaik.controller import run_workflow, setup_logging import mozaik from experiments import create_experiments_cortical_stimulation_or_exc_LumBased from model import SelfSustainedPushPull from mozaik.storage.datastore import Hdf5DataStore, PickledDataStore from analysis_and_visualization import perform_analysis_and_visualization from parameters import ParameterSet mpi_comm = MPI.COMM_WORLD data_store, model = run_workflow( 'CorticalStimulationModel', SelfSustainedPushPull, create_experiments_cortical_stimulation_or_exc_LumBased) data_store.save() if mpi_comm.rank == 0: print "Starting visualization" perform_analysis_and_visualization(data_store, gratings=False, cort_stim=True, nat_stim=False, tp=1)
model.connectors['V1AffConnectionOff'].store_connections(data_store) model.connectors['V1AffInhConnectionOn'].store_connections(data_store) model.connectors['V1AffInhConnectionOff'].store_connections(data_store) model.connectors['V1L4ExcL4ExcConnection'].store_connections(data_store) model.connectors['V1L4ExcL4InhConnection'].store_connections(data_store) model.connectors['V1L4InhL4ExcConnection'].store_connections(data_store) model.connectors['V1L4InhL4InhConnection'].store_connections(data_store) model.connectors['V1L4ExcL4ExcConnectionRand'].store_connections(data_store) model.connectors['V1L4ExcL4InhConnectionRand'].store_connections(data_store) model.connectors['V1L4InhL4ExcConnectionRand'].store_connections(data_store) model.connectors['V1L4InhL4InhConnectionRand'].store_connections(data_store) if withFeedback_CxLGN: model.connectors['V1EffConnectionOn'].store_connections(data_store) model.connectors['V1EffConnectionOff'].store_connections(data_store) if withPGN and withFeedback_CxPGN: model.connectors['V1EffConnectionPGN'].store_connections(data_store) data_store.save() # or only load pickled data else: setup_logging() data_store = PickledDataStore(load=True,parameters=ParameterSet({'root_directory':'ThalamoCorticalModel_data_luminance_____', 'store_stimuli' : False}),replace=True) logger.info('Loaded data store') data_store.save() # Analysis and Plotting if mpi_comm.rank == MPI_ROOT: # perform_analysis_test( data_store ) perform_analysis_and_visualization( data_store, 'luminance', withPGN, withV1 )