Code
import os
import matplotlib.pyplot as plt
import warnings
from jaxcmr.analyses.cat_lpp_spc import plot_cat_lpp_spc
from jaxcmr.helpers import find_project_root, generate_trial_mask, load_data, save_figure
warnings.filterwarnings("ignore")Plot mean LPP amplitude across study positions, filtered by item category.
The category LPP SPC shows how neural encoding signals (LPP amplitude) vary across the study list for different item types. This reveals whether category-dependent encoding effects interact with serial position.
Each curve shows mean LPP amplitude across study positions for one category.
data_path — path to an HDF5 file containing a RecallDataset with EEG fields.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.category_field — dataset field containing category labels.category_values — list of category values to plot.lpp_field — dataset field containing LPP amplitudes per study position.labels — legend labels for each category.color_cycle — colors for each curve.contrast_name — legend title.