Skip to content

Instantly share code, notes, and snippets.

# These are functions to estimate a variety of ERP amptlitude and latency features that interact with mne-python
import numpy as np
import pandas as pd
from scipy.integrate import trapezoid
from scipy.signal import find_peaks
from mne import Evoked, pick_channels
@jdkoen
jdkoen / make_repetitions_with_lag_range.py
Last active July 21, 2021 19:00
This is a script that creates a randomized list of stimuli (here, faces, scenes, and objects), that are repeated with a lag in a specified range. This is generic and can be modified for more complex constraints.
import numpy as np
import pandas as pd
from random import shuffle
from pathlib import Path
# Out directory
out_dir = Path('lagged_lists')
out_dir.mkdir(exist_ok=True)
# Make a dummy stimulus list