Measure how recall probability depends on lag from an external retrieval cue rather than the previous recall.
The cue-centered Lag-CRP replaces the standard transition-based lag with the lag between a retrieval cue and the recalled item. This is useful for paradigms where participants receive cues at each recall event. The dataset must contain a cue_clips field providing the cue item identifier for each recall event.
Workflow
Code
import os
import matplotlib.pyplot as plt
import warnings
from jaxcmr.analyses.cue_centered_crp import plot_cue_centered_crp
from jaxcmr.helpers import find_project_root, generate_trial_mask, load_data, save_figure
warnings.filterwarnings("ignore" )
Code
data_path = "data/VRT_clips.h5"
figure_dir = "results/figures"
figure_str = ""
ylim = None
trial_query = None
Code
project_root = find_project_root()
figure_dir = os.path.join(project_root, figure_dir)
data_path = os.path.join(project_root, data_path)
data = load_data(data_path)
trial_mask = generate_trial_mask(data, trial_query) if trial_query else None
Code
plot_cue_centered_crp(data, trial_mask)
if ylim is not None :
for ax in plt.gcf().axes:
ax.set_ylim(ylim)
save_figure(figure_dir, figure_str)
Interpretation
The x-axis shows lag from the retrieval cue’s study position; the y-axis shows conditional recall probability.
Peak near lag 0 : cues reinstate temporal context, biasing recall toward items studied near the cue.
Flat curve : cues do not drive temporally organized retrieval.
API Details
Notebook parameters
data_path — path to an HDF5 file containing a RecallDataset with a cue_clips field.
figure_dir — directory for saving figures.
figure_str — base filename for the saved figure. Leave empty to display without saving.
ylim — y-axis limits as a tuple, or None for automatic scaling.
trial_query — a Python expression evaluated against the dataset to select trials, or None for all trials.