experiments Package

mozaik.experiments Module

Module containing the experiment API.

class mozaik.experiments.__init__.Experiment(model)

Bases: object

The abastract class for an experiment. The experiment defines the list of stimuli that it needs to present to the brain.These stimuli presentations have to be independent - e.g. should not temporarily depend on each other. Experiment should also specify the analysis of the recorded results that it performs. This can be left empty if analysis will be done later.

The experiment has to also define the direct_stimulation variable which should contain a list of dictionaries one per each stimulus. The keys in these dictionaries are sheet names and values are list of mozail.sheets.direct_stimulator.DirectStimulator instances, that specify what direct stimulations should be applied to given layers during the corresponding stimulus. Layers to which no direct stimulation is applied can stay empty. Also if the direct_stimulation is set to None, empty dictionaries will be automatically passed to the model, indicating no direct stimulation is required.

Parameters :

model : Model

The model on which to execute the experiment.

return_stimuli()

This function is called by mozaik to retrieve the list of stimuli the experiment requires to be presented to the model.

run(data_store, stimuli)

This function is called to execute the experiment.

Parameters :

data_store : DataStore

The data store into which to store the recorded data.

stimuli : list(Stimulus)

The list of stimuli to present to the model.

Returns :

strsum : int (s)

The overal simulation time it took to execute the experiment.

Notes

The reason why this function gets a list of stimuli as input is that even though the experiment itself defines the list of stimuli to present to the model, some of these might have already been presented. The module mozaik.controller filters the list of stimuli which to present to prevent repetitions, and lets this function know via the stimuli argument which stimuli to actually present.

do_analysis()
class mozaik.experiments.__init__.PoissonNetworkKick(model, duration, sheet_list, drive_period, recording_configuration, lambda_list, weight_list)

Bases: mozaik.experiments.__init__.Experiment

This experiment does not show any stimulus. Importantly for the duration of the experiment it will stimulate neurons definded by the recording configurations in recording_configuration_list in the sheets specified in the sheet_list with Poisson spike train of mean frequency determined by the corresponding values in lambda_list.

Parameters :

model : Model

The model on which to execute the experiment.

duration : str

The duration of single presentation of the stimulus.

sheet_list : int

The list of sheets in which to do stimulation

drive_period : float (ms)

The length of the constant drive, after which it will be linearly taken down to 0 at the end of the stimulation.

recording_configuration : ParameterSet

The parameter set for recording configuration specifing neurons to which the kick will be administered.

lambda_list : list

List of the means of the Poisson spike train to be injected into the neurons specified in recording_configuration_list (one per each sheet).

weight_list : list

List of spike sizes of the Poisson spike train to be injected into the neurons specified in recording_configuration_list (one per each sheet).

class mozaik.experiments.__init__.NoStimulation(model, duration)

Bases: mozaik.experiments.__init__.Experiment

This experiment does not show any stimulus for the duration of the experiment.

Notes

Unlike MeasureSpontaneousActivity this can be used in model with no sensory input sheet.

mozaik.experiments.vision Module

class mozaik.experiments.vision.VisualExperiment(model)

Bases: mozaik.experiments.Experiment

Visual experiment. On top of Experiment class it defines a new variable background_luminance, that it sets to be the background luminance of the model’s input space, and new variable density which is set to over the spatial_resolution of the input layer’s receptive field spatial resolution. All experiments in the visual sensory domain should be derived from this class.

Parameters :

model : Model

The model on which to execute the experiment.

class mozaik.experiments.vision.MeasureOrientationTuningFullfield(model, num_orientations, spatial_frequency, temporal_frequency, grating_duration, contrasts, num_trials)

Bases: mozaik.experiments.vision.VisualExperiment

Measure orientation tuning using a fullfiled sinusoidal grating.

Parameters :

model : Model

The model on which to execute the experiment.

num_orientations : int

Number of orientation to present.

spatial_frequency : float

Spatial frequency of the grating.

temporal_frequency : float

Temporal frequency of the grating.

grating_duration : float

The duration of single presentation of a grating.

contrasts : list(float)

List of contrasts (expressed as % : 0-100%) at which to measure the orientation tuning.

num_trials : int

Number of trials each each stimulus is shown.

do_analysis(data_store)
class mozaik.experiments.vision.MeasureSizeTuning(model, num_sizes, max_size, orientation, spatial_frequency, temporal_frequency, grating_duration, contrasts, num_trials)

Bases: mozaik.experiments.vision.VisualExperiment

Measure size tuning using expanding sinusoidal grating disk.

Parameters :

model : Model

The model on which to execute the experiment.

num_sizes : int

Number of sizes to present.

max_size : float (degrees of visual field)

Maximum size to present.

