carrien / free-speech

Analysis and plotting code for speech neuroimaging experiments.
MIT License
4 stars 5 forks source link

new fields stimulusText in expt struct #14

Closed cwnaber closed 3 years ago

cwnaber commented 3 years ago

This is a minor change, so I'll plan on merging EOD Friday unless something comes up.

Problem: New experiments, including vsaSentence and taimComp, have stimuli that are longer than one word and do not fit the same format (cf. timeAdapt, where the stimulus was longer than one word, but all followed the same format: "a capper," "a sapper," etc.). There are various functions that assume each cell array in expt.words is only one word long, meaning expt.words cannot contain the full text that the participant will be reading.

Solution: Add three new default fields to expt, namely expt.stimulusText, expt.allStimulusText, and expt.listStimulusText. expt.stimulusText will contain each of the full phrases participants will be shown, and it has a 1:1 mapping with expt.words. expt.allStimulusText is an index for each trial of which item in expt.stimulusText to display. expt.listStimulusText is a character array for each trial of the literal string that will be displayed.

The model experiment has also been updated to use these new features. Not much has changed: the _audapter function now simply sets txt2display based on expt.stimulusText rather than expt.words.

cwnaber commented 3 years ago

Previous commit fixed the issue Carrie requested.