Capturing the multimodal dynamics of acute stress responses: Evidence from the Montreal Imaging Stress Task (MIST).
Paper
Loaded from Europe PMC by your browser, not stored by OSCR: doi.org · Europe PMC
The paper is loaded when this pane is shown.
The authors' code
MATLAB · 160 lines · 5.1 KB · GPL-3.0
- function batchFileConverter_Dataset1()
- % batchFileConverter_Dataset1 Example of how to converts EDF files to MATLAB.
- %
- % This function is specifically written for the accompanying dataset, use
- % it only as a guide on how to implement the edfDataConverter function
- % and the RawFileModel class.to convert your files.
- %
- %--------------------------------------------------------------------------
- %
- % This code is part of the supplement material to the article:
- %
- % Preprocessing Pupil Size Data. Guideline and Code.
- % Mariska Kret & Elio Sjak-Shie. 2018.
- %
- %--------------------------------------------------------------------------
- %
- % Pupil Size Preprocessing Code (v1.1)
- % Copyright (C) 2018 Elio Sjak-Shie
- % [email hidden].
- %
- % This program is free software: you can redistribute it and/or
- % modify it under the terms of the GNU General Public License as
- % published by the Free Software Foundation, either version 3 of
- % the License, or (at your option) any later version.
- %
- % This program is distributed in the hope that it will be useful,
- % but WITHOUT ANY WARRANTY; without even the implied warranty of
- % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
- % General Public License for more details.
- %
- % You should have received a copy of the GNU General Public License
- % along with this program. If not, see
- % <http://www.gnu.org/licenses/>.
- %
- %--------------------------------------------------------------------------
- %% Process Directory:
- % Get files:
- sourceFolderName = './rawData/';
- destFolderName = './matlabData/';
- rawFiles = dir([sourceFolderName '*.edf']);
- % Process subset of files:
- nFiles = length(rawFiles);
- % Disp file information:
- printToConsole('L1');
- printToConsole(1, 'Processing %i files...\n', nFiles);
- % Loop through files:
- for fileIndx = 1:nFiles
- edfDataConverter([sourceFolderName rawFiles(fileIndx).name]...
- ,[destFolderName rawFiles(fileIndx).name(1:end-4) '.mat'])
- printToConsole(2, 'Done with file %i.\n',fileIndx);
- end
- printToConsole(2, 'Done with folder.\n');
- printToConsole('L2');
- end
- %% edfDataConverter Function:
- function edfDataConverter(edfFilename,matFilename)
- % edfDataConverter Converts a single edf file to a matlab file.
- % Read raw edf file:
- hMex = @edfmex; %#ok<NASGU>
- [~,rawEDF] = evalc(['edfmex(''' edfFilename ''');']);
- t_ms = double(rawEDF.FSAMPLE.time)';
- zeroTime_ms = t_ms(1);
- t_ms = (t_ms - zeroTime_ms);
- L_raw = double(rawEDF.FSAMPLE.pa(1,:)');
- R_raw = double(rawEDF.FSAMPLE.pa(2,:)');
- % Only keep the correct eye, and label it the left for convenience:
- if all(L_raw == intmin('int16'))
- L = R_raw;
- curEye = 'right';
- else
- L = L_raw;
- curEye = 'left';
- end
- % Remove the 0 samples:
- L(L==0) = NaN;
- % Process events (only extract relevant events):
- evtRows = arrayfun(@(f) ~isempty(f.message),rawEDF.FEVENT);
- eventData.t = (double(vertcat(rawEDF.FEVENT(evtRows).sttime))...
- -zeroTime_ms)/1000;
- eventData.name = {rawEDF.FEVENT(evtRows).message}';
- % Find trials start and end times:
- trailStartRows = find(strcmp(eventData.name,'pictureTrial_Start'));
- assert(length(trailStartRows)==36);
- segmentStart = eventData.t(trailStartRows);
- segmentEnd = eventData.t(trailStartRows+9);
- % Extract trial metadata:
- trialNum = regexp(eventData.name...
- ,'!V TRIAL_VAR trial (\d{2,3})','tokens','once');
- assert(isequal(find(~cellfun(@isempty,trialNum)),trailStartRows+5))
- trial = str2double([trialNum{:}]');
- % Extract CA metadata:
- trialCA = regexp(eventData.name...
- ,'!V TRIAL_VAR CA (\d|?)','tokens','once');
- assert(isequal(find(~cellfun(@isempty,trialCA)),trailStartRows+7))
- CA = str2double([trialCA{:}]');
- % Extract Condition metadata:
- trialCondition = regexp(eventData.name...
- ,'!V TRIAL_VAR Condition (\d)','tokens','once');
- assert(isequal(find(~cellfun(@isempty,trialCondition)),trailStartRows+8))
- Condition = str2double([trialCondition{:}]');
- % Extract picture metadata:
- trialPicture = regexp(eventData.name...
- ,'!V TRIAL_VAR picture (.)+$','tokens','once');
- assert(isequal(find(~cellfun(@isempty,trialPicture)),trailStartRows+6))
- picture = [trialPicture{:}]';
- % Make table:
- segmentName = strcat('pictureSeq_'...
- ,strrep(cellstr(num2str((1:36)')),' ','0'));
- SegmentSource = segmentName;
- [~,justFileName,~] = fileparts(edfFilename);
- SegmentSource(:) = {justFileName};
- fileType = SegmentSource;
- fileType(:) = regexp(edfFilename...
- ,'.+(F|B|iCB1|iCB2).edf','tokens','once');
- eyeUsed = segmentName;
- eyeUsed(:) = {curEye};
- segmentData = table(...
- segmentStart,segmentEnd,segmentName,SegmentSource...
- ,fileType,trial,CA,Condition,picture,eyeUsed);
- % Build RawFileModel instance, which saves the data to a mat file that is
- % compatible with the other data models:
- diameterUnit = 'px';
- diameter = struct('t_ms',t_ms,'L',L,'R',[]);
- RawFileModel(diameterUnit,diameter,segmentData...
- ,zeroTime_ms,matFilename);
- end
batchFileConverter_Dataset1.m at commit 944523b, under GPL-3.0 · at the source
Overview
- The Clinical Hospital of Chengdu Brain Science Institute, MOE-K Lab for NeuroInformation, Brain-Apparatus Communication Institute, University of Electronic Science and Technology of China, Chengdu, China
- Sichuan Institute for Brain Science and Brain-Inspired Intelligence, Chengdu, China
Abstract
Background: Capturing multimodal acute stress responses is important for understanding how stress is expressed across psychophysiological systems. Pupil diameter and electroencephalogram (EEG) are important indices for assessing acute stress responses. However, the relationships among behavioral, pupillary, and EEG responses during sustained stress exposure remain less well understood.
Methods: We collected multimodal data, including self-reported stress, salivary cortisol, electrocardiogram (ECG), pupil diameter, behavioral performance, and EEG from 33 healthy young adults during the Montreal Imaging Stress Task (MIST). Differences in responses between the training and testing conditions across difficulty levels were analyzed to characterize changes in the multimodal dynamics of acute stress responses across MIST blocks, and exploratory correlation analyses were conducted to examine associations between pupil diameter changes and relative EEG power changes
Results: The testing condition successfully elicited an acute stress response profile, reflected by increased self-reported stress, salivary cortisol, heart rate, and pupil diameter, alongside decreased behavioral performance and a shift in relative EEG power from lower to higher frequency bands. During the testing condition, behavioral performance improved and pupil diameter decreased from the medium to the hard difficulty block, accompanied by changes in relative alpha, beta (beta1, beta2, beta3), and gamma power. These findings may reflect adaptive-like changes over the course of the testing condition. Exploratory analyses showed limited associations between pupil diameter changes and relative EEG power changes, restricted to changes from the medium to the hard difficulty block in the testing condition and mainly involving frontal relative beta2 power.
Conclusion: Our findings suggest that acute stress involves coordinated but partly dissociable multimodal dynamics across MIST blocks and highlight the value of integrating behavioral, pupillary, and EEG measures to characterize acute stress responses.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Repository
Its files are read in the Code ↔ Paper reader above.
ElioS-S/pupil-size
944523bff0ca583039039a3008ac1171ab46400a, 9 October 2019Availability: 1 check, the latest on 28 September 2026: the link answers
- 28 September 2026: the link answers
17 files
- code/
Examples/ , MATLAB, 160 linesDataset_1/ batchFileConverter_Datas et1.m - code/
Examples/ , MATLAB, 152 linesDataset_1/ main_Dataset1.m - code/
Examples/ , MATLAB, 165 linesDataset_2/ batchFileConverter_Datas et2.m - code/
Examples/ , MATLAB, 207 linesDataset_2/ main_Dataset2.m - code/
dataModels/ , MATLAB, 788 linesPupilDataModel.m - code/
dataModels/ , MATLAB, 172 linesRawFileModel.m - code/
dataModels/ , MATLAB, 383 linesRawSamplesModel.m - code/
dataModels/ , MATLAB, 379 linesValidSamplesModel.m - code/
helperFunctions/ , MATLAB, 12 linesLEGACY/ array2table.m - code/
helperFunctions/ , MATLAB, 131 linesLEGACY/ table.m - code/
helperFunctions/ , MATLAB, 90 linesgenMeanDiaSamples.m - code/
helperFunctions/ , MATLAB, 27 lineslegacyModeCheck.m - code/
helperFunctions/ , MATLAB, 159 linesplotSegments.m - code/
helperFunctions/ , MATLAB, 63 linesprintToConsole.m - code/
helperFunctions/ , MATLAB, 564 linesrawDataFilter.m - LICENSE, License, 674 lines
- README.md, Text, 43 lines
Tracing map
Proposed by the machine: these links were found in the paper and verified at the source, without human review. The map will receive a Zenodo DOI once one of the paper's authors has validated it with their ORCID.
What the map holds:
- 1 repository of the authors' code, each at its verified commit, with its license and how the link was found in the paper;
- 15 scripts, each with its path and the digest of its content;
- no match between paragraphs and code yet;
- neither the text of the paper nor the code itself.
Its JSON (tracing-map.json) is deposited on Zenodo with its DOI once the map is validated.
Data
No dataset and no data link were found in the paper.
Data accessibility statement
Data in the present study can be made available upon request to the primary contact author.
Reproduced under the paper's license (CC BY-NC), from the paper cited above.
Versions
The history of this record: each version stored by the harvester or made by a correction of its authors or of the maintainers of its code, and what changed in its facts. The texts of the paper (its abstract, its availability statements) are not part of it; versions that changed only those are not listed.
Version 2, 28 September 2026
- Authors: added Wei Zhao (0009-0000-8091-2728); removed Wei Zhao
Version 1, 28 September 2026: the first record
Recorded: type, language, journal, volume, issue, pages, dates, 5 authors, 5 keywords, 2 funders, 40 references.
Cite
This paper
Zhao, W., Li, P., Yao, D., Qin, Y., & Liu, T. (2026). Capturing the multimodal dynamics of acute stress responses: Evidence from the Montreal Imaging Stress Task (MIST). International journal of clinical and health psychology : IJCHP, 26(2), 100713. https://
BibTeX
@article{zhao2026capturi
author = {Zhao, Wei and Li, Pengrui and Yao, Dezhong and Qin, Yun and Liu, Tiejun},
title = {{Capturing the multimodal dynamics of acute stress responses: Evidence from the Montreal Imaging Stress Task (MIST)}},
journal = {International journal of clinical and health psychology : IJCHP},
year = {2026},
month = apr,
volume = {26},
number = {2},
pages = {100713},
publisher = {Asociacion Espanola de Psicologia Conductual},
issn = {1697-2600},
doi = {10.1016/
url = {https://
pmid = {42603950},
pmcid = {PMC13476487}
}
RIS
TY - JOUR
AU - Zhao, Wei
AU - Li, Pengrui
AU - Yao, Dezhong
AU - Qin, Yun
AU - Liu, Tiejun
TI - Capturing the multimodal dynamics of acute stress responses: Evidence from the Montreal Imaging Stress Task (MIST)
T2 - International journal of clinical and health psychology : IJCHP
J2 - Int J Clin Health Psychol
PY - 2026
DA - 2026/
VL - 26
IS - 2
SP - 100713
SN - 1697-2600
PB - Asociacion Espanola de Psicologia Conductual
DO - 10.1016/
UR - https://
LA - en
ER -
CSL-JSON
{
"id": "10.1016/
"type": "article-journal",
"title": "Capturing the multimodal dynamics of acute stress responses: Evidence from the Montreal Imaging Stress Task (MIST)",
"container-title": "International journal of clinical and health psychology : IJCHP",
"author": [
{
"family": "Zhao",
"given": "Wei"
},
{
"family": "Li",
"given": "Pengrui"
},
{
"family": "Yao",
"given": "Dezhong"
},
{
"family": "Qin",
"given": "Yun"
},
{
"family": "Liu",
"given": "Tiejun"
}
],
"container-title-short":
"volume": "26",
"issue": "2",
"page": "100713",
"DOI": "10.1016/
"PMID": "42603950",
"PMCID": "PMC13476487",
"ISSN": "1697-2600",
"publisher": "Asociacion Espanola de Psicologia Conductual",
"URL": "https://
"language": "en",
"issued": {
"date-parts": [
[
2026,
4,
1
]
]
}
}
The tracing map gets a citation of its own once an author has validated it and it has a DOI.
Similar papers
The papers with a page that share the most with this one: the tools found in their code, their categories, datasets, cited references and authors, the rarest counting most.
- [1] doi:10.1523/eneuro.0417-25.2026 [code]
- Learning and Motivation State Fluctuations from Motoric and Neurophysiologic Metrics during a Somatosensory Task in Mice.Journal: eNeuroIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, 2 references
- [2] doi:10.1016/j.isci.2026.115767
- Acute stress impairs attentional control and emotional processing in social anxiety.Journal: iScienceIn common: EEG, cognitive, 3 references
- [3] doi:10.1038/s41562-026-02533-1 [code]
- Fluctuations in arousal reflect latent state transitions that facilitate behavioural optimization.Journal: Nature human behaviourIn common: Statistics and Machine Learning Toolbox, EEG, cognitive, 3 references
- [4] doi:10.1111/ejn.70543 [code]
- Neural Oscillations Track Subjective and Pupillary Arousal During Naturalistic Movie Viewing.Journal: The European journal of neuroscienceIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, cognitive, 2 references
- [5] doi:10.1038/s41467-026-71725-0 [code]
- Interactions across hemispheres in prefrontal cortex reflect global cognitive processing.Journal: Nature communicationsIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, cognitive, 2 references
- [6] doi:10.1162/imag.a.1200 [code]
- An fMRI examination of the role of the Locus Coeruleus in state regulation in ADHD.Journal: Imaging neuroscience (Cambridge, Mass.)In common: 3 references
- [7] doi:10.7554/elife.108408 [code]
- Frequency and laminar profile of feature-specific visual activity revealed by interleaved EEG-fMRI.Journal: eLifeIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, 1 reference
- [8] doi:10.1126/sciadv.adv5652 [code]
- The anterior cingulate cortex modulates pupil-linked arousal.Journal: Science advancesIn common: 3 references
- [9] doi:10.1016/j.neuroimage.2026.122115 [code]
- Midfrontal theta power relates to response speeding following frustrative nonreward.Journal: NeuroImageIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, cognitive, 1 reference
- [10] doi:10.1523/jneurosci.0154-26.2026 [code]
- Faster but less precise: expectation enhances response speed while reducing sensory fidelity.Journal: The Journal of neuroscience : the official journal of the Society for NeuroscienceIn common: Signal Processing Toolbox, Statistics and Machine Learning Toolbox, EEG, cognitive, 1 reference
Contribute
The authors of this paper can claim it, correct its record and validate its tracing map, and the maintainers of its code (its owner, or a public member of its organization) correct what it says of their repository; anyone signed in can ask for its removal. Every request goes to OSCR's own machine, which answers it; your account page follows them.
Sign in with ORCID to claim this paper as one of its authors, correct its record or validate its tracing map: when the paper's metadata lists your ORCID iD, you are recognized at once. Maintainers of its code: sign in with GitHub, then claim the repository on your account page.
Claim this paper
Correct its record
Say what each link of this record is, remove the ones that are not the paper's, add the ones that are missing. The correction becomes a new version of the record, in its Versions section.
Validate its tracing map
You validate the map as this page shows it: 1 repository of the authors' code, each at its verified commit and with its license, 15 scripts, and 0 matches between paragraphs and code (see the Code and Map sections). It then receives a DOI on Zenodo, with you (your ORCID iD) and OSCR as its creators; the code itself is not deposited.
The map's fingerprint: sha256:3c57bd29caa638ef…
Add the badge to its README
The badge links the code to this page. Copy one of these into the README of the paper's code: only you decide where it goes, and nothing is changed for you.
Markdown
[, paste the snippet at the top, then “Commit changes…” and, to review it first, “Create a new branch and start a pull request”. You open the pull request; OSCR asks for no permission.
Request its removal
To ask OSCR to remove this record, the copies of its authors' scripts or its tracing map, use the removal request page: signed in, you say who you are, what to remove and why, then review and confirm the request. Published rules decide every request (how).
Discussion, reproductions, activity
Discussion: questions and error reports about this paper and its code, from signed-in readers and its authors. It opens with sign-in.
Reproductions: reports from readers who ran the authors' code: what they reproduced, with which environment, commit and data. It opens with sign-in.
Activity: what happens around this paper: new versions of its record, its map's validation, discussions and reproductions. It opens with sign-in.
