choices#

Choices of the animal: first / last choice, where it comes from, bias, psychometric data (visual and cloud of tones) and model regressors.

Functions

add_mouse_first_choice

Add the first choice made by the mouse in each trial.

add_mouse_last_choice

Add the last choice made by the mouse in each trial.

add_port_where_animal_comes_from

The previous side port can come from two sources.

add_repeat_or_alternate_numeric

Adds roa_choice_numeric: 0 if the animal alternated, -1 if it repeated to the left, 1 if it repeated to the right (NaN otherwise).

add_sound_location_level

Adds sound_location_db: loudness of the sound of a sound location trial (auditory-local-wn), positive if it came from the left and negative if from the right (the side in auditory_output_side, or the correct side, as the sound plays on the side of the reward).

add_trial_group_column

Adds trial_group: the trials of each subject split, in order, into n_groups groups with the same number of trials (the number of the first trial of the group, from total_trial).

add_visual_stimulus_difference

add_win_stay_lose_switch_columns

Adds, to each trial, what happened in the trial before (of the same subject and session) and whether the mouse chose the same side again:

create_transition_matrix

get_bias_evolution_df

Gets how the bias of the animals (alternating, right bias, or left bias) evolves over time.

get_choice_before

get_choices_by_difficulty_matrix

The proportion of left choices (first choice) by correct side and difficulty in each session: a psychometric curve per session, to show as colours (see MATRIX_ROWS).

get_left_auditory_stim

get_left_choice

get_performance_by_difficulty_diff

get_performance_by_difficulty_ratio

get_time_kernel_impact

get_triangle_polar_plot_df

get_win_stay_lose_switch_df

Win-stay and lose-switch probabilities of each group of trials.

matrix_row_label

parameters_for_fit

Get the parameters for the fit

points_to_lines_for_bias_evolution

previous_impact_on_time_kernel

two_sided_bin_edges

Bin edges for a signed stimulus with a gap around 0 (e.g. sound levels, never close to 0 dB): per_side bins of equal width over the range of the negative values and per_side over the range of the positive ones, so that no bin falls in the gap.