iblrig.base_choice_world.ChoiceWorldSession
- class iblrig.base_choice_world.ChoiceWorldSession[source]
- TrialDataModel
alias of
ChoiceWorldTrialData
- 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.
- get_graphviz_task(output_file=None, view=True)[source]
Get the state machine’s states diagram in Digraph format.
- Parameters:
output_file
- Returns:
- 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.
- 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()
inActiveChoiceWorldSession
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
- 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