Installation: To get started with
ANSLAB
download a recent ANSLAB zip-archive and extract the archive to a
location of your choice. Make sure that the original folder structure
is preserved. The resulting ANSLAB-folder has the following subfolder
structure. For full functionality, all folders need to exist and be
included in the Matlab path.
ANSLABlib | main m-file folder for all ANSLAB functions |
ANSLABUtil | default option files for axes limits and plot formats.
EmptyStudyFolder for setting up a new ANSLAB study. |
ANSLABTestData | Example data in the format required for ANSLAB analysis. |
ANSLABHelp | ANSLAB help files |
All ANSLAB functions are now available and you can start with the data
analysis. Type ANSLAB to
start a launchpad for
all major submodules.
Each
submodule can also be called by typing its name in the command window
and pressing return (names consisting of only lower case characters
will be recognized). The most important functions are the following:
ANSLABecg
for ECG
analysis,
including interbeat interval (IBI), T-wave amplitude, Q-point
detection, etc.
ANSLABcal and ANSLABspi for fixed volume bag and
spirometer respiration calibration.
ANSLABresp for analysis
of
respiration plethysmography data. Requires ANSLABcal or ANSLABspi to be run beforehand.
ANSLABeda for
analysis
of electrodermal activity.
ANSLABemg for analysis of
tonic muscle activity
ANSLABstl for reflexive
startle
data
anylsis.
ANSLABrat to analyze
continuous voltage-coded rating data.
ANSLABacc to analyze
accelerometer data.
ANSLABppg to analyze
pulse
plethysmography data.
ANSLABco to analyze capnography data.
ANSLABtmp to analyze body
temperature data.
ANSLABbp to analyze
continuous arterial pressure.
ANSLABhelp to open
ANSLAB help-files in the help browser.
User interface: Many of ANSLAB's general programs interact with the user via the command prompt. You are given a list of actions that you can choose by entering the corresponding number and pressing return. Data editing functions however work with graphical input on the figures displaying the data (based on the ginput-function). Therefore, when manipulating data, excluding outliers, interpolating, adding/deleting events, etc., the data figure must be active and the mouse pointer must be over the active figure. This is also true for keyboard-options that use the same ('ginput') response input mode.
The default appearance of the ginput-function in Matlab is the display of a crosshair starting from the edges of the figure. If you prefer to display only a small crosshair, you can change the corresponding line in the 'ginput.m'-file (type 'edit ginput' in the command window) from >> set(gcf,'pointer','fullcrosshair'); << to >> set(gcf,'pointer','crosshair'); <<.
Data preparation:
Preparing your data for analysis with ANSLAB involves the following
steps:
1. Data
format: Save data in tab-separated plain text format,
with sample points as
rows and channels as columns. Do not include channel labels, and make
sure that the correct number of channels (columns) is included in each
file.
Usually this is only the one channel of interest for a specific type of
analysis. Sometimes however, e.g. for respiration or for startle data,
multiple channels are required and they need to be listed as shown in
the table below:
module | columns 1 |
column 2 |
column
3 |
electrocardiography |
ECG | - |
- |
respiration calibration (fixed) |
thorax | abdomen |
- |
respiration calibration (spirometer) | thorax | abdomen |
spirometer |
electrodermal activity |
eda | - |
- |
continuous arterial pressure |
blood pressure | - |
- |
pulse plethysmography |
pulse | - |
- |
capnography |
partial pressure of CO2 | - |
- |
temperature |
temperature |
- |
- |
rating dial |
rating channel |
- |
- |
startle myography |
trigger channel (uprising flank marks onset, downfalling flank offset of startle tone) |
startle EMG | - |
facial myography |
EMG | - |
- |
accelerometry |
accelerometer | - |
- |
Data
can be listed at an arbitrary sampling rate (sufficient to avoid data
loss) because all ANSLAB functions will resample the data to whatever
rate they need.
However, resampling is fastest for channels recorded at parts or
multiples of 400 Hz or 1000 Hz (e.g., 10 Hz, 25 Hz, 100 Hz, 400 Hz, 800
Hz, 1000 Hz, 2000 Hz).
2.
Data folder: Copy the 'EmptyStudyFolder' from the
ANSLABUtil-folder to a
location of your choice and rename it to a 3 character study identifier
(for instance 'tex' for 'test experiment' as in the
ANSLABTestData-folder). This will be your working folder and it's name
will identify the study.
It
is not recommended to use numbers in this identifier (e.g., ab1) since
reduced data file names will have many
numbers specifying subject and data file following this identifier, and
reading these correctly can
then be confusing. Rename the
file 'xxxc.m' inside the
study folder according to your 3 character study name (for instance
'texc.m'). It will store the
respiration calibration coefficients from the respiration calibration
analysis for all subjects. It has 5 columns: subject number,
thoracic band multiplier, abdominal band multiplier, thoracic
multiplier if the abdominal signal is missing, and abdominal multiplier
if the thoracic signal is missing.
3. File naming:
Raw
data to be analyzed needs
to be copied into this study folder. Many files containing the
3-character study name as unique
identifier will automatically be created by ANSLAB programs and stored
in
the subfolders of the study folder. Raw data files
should be renamed using the 3-character study name (e.g.
'tex') followed by a 3 digit subject number and a 2 digit session
number (for instance 'tex00101.txt'). You
can append any string you like after the session number (
tex00101ecglead1.txt ) but you should keep the former parts, because
all the programs use them for saving and naming files with the reduced
data.
The following table provides the meaning of the study subfolders storing your analysis results. Note that not all studies record all channels, so some folders will remain empty.
a |
activity (accelerometry) data |
d |
rating dial data |
e |
pulse plethysmography data |
f |
Finapres arterial pressure data |
i |
interbeat interval (ECG) data |
l |
startle response
electromyography (EMG) data |
n |
averaged EMG data, neck, facial or other tonic EMGs |
p |
capnography (end-tidal pCO2)
data |
r |
respiration data |
s |
skin conductance (EDA) data |
t |
temperature data |
Acknowledgements: Parts of this help function were created with the kind help of Iris Mauss, PhD. Thanks!