Psychometric curve: visual#

Left choices against the brightness ratio of the ports (positive: left brighter), with a lapse logistic fit.

from matplotlib import pyplot as plt

from lecilab_behavior_analysis.metrics.choices import get_performance_by_difficulty_ratio
from lecilab_behavior_analysis.plots import psychometric_plot

# the trials of the visual task with easy to hard stimuli
visual = trials[trials["current_training_stage"] == "TwoAFC_visual_hard"]
df = get_performance_by_difficulty_ratio(visual)
fig, ax = plt.subplots(figsize=(4, 3.5))
psychometric_plot(df, x="visual_stimulus_ratio", y="first_choice_numeric", ax=ax, valueType="discrete")

trials, day, summary, events and cohort are the inputs of the examples. Back to the gallery