How Benign Sensory Events Become Aversive: Self-Fulfilling Expectations in Affective Experience
收藏资源简介:
Master Repository Guide Manuscript: How Benign Sensory Events Become Aversive: Self-Fulfilling Expectations in Affective Experience Welcome to the repository for this manuscript. This repository contains all raw data, processed datasets, experimental materials, preprocessing pipelines, and analysis scripts necessary to fully reproduce the behavioral and physiological (Study 1: Heart Period, SCR; Study 2: EEG, Heart Period) findings of Study 1 and Study 2. This Master README provides an overview of the repository structure, instructions for initial setup, and a detailed breakdown of the documentation and directories for both Study 1 and Study 2. 1. Initial Setup and Unzipping Instructions To ensure all scripts function correctly, the repository must be extracted and structured properly on your local machine. Figures.zip, ReadMe.zip, and Study1.zip: Simply unzip these archives in your chosen root directory. They are fully self-contained and ready to use as-is. Study2.zip: Unzip this archive normally. However, you must perform one additional step for the raw physiological data: Locate the 6 zipped raw physiological data archives (Study2_P_009toP_035.zip, Study2_P_036toP_059.zip, Study2_P_061toP_084.zip, Study2_P_085toP_106.zip, Study2_P_107toP_127.zip, Study2_P_128toP_142.zip). Extract the contents of all 6 archives into a single, unified folder. When running the physiological analysis scripts for Study 2, you must manually update the raw data directory path within the script to point to this new, unified folder. 2. Navigating the Documentation (ReadMe Folder) Because this repository contains different dependent variables, we have isolated the specific ReadMeFiles for each dependent variable into a dedicated ReadMe folder. Figures_ReadMe: A guide detailing how to use the Python and MATLAB plotting scripts to computationally reproduce the manuscript's figures. Open_Materials_ReadMe: A general guide detailing how to run the experimental PsychoPy tasks for both Study 1 and Study 2 (including instructions for acquiring the restricted face stimuli). Study1/: ReadMeFiles (incl.: codebooks and guides) for Study 1's dependent variables: ReadMe_Study1_Behavioral ReadMe_Study1_HeartPeriod ReadMe_Study1_SCR Study2/: ReadMeFiles (incl.: codebooks and guides) for Study 2's dependent variables: ReadMe_Study2_Behavioral ReadMe_Study2_EEG ReadMe_Study2_HeartPeriod ReadMe_Study2_MVPA_EEG 3. Figures: Directory Breakdown The Figures directory contains the plotting scripts to generate the visualizations presented in the manuscript. Figure1_Methods/: Scripts to reproduce Figure 1 (Methods figure). Figure2_Behavioral_HeartPeriod/: Scripts to reproduce Figure 2 (Heart Period and behavioral results). Figure3_EEG/: Scripts to reproduce Figure 3 (EEG and MVPA). Figure4_Avoidance/: Scripts to reproduce Figure 4 (avoidance). · Helvetica Neue LT Std 57 Condensed/: Required font files. These must be installed on your local machine before running the plotting scripts. (Please refer to the Figures_ReadMe in the main ReadMe folder). 4. Study 1: Directory Breakdown The Study1 directory is divided into two subfolders: Open_Materials and Open_Data. A. Open_Materials This folder contains the PsychoPy code, block lists, and stimuli structure required to run the behavioral experiment. (Please refer to the Open_Materials_ReadMe in the main ReadMe folder for full execution instructions). B. Open_Data This folder contains the data, code and statistics for Study 1, categorized by data type and processing stage: Raw Primary Data PrimaryData_Behavioral/: Contains all raw primary behavioral data outputs. PrimaryData_SCR_HeartPeriod/: Contains all raw primary physiological (Skin Conductance and Heart Period) data. PrimaryData_SoundCalibration/: Contains all raw primary sound calibration data. Preprocessing & Processing Scripts Process_BehavioralData/: Contains the Python script (Study1_Process_BehavioralData.py) used to clean and process the raw behavioral data. Process_HeartPeriodData/: Contains the MATLAB script (Study1_HeartPeriod_PreProcessing_PLOTS.m) for Heart Period preprocessing. It also stores the folders for the dependencies (ECG2IBI/, eeglab2024.2.1/) and the IBI_PreProcessed/ folder where individual processed data is saved. PreProcessing_SCR/: Contains the MATLAB script (Study1_SCR_PreProcessing.m) for SCR preprocessing. It includes necessary dependencies (Dependencies/, ledalab-349/) and the LedaData/ folder where individual processed data is saved. Analysis_SoundCalibration/: Contains the Python script (Study1_Calibration_VarianceExplainedParameters.py) used to calculate the variance explained by the sound calibration parameters. Final Datasets DataSet_BehavioralData/: Contains the fully processed behavioral dataset (Study1_BehavioralData.csv). DataSet_HeartPeriod/: Contains the processed Heart Period dataset (Study1_HeartPeriod_CombinedDeltasBehav.csv). DataSet_SCR/: Contains the processed Skin Conductance dataset (Study1_SCR_Processed.csv). DataSet_SoundCalibration/: Contains the processed datasets related to the sound calibration phase (Study1_SoundCalibration_Parameters.csv). Statistical Analyses (JASP) JASP_BehavioralData/: Contains JASP_Study1_BehavioralData.jasp with pre-configured models for behavioral analyses. JASP_HeartPeriodData/: Contains JASP_Study1_HeartPeriodData.jasp with pre-configured models for Heart Period analyses. JASP_SCR/: Contains JASP_Study1_SCR.jasp with pre-configured models for SCR analyses. 5. Study 2: Directory Breakdown The Study2 directory follows an identical structural logic to Study 1, divided into Open_Materials and Open_Data. A. Open_Materials This folder contains the PsychoPy code, trial sequences, and materials to conduct the behavioral experiment. (Please refer to the Open_Materials_ReadMe in the main ReadMe folder for full execution instructions). B. Open_Data This folder contains the data, code and statistics for Study 2, categorized by data type and processing stage: Raw Primary Data PrimaryData_Behavioral/: Contains all raw primary behavioral data outputs. PrimaryData_SoundCalibration/: Contains all raw primary sound calibration data. PrimaryData_EEG_HP/: [Action Required] This folder is initially empty. You must extract the 6 raw physiological data archives (Study2_P_009toP_035.zip, Study2_P_036toP_059.zip, Study2_P_061toP_084.zip, Study2_P_085toP_106.zip, Study2_P_107toP_127.zip, Study2_P_128toP_142.zip) into this directory. If you choose to extract them here, you must update the dir_raw_all variable in the MATLAB preprocessing scripts to this specific folder. Preprocessing & Processing Scripts Process_BehavioralData/: Contains the Python script (Study2_Process_BehavioralData.py) used to clean and process the raw behavioral data. Analysis_SoundCalibration/: Contains the Python script (Study2_Calibration_VarianceExplainedParameters.py) to calculate the variance explained by the sound calibration parameters. PreProcess_HeartPeriodData/: Contains the MATLAB pipeline (Study2_HeartPeriod_PreProcessing_PLOTS.m) for ECG/Heart Period analysis. It includes necessary dependencies (ECG2IBI-main/, eeglab2024.2.1/) and an IBI_PreProcessed/ folder where individual participant data arrays are saved. PreProcess_EEG/: Contains the primary MATLAB pipeline (EEG_Master_Script_Study2.m) that runs the full automated EEG preprocessing (FASTER, ICA), epoching, ERP extraction, and visualization. It includes folders for: chanloc file (chanlocs/), necessary dependencies (eeglab2024.2.1/, eeg_pipeline/, functions/), and folders for caching intermediate processing steps (preprocessed/, set/). Multivariate Pattern Analysis (MVPA) MVPA_EEG/: Contains the MVPA pipeline. MVPA_Step1_PrepareForMVPA.m: MATLAB script that preprocesses the EEG data and exports trials to .mat arrays for decoding. MVPA_Step2_Compute.py: Python script that loads the arrays, subaverages trials, runs the 5-fold cross-validated SVM decoder (calculating 1D and 2D TGM statistics), and saves the mathematical output. MVPA_Step3_Plot.py: Python script that loads the cached statistics and generates publication-ready SVG/PNG figures. Subfolders: 0_sets/ (holds preprocessed inputs), 1_4stEEG/ (holds extracted arrays), MVPA_Cache/ (holds statistical outputs), and stEEG_decoder-main/ (the custom Python decoding module). Final Datasets DataSet_BehavioralData/: Contains the fully processed behavioral dataset (Study2_BehavioralData.csv). DataSet_EEG/: Contains the extracted ERP metrics matrix (ERP_Metrics_Export.csv), providing mean amplitudes (N1, P2, LPP) and N1-P2 slopes. DataSet_HeartPeriod/: Contains the processed Heart Period dataset (Study2_HeartPeriod_Combined.csv). DataSet_SoundCalibration/: Contains the processed parameters dataset from the sound calibration phase (Study2_SoundCalibration_Parameters.csv). Statistical Analyses (JASP) JASP_BehavioralData/: Contains JASP_Study2_BehavioralData.jasp with pre-configured models for behavioral analyses. JASP_EEG_Data/: Contains JASP_Study2_EEG_Data.jasp with pre-configured models for ERP analyses (N1, P2, LPP, N1-P2 Slope). JASP_HeartPeriodData/: Contains JASP_Study2_HeartPeriodData.jasp with pre-configured models for Heart Period analyses.



