Basic dataVals structure
Generating dataVals
Running an experiment generates data.mat and expt.mat files. The base file for data analysis is dataVals.mat. More info about generating dataVals is under the Data Analysis header here: SMNG Code: Quick Start Guide
What's in dataVals
dataVals is a struct with a row for each trial.
Depending on how the experiment is structured, the format of dataVals will be different. More specifically, if your experiment has a single vowel in a trial (stimuli like "bead"), when gen_dataVals_from_wave_viewer
is run, the `bMultisegment` input argument will be set to 0. If your experiment has multiple vowels in a trial (stimuli like "bedhead" or "A gem in the rough needs work to polish."), when gen_dataVals_from_wave_viewer
is run, the `bMultisegment` input argument will be set to 1.
dataVals for single vowels (bMultisegment = 0)
These fields contain the data values themselves.
- f0. Pitch values during the vowel.
- f1. f1 values during the vowel.
- f2. f2 values during the vowel.
- int. The RMS intensity during the vowel.
All of the "taxis" (time axis) fields are the time points which you can align with the data. For example, if dataVals(1).pitch_taxis is [0.500, 0.510, 0.520], and dataVals(1).f0 is [110 105 104], that means that at 500 ms into the trial, the f0 was 110 Hz, and at 510 ms into the trial the F0 was 105 Hz, etc. There are multiple "taxis" fields because the sampling rate is different for the different data types: pitch is reported every 10 ms, formants are sampled every 3 ms, and amplitude is sampled every 0.0625 ms.
- pitch_taxis. The time points aligning to the values in dataVals.f0
- ftrack_taxis. The time points aligning to the values in dataVals.f1 and dataVals.f2
- ampl_taxis. The time points aligning to the values in dataVals.int
Additional fields.
- dur. Vowel duration, in seconds.
- segment. The method of determining the vowel segment.
- If someone used audioGUI to put user events marking the onset and offset of the vowel, the segment should be 'uev1'.
- If the Montreal Forced Aligner was run, the segment name will probably be an ARPABET vowel name, like 'AY'.
- If no user events were placed, the segment name may be 'trial amplitude onset,' which means the vowel onset is the first time the amplitude rose above the minimum amplitude for voicing (in wave_viewer_params.sigproc_params.ampl_thresh4voicing), and the offset is the next time the amplitude dipped below that threshold. In audioGUI, this appears as the first continuous set of formants.
These fields are index references to expt.mat. For example, if dataVals(2).word is 3, that means that on trial 2, the word was the 3nd index value in expt.words (expt.words{3}).
- word. From expt.words
- vowel. From expt.vowels.
- color. From expt.colors.
- cond. From expt.conds.
Additional fields.
- token. The trial number.
- bExcl. A flag for "excluding" the trial.
- 1 means that the trial was marked "bad" at some point during data analysis. This can be done by clicking the stimulus word in check_audio or clicking the word "good" to "bad" in audioGUI. (See steps #2 and #3 in General analysis guide for formant tracking)
- When bExcl is 1, most data fields will be marked empty or NaN. See trial #4 in example dataVals.mat below.
- 0 means a good trial.
- 1 means that the trial was marked "bad" at some point during data analysis. This can be done by clicking the stimulus word in check_audio or clicking the word "good" to "bad" in audioGUI. (See steps #2 and #3 in General analysis guide for formant tracking)
dataVals for multi-vowel trials (bMultisegment = 1)
In experiments with multiple vowels within a single trial, dataVals has the same fields as a single vowel experiment. However, fields which record data about a vowel become cell arrays, where each element in the cell array refers to one vowel.
These fields are formatted differently:
- f0
- f1
- f2
- int
- pitch_taxis
- ftrack_taxis
- ampl_taxis
- dur
- segment
For example, say the stimulus word is "puppy" /ppi/. To get f1 data for the first vowel (//) of trial 4, you would refer to dataVals(4).f1{1}
. For f1 data of the 2nd vowel (/i/) of trial 4, dataVals(4).f1{2}
. For the first 5 formant values of the 2nd vowel of trial 4, dataVals(4).f1{2}(1:5)
. In this example, dataVals(4).segment
would look like [{'UH'} {'EE'}]
.
Sample data
Attached are example expt.mat, data.mat, and dataVals.mat files which demonstrate the general structure. To download, right click the links below >> Save Link As...