klabhub / neurostim

Design and run visual neuroscience experiments using Matlab and the Psychophysics Toolbox.
MIT License
4 stars 3 forks source link

jittered parameters not updating #190

Closed cnuahs closed 2 years ago

cnuahs commented 2 years ago

It appears that parameters that are directly assigned a jitter object are not updated after #188.

When a jitter object (or any adaptive object for that matter) is part of a block/design object, then the block object calls it's updateValue() method in it's beforeTrial(). However, when the jitter object is NOT part of a block/design, i.e., it is assigned directly to a parameter, then it's updateValue() method is never called. As a result, jittered parameters retain the same (random) value on all trials.

cnuahs commented 2 years ago

One option is for the adaptive base class to define a beforeTrial() method that calls updateValue().

bartkrekelberg commented 2 years ago

Fixed i #192