orientation : float

The orientation (in radians) at which to measure the size tuning. (in future this will become automated)

spatial_frequency : float

Spatial frequency of the grating.

temporal_frequency : float

Temporal frequency of the grating.

grating_duration : float

The duration of single presentation of a grating.

contrasts : list(float)

List of contrasts (expressed as % : 0-100%) at which to measure the orientation tuning.

num_trials : int

Number of trials each each stimulus is shown.

do_analysis(data_store)
class mozaik.experiments.vision.MeasureOrientationContrastTuning(model, num_orientations, orientation, center_radius, surround_radius, spatial_frequency, temporal_frequency, grating_duration, contrasts, num_trials)

Bases: mozaik.experiments.vision.VisualExperiment

Measure orientation contrast tuning using. This measures the orientation dependence of the surround of a visual neuron. This is done by stimulating the center of the RF with optimal (spatial,temporal frequency and orientation) sine grating, surrounded by another sinusoidal grating ring whose orientation is varied.

Parameters :

model : Model

The model on which to execute the experiment.

num_orientations : int

Number of orientation of the surround to present.

orientation : float

The orientation (in radians) at which to present the center stimulus. (in future this will become automated)

center_radius : float

The radius of the center grating disk.

surround_radius : float

The outer radius of the surround grating ring.

spatial_frequency : float

Spatial frequency of the center and surround grating.

temporal_frequency : float

Temporal frequency of the center and surround the grating.

grating_duration : float

The duration of single presentation of the stimulus.

contrasts : list(float)

List of contrasts (expressed as % : 0-100%) of the center and surround grating.

num_trials : int

Number of trials each each stimulus is shown.

do_analysis(data_store)
class mozaik.experiments.vision.MeasureNaturalImagesWithEyeMovement(model, stimulus_duration, num_trials)

Bases: mozaik.experiments.vision.VisualExperiment

Stimulate the model with a natural image with simulated eye movement.

Parameters :

model : Model

The model on which to execute the experiment.

stimulus_duration : str

The duration of single presentation of the stimulus.

num_trials : int

Number of trials each each stimulus is shown.

Notes

Currently this implementation bound to have the image and the eye path saved in in files ./image_naturelle_HIGH.bmp and ./eye_path.pickle. In future we need to make this more general.

do_analysis(data_store)
class mozaik.experiments.vision.MeasureDriftingSineGratingWithEyeMovement(model, stimulus_duration, num_trials, spatial_frequency, temporal_frequency, contrast)

Bases: mozaik.experiments.vision.VisualExperiment

Stimulate the model with a drifting sine grating with simulated eye movement.

Parameters :

model : Model

The model on which to execute the experiment.

spatial_frequency : float

Spatial frequency of the center and surround grating.

temporal_frequency : float

Temporal frequency of the center and surround the grating.

duration : float

The duration of single presentation of the stimulus.

contrast : float

Contrast (expressed as % : 0-100%) of the grating.

num_trials : int

Number of trials each each stimulus is shown.

do_analysis(data_store)
class mozaik.experiments.vision.MeasureSpontaneousActivity(model, duration, num_trials)

Bases: mozaik.experiments.vision.VisualExperiment

Measure spontaneous activity while presenting blank stimulus (all pixels set to background luminance).

Parameters :

model : Model

The model on which to execute the experiment.

duration : str

The duration of single presentation of the stimulus.

num_trials : int

Number of trials each each stimulus is shown.

do_analysis(data_store)
class mozaik.experiments.vision.MeasureSpontaneousActivityWithPoissonStimulation(model, duration, sheet_list, drive_period, recording_configuration, lambda_list, weight_list)

Bases: mozaik.experiments.vision.VisualExperiment

Measure spontaneous activity while presenting blank stimulus (all pixels set to background luminance). Importantly for the duration of the experiment it will stimulate neurons definded by the recording configurations in recording_configuration in the sheets specified in the sheet_list with Poisson spike train of mean frequency determined by the corresponding values in lambda_list via synpases of size weight_list.

Parameters :

model : Model

The model on which to execute the experiment.

duration : str

The duration of single presentation of the stimulus.

sheet_list : int

The list of sheets in which to do stimulation

drive_period : float (ms)

The length of the constant drive, after which it will be linearly taken down to 0 at the end of the stimulation.

recording_configuration : list

The list of recording configurations (one per each sheet).

lambda_list : list

List of the means of the Poisson spike train to be injected into the neurons specified in recording_configuration_list (one per each sheet).

weight_list : list

List of spike sizes of the Poisson spike train to be injected into the neurons specified in recording_configuration_list (one per each sheet).

do_analysis(data_store)

Previous topic

connector Package

Next topic

sheets Package

This Page