iblrig.base_choice_world.ChoiceWorldSession

Inheritance diagram of ChoiceWorldSession

class iblrig.base_choice_world.ChoiceWorldSession[source]
TrialDataModel

alias of ChoiceWorldTrialData

__init__(*args, delay_secs=0, **kwargs)[source]
check_sync_pulses(bpod_data)[source]
draw_next_trial_info(pleft=0.5, **kwargs)[source]

Draw next trial variables.

calls send_trial_info_to_bonsai(). This is called by the next_trial method before updating the Bpod state machine.

static extra_parser()[source]
Returns:

argparse.parser()

get_graphviz_task(output_file=None, view=True)[source]

Get the state machine’s states diagram in Digraph format.

Parameters:

output_file

Returns:

get_state_machine_trial(i)[source]
mock(file_jsonable_fixture=None)[source]

Instantiate a state machine and Bpod object to simulate a task’s run.

This is useful to test or display the state machine flow.

abstract next_trial()[source]
show_trial_log(extra_info=None, log_level=20)[source]

Log the details of the current trial.

This method retrieves information about the current trial from the trials table and logs it. It can also incorporate additional information provided through the extra_info parameter.

Parameters:
  • extra_info (dict[str, Any], optional) – A dictionary containing additional information to include in the log.

  • log_level (int, optional) – The logging level to use when logging the trial information. Default is logging.INFO.

Parameters:

Notes

When overloading, make sure to call the super class and pass additional log items by means of the extra_info parameter. See the implementation of show_trial_log() in ActiveChoiceWorldSession for reference.

start_hardware()[source]

In this step we explicitly run the start methods of the various mixins. The super class start method is overloaded because we need to start the different hardware pieces in order

trial_completed(bpod_data)[source]
Parameters:

bpod_data (dict[str, Any])

Return type:

None

base_parameters_file: Path | None = PosixPath('/home/runner/work/iblrig/iblrig/iblrig/base_choice_world_params.yaml')

A YAML file containing base, default task parameters.

Type:

Path

property default_reward_amount
property event_error
property event_reward
property feedback_correct_delay
property feedback_error_delay
property feedback_nogo_delay
property iti_reward

Returns the ITI time that needs to be set in order to achieve the desired ITI, by subtracting the time it takes to give a reward from the desired ITI.

property position
property quiescent_period
property reward_time