@@ -28,12 +28,43 @@ def add_state(self, **kwargs):
2828class Session (TrainingChoiceWorldSession ):
2929 protocol_name = 'nate_adaptiveTimeoutChoiceWorld'
3030
31- def __init__ (self , * args , ** kwargs ):
31+ def __init__ (
32+ self ,
33+ * args ,
34+ adaptive_delay_nogo = DEFAULTS ['ADAPTIVE_FEEDBACK_NOGO_DELAY_SECS' ],
35+ adaptive_delay_error = DEFAULTS ['ADAPTIVE_FEEDBACK_ERROR_DELAY_SECS' ],
36+ ** kwargs ,
37+ ):
38+ self .adaptive_delay_nogo = adaptive_delay_nogo
39+ self .adaptive_delay_error = adaptive_delay_error
3240 super ().__init__ (* args , ** kwargs )
3341
3442 def _instantiate_state_machine (self , trial_number = None ):
3543 return AdaptiveTimeoutStateMachine (self .bpod )
3644
45+ @staticmethod
46+ def extra_parser ():
47+ parser = super (Session , Session ).extra_parser ()
48+ parser .add_argument (
49+ '--adaptive_delay_nogo' ,
50+ option_strings = ['--adaptive_delay_nogo' ],
51+ dest = 'adaptive_delay_nogo' ,
52+ default = DEFAULTS ['ADAPTIVE_FEEDBACK_NOGO_DELAY_SECS' ],
53+ nargs = '+' ,
54+ type = float ,
55+ help = 'list of delays for no-go condition (contrasts: 1.0, 0.25, 0.125, 0.0625, 0.0)' ,
56+ )
57+ parser .add_argument (
58+ '--adaptive_delay_error' ,
59+ option_strings = ['--adaptive_delay_error' ],
60+ dest = 'adaptive_delay_nogo' ,
61+ default = DEFAULTS ['ADAPTIVE_FEEDBACK_ERROR_DELAY_SECS' ],
62+ nargs = '+' ,
63+ type = float ,
64+ help = 'list of delays for error condition (contrasts: 1.0, 0.25, 0.125, 0.0625, 0.0)' ,
65+ )
66+ return parser
67+
3768
3869if __name__ == '__main__' : # pragma: no cover
3970 kwargs = get_task_arguments (parents = [Session .extra_parser ()])
0 commit comments