topo.analysis Package


analysis Package

Inheritance diagram of topo.analysis

Analysis tools for Topographica, other than plotting tools.

Configures the interface to the featuremapper and holoviews projects and sets the appropriate Topographica-specific hooks.


command Module

Inheritance diagram of topo.analysis.command

Topographica specific analysis commands, typically for measuring model activity or weights.

It implements several Topographica specific measurement commands, including weight matrix visualizations (e.g. update_projection).

class topo.analysis.command.ProjectionSheetMeasurementCommand(**params)[source]

Bases: param.parameterized.ParameterizedFunction

A callable Parameterized command for measuring or plotting a specified Sheet.

param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of sheets to use in measurements.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20bc00>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa20bd08>
inspect_value = <functools.partial object at 0x2b07aa20bd60>
instance = <functools.partial object at 0x2b07aa20be10>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa25e208>
set_param = <functools.partial object at 0x2b07aa25e260>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_od_pref(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

Measure an ocular dominance preference map by collating the response to patterns.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>, <class ‘featuremapper.metaparams.ocular2leftrightscale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20bdb8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa20bf70>
inspect_value = <functools.partial object at 0x2b07aa20bec0>
instance = <functools.partial object at 0x2b07aa20b8e8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa26c310>
set_param = <functools.partial object at 0x2b07aa26c368>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_corner_or_pref(**params)

Bases: featuremapper.command.PositionMeasurementCommand

Measure a corner preference map by collating the response to patterns.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_MaxValue DSF_MaxValue00965>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param NumericTuple x_range (allow_None=False, constant=False, default=(-1.2, 1.2), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of X values to test.
param Integer divisions (allow_None=False, bounds=(1, None), constant=False, default=11, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The number of different positions to measure in X and in Y.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param NumericTuple y_range (allow_None=False, constant=False, default=(-1.2, 1.2), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of Y values to test.
param Callable pattern_generator (allow_None=False, constant=False, default=<Composite Composite00979>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. For measuring position, the pattern_presenter should be spatially localized, yet also able to activate the appropriate neurons reliably.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20baa0>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa20ba48>
inspect_value = <functools.partial object at 0x2b07aa20baf8>
instance = <functools.partial object at 0x2b07aa20bba8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa27a368>
set_param = <functools.partial object at 0x2b07aa27a3c0>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_cog(**params)[source]

Bases: param.parameterized.ParameterizedFunction

Calculate center of gravity (CoG) for each CF of each unit in each CFSheet.

Unlike measure_position_pref and other measure commands, this one does not work by collating the responses to a set of input patterns. Instead, the CoG is calculated directly from each set of incoming weights. The CoG value thus is an indirect estimate of what patterns the neuron will prefer, but is not limited by the finite number of test patterns as the other measure commands are.

Measures only one projection for each sheet, as specified by the proj_name parameter. The default proj_name of ‘’ selects the first non-self connection, which is usually useful to examine for simple feedforward networks, but will not necessarily be useful in other cases.

param Callable measurement_storage_hook (allow_None=True, constant=False, default=StorageHook(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Interface to store measurements after they have been completed.
param Integer stride (allow_None=False, bounds=None, constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Stride by which to skip grid linesin the CoG Wireframe.
param String proj_name (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of the projection to measure; the empty string means ‘the first non-self connection available’.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20bc00>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa20bc58>
inspect_value = <functools.partial object at 0x2b07aa20bb50>
instance = <functools.partial object at 0x2b07aa20bf70>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa27d310>
set_param = <functools.partial object at 0x2b07aa27d368>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

topo.analysis.command.update_activity(force=False)

Make a map of neural activity available for each sheet, for use in template-based plots.

This command simply asks each sheet for a copy of its activity matrix, and then makes it available for plotting. Of course, for some sheets providing this information may be non-trivial, e.g. if they need to average over recent spiking activity.

class topo.analysis.command.measure_corner_angle_pref(**params)

Bases: featuremapper.command.PositionMeasurementCommand

Generate the preference map for angle shapes, by collating the response to patterns.

param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘size’, ‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param NumericTuple x_range (allow_None=False, constant=False, default=(-1.0, 1.0), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of X values to test.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Callable pattern_generator (allow_None=False, constant=False, default=<GaussiansCorner GaussiansCorner00980>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. For measuring position, the pattern_presenter should be spatially localized, yet also able to activate the appropriate neurons reliably.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Integer num_angle (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of angles to test.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.2, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param Number scale (allow_None=False, bounds=None, constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param Number angle_1 (allow_None=False, bounds=(0.0, 3.141592653589793), constant=False, default=2.35619449019, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Last angle to test.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_MaxValue DSF_MaxValue00965>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_or (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Number angle_0 (allow_None=False, bounds=(0.0, 3.141592653589793), constant=False, default=0.785398163397, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
First angle to test.
param NumericTuple y_range (allow_None=False, constant=False, default=(-1.0, 1.0), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of Y values to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Integer divisions (allow_None=False, bounds=(1, None), constant=False, default=7, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The number of different positions to measure in X and in Y.

param Integer positions (allow_None=False, bounds=None, constant=False, default=7, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)

debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20bfc8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa20ba48>
inspect_value = <functools.partial object at 0x2b07aa20b9f0>
instance = <functools.partial object at 0x2b07aa28d0a8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa28d4c8>
set_param = <functools.partial object at 0x2b07aa28d520>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_frequency_response(**params)

Bases: featuremapper.command.UnitCurveCommand

Measure spatial frequency preference of one unit of a sheet.

Uses an constant circular sine grating stimulus at the preferred with varying spatial frequency orientation and retinal position of the specified unit. Orientation and position preference must be calulated before measuring size response.

The curve can be plotted at various different values of the contrast (or actually any other parameter) of the stimulus. If using contrast and the network contains an LGN layer, then one would usually specify weber_contrast as the contrast_parameter. If there is no explicit LGN, then scale (offset=0.0) can be used to define the contrast. Other relevant contrast definitions (or other parameters) can also be used, provided they are defined in one of the appropriate metaparameter_fns.

param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘orientation’, ‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param Integer num_freq (allow_None=False, bounds=(1, None), constant=False, default=21, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of different sizes to test.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00971>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[contrast2scale(contrast_parameter=’weber_contrast’, name=’contrast2scale00972’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=True, default=frequency, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Number max_freq (allow_None=False, bounds=(0.1, None), constant=False, default=10.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Maximum extent of the grating
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of units to measure.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20bd60>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa20be68>
inspect_value = <functools.partial object at 0x2b07aa29e050>
instance = <functools.partial object at 0x2b07aa29e0a8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa29e520>
set_param = <functools.partial object at 0x2b07aa29e578>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_or_tuning_fullfield(**params)

Bases: featuremapper.command.FeatureCurveCommand

Measures orientation tuning curve(s) of a particular unit using a full-field sine grating stimulus.

The curve can be plotted at various different values of the contrast (or actually any other parameter) of the stimulus. If using contrast and the network contains an LGN layer, then one would usually specify michelson_contrast as the contrast_parameter. If there is no explicit LGN, then scale (offset=0.0) can be used to define the contrast. Other relevant contrast definitions (or other parameters) can also be used, provided they are defined in CoordinatedPatternGenerator and the units parameter is changed as appropriate.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Parameter coords (allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Ignored; here just to suppress warning.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00981>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20bf70>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa20b9f0>
inspect_value = <functools.partial object at 0x2b07aa29e0a8>
instance = <functools.partial object at 0x2b07aa29e100>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa29e578>
set_param = <functools.partial object at 0x2b07aa29e5d0>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

topo.analysis.command.centroid(array_2D)

Return the centroid (center of gravity) for a 2D array.

class topo.analysis.command.measure_orientation_contrast(**params)

Bases: featuremapper.command.UnitCurveCommand

Measures the response to a center sine grating disk and a surround sine grating ring at different contrasts of the central disk.

The central disk is set to the preferred orientation of the unit to be measured. The surround disk orientation (relative to the central grating) and contrast can be varied, as can the size of both disks.

param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘x’, ‘y’, ‘sizecenter’, ‘sizesurround’, ‘orientationcenter’, ‘thickness’, ‘contrastcenter’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List contrastsurround (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Contrast of the surround.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Callable pattern_generator (allow_None=False, constant=False, default=<OrientationContrast OrientationContrast00983>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[contrast2centersurroundscale(contrast_parameter=’weber_contrast’, name=’contrast2centersurroundscale00982’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=True, default=orientationsurround, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=9, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number thickness (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Ring thickness.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Number sizecenter (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the central pattern to present.
param Number sizesurround (allow_None=False, bounds=(0, None), constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the surround pattern to present.
param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param Number orientation_center (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Orientation of the center grating patch
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Number contrastcenter (allow_None=False, bounds=(0, 100), constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Contrast of the center.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of units to measure.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20bd08>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa29e0a8>
inspect_value = <functools.partial object at 0x2b07aa29e100>
instance = <functools.partial object at 0x2b07aa29e1b0>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa29e628>
set_param = <functools.partial object at 0x2b07aa29e680>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_phasedisparity(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

Measure a phase disparity preference map by collating the response to patterns.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘orientation’, ‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Number orientation (allow_None=False, bounds=None, constant=False, default=1.57079632679, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Orientation of the test pattern; typically vertical to measure horizontal disparity.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>, <class ‘featuremapper.metaparams.phasedisparity2leftrightphase’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Integer num_disparity (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of disparity values to test.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa20baf8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa2bd100>
inspect_value = <functools.partial object at 0x2b07aa2bd158>
instance = <functools.partial object at 0x2b07aa2bd208>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa2bd680>
set_param = <functools.partial object at 0x2b07aa2bd6d8>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_contrast_response(**params)

Bases: featuremapper.command.UnitCurveCommand

Measures contrast response curves for a particular unit.

Uses a circular sine grating stimulus at the preferred orientation and retinal position of the specified unit. Orientation and position preference must be calulated before measuring contrast response.

The curve can be plotted at various different values of the contrast (or actually any other parameter) of the stimulus. If using contrast and the network contains an LGN layer, then one would usually specify weber_contrast as the contrast_parameter. If there is no explicit LGN, then scale (offset=0.0) can be used to define the contrast. Other relevant contrast definitions (or other parameters) can also be used, provided they are defined in CoordinatedPatternGenerator and the units parameter is changed as appropriate.

param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘size’, ‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00971>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[contrast2scale(contrast_parameter=’weber_contrast’, name=’contrast2scale00972’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=True, default=contrast, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.

param List relative_orientations (allow_None=False, bounds=(0, None), constant=False, default=[0.0, 0.5235987755982988, 0.7853981633974483, 1.5707963267948966], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[10, 20, 30, 40, 50, 60, 70, 80, 90, 100], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of units to measure.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa2d0050>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa2d0158>
inspect_value = <functools.partial object at 0x2b07aa2d01b0>
instance = <functools.partial object at 0x2b07aa2d0260>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa2d06d8>
set_param = <functools.partial object at 0x2b07aa2d0730>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_or_tuning(**params)

Bases: featuremapper.command.UnitCurveCommand

Measures orientation tuning curve(s) of a particular unit.

Uses a circular sine grating patch as the stimulus on the retina.

The curve can be plotted at various different values of the contrast (or actually any other parameter) of the stimulus. If using contrast and the network contains an LGN layer, then one would usually specify weber_contrast as the contrast_parameter. If there is no explicit LGN, then scale (offset=0.0) can be used to define the contrast. Other relevant contrast definitions (or other parameters) can also be used, provided they are defined in CoordinatedPatternGenerator and the units parameter is changed as appropriate.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘size’, ‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of units to measure.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[contrast2scale(contrast_parameter=’weber_contrast’, name=’contrast2scale00972’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00971>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa2db0a8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa2db1b0>
inspect_value = <functools.partial object at 0x2b07aa2db208>
instance = <functools.partial object at 0x2b07aa2db2b8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa2db730>
set_param = <functools.partial object at 0x2b07aa2db788>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_or_pref(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

Measure an orientation preference map by collating the response to patterns.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00975>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa2db100>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa2db208>
inspect_value = <functools.partial object at 0x2b07aa2db260>
instance = <functools.partial object at 0x2b07aa2db310>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa2db788>
set_param = <functools.partial object at 0x2b07aa2db7e0>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_dr_pref(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

Measure a direction preference map by collating the response to patterns.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00976>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses. Sets value_scale to normalize direction preference values.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_direction (allow_None=False, bounds=(1, None), constant=False, default=6, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of directions to test.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number max_speed (allow_None=False, bounds=(0, None), constant=False, default=0.0833333333333, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The maximum speed to measure (with zero always the minimum).
param Integer num_speeds (allow_None=False, bounds=(0, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of speeds to test (where zero means only static patterns).
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>, <class ‘featuremapper.metaparams.direction2translation’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Direction, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa2f6158>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa2f6260>
inspect_value = <functools.partial object at 0x2b07aa2f62b8>
instance = <functools.partial object at 0x2b07aa2f6368>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa2f67e0>
set_param = <functools.partial object at 0x2b07aa2f6838>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

topo.analysis.command.update_rgb_activities()[source]

Make available Red, Green, and Blue activity matrices for all appropriate sheets.

class topo.analysis.command.update_connectionfields(**params)[source]

Bases: topo.analysis.command.UnitMeasurementCommand

A callable Parameterized command for measuring or plotting a unit from a Projection.

param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of sheets to use in measurements.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of unit(s) to measure.
param ObjectSelector projection (allow_None=None, check_on_set=False, compute_default_fn=None, constant=True, default=None, instantiate=True, objects=[], pickle_default_value=True, precedence=None, readonly=False)
Name of the projection to measure; None means all projections.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa2fb260>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa2fb368>
inspect_value = <functools.partial object at 0x2b07aa2fb3c0>
instance = <functools.partial object at 0x2b07aa2fb470>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa2fb838>
set_param = <functools.partial object at 0x2b07aa2fb890>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.update_projectionactivity(**params)[source]

Bases: topo.analysis.command.ProjectionSheetMeasurementCommand

Add SheetViews for all of the Projections of the ProjectionSheet specified by the sheet parameter, for use in template-based plots.

param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of sheets to use in measurements.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa3042b8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa3043c0>
inspect_value = <functools.partial object at 0x2b07aa304418>
instance = <functools.partial object at 0x2b07aa3044c8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa304890>
set_param = <functools.partial object at 0x2b07aa3048e8>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_sine_pref(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

Measure preferences for sine gratings in various combinations. Can measure orientation, spatial frequency, spatial phase, ocular dominance, horizontal phase disparity, color hue, motion direction, and speed of motion.

In practice, this command is useful for any subset of the possible combinations, but if all combinations are included, the number of input patterns quickly grows quite large, much larger than the typical number of patterns required for an entire simulation. Thus typically this command will be used for the subset of dimensions that need to be evaluated together, while simpler special-purpose routines are provided below for other dimensions (such as hue and disparity).

param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param Integer num_hue (allow_None=False, bounds=(1, None), constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of hues to test; set to 1 to disable or e.g. 8 to enable.
param Integer num_direction (allow_None=False, bounds=(0, None), constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of directions to test. If nonzero, overrides num_orientation, because the orientation is calculated to be perpendicular to the direction.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>, <class ‘featuremapper.metaparams.direction2translation’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Integer num_speeds (allow_None=False, bounds=(0, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of speeds to test (where zero means only static patterns). Ignored when num_direction=0.
param Integer num_ocularity (allow_None=False, bounds=(1, None), constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of ocularity values to test; set to 1 to disable or 2 to enable.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Number max_speed (allow_None=False, bounds=(0, None), constant=False, default=0.0833333333333, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The maximum speed to measure (with zero always the minimum).
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_disparity (allow_None=False, bounds=(1, None), constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of disparity values to test; set to 1 to disable or e.g. 12 to enable.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa304310>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa304418>
inspect_value = <functools.partial object at 0x2b07aa304470>
instance = <functools.partial object at 0x2b07aa304520>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa304998>
set_param = <functools.partial object at 0x2b07aa3049f0>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.update_projection(**params)[source]

Bases: topo.analysis.command.UnitMeasurementCommand

A callable Parameterized command for measuring or plotting units from a Projection.

param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of sheets to use in measurements.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of unit(s) to measure.
param ObjectSelector projection (allow_None=None, check_on_set=False, compute_default_fn=None, constant=False, default=None, instantiate=False, objects=[], pickle_default_value=True, precedence=None, readonly=False)
Name of the projection to measure; None means all projections.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa304368>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa304470>
inspect_value = <functools.partial object at 0x2b07aa3044c8>
instance = <functools.partial object at 0x2b07aa304578>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa304940>
set_param = <functools.partial object at 0x2b07aa304998>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.UnitMeasurementCommand(**params)[source]

Bases: topo.analysis.command.ProjectionSheetMeasurementCommand

A callable Parameterized command for measuring or plotting specified units from a Sheet.

param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of sheets to use in measurements.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of unit(s) to measure.
param ObjectSelector projection (allow_None=None, check_on_set=False, compute_default_fn=None, constant=False, default=None, instantiate=False, objects=[], pickle_default_value=True, precedence=None, readonly=False)
Name of the projection to measure; None means all projections.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa304520>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa304628>
inspect_value = <functools.partial object at 0x2b07aa304788>
instance = <functools.partial object at 0x2b07aa3046d8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa3040a8>
set_param = <functools.partial object at 0x2b07aa304100>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.ParameterizedFunction(**params)

Bases: param.parameterized.Parameterized

params(name=String)

Acts like a Python function, but with arguments that are Parameters.

Implemented as a subclass of Parameterized that, when instantiated, automatically invokes __call__ and returns the result, instead of returning an instance of the class.

To obtain an instance of this class, call instance().

 Object has no parameters.

debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa304890>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa3040a8>
inspect_value = <functools.partial object at 0x2b07aa304050>
instance = <functools.partial object at 0x2b07aa3041b0>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa304f70>
set_param = <functools.partial object at 0x2b07aa33a0a8>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_size_response(**params)

Bases: featuremapper.command.UnitCurveCommand

Measure receptive field size of one unit of a sheet.

Uses an expanding circular sine grating stimulus at the preferred orientation and retinal position of the specified unit. Orientation and position preference must be calulated before measuring size response.

The curve can be plotted at various different values of the contrast (or actually any other parameter) of the stimulus. If using contrast and the network contains an LGN layer, then one would usually specify weber_contrast as the contrast_parameter. If there is no explicit LGN, then scale (offset=0.0) can be used to define the contrast. Other relevant contrast definitions (or other parameters) can also be used, provided they are defined in CoordinatedPatternGenerator and the units parameter is changed as appropriate.

param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘orientation’, ‘x’, ‘y’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00971>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[contrast2scale(contrast_parameter=’weber_contrast’, name=’contrast2scale00972’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=True, default=size, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param Number max_size (allow_None=False, bounds=(0.1, None), constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Maximum extent of the grating
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of units to measure.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param Integer num_sizes (allow_None=False, bounds=(1, None), constant=False, default=11, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of different sizes to test.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa304208>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa3042b8>
inspect_value = <functools.partial object at 0x2b07aa304418>
instance = <functools.partial object at 0x2b07aa304ba8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa34a158>
set_param = <functools.partial object at 0x2b07aa34a260>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_position_pref(**params)

Bases: featuremapper.command.PositionMeasurementCommand

Measure a position preference map by collating the response to patterns.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_MaxValue DSF_MaxValue00965>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param NumericTuple x_range (allow_None=False, constant=False, default=(-0.5, 0.5), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of X values to test.
param Integer divisions (allow_None=False, bounds=(1, None), constant=False, default=7, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The number of different positions to measure in X and in Y.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’, ‘size’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param NumericTuple y_range (allow_None=False, constant=False, default=(-0.5, 0.5), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of Y values to test.
param Callable pattern_generator (allow_None=False, constant=False, default=<Gaussian Gaussian00968>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. For measuring position, the pattern_presenter should be spatially localized, yet also able to activate the appropriate neurons reliably.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aa304260>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aa304d60>
inspect_value = <functools.partial object at 0x2b07aa304db8>
instance = <functools.partial object at 0x2b07aa304ec0>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07a9fe5c58>
set_param = <functools.partial object at 0x2b07a9fe5b50>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.pattern_response(**params)

Bases: topo.analysis.featureresponses.pattern_present

This command is used to perform measurements, which require a number of permutations to complete. The inputs and outputs are defined as dictionaries corresponding to the generator sheets they are to be presented on and the measurement sheets to record from respectively. The update_activity_fn then accumulates the updated activity into the appropriate entry in the outputs dictionary.

The command also makes sure that time, events and state are reset after each presentation. If a GUI is found a timer will be opened to display a progress bar and sheet_views will be made available to the sheet to display activities.

param Dict inputs (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
A dictionary of GeneratorSheetName:PatternGenerator pairs to be installed into the specified GeneratorSheets
param Boolean apply_output_fns (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether sheet output functions will be applied.
param Boolean progress_bar (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Whether or not to display a textual progress bar during measurements. Disabled when using the Tk GUI.
param Boolean restore_events (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore simulation events after the response has been measured, so that no simulation time will have elapsed. Implied by restore_state=True.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Boolean plastic (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If plastic is False, overwrites the existing values of Sheet.plastic to disable plasticity, then reenables plasticity.
param Boolean overwrite_previous (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If overwrite_previous is true, the given inputs overwrite those previously defined.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Boolean install_sheetview (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether to install a sheet view in the global storage dictionary.
param Boolean return_responses (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, return a dictionary of the measured sheet activities.
param Boolean restore_state (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore the state of both sheet activities and simulation events after the response has been measured. Implies restore_events.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07a9fe5ba8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07a9fe5aa0>
inspect_value = <functools.partial object at 0x2b07a9fe5c00>
instance = <functools.partial object at 0x2b07a9fe5af8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07a9fe55d0>
set_param = <functools.partial object at 0x2b07a9fe5578>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_hue_pref(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

Measure a hue preference map by collating the response to patterns.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Integer num_hue (allow_None=False, bounds=(1, None), constant=False, default=8, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of hues to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>, <class ‘featuremapper.metaparams.hue2rgbscale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Hue, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07a9fe5838>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07a9fe5788>
inspect_value = <functools.partial object at 0x2b07a9fe57e0>
instance = <functools.partial object at 0x2b07a9fe5730>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07a9fe5e10>
set_param = <functools.partial object at 0x2b07aa01ef70>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_rfs(**params)

Bases: featuremapper.command.SingleInputResponseCommand

Map receptive fields by reverse correlation.

Presents a large collection of input patterns, typically white noise, keeping track of which units in the specified input_sheet were active when each unit in other Sheets in the simulation was active. This data can then be used to plot receptive fields for each unit. Note that the results are true receptive fields, not the connection fields usually presented in lieu of receptive fields, because they take all circuitry in between the input and the target unit into account.

Note also that it is crucial to set the scale parameter properly when using units with a hard activation threshold (as opposed to a smooth sigmoid), because the input pattern used here may not be a very effective way to drive the unit to activate. The value should be set high enough that the target units activate at least some of the time there is a pattern on the input.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_MaxValue DSF_MaxValue00965>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param NumericTuple roi (allow_None=False, constant=False, default=(0, 0, 0, 0), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False)
If non-zero ROI bounds is specified only the RFs in that subregion are recorded.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Number presentations (allow_None=False, bounds=None, constant=False, default=100, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of presentations to run the reverse correlation for.
param Number scale (allow_None=False, bounds=None, constant=False, default=30.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<UniformRandom UniformNoise>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Presented pattern for reverse correlation, usually white noise.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07a9fe56d8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07a9fe5520>
inspect_value = <functools.partial object at 0x2b07a9fe5628>
instance = <functools.partial object at 0x2b07a9fe54c8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa01ee68>
set_param = <functools.partial object at 0x2b07aa01ef70>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.pattern_present(**params)

Bases: featuremapper.command.PatternPresentingCommand

Given a set of input patterns, installs them into the specified GeneratorSheets, runs the simulation for the specified length of time, then restores the original patterns and the original simulation time. Thus this input is not considered part of the regular simulation, and is usually for testing purposes.

May also be used to measure the response to a pattern by calling it with restore_events disabled and restore_state and install_sheetview enabled, which will push and pop the simulation state and install the response in the sheets views dictionary. The update_activity command implements this functionality.

As a special case, if ‘inputs’ is just a single pattern, and not a dictionary, it is presented to all GeneratorSheets.

If this process is interrupted by the user, the temporary patterns may still be installed on the retina.

If overwrite_previous is true, the given inputs overwrite those previously defined.

If plastic is False, overwrites the existing values of Sheet.plastic to disable plasticity, then re-enables plasticity.

If this process is interrupted by the user, the temporary patterns may still be installed on the retina.

In order to to see the sequence of values presented, you may use the back arrow history mechanism in the GUI. Note that the GUI’s Activity window must be open. Alternatively or access the activities through the Activity entry in the views.Maps dictionary on the specified sheets.

param Dict inputs (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
A dictionary of GeneratorSheetName:PatternGenerator pairs to be installed into the specified GeneratorSheets
param Boolean apply_output_fns (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether sheet output functions will be applied.
param Boolean restore_events (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore simulation events after the response has been measured, so that no simulation time will have elapsed. Implied by restore_state=True.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Boolean plastic (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If plastic is False, overwrites the existing values of Sheet.plastic to disable plasticity, then reenables plasticity.
param Boolean overwrite_previous (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If overwrite_previous is true, the given inputs overwrite those previously defined.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Boolean install_sheetview (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether to install a sheet view in the global storage dictionary.
param Boolean return_responses (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, return a dictionary of the responses.
param Boolean restore_state (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore the state of both sheet activities and simulation events after the response has been measured. Implies restore_events.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07a9fe5890>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07a9fe5e68>
inspect_value = <functools.partial object at 0x2b07a9fe5e10>
instance = <functools.partial object at 0x2b07a9fe5c58>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07a9fe57e0>
set_param = <functools.partial object at 0x2b07aa01ef18>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.command.measure_second_or_pref(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

Measure the secondary orientation preference maps.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=16, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Boolean true_peak (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If set the second orientation response is computed on the true second mode of the orientation distribution, otherwise is just the second maximum response
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Second Orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07a9fe5e68>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07a9fe5838>
inspect_value = <functools.partial object at 0x2b07a9fe5c00>
instance = <functools.partial object at 0x2b07a9fe5940>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aa01ee68>
set_param = <functools.partial object at 0x2b07aa01ef70>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.


featureresponses Module

Inheritance diagram of topo.analysis.featureresponses

FeatureResponses and associated functions and classes.

These classes implement map and tuning curve measurement based on measuring responses while varying features of an input pattern.

class topo.analysis.featureresponses.DistributionMatrix(matrix_shape, axis_range=(0.0, 1.0), cyclic=False, keep_peak=True)

Bases: param.parameterized.Parameterized

Maintains a matrix of Distributions (each of which is a dictionary of (feature value: activity) pairs).

The matrix contains one Distribution for each unit in a rectangular matrix (given by the matrix_shape constructor argument). The contents of each Distribution can be updated for a given bin value all at once by providing a matrix of new values to update().

The results can then be accessed as a matrix of weighted averages (which can be used as a preference map) and/or a selectivity map (which measures the peakedness of each distribution).

apply_DSF(dsf)

Apply the given dsf DistributionStatisticFn on each element of the distribution_matrix

Return a dictionary of dictionaries, with the same structure of the called DistributionStatisticFn, but with matrices as values, instead of scalars

debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6ec58>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ecb0>
inspect_value = <functools.partial object at 0x2b07aad6ed60>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix=' ', unknown_value='<?>', qualify=False, separator='')

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Variant of __repr__ designed for generating a runnable script.

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ed08>
set_param = <functools.partial object at 0x2b07aad6ee68>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

update(new_values, bin)

Add a new matrix of histogram values for a given bin value.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.FullMatrix(matrix_shape, features)

Bases: param.parameterized.Parameterized

Records the output of every unit in a sheet, for every combination of feature values. Useful for collecting data for later analysis while presenting many input patterns.

debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6ec58>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ea48>
inspect_value = <functools.partial object at 0x2b07aad6eba8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix=' ', unknown_value='<?>', qualify=False, separator='')

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Variant of __repr__ designed for generating a runnable script.

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6eaa0>
set_param = <functools.partial object at 0x2b07aad6ec00>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

update(new_values, feature_value_permutation)

Add a new matrix of histogram values for a given bin value.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.FeatureResponses(**params)

Bases: featuremapper.PatternDrivenAnalysis

Systematically vary input pattern feature values and collate the responses.

A DistributionMatrix for each measurement source and feature is created. The DistributionMatrix stores the distribution of activity values for that feature. For instance, if the features to be tested are orientation and phase, we will create a DistributionMatrix for orientation and a DistributionMatrix for phase for each measurement source. The orientation and phase of the input are then systematically varied (when measure_responses is called), and the responses of all units from a measurement source to each pattern are collected into the DistributionMatrix.

The resulting data can then be used to plot feature maps and tuning curves, or for similar types of feature-based analyses.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Presenter command responsible for presenting the input patterns provided to it and returning the response for the requested measurement sources.
param HookList pre_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_push of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>, <function wipe_out_activity at 0x2b07a8f5db18>, <function clear_event_queue at 0x2b07a8f5d2a8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before each pattern is presented.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Prefix to add to the name under which results are stored.
param HookList post_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_pop of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after each pattern is presented.
param HookList post_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after an analysis session ends.
param HookList pre_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before an analysis session begins.
param Boolean store_responses (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether or not to return the full set of responses to the presented patterns.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the output source supplied to metadata_fns to filter out desired outputs.
param List durations (allow_None=False, bounds=(0, None), constant=False, default=[1.0], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation, when a measurement is taken.
param Integer repetitions (allow_None=False, bounds=(1, None), constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
How many times each stimulus will be presented. Each stimulus is specified by a particular feature combination, and need only be presented once if the network has no other source of variability. If results differ for each presentation of an identical stimulus (e.g. due to intrinsic noise), then this parameter can be increased so that results will be an average over the specified number of repetitions.
param Callable measurement_storage_hook (allow_None=True, constant=False, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Interface to store measurements after they have been completed.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the input supplied to the metadata_fns to filter out desired inputs.
param Dict cmd_overrides (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary used to overwrite parameters on the pattern_response_fn.
param Callable pattern_generator (allow_None=True, constant=False, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Defines the input pattern to be presented.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature functions can be used to coordinate lower level features across input devices or depending on a metafeature set on the function itself.
param HookList metadata_fns (allow_None=False, bounds=(0, None), constant=False, default=[<function topo_metadata_fn at 0x2b07a8f5ded8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Interface functions for metadata. Should return a dictionary that at a minimum must contain the name and dimensions of the inputs and outputs for pattern presentation and response measurement.
param Dict static_features (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary containing name value pairs of a feature, which is to be varied across measurements.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6ee68>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6eaf8>
inspect_value = <functools.partial object at 0x2b07aad6ee10>
instance = <functools.partial object at 0x2b07aad6eec0>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

set_cmd_overrides = <functools.partial object at 0x2b07aad6ed08>
classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ef70>
set_param = <functools.partial object at 0x2b07aad6efc8>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.ReverseCorrelation(**params)

Bases: featuremapper.FeatureResponses

Calculate the receptive fields for all neurons using reverse correlation.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Presenter command responsible for presenting the input patterns provided to it and returning the response for the requested measurement sources.
param HookList pre_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_push of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>, <function wipe_out_activity at 0x2b07a8f5db18>, <function clear_event_queue at 0x2b07a8f5d2a8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before each pattern is presented.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Prefix to add to the name under which results are stored.
param HookList post_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_pop of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after each pattern is presented.
param HookList post_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after an analysis session ends.
param HookList pre_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before an analysis session begins.
param Boolean store_responses (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether or not to return the full set of responses to the presented patterns.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the output source supplied to metadata_fns to filter out desired outputs.
param List durations (allow_None=False, bounds=(0, None), constant=False, default=[1.0], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation, when a measurement is taken.
param Integer repetitions (allow_None=False, bounds=(1, None), constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
How many times each stimulus will be presented. Each stimulus is specified by a particular feature combination, and need only be presented once if the network has no other source of variability. If results differ for each presentation of an identical stimulus (e.g. due to intrinsic noise), then this parameter can be increased so that results will be an average over the specified number of repetitions.
param NumericTuple roi (allow_None=False, constant=False, default=(0, 0, 0, 0), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False)
If non-zero, specifies the subregion to perform reverse correlation on.
param Callable measurement_storage_hook (allow_None=True, constant=False, default=StorageHook(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Interface to store measurements after they have been completed.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the input supplied to the metadata_fns to filter out desired inputs.
param Dict cmd_overrides (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary used to overwrite parameters on the pattern_response_fn.
param Callable pattern_generator (allow_None=True, constant=False, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Defines the input pattern to be presented.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature functions can be used to coordinate lower level features across input devices or depending on a metafeature set on the function itself.

param Boolean continue_measurement (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)

param HookList metadata_fns (allow_None=False, bounds=(0, None), constant=False, default=[<function topo_metadata_fn at 0x2b07a8f5ded8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Interface functions for metadata. Should return a dictionary that at a minimum must contain the name and dimensions of the inputs and outputs for pattern presentation and response measurement.
param Dict static_features (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary containing name value pairs of a feature, which is to be varied across measurements.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6eba8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ea48>
inspect_value = <functools.partial object at 0x2b07aad6eb50>
instance = <functools.partial object at 0x2b07aad6ec00>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

set_cmd_overrides = <functools.partial object at 0x2b07aad6ee68>
classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6edb8>
set_param = <functools.partial object at 0x2b07aad6ef18>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.FeatureMaps(**params)

Bases: featuremapper.FeatureResponses

Measure and collect the responses to a set of features, for calculating feature maps.

For each feature and each measurement source, the results are stored as a preference matrix and selectivity matrix in the sheet’s sheet_views; these can then be plotted as preference or selectivity maps.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Presenter command responsible for presenting the input patterns provided to it and returning the response for the requested measurement sources.
param HookList pre_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_push of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>, <function wipe_out_activity at 0x2b07a8f5db18>, <function clear_event_queue at 0x2b07a8f5d2a8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before each pattern is presented.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Prefix to add to the name under which results are stored.
param HookList post_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_pop of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after each pattern is presented.
param HookList post_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after an analysis session ends.
param HookList pre_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before an analysis session begins.
param Boolean store_responses (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether or not to return the full set of responses to the presented patterns.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the output source supplied to metadata_fns to filter out desired outputs.
param List durations (allow_None=False, bounds=(0, None), constant=False, default=[1.0], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation, when a measurement is taken.
param Integer repetitions (allow_None=False, bounds=(1, None), constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
How many times each stimulus will be presented. Each stimulus is specified by a particular feature combination, and need only be presented once if the network has no other source of variability. If results differ for each presentation of an identical stimulus (e.g. due to intrinsic noise), then this parameter can be increased so that results will be an average over the specified number of repetitions.
param Callable measurement_storage_hook (allow_None=True, constant=False, default=StorageHook(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Interface to store measurements after they have been completed.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the input supplied to the metadata_fns to filter out desired inputs.
param Dict cmd_overrides (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary used to overwrite parameters on the pattern_response_fn.
param Callable pattern_generator (allow_None=True, constant=False, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Defines the input pattern to be presented.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature functions can be used to coordinate lower level features across input devices or depending on a metafeature set on the function itself.
param Number selectivity_multiplier (allow_None=False, bounds=None, constant=False, default=17.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Scaling of the feature selectivity values, applied in all feature dimensions. The multiplier sets the output scaling. The precise value is arbitrary, and set to match historical usage.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00947>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function for computing a scalar-valued preference, selectivity, etc. from the distribution of responses. Note that this default is overridden by specific functions for individual features, if specified in the Feature objects.
param HookList metadata_fns (allow_None=False, bounds=(0, None), constant=False, default=[<function topo_metadata_fn at 0x2b07a8f5ded8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Interface functions for metadata. Should return a dictionary that at a minimum must contain the name and dimensions of the inputs and outputs for pattern presentation and response measurement.
param Dict static_features (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary containing name value pairs of a feature, which is to be varied across measurements.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6eec0>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ec58>
inspect_value = <functools.partial object at 0x2b07aad6ed08>
instance = <functools.partial object at 0x2b07aad6ea48>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

set_cmd_overrides = <functools.partial object at 0x2b07aad6ef70>
classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ed60>
set_param = <functools.partial object at 0x2b07aad6ecb0>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.FeatureCurves(**params)

Bases: featuremapper.FeatureResponses

Measures and collects the responses to a set of features, for calculating tuning and similar curves.

These curves represent the response of a measurement source to patterns that are controlled by a set of features. This class can collect data for multiple curves, each with the same x axis. The x axis represents the main feature value that is being varied, such as orientation. Other feature values can also be varied, such as contrast, which will result in multiple curves (one per unique combination of other feature values).

A particular set of patterns is constructed using a user-specified pattern_generator by adding the parameters determining the curve (curve_param_dict) to a static list of parameters (param_dict), and then varying the specified set of features. The input patterns will then be passed to the pattern_response_fn, which should return the measured responses for each of the requested sheets. Once the responses to all feature permutations has been accumulated, the measured curves are passed to the storage_fn and are finally returned.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Presenter command responsible for presenting the input patterns provided to it and returning the response for the requested measurement sources.
param HookList pre_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_push of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>, <function wipe_out_activity at 0x2b07a8f5db18>, <function clear_event_queue at 0x2b07a8f5d2a8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before each pattern is presented.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Prefix to add to the name under which results are stored.
param HookList post_presentation_hooks (allow_None=False, bounds=(0, None), constant=False, default=[<bound method Simulation.state_pop of Simulation(basename_format=’%(name)s_%(timestr)s’, name=None, register=True, startup_commands=[], time=Time(label=’Time’, name=’Time00001’, time_type=<built-in function mpq>, timestep=1.0, unit=None, until=Infinity()), time_printing_format=’%(_time)09.2f’)>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after each pattern is presented.
param HookList post_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run after an analysis session ends.
param HookList pre_analysis_session_hooks (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
List of callable objects to be run before an analysis session begins.
param Boolean store_responses (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether or not to return the full set of responses to the presented patterns.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the output source supplied to metadata_fns to filter out desired outputs.
param List durations (allow_None=False, bounds=(0, None), constant=False, default=[1.0], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation, when a measurement is taken.
param Integer repetitions (allow_None=False, bounds=(1, None), constant=False, default=1, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
How many times each stimulus will be presented. Each stimulus is specified by a particular feature combination, and need only be presented once if the network has no other source of variability. If results differ for each presentation of an identical stimulus (e.g. due to intrinsic noise), then this parameter can be increased so that results will be an average over the specified number of repetitions.
param Callable measurement_storage_hook (allow_None=True, constant=False, default=StorageHook(), instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Interface to store measurements after they have been completed.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Names of the input supplied to the metadata_fns to filter out desired inputs.
param Dict cmd_overrides (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary used to overwrite parameters on the pattern_response_fn.
param Callable pattern_generator (allow_None=True, constant=False, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Defines the input pattern to be presented.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature functions can be used to coordinate lower level features across input devices or depending on a metafeature set on the function itself.
param HookList metadata_fns (allow_None=False, bounds=(0, None), constant=False, default=[<function topo_metadata_fn at 0x2b07a8f5ded8>], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Interface functions for metadata. Should return a dictionary that at a minimum must contain the name and dimensions of the inputs and outputs for pattern presentation and response measurement.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Dict static_features (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Dictionary containing name value pairs of a feature, which is to be varied across measurements.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6eb50>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6eaa0>
inspect_value = <functools.partial object at 0x2b07aad6ee68>
instance = <functools.partial object at 0x2b07aad6edb8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

set_cmd_overrides = <functools.partial object at 0x2b07aad6ef18>
classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6efc8>
set_param = <functools.partial object at 0x2b07aad6eaf8>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.Feature(name, **params)

Bases: holoviews.core.dimension.Dimension

Specifies several parameters required for generating a map of one input feature.

param ClassSelector preference_fn (allow_None=True, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00900>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit response to this feature.
param Boolean cyclic (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Whether the range of this feature is cyclic such that the maximum allowed value (defined by the range parameter) is continuous with the minimum allowed value.
param Callable compute_fn (allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If non-None, a function that when given a list of other parameter values, computes and returns the value for this feature.
param String format_string (allow_None=False, basestring=<type ‘basestring’>, constant=False, default={name}: {val}{unit}, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Format string to specify how pprint_value_string is generated. Valid format keys include: ‘name’ (Dimension name), ‘val’ (a particular dimension value to be presented) and ‘unit’ (the unit string).
param Tuple soft_range (allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
Specifies a minimum and maximum reference value, which may be overridden by the data.
param Tuple range (allow_None=False, constant=False, default=(None, None), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
Specifies the minimum and maximum allowed values for a Dimension. None is used to represent an unlimited bound.
param ClassSelector values (allow_None=False, constant=False, default=[], instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Optional set of allowed values for the dimension that can also be used to retain a categorical ordering. Setting values to ‘initial’ indicates that the values will be added during construction.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Offset to add to the values for this feature
param Integer steps (allow_None=False, bounds=None, constant=False, default=0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of steps, between lower and upper range value, to be presented.
param Callable formatter (allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Formatting function applied to each value before display.
param Parameter type (allow_None=True, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional type associated with the Dimension values. The type may be an inbuilt constructor (such as int, str, float) or a custom class object.
param String unit (allow_None=True, basestring=<type ‘basestring’>, constant=False, default=None, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional unit string associated with the Dimension. For instance, the string ‘m’ may be used represent units of meters and ‘s’ to represent units of seconds.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6eaf8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ed08>
inspect_value = <functools.partial object at 0x2b07aad6eb50>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix=' ', unknown_value='<?>', qualify=False, separator='')

(Experimental) Pretty printed representation that may be evaluated with eval. See pprint() function for more details.

pprint_label

The pretty-printed label string for the Dimension

pprint_value(value)

Applies the defined formatting to the value.

pprint_value_string(value)

Pretty prints the dimension name and value using the format_string parameter, including the unit string (if set). Numeric types are printed to the stated rounding level.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Variant of __repr__ designed for generating a runnable script.

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6efc8>
set_param = <functools.partial object at 0x2b07aad6ef70>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.MeasureResponseCommand(**params)

Bases: featuremapper.command.PatternPresentingCommand

Parameterized command for presenting input patterns and measuring responses.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_MaxValue DSF_MaxValue00965>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Number scale (allow_None=False, bounds=None, constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=True, constant=False, default=None, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will generate input patterns coordinated using a list of meta parameters.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6ef18>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ee68>
inspect_value = <functools.partial object at 0x2b07aad6ec00>
instance = <functools.partial object at 0x2b07aad6ec58>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ecb0>
set_param = <functools.partial object at 0x2b07aad6eec0>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.SinusoidalMeasureResponseCommand(**params)

Bases: featuremapper.command.MeasureResponseCommand

Parameterized command for presenting sine gratings and measuring responses.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=4, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6eaf8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6eb50>
inspect_value = <functools.partial object at 0x2b07aad6efc8>
instance = <functools.partial object at 0x2b07aad6ef70>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6eaa0>
set_param = <functools.partial object at 0x2b07aad6ed60>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.PositionMeasurementCommand(**params)

Bases: featuremapper.command.MeasureResponseCommand

Parameterized command for measuring topographic position.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_MaxValue DSF_MaxValue00965>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param NumericTuple x_range (allow_None=False, constant=False, default=(-0.5, 0.5), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of X values to test.
param Integer divisions (allow_None=False, bounds=(1, None), constant=False, default=7, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The number of different positions to measure in X and in Y.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’, ‘size’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Number scale (allow_None=False, bounds=None, constant=False, default=1.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param NumericTuple y_range (allow_None=False, constant=False, default=(-0.5, 0.5), instantiate=False, length=2, pickle_default_value=True, precedence=None, readonly=False)
The range of Y values to test.
param Callable pattern_generator (allow_None=False, constant=False, default=<Gaussian Gaussian00968>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. For measuring position, the pattern_presenter should be spatially localized, yet also able to activate the appropriate neurons reliably.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6ef18>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ec00>
inspect_value = <functools.partial object at 0x2b07aad6ec58>
instance = <functools.partial object at 0x2b07aad6ed60>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ecb0>
set_param = <functools.partial object at 0x2b07aad6edb8>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.SingleInputResponseCommand(**params)

Bases: featuremapper.command.MeasureResponseCommand

A callable Parameterized command for measuring the response to input on a specified Sheet.

Note that at present the input is actually presented to all input sheets; the specified Sheet is simply used to determine various parameters. In the future, it may be modified to draw the pattern on one input sheet only.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_MaxValue DSF_MaxValue00965>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[‘scale’, ‘offset’, ‘size’], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Number scale (allow_None=False, bounds=None, constant=False, default=30.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Callable pattern_generator (allow_None=False, constant=False, default=<RawRectangle RawRectangle00969>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will generate input patterns coordinated using a list of meta parameters.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6edb8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ec58>
inspect_value = <functools.partial object at 0x2b07aad6ea48>
instance = <functools.partial object at 0x2b07aad6eec0>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6eaa0>
set_param = <functools.partial object at 0x2b07aad6ed08>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.FeatureCurveCommand(**params)

Bases: featuremapper.command.SinusoidalMeasureResponseCommand

A callable Parameterized command for measuring tuning curves.

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[<class ‘featuremapper.metaparams.contrast2scale’>], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00966>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6ef70>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ec00>
inspect_value = <functools.partial object at 0x2b07aad6ed08>
instance = <functools.partial object at 0x2b07aad6ee68>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ecb0>
set_param = <functools.partial object at 0x2b07aad6efc8>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.UnitCurveCommand(**params)

Bases: featuremapper.command.FeatureCurveCommand

Measures tuning curve(s) of particular unit(s).

param Callable pattern_response_fn (allow_None=True, constant=False, default=pattern_response(), instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will present a parameter-controlled pattern to a set of Sheets. Needs to be supplied by a subclass or in the call. The attributes duration and apply_output_fns (if non-None) will be set on this object, and it should respect those if possible.
param List inputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of input supplied to the metadata_fns to filter out desired input.
param ClassSelector preference_fn (allow_None=False, constant=False, default=<DSF_WeightedAverage DSF_WeightedAverage00967>, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
Function that will be used to analyze the distributions of unit responses.
param List frequencies (allow_None=False, bounds=(0, None), constant=False, default=[2.4], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Sine grating frequencies to test.
param List static_parameters (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of names of parameters of this class to pass to the pattern_presenter as static parameters, i.e. values that will be fixed to a single value during measurement.
param List outputs (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Name of output sources supplied to metadata_fns to filter out desired output.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Integer num_orientation (allow_None=False, bounds=(1, None), constant=False, default=12, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of orientations to test.
param Number scale (allow_None=False, bounds=None, constant=False, default=0.3, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Multiplicative strength of input pattern.
param Callable preference_lookup_fn (allow_None=True, constant=False, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Callable object that will look up a preferred feature values.
param List coords (allow_None=False, bounds=(0, None), constant=False, default=[(0, 0)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of coordinates of units to measure.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param HookList metafeature_fns (allow_None=False, bounds=(0, None), constant=False, default=[contrast2scale(contrast_parameter=’weber_contrast’, name=’contrast2scale00972’)], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Metafeature_fns is a hooklist, which accepts any function, which applies coordinated changes to a set of inputs based on some parameter or feature value. Can be used to present different patterns to different inputs or to control complex features like contrast.
param Number offset (allow_None=False, bounds=None, constant=False, default=0.0, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Additive offset to input pattern.

param List contrasts (allow_None=False, bounds=(0, None), constant=False, default=[30, 60, 80, 90], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)

param Integer num_phase (allow_None=False, bounds=(1, None), constant=False, default=18, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of phases to test.
param String subplot (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Name of map to register as a subplot, if any.
param Number size (allow_None=False, bounds=(0, None), constant=False, default=0.5, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
The size of the pattern to present.
param String x_axis (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Parameter to use for the x axis of tuning curves.
param Callable pattern_generator (allow_None=False, constant=False, default=<SineGrating SineGrating00971>, instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
Pattern to be presented on the inputs.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6edb8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ea48>
inspect_value = <functools.partial object at 0x2b07aad6efc8>
instance = <functools.partial object at 0x2b07aad6ec58>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

static preference_lookup_fn(feature, sheet_name, coords, default=0.0)

Return the feature preference for a particular unit.

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6eaa0>
set_param = <functools.partial object at 0x2b07aad6eb50>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.pattern_present(**params)[source]

Bases: featuremapper.command.PatternPresentingCommand

Given a set of input patterns, installs them into the specified GeneratorSheets, runs the simulation for the specified length of time, then restores the original patterns and the original simulation time. Thus this input is not considered part of the regular simulation, and is usually for testing purposes.

May also be used to measure the response to a pattern by calling it with restore_events disabled and restore_state and install_sheetview enabled, which will push and pop the simulation state and install the response in the sheets views dictionary. The update_activity command implements this functionality.

As a special case, if ‘inputs’ is just a single pattern, and not a dictionary, it is presented to all GeneratorSheets.

If this process is interrupted by the user, the temporary patterns may still be installed on the retina.

If overwrite_previous is true, the given inputs overwrite those previously defined.

If plastic is False, overwrites the existing values of Sheet.plastic to disable plasticity, then re-enables plasticity.

If this process is interrupted by the user, the temporary patterns may still be installed on the retina.

In order to to see the sequence of values presented, you may use the back arrow history mechanism in the GUI. Note that the GUI’s Activity window must be open. Alternatively or access the activities through the Activity entry in the views.Maps dictionary on the specified sheets.

param Dict inputs (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
A dictionary of GeneratorSheetName:PatternGenerator pairs to be installed into the specified GeneratorSheets
param Boolean apply_output_fns (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether sheet output functions will be applied.
param Boolean restore_events (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore simulation events after the response has been measured, so that no simulation time will have elapsed. Implied by restore_state=True.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Boolean plastic (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If plastic is False, overwrites the existing values of Sheet.plastic to disable plasticity, then reenables plasticity.
param Boolean overwrite_previous (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If overwrite_previous is true, the given inputs overwrite those previously defined.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Boolean install_sheetview (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether to install a sheet view in the global storage dictionary.
param Boolean return_responses (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, return a dictionary of the responses.
param Boolean restore_state (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore the state of both sheet activities and simulation events after the response has been measured. Implies restore_events.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6ed08>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6edb8>
inspect_value = <functools.partial object at 0x2b07aad6eb50>
instance = <functools.partial object at 0x2b07aad6ef70>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ee68>
set_param = <functools.partial object at 0x2b07aad6ef18>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.featureresponses.pattern_response(**params)[source]

Bases: topo.analysis.featureresponses.pattern_present

This command is used to perform measurements, which require a number of permutations to complete. The inputs and outputs are defined as dictionaries corresponding to the generator sheets they are to be presented on and the measurement sheets to record from respectively. The update_activity_fn then accumulates the updated activity into the appropriate entry in the outputs dictionary.

The command also makes sure that time, events and state are reset after each presentation. If a GUI is found a timer will be opened to display a progress bar and sheet_views will be made available to the sheet to display activities.

param Dict inputs (allow_None=False, constant=False, default={}, instantiate=True, is_instance=True, pickle_default_value=True, precedence=None, readonly=False)
A dictionary of GeneratorSheetName:PatternGenerator pairs to be installed into the specified GeneratorSheets
param Boolean apply_output_fns (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether sheet output functions will be applied.
param Boolean progress_bar (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Whether or not to display a textual progress bar during measurements. Disabled when using the Tk GUI.
param Boolean restore_events (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore simulation events after the response has been measured, so that no simulation time will have elapsed. Implied by restore_state=True.
param Parameter durations (allow_None=False, constant=False, default=[1.0], instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Times after presentation begins at which to record a measurement.
param Boolean plastic (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If plastic is False, overwrites the existing values of Sheet.plastic to disable plasticity, then reenables plasticity.
param Boolean overwrite_previous (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If overwrite_previous is true, the given inputs overwrite those previously defined.
param String measurement_prefix (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Optional prefix to add to the name under which results are stored as part of a measurement response.
param Boolean install_sheetview (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Determines whether to install a sheet view in the global storage dictionary.
param Boolean return_responses (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, return a dictionary of the measured sheet activities.
param Boolean restore_state (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
If True, restore the state of both sheet activities and simulation events after the response has been measured. Implies restore_events.
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad6efc8>
get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad6ed08>
inspect_value = <functools.partial object at 0x2b07aad6eec0>
instance = <functools.partial object at 0x2b07aad6eaf8>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad6ec58>
set_param = <functools.partial object at 0x2b07aad6ed60>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

topo.analysis.featureresponses.update_activity(force=False)[source]

Make a map of neural activity available for each sheet, for use in template-based plots.

This command simply asks each sheet for a copy of its activity matrix, and then makes it available for plotting. Of course, for some sheets providing this information may be non-trivial, e.g. if they need to average over recent spiking activity.

topo.analysis.featureresponses.update_sheet_activity(sheet_name, force=False)[source]

Update the ‘_activity_buffer’ ViewMap for a given sheet by name.

If force is False and the existing Activity Image isn’t stale, the existing view is returned.


weights Module

Inheritance diagram of topo.analysis.weights

class topo.analysis.weights.WeightDistribution(**params)[source]

Bases: holoviews.core.operation.TreeOperation

Computes histogram of the difference in feature preference between pre- and post-synaptic neurons weighted by the connection strength between them.

param Boolean weighted (allow_None=False, bounds=(0, 1), constant=False, default=True, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)

param String group (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Operation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
The group string used to identify the output of the Operation. By default this should match the operation name.
param String feature (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Orientation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Feature to compute the distribution over
param List projections (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of tuples of the form (sheet, projection).
param Integer num_bins (allow_None=False, bounds=None, constant=False, default=10, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of histogram bins.
param Boolean normalized (allow_None=False, bounds=(0, 1), constant=False, default=False, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
Whether to normalize the histogram
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad8f578>
classmethod get_overlay_bounds(overlay)

Returns the extents if all the elements of an overlay agree on a consistent extents, otherwise raises an exception.

classmethod get_overlay_label(overlay, default_label='')

Returns a label if all the elements of an overlay agree on a consistent label, otherwise returns the default label.

get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad8f730>
inspect_value = <functools.partial object at 0x2b07aad8f788>
instance = <functools.partial object at 0x2b07aad8f7e0>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

process_element(element, key, **params)

The process_element method allows a single element to be operated on given an externally supplied key.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod search(element, pattern)

Helper method that returns a list of elements that match the given path pattern of form {type}.{group}.{label}.

The input may be a Layout, an Overlay type or a single Element.

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad8fcb0>
set_param = <functools.partial object at 0x2b07aad8fd08>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

class topo.analysis.weights.WeightIsotropy(**params)[source]

Bases: holoviews.core.operation.TreeOperation

Computes a histogram of azimuths between the positional preferences of pre- and post-synaptic neurons weighted by the connection strength and normalized relative to the orientation preference.

Useful for determining whether lateral connection are anisotropic along the axis of preferred orientation.

param NumericTuple roi (allow_None=False, constant=False, default=(-0.5, -0.5, 0.5, 0.5), instantiate=False, length=4, pickle_default_value=True, precedence=None, readonly=False)
Region of interest supplied as a four-tuple of the form (left, bottom, right, top)
param Integer num_bins (allow_None=False, bounds=None, constant=False, default=20, inclusive_bounds=(True, True), instantiate=False, pickle_default_value=True, precedence=None, readonly=False, time_dependent=True, time_fn=<Time Time00001>)
Number of bins in the histogram.
param String group (allow_None=False, basestring=<type ‘basestring’>, constant=False, default=Operation, instantiate=False, pickle_default_value=True, precedence=None, readonly=False)
The group string used to identify the output of the Operation. By default this should match the operation name.
param List projections (allow_None=False, bounds=(0, None), constant=False, default=[], instantiate=True, pickle_default_value=True, precedence=None, readonly=False)
List of tuples of the form (sheet, projection).
debug(msg, *args, **kw)

Print msg merged with args as a debugging statement.

See Python’s logging module for details of message formatting.

defaults()

Return {parameter_name:parameter.default} for all non-constant Parameters.

Note that a Parameter for which instantiate==True has its default instantiated.

force_new_dynamic_value = <functools.partial object at 0x2b07aad8f6d8>
classmethod get_overlay_bounds(overlay)

Returns the extents if all the elements of an overlay agree on a consistent extents, otherwise raises an exception.

classmethod get_overlay_label(overlay, default_label='')

Returns a label if all the elements of an overlay agree on a consistent label, otherwise returns the default label.

get_param_values(onlychanged=False)

Return a list of name,value pairs for all Parameters of this object.

If onlychanged is True, will only return values that are not equal to the default value.

get_value_generator = <functools.partial object at 0x2b07aad8f8e8>
inspect_value = <functools.partial object at 0x2b07aad8fa48>
instance = <functools.partial object at 0x2b07aad8f998>
message(msg, *args, **kw)

Print msg merged with args as a message.

See Python’s logging module for details of message formatting.

classmethod params(parameter_name=None)

Return the Parameters of this class as the dictionary {name: parameter_object}

Includes Parameters from this class and its superclasses.

pprint(imports=None, prefix='n ', unknown_value='<?>', qualify=False, separator='')

Same as Parameterized.pprint, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod print_param_defaults()

Print the default values of all cls’s Parameters.

print_param_values()

Print the values of all this object’s Parameters.

process_element(element, key, **params)

The process_element method allows a single element to be operated on given an externally supplied key.

script_repr(imports=, []prefix=' ')

Same as Parameterized.script_repr, except that X.classname(Y is replaced with X.classname.instance(Y

classmethod search(element, pattern)

Helper method that returns a list of elements that match the given path pattern of form {type}.{group}.{label}.

The input may be a Layout, an Overlay type or a single Element.

classmethod set_default(param_name, value)

Set the default value of param_name.

Equivalent to setting param_name on the class.

set_dynamic_time_fn = <functools.partial object at 0x2b07aad8f158>
set_param = <functools.partial object at 0x2b07aad8f310>
state_pop()

Restore the most recently saved state.

See state_push() for more details.

state_push()

Save this instance’s state.

For Parameterized instances, this includes the state of dynamically generated values.

Subclasses that maintain short-term state should additionally save and restore that state using state_push() and state_pop().

Generally, this method is used by operations that need to test something without permanently altering the objects’ state.

verbose(msg, *args, **kw)

Print msg merged with args as a verbose message.

See Python’s logging module for details of message formatting.

warning(msg, *args, **kw)

Print msg merged with args as a warning, unless module variable warnings_as_exceptions is True, then raise an Exception containing the arguments.

See Python’s logging module for details of message formatting.

topo.analysis.weights.circular_dist(a, b, period)[source]

Returns the distance between a and b (scalars) in a domain with period period.