data preparation
The spectral analysis tool of anslab works with an arbitrary signal
previously extracted with other analysis types (ecg, pulse, bp or
other). You specify the signal to be used on the spectral-tab of
the anslab options dialog as shown below for the case of RSA
analysis of the IBI trace. You start the analysis just like
any other analysis by selecting the raw (!) data file you wish to
process. Anslab then looks for the specified variable in the dependant
result data file in the given subfolder of the specified channel type
subfolder of the study folder (ouff...that was a long sentence, so for
the example below, anslab will try to find the ibi0-variable in a data
file taken from the 'ECG Lead II'-subfolder in the ecg-subfolder of the
selected study folder). Anslab assumes that this signal is sampled with
the here given sampling rate (the ibi0 -variable is saved with 4 Hz by
default).
Default settings for welch window size of pts240 works correctly for total signal/interval length of >60 seconds (240 sampling points / sampling rate of source signal (default 4Hz)). If total signal length is <60 seconds you will have to reduce welch window size [pts]. E.g. for 40 seconds to 160 (40 seconds*4 hz). Make sure 'welch window size overlap' is always set to half of the welch window sitze. However, note that calculation of spectral parameters for the low frequency band for segments <60 seconds becomes less stable and other indices are recommended (Wilhelm, Grossman & Roth, 2005)
Wilhelm, F. H., Grossman, P., & Roth, W. T. (2005). Assessment of heart rate variability during alterations in stress: complex demodulation vs. spectral analysis. Biomedical Sciences Instrumentation, 41, 346-351.
timing files
Before loading the data, anslab will check if a spectral-timingfile is
present next to the raw datafile. If so, intervals to be processed will
be taken from that file. A spectral timing file has
the same structure as standard anslab timing files, except that it's
named 'MyFileName.spectral.m'
instead of 'MyFileName.m' (see timing
files for more information). You can create such a timing file by
running
marker
analysis. You can additionally subdivide intervals created with the
marker analysis using
timing file modification
from the tools menu
spectral analysis procedure
Anslab then loads the signal, jumps to the first interval defined, and
displays the signal, an underlying trend and the resulting spectral
analysis Porges RSA signal, complex demodulation and spectral analysis
(power-spectral-density) for this piece of data, as shown
below again for the example of an ibi-signal. In the title of the
topmost axes, stationarity, approximative entropy (ApEn) ,
root-mean-square of successive differences (RMS sd) , and DFA alpha (detrended fluctuation analysis) are
displayed. Stationarity information is based on the uniformly sampled
signal (ibi0 in the shown example), approximative entropy, RMSsd and
dfa alpha are based on the non-uniformly sampled signal specified as
source signal for ApEn in the options file (rt in the shown example).
RSA frequency bands
are colorized and quantified by two extracted parameters: the
mean power of the band (shown just above the x-axis) and the
estimated peak-valley-amplitude this power would correspond in the
raw-data (shown in the legend). Variability of the Porges-filtered and
smoothed signal is also displayed on the legend (V-hat).
You can adjust the interval used for the spectral analysis by
draggin the left and right border of the gray interval-area:
The dynamic section of anslab command window is set to show the
'spectral'-tools that should be used for navigating through segments,
accepting calculated parameters or defining missing data. Hit accept to
jump to the next segment, hit the '<<<'-button to go back to
the previous segment, hit 'clear seg' to reset the currently shown
segment to it's initial range and position, hit 'restart'
to reset al
segment positions and ranges, delete all extracted parameters and
restart with the first segment.
After the last segment has been processed, an overview plot of the
extracted parameters is displayed and you are prompted to select to
save the extracted parameters or quit without saving.
detrending
By default, the trend shown on the raw
signal is removed before running the spectral analysis (although the
removed signal is not displayed). If you do not wish to remove a
trend, select the last trace as active signal, activate display
options setting for one signal at a time (set all/set one-button)
and uncheck the 'detrend'-checkbox in the display section of anslab
command window. You can change the type of the trend by modifying
the trend paramaters in the spectral-options dialog shown above:
polynomial, moving average and lowpassfilter trend types can be used,
with user defined cutoff-frequency, moving average width and polynomial
order.