def epoching_ARglobal(subject): epoching_funcs.run_epochs(subject, epoch_on_first_element=False, baseline=False) epoching_funcs.run_epochs(subject, epoch_on_first_element=True, baseline=False)
def extract_good_epochs_for_RSA(subject, tmin, tmax, baseline, decim, clean, recompute=True): """ This function computes and saves the epochs epoched for the RSA. :param subject: :param tmin: :param tmax: :param baseline: :param decim: :param reject: :param which_analysis: :return: """ if recompute: print("=== we are recomputing the epochs but not saving them ! ===") if clean: epochs = epoching_funcs.run_epochs(subject, epoch_on_first_element=False, tmin=tmin, tmax=tmax, baseline=baseline, whattoreturn='ARglobal') else: epochs = epoching_funcs.run_epochs(subject, epoch_on_first_element=False, tmin=tmin, tmax=tmax, baseline=baseline, whattoreturn='') else: epochs = epoching_funcs.load_epochs_items(subject, cleaned=clean) epochs.pick_types(meg=True) epochs.crop(tmin, tmax) if decim is not None: epochs.decimate(decim) if baseline is not None: epochs.apply_baseline(True) epochs = epochs[ "TrialNumber > 10 and ViolationInSequence == 0 and StimPosition > 1"] return epochs
def epoch_full_trial(subject): epoching_funcs.run_epochs(subject, epoch_on_first_element=True, baseline=True)
def epoch_items(subject): epoching_funcs.run_epochs(subject, epoch_on_first_element=False, baseline=None)