PsyNeuLink icon indicating copy to clipboard operation
PsyNeuLink copied to clipboard

Determine if there is a more intuitive way to handle the API surrounding values and modulated values of parameters

Open dillontsmith opened this issue 6 years ago • 0 comments

There is a distinction between the value of a Parameter and its corresponding ParameterPort that comes into play when control signals are used to modulate a Parameter. In this situation, the value of the ParameterPort is changed, and not the value of the Parameter itself.

More often than not, the value of a ParameterPort is what is relevant to the user as it is the actual value that will be used by its owner Mechanism, but the API for accessing it or enabling logging on it is a little clunky.

e.g. here is the code to enable logging on the modulated value of a parameter termination_threshold on mechanism my_mechanism:

my_mechanism.set_log_conditions(['mod_termination_threshold'])

here is the code to enable logging on the base value:

my_mechanism.set_log_conditions(['termination_threshold'])

A user is likely to do the latter while intending the former. We should determine if there is a more intuitive way for this API to work, perhaps by adding an argument to the relevant method call(s) that would toggle between the two.

dillontsmith avatar Apr 01 '20 21:04 dillontsmith