This is an old revision of the document!
Table of Contents
plotcurves
Motivation
Some physiological measurements require more human inspection and interaction to be good enough for additional analyses (e.g. in a GSR peak-to-peak analysis). This function allows to visualize parts of a measurement (e.g. GSR data channel) as single curves (e.g. 15-second windows following onsets).
Requirements
The physiological data must be available as a one of the supported object types, ACQ or NTT. It is fairly simple to store any channel data in a new NTT object, if necessary:
- plotcurves_new_ntt.m
% load data from a MAT file load HPS1344_session1_GSR.mat; % create new NTT ntt = xff('new:ntt'); % store data from mat file in ntt ntt.Data = data;
Usually, it is best to first resample the data and then filter the channel which is to be examined (potentially into a new channel):
- plotcurves_pres1.m
% data is loaded in object gsr % this resamples all channels, applying cubic/gaussian resampling % for channel 1 and simple re-indexing for channels 2 through 9 gsr.Resample(100, struct('cubic', [true, false(1, 8)])); % this filters channel 1 into a new channel (10) % all parameters are default, the post-filtering cut-off is set to 0.5s gsr.Filter(1, struct('dest', 10, 'post', 0.5));
Function reference ('help plotcurves')
plotcurves - plot different curves and select those of interest FORMAT: [sel, varc, spot, sets] = plotcurves(obj [, opts]]); Input fields: obj xff object with plotable data or SxC double data opts optional settings .curves Cx2 cell array with names and a 1x3 double array containing [channelnumber, onset, offset] for multiple curves, the mean will be computed .freq data sampling frequency (if not in object) .resfreq resampling frequency .sets Sx2 cell array with names and lists of curve indices .spot Sx1 cell array with Cx1 X or Cx2 x/y coordinates .spotcol Sx3 RGB color (either [0 .. 255] or [0 .. 1]) .spotnames Sx1 cell array with strings .spottype Sx1 cell array with either of {'free'}, 'max', 'min', 'minmax' .var 1xV struct with fields .calc either of 'dx', {'dy'}, 'mean', 'std', 'var', 'x', 'y' .spot 1x1 or 1x2 index into S .trans apply additional transformation to each value, one of {'none'}, 'log', 'log+1', 'sqrt' .varnames Output fields: sel selection (Cx1 boolean array) varc computed variables spot updated spots sets updates sets (new indices)
GUI
This function has its own GUI. Once called (with appropriate parameters), the following dialog will open: