PostDecisionWager#

class braintools.cogtask.PostDecisionWager(t_fixation=Quantity(300., 'ms'), t_stimulus=Quantity(1000., 'ms'), t_delay=Quantity(500., 'ms'), t_decision=Quantity(500., 'ms'), t_wager=Quantity(500., 'ms'), num_choices=2, coherences=(0, 6.4, 12.8, 25.6, 51.2), noise_sigma=Quantity(1., 'ms^0.5'), **kwargs)[source]#

Post-Decision Wager task.

Agent makes a perceptual decision, then bets on its confidence. High bet = confident, low bet = uncertain.

Structure: Fixation >> Stimulus >> Delay >> Decision >> Wager

Parameters:
  • t_fixation (Quantity) – Fixation duration (default: 300ms).

  • t_stimulus (Quantity) – Stimulus duration (default: 1000ms).

  • t_delay (Quantity) – Delay duration (default: 500ms).

  • t_decision (Quantity) – Decision period duration (default: 500ms).

  • t_wager (Quantity) – Wager period duration (default: 500ms).

  • num_choices (int) – Number of choices (default: 2).

  • coherences (Sequence[float]) – Coherence levels (default: (0, 6.4, 12.8, 25.6, 51.2)).

  • noise_sigma (Array | ndarray | bool | number | bool | int | float | complex | Quantity) – Stimulus noise (default: 1.0 * u.ms**0.5).

  • seed (int, optional) – Random seed.

Examples

>>> task = PostDecisionWager()
>>> X, Y, info = task.sample_trial(0)
define_features()[source]#

Define input and output features.

Override in subclass for class-based task definition.

Return type:

Tuple

Returns:

  • input_features (Feature or FeatureSet) – Input feature definitions.

  • output_features (Feature or FeatureSet) – Output feature definitions.

define_phases()[source]#

Define the phase structure.

Override in subclass for class-based task definition.

Returns:

The task phase structure (single phase or composition).

Return type:

Phase

trial_init(ctx)[source]#

Initialize trial-level state.

Override in subclass to set up trial parameters like ground_truth, stimulus indices, etc.

Parameters:

ctx (Context) – Trial context to populate with state.

Return type:

None