PSPHA Manual
Armand De Clercq (
[email protected])
User guide for PSPHA LEUVEN version
Table of Contents PSPHA Manual ________________________________________________________________ 0 Introduction_______________________________________________________________________ 5
Chapter 1 The general concept of PSPHA ___________________________________________ 6 STRUCTURE OF THE MANUAL ____________________________________________________ 6 INTRODUCTION _________________________________________________________________ 6 Object based concept _______________________________________________________________ 8 Internationalization ________________________________________________________________ 9 DISCUSSION _____________________________________________________________________ 9 AVAILABILITY ___________________________________________________________________ 9
Chapter 2 How to use the programme. _____________________________________________ 10 INSTALLING THE SOFTWARE ___________________________________________________ 10 INSTALL NEW VERSION_________________________________________________________________ 10
STARTUP _______________________________________________________________________ 10 The first time ____________________________________________________________________________ 10 Normal start-up __________________________________________________________________________ 11 Open command __________________________________________________________________________ 11 Converting data from Affect to PSPHA (.XML) format ___________________________________________ 12
PSPHA normal operation __________________________________________________________ 14 FILE ___________________________________________________________________________________ 14 Display _________________________________________________________________________________ 15 Show / Hide Benchpoints ___________________________________________________________________ 16 Script __________________________________________________________________________________ 16
PSPHA Windows _________________________________________________________________ 18 Keyboard options _________________________________________________________________ 19 Zooming and panning the data window ________________________________________________________ 19 [ en ] markers ____________________________________________________________________________ 19 Pressing M ______________________________________________________________________________ 21
Mouse options ____________________________________________________________________ 21 markers [] _______________________________________________________________________________ 21 Named markers __________________________________________________________________________ 21
Chapter 3 Reading Affect data. ___________________________________________________ 23
Introduction______________________________________________________________________ 23 A (very short) introduction to XML __________________________________________________ 23 XML header _____________________________________________________________________________ 23 TAG ___________________________________________________________________________________ 23 XML element ____________________________________________________________________________ 23 XML hierarchy___________________________________________________________________________ 24 XML attributes. __________________________________________________________________________ 24
Affect data file structure ___________________________________________________________ 25 .PSPDEF tags hierarchy____________________________________________________________ 25 General tags _____________________________________________________________________________ 25 The <signal> TAG ________________________________________________________________________ 25 TAGS in <signal> ________________________________________________________________________ 26
TAG _________________________________________________________________________ 27 TAG __________________________________________________________________________ 27 TAGS in TAG __________________________________________________________________ 27 Formulas _______________________________________________________________________________ 28 PSPDEF example _________________________________________________________________________ 29
Chapter 4 Respiration processing. ________________________________________________ 30 Introduction______________________________________________________________________ 30 Script commands used for Respiration Processing ______________________________________ 30 setup CO2SHIFT AND VOL INV ____________________________________________________________ 31 CO2 CALIBRATION & PNEUMO CALIBATION _____________________________________________ 32 REGION COMMANDS ___________________________________________________________________ 33
Script option for calibration data ____________________________________________________ 34 Pneumo calibration. _______________________________________________________________________ 35
Profile Parameters ________________________________________________________________ 36 Structure of a pneumo cycle ________________________________________________________ 36 A regular breathing pattern _________________________________________________________________ 36 Pinsp: Pause during inspiration. ______________________________________________________________ 39 Pexp: Pause during expiration._______________________________________________________________ 39 Pinexp: Pause between inspiration and expiration. _______________________________________________ 41 Pexpin: Pause between expiration and inspiration. _______________________________________________ 43 Oinsp: Interruption during inspiration _________________________________________________________ 46 Oexp Interruption during expiration __________________________________________________________ 47 Sigh ___________________________________________________________________________________ 50 Insufficient tidal volume (Ovv) ______________________________________________________________ 50 CO2 signal out of range (CO2OOR) __________________________________________________________ 50 Explanation of other output signals. ___________________________________________________________ 51
PSPHA channels. _________________________________________________________________ 51 Algorithm sequence for respiration analysis ___________________________________________ 52 Step1 STARTUP _________________________________________________________________________ 52 Step 2 INIT _____________________________________________________________________________ 52 Step 3: VOLRemoveSpikes _________________________________________________________________ 52 Step 4: CalCulateRefVolandInspTimArray _____________________________________________________ 53 Step5 CO2RemoveSpikes __________________________________________________________________ 53 Step6 NewCalCulateRefCO2 ________________________________________________________________ 53 Step 7 GetExtrema ________________________________________________________________________ 54 Step 8 RemoveSmallTriples / RemoveSmallMarkers / FinalAnalysisOfInterruption _____________________ 54 Step9 PaintPinexpPexpin ___________________________________________________________________ 54
ii
Step10 PaintPexpPin ______________________________________________________________________ 54 Step11 CheckWithCO2 ____________________________________________________________________ 54 Step 12 CLEANUP _______________________________________________________________________ 54 Step 13 ADD_NOCO2CHREGION_BADREGION_BADCO2REGION _____________________________ 55 Step 14 WriteOUT ________________________________________________________________________ 55
Modifying markers by hand ________________________________________________________ 56 Case 1 restore OexpOins ___________________________________________________________________ 56 Case 2 Transform Pexpin and Pinexp _________________________________________________________ 57 Case 3 normal respiration. __________________________________________________________________ 59 Case 4 moving FETCO2 signal in CO data _____________________________________________________ 60
PROCESS CO2 only_______________________________________________________________ 61
Chapter 5 Skin processing. ______________________________________________________ 62 Intro ____________________________________________________________________________ 62 Skin conductance response: calculation after smoothing (Psychophysiological Analysis (PSPHA): A modular script-based program for analyzing psychophysiological data. BEHAVIOR RESEARCH METHODS 38: (3) 504-510 AUG 2006 ) __________________________________ 62 Profile Parameters ________________________________________________________________ 64 SKIN4ALL _____________________________________________________________________________ 64 SKIN __________________________________________________________________________________ 65
Specific options for Leuven. _________________________________________________________ 66 Passive integers __________________________________________________________________________ 66 Sensitivity ______________________________________________________________________________ 66
Algorithm sequence for skin analysis _________________________________________________ 67 SKIN.CSV processing. _____________________________________________________________ 67 SKINBIS.CSV processing. __________________________________________________________ 70 Step 1: calculation of minima/maxima/ inflection ________________________________________________ 70 Step2 skin processing method 1 ______________________________________________________________ 71 Step2 skin processing method 1 RULE exceptions _______________________________________________ 72 Step3 skin processing method 2 ______________________________________________________________ 76 Step3 skin processing method 3 ______________________________________________________________ 76 Step4 skin processing SCL (method 4) ________________________________________________________ 77
Chapter 6 EMG processing. _____________________________________________________ 79 PROFILE PARAMETERS _________________________________________________________ 79 EMG __________________________________________________________________________________ 79 startle_probe ____________________________________________________________________________ 81
Algorithm sequence for EMG analysis ________________________________________________ 81 EMG.CSV processing. _____________________________________________________________ 81 EMGBIS.CSV ____________________________________________________________________ 82 The smoothing algorithm: FIR filter _________________________________________________ 85 What is FIR filtering ______________________________________________________________________ 85
RUN after EMG for all trials. _______________________________________________________ 86 STEP1: MEAN __________________________________________________________________________ 86 STEP2: STDEV __________________________________________________________________________ 86
Chapter 7 ECG processing. ______________________________________________________ 89
iii
PROFILE PARAMETERS _________________________________________________________ 89 ECG ___________________________________________________________________________________ 89
APPENDIX: UPDATES 29/9/2008 ___________________________________________________ 92
iv
Introduction In psychophysiological research complex tailor-made and interactive analyses of biosignals (e.g., skin conductance, heart rate and respiration) are often required. Moreover, a synchronization between experimental stimuli and psychophysiolgical responses is necessary. PSychoPHysiological Analysis (PSPHA) is a modular script-base program for analyzing biosignals in the time domain. PSPHA is a free, interactive and flexible program for analyzing data of psychophysiological experiments. Chapter 1 describes the general concept of PSPHA. Chapter 2 How to use the programme. Chapter 3 describes the definition file for reading Affect data. Chapter 4 describes the respiration processing Chapter 5 describes skin processing Chapter 6 handles EMG
Opmerking [A1]: Chapter 7 is verwijderd en zit nu in DEEL2
Introduction 5
1
Chapter
Chapter 1 The general concept of PSPHA STRUCTURE OF THE MANUAL This manual is composed of three parts PART1 (the one you are reading now) describes PSPHA for the experimenter. PART2 describes the internal structure and programming options in PSPHA. It is intended for the user who wants to understand some internals of PSPHA. It strongly encouraged not to modify PSPHA based on this knowledge. PART3 describes application options for PSPHA. It is intended for students and other first time users. PART1 and PART2 are written by the PSPHA developer (A. De Clercq), PART3 is created by the end users in Leuven. INTRODUCTION This chapter is a adapted version of our article1. Psychophysiology covers a broad range of research topics, ranging from stress reactivity to the detection of deception. Often, researchers investigate the effect of an experimental manipulation (e.g., lying vs. truthfully answering) upon physiological signals, such as sweating, respiration, brain waves or cerebral blood flow. A number of software packages exist to analyze psychophysiological data. Some of these packages are for use in clinical settings, in which one is mainly interested in steady state signals. In experimental studies, the immediate change of physiological parameters as a response to an event is of critical importance. Several commercial and non-commercial programs exist that allow synchronization between experimental stimuli and physiological responses. Most often, these software programs are written for one particular psychophysiological signal, and do not allow the analysis of multiple signals and/or their interaction. Our program to analyse psychophysiological responses, PSPHA, overcomes these disadvantages: (1) it is written in an internationally accepted computer language (Visual Basic 6, VBS, VB.NET), (2) it allows synchronization between experimental stimuli and psychophysiological responses, (3) it allows improvement of the signal-to-noise ratio (e.g., through smoothing or finite impulse response [FIR] filtering) and data reduction of multiple 1
De Clercq A, Verschuere B, De Vlieger P, G. Crombez. Psychophysiological Analysis (PSPHA): A modular script-based program for analyzing psychophysiological data BEHAVIOR RESEARCH METHODS 38 (3): 504-510 AUG 2006
The general concept of PSPHA 6
signals and their interaction, (4) it is flexible, interactive and free to use. PSPHA is user-ready for analyzing electrodermal, cardiac and respiratory data and for electromyography recordings: (EMG) or the interaction between measures (e.g., respiratory sinus arrhythmia: RSA). PSPHA reads data sets that are created with VPM (Cook, Atkinson, & Lang, 1987), but because VPM is not a generally used format, reading data sets in a delimited format is preferred. The LEUVEN version has also the possibility for reading data created with Affect2 Most other data forms may be converted to such a delimited format. For signal enhancement and data reduction, data are displayed on screen. In PSPHA all or a set of selected channels can be displayed. The data can be zoomed or panned. Figure 1 shows a typical window. Also experimental markers, which are used to indicate the occurrence of external events, such as the beginning or ending of a stimulus, the subjects’ response or noise (e.g., coughing) can be displayed or hidden. The program provides an easy to handle format for data editing and parameter extraction. Data analyses are performed by selecting an item in the script menu For the LEUVEN version there are two scripts menus used: LEUVEN2007 for normal data processing and LEUVEN2007_CALIB that is used for respiration calibration. In fact these two scripts menu's make the PSPHA version for LEUVEN and Ghent different. The base software is the same for both versions. PSPHA consists of a limited number of base functions. The most important ones are those for calculating minima and maxima (or alternatively: inflection points) within particular time windows. In many situations these functions are sufficient to calculate the most widely used physiological parameters, such as SCR-amplitude, T-wave or R-peak in the ECG signal, or the depth of breathing (amplitude). After parameter extraction, the physiological parameters are stored as internal markers (e.g., MIN, MAX,…) and added to the screen. This strategy allows the experimenter to visually inspect and correct the data and the proposed parameters. Finally, the data and parameter output are converted to any format for processing by statistical packages.
Figure 1 The user has two possibilities to adopt PSPHA to their own need: by creating the XML PSPDEF file that describes how Affect data must by converted into PSPHA data.
2
http://ppw.kuleuven.be/leerpsy/affect4/index2.php
The general concept of PSPHA 7
Opmerking [A2]: {19/9/2008} {ADC1/1}Daar het niet de bedoeling is om de scripts van PSPHA aan te passen is de referentie daarna verwijderd.
Object based concept PSPHA uses a hierarchical object oriented approach for storing and analyzing data. Data are read in the program as a collection of trial objects. Each trial object consists of a collection of parameters for storing general information (e.g., trial number, participant number, SCR amplitude), and of a collection of data objects, one for each physiological channel. The data object contains the binary data but also marker objects. Marker objects are of crucial importance for data reduction. Experimental markers indicate the occurrence of an external event. Internal markers refer to calculated items such as minima and maxima.
The general concept of PSPHA 8
Internationalization In some European countries the decimal separator is the comma and not the point. PSPHA uses the point as default DISCUSSION PSPHA offers a freeware alternative for dedicated commercial and non-commercial software for analyzing psychophysiological data. Because experimenters want specific parameters from their data, it is almost impossible to accomplish this in one standard program. Because PSPHA has a modular structure it can be easily adopted to the end user needs. AVAILABILITY The software described in the original article is available for nonprofit use under the Gnu General Public License (GPL). The terms of the GPL open source license are described at the Web site http://www.opensource.org/. The complete program including source, a ready to install binary version and example data can be downloaded from http://allserv.ugent.be/~adeclerc/PSPHA. The PSPHA version described in this document however is only intended for Ghent and Leuven. It is the responsibility of the Ghent (Crombez) and Leuven (Van den Bergh) team for distributing this version. The availability of the program source for this version must still be discussed.
The general concept of PSPHA 9
2
Chapter
Chapter 2 How to use the programme. Opmerking [A3]: {20/9/2008}{ADC2/ 1} De installatie procedure is bijgewerkt.
INSTALLING THE SOFTWARE INSTALL NEW VERSION The new version (as from FEB 2008) is completely created in VB.NET You do not need to remove older versions with every update. Just double click on the file: YYMMDD_PSPHA.exe from http://users.pandora.be/armand.de.clercq/krasna/LEUVEN/ choose Uitvoeren / Execute. Windows will warn you that this program is from an unknown source: click execute (uitvoeren) Click on all OK's that appears. A shurtcut is created on the desktop. Note: do not use the START>programs>RUG_PSPHA>RUG_PSPHA any longer. This starts the older VB6 version. STARTUP You start PSPHA with the PSPHA shortcut on the desktop The first time If you start PSPHA for the first time (or when you deleted the C:\Program Files\PSPHA subdirectory) PSPHA asks: A new GROUP will be created. What is your site? Always answer LEUVEN. The word "site" means the version. You must type LEUVEN to get the "LEUVEN PSPHA" version
How to use the programme 10
Normal start-up After that PSPHA starts with:
File options:
Figure 2 File menu Open: reading new data (see below) Exit: exit PSPHA without saving work Open command After clicking on open the following window appears:
How to use the programme 11
Figure 3 Open options The last 2 options (VOLCOUS and VOLCOUS2) Are just used for reading data that that were collected by Ilse in the US. VOLCO (LEUVEN) was intended for reading old data that were created before Affect. The only options that count here are: LEUVEN (2007) .PSPDEF Default (*.xml) Converting data from Affect to PSPHA (.XML) format You do this by selecting the LEUVEN (2007) .PSPDEF option. The structure of the .PSPDEF file will be explained in chapter 3. When you open a .PSPDEF file the following windows appears:
How to use the programme 12
Figure 4 selecting a GROUP This is just an example. The content of this window is just an example and depends on the user. When you open PSPHA for the first time, and LEUVEN as site is selected, an empty GROUP.XML file is created. How these groups are created will be explained later. In fact a "group" contains at this moment VOLINV that indicates of the respiration volume was inverted or not, and SHIFTCO2 for the time shift of the CAPNO signal. More parameters can be added later (this cannot be modified by the user!). You can select CANCEL if you do not know the group. After a little time the data is displayed (see next). In fact the conversion from Affect into PSPHA data is done with PSPHAIMP, a separate programme that is started within PSPHA.
How to use the programme 13
PSPHA normal operation After reading the data the next windows appears:
Figure 5 PSPHA screen On the menu line you have 5 items (File, Action, Display, Script & Show Benchpoints) which always appear. The rest depends on the data. In most cases there are 2 items for each data channel: The RAW data, imported from affect and the data after conversion. The type of conversion depends on the kind of data and will be explained in Chapter 4 & 5. FILE
Figure 6 FILE MENU Close: closing data (when opened) Add: In the original design of PSPHA(LEUVEN) it was intended to design just one .PSPDEF file that contained information from all the partial data (Respiration, skin, EMG, etc) . This has the advantage that a survey is possible between all the partial data. In practice, researchers created .PSPDEF files for each partial data set. With the Add option you can still merge the partial data sets to compare each data part. When selecting the Add option the same menu as for opening a file appears. The order in which you add the data does not matter. You cannot save parts as a (new) data set. Note that when PSPHA is processing data a single menu option: JOB>STOP appears. This option can be used and ... (tries) to stop de calculation/processing immediately. The "state" of the calculations after stop is unpredictable!)
How to use the programme 14
Opmerking [u4]: [L2/1] Kunnen we hiervan een voorbeeld krijgen? Bovendien: is de volgorde bepalend waarin we signalen toevoegen, is het van belang welk signaal eerst wordt geopend? Zijn er restricties aangaande de data: moeten ze bijvoorbeeld aan dezelfde frequentie gemeten zijn? Opmerking [A5]: {20/9/2008}{ADC2/ 2} Bovenstaande opmerking is bijgevoegd in de tekst. De extra menu opties die van geen nut zijn voor de experimentator zijn verwijderd.
Display
Figure 7 Display options X is the time scale in Seconds. All data samples are converted and placed on the exact absolute time. The base time unit of PSPHA is 1 millisecond. All data samples and markers are always saved as a whole count of milliseconds. This means that PSPHA NEVER can accept data with a sample rate with a corresponding sample time that is not a whole number of milliseconds. (this is always correct for Affect data) X: Full Scale: All the data is displayed in the window. X: Zoom between markers. ([] markers are discussed in "mouse options"). Remember that data can be Zoomed in and out with the mouse (see "mouse options") Y: Fill screen range. This is perhaps the most used setting for the Y (data) range. It always adjust the data scale and offset in such a way that the data "fills" the window. For every adjustment in the start point and data range on screen the scale is adjusted. Y: Full scale : Data is displayed with Y set to the full scale of the input data. In fact the minimum / maximum depends on the ADCLOWCUTOFF / ADCUPCUTOFF parameter defined in the LEUVEN2007.TXT script; At these moment the values are: Parameter ADCLOWCUTOFF ADCLOWCUTOFF ADCUPCUTOFF ADCUPCUTOFF ADCUPCUTOFF ADCUPCUTOFF ADCUPCUTOFF ADCUPCUTOFF
Channel DEFAULT CH2 (CO2-capno) DEFAULT REFVOL REFCO2 REFINT FLWCAL VOLRAWCL
Value -30000 -60000 30000 1000 10 10000 0 0
Table 1 ADCLOWCUTOFF / ADCUPCUTOFF values In all cases where no specific value is given the DEFAULT value is used Y: -1024-+1024: Y: 0-1024: Y: 0-+2048: 3 3
The 4 Y values discussed above are here for historical reasons. As data is imported from Affect, they are not very useful and should be replaced with something else are removed at all
How to use the programme 15
Take fixed values for the mimimum/maximum on screen. Y: Subject range: Display minimum / maximum is calculated for every data channel (over all trials). As this option is here on demand of Ilse (10-maart-2007) it is a useful menu option for PSPHA-LEUVEN Y: CO2 0-6: Sets display MINIMUM=0 and MAXIMUM=6 for CO2 (capno) only. Show / Hide Benchpoints Most of the parameters in PSPHA are calculated from data MAXIMUM and MINIMUM. Besides this PSPHA can also calculate Benchpoints4
Script The word script refers to menu options that are defined in the script associated with the data. At this moment there are two scripts active for PSPHA-LEUVEN: LEUVEN2007.TXT for all data processing and LEUVEN2007_CALIB.TXT for calibration processing. This means that for those two applications the Script options differs.
Figure 8 Script options for LEUVEN2007.TXT The meaning of the different commands will be discussed in the appropriate chapters.
4
A benchpoint (=inflection point) is a data point where the first derivative has a maximum or minimum. It can be used in skin processing
How to use the programme 16
Opmerking [A6]: {20/9/2008}{ADC2/ 3} De script commands voor respiration processing zijn verschoven naar H4 zoals gevraagd. Zo ook deze voor SKIN en EMG
Bug cleanup: This command does what it says... remove bugs in older XML data. Useless for new data. modify group name / remove group (in case there is no group, you need making one with setup shift CO2...): One of the (rare) commands that explains itself. For definition of a group see Figure 4 selecting a GROUP. info concerning data processing: Selecting this command displays an older help file. You should not use this command for information. All relevant info from this help is incorporated in this manual.
How to use the programme 17
PSPHA Windows PSPHA consist of 2 Main Windows. Window1 contains the data, Window2 displays the output data. Place and size of each window can be changed. PSPHA remembers the place and size.
Figure 9 Typical PSPHA data and output screen The data in the title bar of the data windows contains the file name, the current trial. Values for left and right markers are displayed too.5 The trial number displayed here is the absolute trial numbers. It always starts with 1 and count up to the total numbers of trials stored in the data file. This can differ from the experimental number as seen in the output window. The output window's title bar contains (among other) the following information: ST: sample time (100ms in this example = 10Hz). SMP: number of samples in this trial. Messages such as "NO SPIKES" and SCO2 (CO2 shift) have no meaning in this (skin) data example.
5
Sometimes erroneous information is displayed in the title bar at start but it disappears when the markers are used.
How to use the programme 18
Keyboard options Keyboard options are still (in this age of windows and screen buttons) an easy and very fast method of using commands but... you must know what they are. Zooming and panning the data window Besides the Display options (see Figure 7 Display options) Data can be moved and zoomed with keys: ALT+UPkey: zoom in ALT+DOWNkey: zoom out ALT+LEFTKey: move window to left. (this means lower display time) ALT_RIGHTKey: move window to right (this means greater display time) ALT-left-mouse:
zoom in with mouse cursor as centre
[ en ] markers To markers can be set. press ESC and click on left or right mouse button. Both markers are displayed and the Channel number, value and time are displayed in the title bar.
Figure 10 [ and ] markers Attention: When mouse buttons are clicked without pressing ESC a warning message appears:
Figure 11 Markers can be set separately for each data channel.
How to use the programme 19
For a (pneumo) volume, clicking displays a typical figure like this:
Figure 12 pneumo selection The exact meaning of the options depends on the markers that are on both sides of the "clicked" place. Markers can be volume maximum, minimum or the start/end of an expiration pause. See chapter 4 for full details.6
6
The option: "Select with F1/F2 key pressed + left/right mouse click will select nearby Maximum or Minimum" as explained in the help file does not work here!
How to use the programme 20
Pressing M Pressing m displays information concerning the marker nearby the mouse pointer
Figure 13 Additional marker information Some information is only relevant for certain data types. SRC, I_INFO, I1_INFO, Message and CO2TIM are used for test during development of PSPHA. CHANNEL, NAME, Amplitude (from marker) are always relevant. EndRegion is used for breath analysis in Ghent only Mouse options markers [] See above.
Named markers Named markers are defined by clicking on the INSERT key from the keyboard.
Figure 14 A named marker is inserted on the place of the [ marker They are displayed on the data screen between {} . Pressing the DEL key shows a list like this:
How to use the programme 21
Figure 15 marker list click on a marker to remove it. Go to named {} marker: press g and select from list User defined markers cannot contain { or } and are displayed as {name} Besides that, there exists a number of system defined markers such as: {{BADR}} defines bad region They always start with {{ and end with }}. System defined markers cannot be removed.
How to use the programme 22
3
Chapter
Chapter 3 Reading Affect data. Introduction A .pspdef file must be created for each Affect data set. This file must conform with the XML standard A (very short) introduction to XML The Extensible Mark-up Language (XML) is a general-purpose mark-up language.7 It is classified as an extensible language because it allows its users to define their own tags. Its primary purpose is to facilitate the sharing of structured data across different information systems. XML is recommended by the World Wide Web Consortium. It is a fee-free open standard. All data in PSPHA conforms to this standard. This is of little concern for the PSPHA user because he/she is never allowed to modify the XML data be hand. Things are different for the .PSPDEF file because the user has to create this file by hand (or copy the structure of an existed file) XML header If you look at an (normal) XML file you see on top a header that starts with:
To make it easy for the user, this header is not necessary for a .PSPDEF file. You can start with the tag hierarchy. TAG A TAG is just a name enclosed between <> bracket. <signal> is a opening tag is a closing TAG XML element An XML element is text enclosed with an opening and a closing TAG like this: <signal>any XML structure
You can use more than one line:
<signal>any XML structure
7
This text is from http://en.wikipedia.org/wiki/XML
Reading Affect data 23
also works. It is preferred that all TAG names should be in lower case. XML hierarchy An XML element works like a Russian matrouscka. You can put an XML element in an XLM element in an XML element... Every element can contain as much XML elements as you wish. example: <signals> <signal> results_capno.txt <sampling_rate>50 yes 7.5 1 value
As mentioned before, new lines are optional. This is correct too... <signals><signal>results_capno.txt<sampling_rate> 50yes 7.51 value
...but totally unreadable (for a human) XML attributes. Any XML opening TAG can have attributes in it. These are a series of names followed by their value. Note: values are always between "". Example: <signals datatype="calibcapno" out_name="calibcapno"> <signal name="capno"> 1 value 2 trial 3 timing
The TAG <signals> has two attributes (datatype and out_name)
Reading Affect data 24
Affect data file structure Affect makes one tab-delimited text output file for each signal in an experiment. Each file starts with a header line (although this is not needed). Subject Trial CS+trial 31 0 0 10 31 0 0 20 ...
CS-trial -44 -42
Time
Pneumo
The .PSPDEF contains a series of nested XML TAGS describing the meaning of each column in the Affect output file. .PSPDEF tags hierarchy General tags On the top of the hierarchy is the signals TAG <signals datatype="data" out_name=".."> ..... signals has two attributes datatype values: "data"
this is a normal data set
"calibcapno"
capno calibration data set
"calibpneumo"
pneumo calibration data set
out_name ".."
The directory name is used as output file name
"output file name"
The <signal> TAG <signals> <signal name="xxx"> ... <signal name="xxx"> ...
Reading Affect data 25
...
There is one <signal> TAG for each affect output file8. <signal> has one attribute name with possible values: "pneumo", "capno", "skin", "emg", "ecg" These are the five different signal types that PSPHA recognizes at this moment.
TAGS in <signal> <signal> can contain nine possible TAGS: xxx
xxx is the affect data file name
<sampling_rate>nnn
nnn sample rate is this data 9 10
ttt timing_type >
ttt tells how the time for each sample is expressed. There are 2 possible values: msec timing in milliseconds (integer) HMS timing as H:M:S:MSEC This TAG is optional. The default value is msec
yes < calibration_file >xxx calibration_file >
The first header line in the affect output data file be omitted is this tags is no. This option is not implemented yet. Select calibration in PSPHA! xxx=absolute means that the data is already calibrated
< co2_percent >nnn co2_percent >
Can only be used in calibcapno data This is the same parameter as discussed in chapter2 (Fout! Verwijzingsbron niet gevonden.). The nnn value is the experimental value.
8
Keep in mind that one .PSPDEF file can be created for all affect data output files or you can create different .PSPDEF files and add all output data for one experiment together with the PSPHA add option. 9 Keep in mind that, although sample rate is defined here, the corresponding sample time in milliseconds must be a whole number (integer). 10 All data sets in one experiment can have different sample rates. PSPHA will always display data correct in milliseconds or seconds.
Reading Affect data 26
Opmerking [u7]: [L3/1]Best opsplitsen in twee soorten data: “FLOW” en “VOLUME”. Dat sluit beter aan bij wat we meten en wat er dus in de datafiles staat. Op die manier zal er ook minder verwarring zijn wanneer de mogelijkheid om volumedata te lezen volledig geïmplementeerd is? Opmerking [A8]: {21/9/2008:}{ADC3/ 1} Dit lijkt mij een onterechte opmerking. flow of volume blijven een pneumo signaal. De verwerking is identiek. Het onderscheid dient dus gemaakt door een extra eigenschap van pneumo Opmerking [u9]: [L3/2] Als de timing van de eerste sample niet overeenkomt met deze sample rate, worden de data voor die trial niet verwerkt. Dat probleem duikt op bij SKIN-data. Voorbeeld: sample rate = 10 Hz, eerste timing-waarde = 105. Dan krijg je een error-message en worden de data niet verwerkt. Dit is ook soms ook een probleem bij ademhaling Waarom 1) is dat geen probleem bij EMG 2) Mogen er in een trial wel samples verloren gaan, maar niet bij aanvang van een trial? Opmerking [A10]: {21/9/2008}{ADC3 /2} Mag uiteraard geen probleem zijn. Gelieve een voorbeeld op te sturen waar het fout loopt.
This parameter is optional. The default value is 7.511 < pump_volume >nnn pump_volume >
Can only be used in calibpneumo data This parameter is optional. The default value is 1000 (1 litre gas)
<delimiter>name
Default is tab but comma is possible
Adds a formula. Formulas can be used to generate extra active Booleans (see below)
< columns>.... columns>
is described next
Opmerking [A11]: {21/9/2008}{ADC3 /3} Zoals in de e-mail aangegeven is de starle_probe optie nu vervangen door een formule.
TAG The tag contains a series ... tags. One for each column in the affect datafile. TAG has one attribute: name It is preferred that the name value corresponds with the header name from the column, but... this is not checked. The exact meaning of each column is defined by the sub TAG . TAGS in TAG nnn trial timing value
passive integer
nnn is the column number (between 1 and 64) trial number The exact time of this sample (default is milliseconds)12 The sample value. This is an integer as measured by the ADC converter and swings between -V and +V (V=1024/2048/4096)13 or is an absolute value A user defined signal. The value must be constant during a trial. Thus a "passive integer" is considered as a trial property. The column name and its value are shown as an extra column in the output data file.
11
Keep in mind that you can use decimal point and decimal comma as decimal separator. As Affect runs under Windows there are sometimes timing errors. Recording the timing of every sample is a powerful option from Affect to detect such errors. It gives PSPHA the opportunity to make the necessary corrections. 13 An ADC value of +V or -V for a number of consecutive samples indicates ADC saturation. The analogue signal is out of range for the ADC converter and the ADC value is meaningless. 12
Reading Affect data 27
Opmerking [u12]: [L3/3] Maar voor de active booleans CS / US / Start_insp (en bij uitbreiding active integer sensitivity) zijn toch headers nodig? Hoe kan het anders werken – is de volgorde bepalend? Bv. neemt PSPHA altijd eerste active boolean als CS, tweede = US, … Wat dan met start_insp? Belangrijke vraag is of CS / US en start_insp kunnen worden gecombineerd en hoe dat dan juist moet gebeuren [zeker als we “has headers” af zetten] Opmerking [A13]: {21/9/2008}{ADC3 /4} has headers heeft nooit een betekenis daar de naam van een data colom in de PSPDEF file (onder ) gegeven wordt. Opmerking [u14]: [L3/4]Zijn de aantallen van de passive-attributen gelimiteerd? Hoeveel passive integers maximaal? Hoeveel passive booleans maximaal? Opmerking [A15]: {21/9/2008}{ADC3 /5} Er is geen beperking aan het aantal passive integers.
passive boolean
A user defines signal. A passive boolean must have values of 0 or 1. The column name and its value is shown as an extra column in the output data file.
passive string
A user defined text. The column name and its value is shown as an extra column in the output data file.
passive boolean marker
A user defines signal. A passive boolean must have values of 0 or 1. Every change in a trial is considered as a marker. The name of the marker indicates the change. This tag can only be used with the " passive boolean marker" type. It indicates which state transitions will be considered as markers. There are 3 values: both, 0to1 and 1to0. The default value is both. This tag can only be used with the " passive boolean marker" type. The 0to1 up to 1to0 region is indicated with a bar. The color of the region bar or marker. Possible colors are: Case RED, DARKRED, BLUE, PURPLE, YELLOW, GREEN, BLACK, GREY, DARKBLUE, DARKGREEN, PINK, GREENBLUE, LIGHTBLUE, LIGHTBROWN, LIGHTYELLOW, WATER An active boolean has a special meaning for PSPHA. A active boolean must have values of 0 or 1. Every transition from 0 to 1 is considered as a marker. The meaning of this marker depends on the data signal. An active integer has a special meaning for PSPHA. At this moment there is only one value name: "Sensitivity". sensitivity is only possible for skin and EMG signals. See Figure 62 sensitivity parameters for SKIN data and Fout! Verwijzingsbron niet gevonden.
xxx
<stripe/>
CCC
active boolean
active integer
Formulas With a formula you can add additional active booleans (ACT:MARKER in the data). example: S.AM("TEST1","$CS=1 AND $T1=1"),
Reading Affect data 28
Opmerking [u16]: [L3/4] Is deze nog nodig? Kunnen worden opgenomen in de ‘Passive Integer’ categorie. Opmerking [A17]: {21/9/2008}{ADC3 /6} Opmerking is niet geheel onterecht maar het was zo opgegeven in de oorspronkelijk definitie
Opmerking [A18]: {21/9/2008}{ADC3 /7} Er werd hier gevraagd of active booleans niet zouden kunnen uitgebreid worden met een formule. Dit is nu aanwezig (zie tekst hieronder)
Whenever in the formula the name of the active boolean is preceded with a $ ($TEST1 in this example) becomes 1 the active boolean generates a transition from 0 to 1. Signal names in the formula must be preceded with a $. Signals can be other active or passive boolean or active boolean markers. In the example above TEST1 will be 1 when CS AND T1 are 1. If a formula contains "S.AM("NAM",,N) with NAM as test symbol and N a digit, an active boolean will start at N (TIME in milliseconds) with name: NAM. example:
S.AM("X",,500)
More then one active boolean can be generated in this way as in the next example: S.AM("X",,500) S.AM("Y",,1000)
PSPDEF example The next figure shows data with markers as defined by this pspdef code: 6 passive boolean marker both <stripe/> RED 7 passive boolean marker BLUE
Figure 16 Markers
Reading Affect data 29
4
Chapter
Chapter 4 Respiration processing. Introduction Respiration processing is the most specific part of the PSPHA LEUVEN version and is totally different from the GHENT Respiration processing. It is based on the original Pascal programme written by M. Cauberghs. (hypven99) and described in the report : "Algorithms for the analyses of volume and CO2 breathing signals" written by Stephan Devriese (2004). Although it is possible to recognize the original analysis, hundreds of hours of work of myself and a lot of help from Ilse have transformed the original algorithms in a new version. Respiration analysis is done in a number of different steps that will be explained in this chapter. Script commands used for Respiration Processing
Figure 17 Script options for LEUVEN2007.TXT Process data pneumo-CO2: This is the standard data processing for the pneumo/capno data.
Respiration processing 30
Most of this processing is "inspired from the "verwerk" programme that was used before PSPHA. It is explained in detail in this chapter. Process data CO2 only: will be explained later Attention: Lifeshirt data is already calibrated. For other data, you cannot do respiration processing if there is no calibration data given. Calibration parameters are defined with the menu options: CO2 CALIBRATION and PNEUMO CALIBATION. If no group was specified (see Converting data from Affect to PSPHA (.XML) format) PSPHA will crash with the message:
Figure 1814 Process SKIN: , Process EMG:, Run AFTER EMG for ALL trials: see chapter 5 for details of processing ModifyProfileParameters: See Profile Parameters later in this chapter setup CO2SHIFT AND VOL INV See chapter 4 for more information With this command it is possible to adjust the CO2SHIFT of the capno signal and set an indication if the VOLUME signal was inverted or not. Those options will be used for all new data converted from Affect that share the same group, as indicated by the warning message:
Opmerking [u19]: [L4/1] Ging dit niet gelinkt worden aan de calibratie? De eerste flow uit calibratie is – per definitie – INspiratie. Kan dat mee in de calibratiewaarden verrekend worden? De functie “invert volume” kan dan wel blijven bestaan voor als iemand een fout maakt, maar niet default. Graag duidelijkheid over of er al rekening wordt gehouden met de ‘richting’ van de calibratie. Opmerking [A20]: {20/9/2008} {ADC4/1} De functie moet zeker blijven bestaan voor die data waar geen calibratie wordt gedaan. (lifeshirt???)
Figure 19 : GROUP warning
14
In earlier PSPHA versions this message was in Dutch!
Respiration processing 31
Figure 20: Windows for adjusting CO2shift. What you see is the CO2 signal (blue) and the pneumo signal. The blue Window bar above tells you what to do: you can shift the CO2 signal up are down using ALT+left/right cursor keys or CTRL+cursor keys. The increment is 50 or 250millisec. Pressing the "I" key toggles the NORMAL/INVERTED volume status. Keep in mind that you select the correct window (this from Figure 20: Windows for adjusting CO2shift.) before pressing the keys. Typing Y ends the session and shows the group screen (Figure 21: Group screen). The group names shown are an example and are those created by the actual user. You can select a group, cancel the whole operation are add a new group. Changing the group parameters do NOT change already converted data to PSPHA (XML) form. It affects only data the will be converting from Affect or other input source to XML
Figure 21: Group screen CO2 CALIBRATION & PNEUMO CALIBATION The calibration procedure is explained in chapter 4. At the end of this calibration process, two .INI files are generated with the filename given by the experimenter. Select the appropriate file for calibration
Opmerking [u21]: [L4/2] Waarom hier een negatieve waarde? 1) Wat is het logaritme dat gebruikt is om deze waarden te berekenen? 2) We kunnen dus in theorie zelf deze INIfile maken. Opmerking [A22]: {20/9/2008}{ADC4 /2}De beschrijving van de inhoud van de .INI files is weggelaten; Je mag er immers toch niets aan veranderen.
Respiration processing 32
REGION COMMANDS Region commands control the data processing in specific data areas. Region commands are controlled by 2 markers [ and ]. They are created by holding down the ESC key while clicking with LEFT([) or right (]) mouse button.
Opmerking [u23]: [L4/3]Niet makkelijk te begrijpen als ademhalingshoofdstuk nog niet gelezen. Samen met CO2Shift en VolInvert naar hoofdstuk over ademhaling Opmerking [A24]: {22/9/2008}{ADC4 /3} is uitgevoerd
mark END OF DATA IN PNEUMORAW (CH3) : use esc+[ :" Data after the [ marker are no longer used for processing and for calculating the drift compensation in the pneumo RAW VOLUME data. Note that there is no drift compensation for the FLOW pneumo data from Affect. mark REJECT region use esc+[ and esc+] (only CH1: VOL): NO CO2 check use esc+[ and esc+]. Where you can use NO CO2 check is discussed later in this chapter. select one bad CO2 region (BADCO2) use esc+[ and esc+]: See chapter 4 under OUTPUT DATA, for the meaning of a REJECT region and CO2 commands. Adjust PAUZE DURATION FOR CO2 check (in millisec) (-1=desable): See later in this chapter for information concerning PAUZE DURATION. This command has 3 possible values:
Figure 22 three value form Default Value is defined in the LEUVEN2007.TXT script and cannot be changed. You can override this value for one for the whole experiment or for one particular trial.
Respiration processing 33
Opmerking [u25]: [L4/4]Wat doet dit commando en waarop is dat dan een uitzondering (of: en wat doe je niet door dit te gebruiken)? Staat vermoedelijk uitgelegd in Chapter4 Opmerking [A26]: {22/9/2008}{ADC4 /4}I s verplaatst en extra zin is bijgevoegd
Script option for calibration data For an XML file with (capno or pneumo) calibration data, a different script is used (LEUVEN2007_CALIB). As such, the script menu option shows different items. Input data is defined as normal or as calibration data by options in the .PSPDEF file (see chaper 3)
Figure 23 : Calibration options GENERATE CALIB DATA : generates the .INI file contain ing the calibration parameters (see "CO2 CALIBRATION & PNEUMO CALIBATION" above)
Respiration processing 34
ModifyProfileParameters shows 4 parameters:
Figure 24 Profile Parameters for calibration De values after G= are values for all experiments. You can override this with a value for one particular experiment by adding : E= . Note that parameters must be separated with ; CO2MAX: The default value (7.5 %) can be overruled for this calibtation. CO2 LOW/HIGH trials: A CO2 calibration file exists of 2 trials. The first is the "LOW" value, the second the "HIGH" value. When the experimenter generates erroneously more trials the good LOW and HIGH trials can be overruled by adding an E= parameter.
Pneumo calibration. Pneumo calibration is more complicated. There are 4 trials. Only Trial 2 and 4 are used. They consist of 6 consecutive cycles of pumping 1 litre gas through the apparatus. Values are gas flows. PSPHA integrates the flow over each cycle. A visual result of this calculation is seen on screen (see next figure)
Opmerking [A27]: {22/9/2008}{ADC4 /5} Als u mij een voorbeeld data set stuurt waar deze volgorde omgekeerd is kan ik vol invert bijvoegen.
Figure 25 Pneumo calibration.
Opmerking [u28]: [L4/5] Cf. hoger: afhankelijk van de {{UP}} of {{DOWN}} van eerste pump, kan het signaal toch worden geïnverteerd? Is dit al geïntegreerd of niet…
Respiration processing 35
Profile Parameters The Respi TAB in the profile parameters contain en number of parameters that wille be discussed in this chapter.
Figure 26 RESPI TAB
Structure of a pneumo cycle The whole PSPHA respiration analysis is based on MARKERS that are placed in the data (see chapter1 for the definition of the marker concept.) A regular breathing pattern When breathing is regular, the markers simply reflect the maxima and minima in the pneumo and capno signal. Each MAX markers is followed a MIN marker and vice versa. For the pneumo signal, a minimum reflects the end of the former and the start of a new respiratory cycle. A maximum reflects the end of inspiration and the start of expiration. For the capno signal, a maximum reflects the maximum CO2-level at the end of expiration, which, in healthy subjects is good estimation of arterial pCO2-pressure. The minimum reflects the how much CO2 is present in the inspired air (close to 0% with regular roomair).
Respiration processing 36
Figure 27 A regular breathing pattern MAX markers are purple, MIN markers are BLUE. The parameter extraction is based on the minima and maxima in the pneumo and capno signals. The table below displays a typical PSPHA-output. Each row contains information of one breathing cycle. FILE TRIAL startTi startTe Ti LEUVEN2007_070202 2 4,51 5,19
Pinexp
Pexpin 0
Ttot 0
1,5
OvvExp 0
0
0,82
endTi endTe 5,19 6,01
TibyTtot Ai Ae AibyTi f 0,453 1080,31 875,74 1588,691
VE SB FETCO2 INFO 43212,4 0,415 3,033 Pinsp
Te 0,68
REJECT Oexp 0
Oinsp 0
40
Pexp 0
0
OvvInsp SUMIRR NOCO2CH BADCO2 Subject CS+trial CS-trial TRSTAT 0 0 0 0 3 1 0 BASELINE
We explain now each of these (relevant) data. startTi: The time of the minimum marker (in seconds) (start inspiration) startTe: The time of the maximum marker (in seconds) (start expiration) Ti: Inspiratory time (or inspiratory duration, in s): startTe- startTi Te: Expiratory time (or expiratory duration, in s): startTi(next)-startTe endTi: startTi + Ti endTe: startTe + Te Pinexp & Pexpin will be explained later Ttot: Ti + Pinexp + Te + Pexpin TibyTtot: Ti / Ttot Ai: Abs(VIN1 - VIN2). VIN1 is the pneumo value at startTi, VIN2 the pneumo value at startTe Ae: Abs(VEXP1 - VEXP2). VEXP1 is the pneumo value at startTe, VEXP2 the pneumo value at the next startTi AibyTi: inspiratory flow, or inspiratory drive: the inspiratory volume on a 1 second basis (in ml/s, if A has been calibrated)
f: 60/ Ttot VE: Ai * f
Respiration processing 37
SB: Strained Breathing (see Fokkema, 1999): Ratio of % expired Volume (amplitudo) at one third of the (Pinexp + Te)-period with % expired volume at two Thirds (Pinexp + Te)-period FETCO2: The CO2 signal maximum between startTe and endTe + (endTe - startTe) * 0.3. FETCO2TIM: The time in the TRIAL if this maximum The rest of the parameters up to BADCO2 will be explained later. After BADCO2 follow the user defined parameters.
Respiration processing 38
Pinsp: Pause during inspiration.
Figure 28 Pinsp (red is pneumo, blue is capno-CO2) A Pinsp is region in an inspiration phase where the volume does not change more then 5% of the reference volume15 for a period longer then 0.5 sec. First every datapoint left from the maximum is compared with the maximum value. If a point detected with a value less than 5% of the maximum value this point is defined as the left end of the Pinsp. Then the points right from the maximum are checked until a value of 5% less then the maximum is detected: this point is the right side of the Pinsp. The value 5% is defined by the parameter PAUZE_LIMIT (0.05) See Figure 26 RESPI TAB). NOTE: Theoretically, CO2 should remain 0 during a Pinsp, because a rise in CO2 can only occur during expiratory flows. PSPHA does not check this, however. Pin does not occur very frequently and can be viewed as a breathing irregularity. The number of Pinsps within a breath is indicated in the output table.
Pexp: Pause during expiration.
Figure 29 Pexp (red is pneumo, blue is capno-CO2) Pexp and Pinsp are detected in the same way:
15
How the reference volume is calculated isexplained on page XXX?
Respiration processing 39
Opmerking [u29]: [L4/6]De synchronisatie van de signalen in dit voorbeeld is niet sluitend Opmerking [A30]: {22/9/2008}{ADC4 /6}ik snap deze opmerking niet Opmerking [u31]: [L4/7] Armand, kan je ook beschrijven hoe PSPHA dit doet? Wordt er bv naar inflection points gezocht, en hoe…? Opmerking [A32]: {22/9/208}{ADC4/ 7} text met uitleg is bijgevoegd.
A Pexp is a region in an expiration phase where the volume does not change more then 5% of the reference volume16 for a period longer then 0.5 sec. The value 5% is defined by the parameter PAUZE_LIMIT (see Figure 26 RESPI TAB.
NOTE. PSPHA does not check the CO2 signal for detecting Pexp. The number of Pexps per breath are mentioned in the output table
16
How the reference volume is calculated is explained on page XXX?.
Respiration processing 40
Opmerking [u33]: [L4/8] Hoe doet pspha dit nu concreet…? Opmerking [A34]: {22/9/2008}{ADC4 /8} zie boven
Pinexp: Pause between inspiration and expiration.
Figure 30 Pinexp (red is pneumo, blue is capno-CO2) After all Minima and Maxima are calculated PSPHA looks for "plateaus" between the end of the inspiration and the start of the next expiration. If such a plateau lasts at least 0.5 s, PSPHA considers it a pause between inspiration and expiration, or a post-inspiratory pause (Pinexp). The figure illustrates that there is often not a well defined single maximum in the expiratory phase, expecially if the signal is noisy. Simply calculating the maximum would remove valuable information about the start and the end of this maximum. In order to preserve this information, PSPHA fits the prolonged maximum with a combination of two half gauss curves: One half for the left side and another one for the right side of the curve. The top of both half gauss functions, which need to be the same, are connected with a straight horizontal line. The marquardt routine changes the different parameters of the double gauss curve (Sigma, Maximum ...etc) as to obtain a minimum in the sum of squares of the differences between the curve and the real data. The result is not always as expected!
Figure 31 post-inspiratory pause in the respiration curve with double gauss fit
Respiration processing 41
Opmerking [u35]: [L4/9]Waar ligt de horizontale lijn dan? Op figuur lijkt de laagste ‘top’ gekozen te worden. Opmerking [A36]: {23/9/2008}{ADC4 /9} dit is de Marquardt algoritme. Er is een textbijgevoegd.
Figure 32 Gausfit (brown) and pneumo signal (red) Above figure shows a Pinexp pause that is fitted with two half gauss functions. In some cases the fit is not as expected. The experimenter may, then, manually change the left and the right wing of the region before analyzing the data. This procedure will be explained later (see page xxx?). Pinexp is defined if the distance between the two gauss tops is more then 500 ms. The value 500 is defined by the parameter PinexpMINDUR in the RESPI TAB from the "modifyProfileParameters" menu item
Opmerking [A37]: {23/9/2008}{ADC4 /10} De verwijzing naar de script is vervangen door een parameter . De verwijzing naar de "script" is eigenlijk zinloos vermits je daar toch niets een kan veranderen. Nu kun je de 500ms aanpassen met de parameter.
Opmerking [u38]: [L4/10] Armand, zou het niet beter zijn van een relatief criterium te gebruiken, bv CO2 moet onder de 20% van de 3 voorgaande maxCO2’s blijven? Daarnaast: is er een manier om deze PinexpBADCO2 toch te aanvaarden als Pinexp, ondanks het feit dat het CO2 criterium niet gehandaafd is? Is in sommige gevallen zinvol, bv bij inademing vanmet CO2-verrijkte lucht
Figure 33 Profile Parameters NOTE. Theoretically, the corresponding CO2 signal should be minimal, because a stipe rise in CO2 actually means that expiration has started, which is incompatible with the def The CO2 signal should be less then 1.5 % or 10 mmHg during the whole Pinexp region.17 A Pinexp where this CO2-criterion is not met, is rejected by the CO2 check and marked as " Pinexp:BADCO2". In most cases this period is then considered as Pinsp or Oinsp as you can see in the next figure.
17
This criterion is senseful only if the inhaled air is regular roomair and is not enriched with C02!!!
Respiration processing 42
Opmerking [A39]: {23/9/2008}{ADC4 /11} Wat uw vraag over 20% betreft: moet dit een optie worden of permanent? Verder is er een tekst bijgevoegd die er op wijst dat op met NOCO2 check steeds de CO2 check kunt opheffen. Opmerking [u40]: [L4/11] Armand, hoe zit het met overlappende irregularities (hier Oinsp en Pinsp): is er een soort van hiërarchie, en hoe wordt dit verwerkt in de output tabel waar de totale tijd van irregularities in een ademcyclus wordt weergeven? Opmerking [A41]: {23/9/2008}{ADC4 /12} In feite wijst dit op verkeerd geïnterpreteerde signalen. Ik denk dat het in dit geval het beste is om een oisp/oexp weg de vegen met de hand.
Figure 34 Pinexp:BADCO2 transformed in Oinsp and Pinsp Note that you always can remove this BADCO2 by defining this region in the CO2 signal as noCO2 check. This is a script menu option. Pexpin: Pause between expiration and inspiration.
Figure 35 Pexpin (red is pneumo, blue is capno-CO2) Pexpin, or a post-expiratory pause, is period of at least 0.5s with an approximately zero-flow following the end of an expiration. In contrast to Pinexp, no bi-gauss algorithm is used here to detect the plateau between expiration and inspiration (yielded suboptimal results). Pexpin are detected as follows:
Respiration processing 43
Opmerking [A42]: {23/9/2008} {ADC4/13} Er bleek hier nogal wat verwarring over de formule die MINAMPLI berekende. Daarom staat er nu een andere tekst en een actra figuur voor verduidelijking.
MINAMPLI1 (in the example above = (AMPLI1+AMPLI2/2)) : the mean of the amplitude difference between the previous maximum and this minimum and the difference between the next maximum and this minimum is calculated. The pneumo value of the minimum is stored as: MINVAL then MINAMPLI2 is defined as: MINAMPLI2 = MINVAL + MINAMPLI1 * DELTAPLATEAU
DELTAPLATEAU is defined in the RESPI parameters from ModifyProfileParameters menu (see picture above) The standard value from = DELTAPLATEAU is 0.1 Which means that 10% of the value from the original MINAMPL is taken. From the previous maximum up to the minimum the derivative of the pneumo signal is calculated. If this is less then MINDERIVATIV and the pneumo value is less then MINAMPLI2 the algorithm stops and this point is defined as the end of the expiration cycle. On the same way the derivative is calculated from the next maximum down to the minimum. If the derivative is MINDERIVATIV and the pneumo value is less then MINAMPLI2 this point is defined as the start of the next inspiration cycle. If the distance between those two points is longer then the PexpinMINDUR (see above, standard value is 500ms) this region is defined as Pexpin. Theoretically, there can be no steep decrease in CO2 during a Pexpin, because this would be an indication that inspiration has started. PSPHA checks this CO2 in a rather complicated way: RULE 1: Pexpin > 2000 ms (default value) If Pexpin > 2000 ms, there is no CO2 check and Pexpin is accepted. During such long postexpiratory pauses, it is normal that CO2 starts drifting to 0, even if no inspiratory movement has occurred yet. Therefore, a CO2-criterion to confirm a Pexpin is not helpful in such case. The criterion of 2000 ms is the default value used by PSPHA, but can be adapted by the user for a given trial or for a given subject (see page XXX?). RULE2: Pexpin <= 2000 ms (default) If CO2 maximum in the Pexpin range is less then PEXPINCO2PERCENT (default 4 % or 28,52 mmHg), then the check is considered as false. "false" means the Pexpin is removed and a label pexpin:BADCO2 is displayed
If the following conditions are met: (1) CO2 max >= PEXPINCO2PERCENT (default: 4% or 28,52 ) (2) PAUZE_DURATION_FOR_CO2_CHECK > Pexpin or disabled Then CO2 must> 90% of its maximum in the Pexpin area. If this is true, Pexpin is considered OK. If this is not the case then, the left side if Pexpin will be moved to the right. If a Pexpin can still be obtained in this way without violating the criterion of a minimum duration of 500ms for a Pexpin, then Pexpin is ok.
Respiration processing 44
Opmerking [u43]: [L4/13]Wat wordt er bedoeld met ‘false’: dat Pexpin verworpen wordt? Wat zijn de gevolgen (wat gebeurt er dan inplaats van een Pexpin-detectie), wat verschijnt er dan in output tabel? Opmerking [u44]: [L4/14]Van waar komt dit criterium van 4% eigenlijk? Is het nodig? Wat gebeurt er als we het weglaten? Opmerking [u45]: [L4/15]Ik snap de voetnoot 23 niet. Het % CO2 waarmee je calibreert heeft toch geen invloed op de interpretatie van de absolute waarde van 4%.? Opmerking [A46]: {23/9/2008}{ADC4 /14}Voetnoot is weggelaten, alle vaste waarden zijn vervangen door parameters die u zelf kunt aanpassen. RULE3 is verwijderd. Opmerking [u47]: [L4/16] RWelk max wordt hier naar verwezen, een gemiddelde, het reference CO2, de voorgaande CO2max? Opmerking [A48]: {23/9/2008}{ADC4 /15}Een tekst met verduidelijking over het maximum is toegevoegd.
If none of the condition above are fulfilled then the pause is defined as: Pexpin:BADCO2_. This region can then still be a Pexp or Oexp. As mentioned before BADCO2 can be removed by defining a "NO CO2 check area" in the CO2 signal.
Opmerking [u49]: [L4/17] Is dit definitief, of kan de gebruiker toch nog iets doen waardoor het wel een Pexpin wordt? Opmerking [A50]: {23/9/2008}{ADC4 /16} Tekst is toegevoegd. RULE3 is weggelaten zoald gevraagd.
Respiration processing 45
Figure 36 Pexpin:BADCO2 There is a BADCO2 because RULE2 is not met: CO2 falls too much at the and of Pexpin.
Figure 37 using NOCO2CHECK does not help here. INTERMEZZO: comment aan Armand De Pexpin algoritmes zijn inderdaad zeer complex, en we vragen ons af het niet eenvoudiger kan/moet. Enkele algemene bedenkingen/suggesties: - de BADCO2-indicaties zijn zinvol ,want als ze veelvuldig voorkomen weet de gebruiker dat er een probleem is, bv de synchronizatie van pneumo en capno zit niet juist. Dus de mogelijkheid tot BADCO2 indicaties moet zeker behouden blijven - De oplossing die PSPHA biedt voor badCO2 (verschuiven van marker): misschien laten vallen (uitproberen wat het geeft). - Interessant zou zijn dat als je NoCO2check inschakelt, dat voor ALLE operaties geldt waar er een CO2 criterium gebruikt wordt (of is dit zo al?). Dit is conceptueel eenvoudig en moet in principe toelaten ook pneumo-signalen te verwerken zonder CO2-signaal.
Oinsp: Interruption during inspiration An interrupted inspiration occurs if a short expiration occurs during an inspiration. There should be corresponding reversal of the CO2-signal, because CO2 cannot stay 0 during (even a very short) expiratory flow.
Respiration processing 46
Opmerking [A51]: {23/9/2008}{ADC4/17} Je moet het mij niet zeggen ik heb MAANDEN bezig geweest om alle "trukken" van de caubergs algoritmen te ontrafelen en in een werkbaar equivalent om te zetten. Tja Als u een beter werkzaam voorbeeld hebt zal ik nagaan of het implementeerbaar is.
Opmerking [A52]: {23/9/2008}{ADC4 /18} NOCO2 check werkt inderdaad op alles waar CO2 gebruikt wordt.
Figure 38 Oinsp
PSPHA checks Oinsps before it detects pauses. An Oinsp is initially considered a separate breathing cycle (with a minimum and a maximum in the pneumo signal), but PSPHA transforms it a later phase into an Oinsp if the volume difference between minimum and maximum is lower then 0.3 the reference volume. PSPHA does not check CO2 during Oinsp Oexp Interruption during expiration An interrupted expiration occurs if a short inspiration occurs during an exspiration. There should be corresponding reversal of the CO2-signal, because CO2 cannot increase during (even a very short) inspiratory flow.
Respiration processing 47
Opmerking [u53]: [L4/18] Armand, is het mogelijk om dit criterium van een omkering van het CO2-signaal tijdens Oinsp toe te voegen? Opmerking [A54]: {23/9/2008}{ADC4 /19} wat bedoelt u met omkeren
Figure 39 Oexp
Respiration processing 48
As for Oinsp, a "normal" cycle is transformed into Oexp if the volume difference between minimum and maximum is lower then VOLRIPPLE (default=0.3) the reference volume. PSPHA does not check CO2 during Oexp pause and "O" interruptions can be intermixed in one respiratory cycle as shown in the next figure.
Figure 40 Pexp and Oexp in one respiration cycle.
Respiration processing 49
Opmerking [u55]: [L4/19] Kan dat toegevoegd worden? Opmerking [A56]: {28/9/2008}{ADC4 /20} Gelieve het "algoritme" op te geven.
Sigh
Figure 41 sigh as defined in the report of Stephan Devriese & M. Cauberghs Sigh detection is not implemented in PSPHA at this moment. Note that the user has always the possibility to mark a region as bad.
Ovvinsp / Ovvexp: insufficient inspiratory/expiratory volumes
Opmerking [u57]: [L4/20]Armand, ondertussen hebben we een assitent die doctoreert op het onderwerp ‘zuchten’ en is het wenselijk een algoritme voor ‘zuchten’ te implementeren. Als je daar principieel akkoord mee gaat, bespreek ik met haar welk algoritme ze graag wil .
PSPHA detects Ovvinsp and Ovvexp. Ovvinsp and Ovvexp are shown in the output table only. They are not shown in the data window.
Opmerking [A58]: {23/9/2008}{ADC4 /21} Geen probleem zolang de criteria duidelijk worden aangegeven en er tijdens implementatie reeds werkbare voorbeelden zijn.
Insufficient tidal volume (Ovv)
A clear maximum (IN the CO2 signal) is defined is a maximum that is minimum two points (= two data samples) of the edge. OvvEXP:If the CO2 maximum is less then OVVLIMIT (default 0.7 or 70%) of the reference CO2 signal for this moment, the region is defined as OvvExp.18 OvvInsp: This occurs only if, in an inspiration cycle, the CO2 is not well defined, which means that there are no minima/maxima in the CO2 signal. There are no other checks here. CO2 signal out of range (CO2OOR) We define TIM1 as the time of a maximum in the pneumo data and TIM2 as the time of the succeeding minimum. Then the maximum of the CO2 signal between TIM1 and TIM2 + (TIM2 - TIM1) * 0.3 is detected. If there is not a clear CO2 maximum in this range then this region is marked as CO2OOR.
18
Note that if there are no maxima/minima at all in the CO2 signal, the region is always defined as OvvExp.
Respiration processing 50
Opmerking [u59]: [L4/21] Wat is ‘two points of the edge’, over welke edge gaat het? Refereert ‘points’ naar samples? Opmerking [A60]: {23/9/2008}{ADC4 /22} Tekst is toegevoegd
Explanation of other output signals. SUMIRR: total time of Pexp + Pinsp + Oexp + Oinsp in a respiration cycle. NOCO2CH: CO2 check is prevented for (a part of) this respiration cycle. BADCO2: CO2 is marked by the user as bad for (a part of) this respiration cycle. For example, if the subjects was breathing trough the mouth while the CO2 was being sampled in the nose, the user can indicate a BADCO2region in the CO2-signal. The output table will indicate value ‘1’ in the BADCO2column, so that the CO2max of that breath can easily be excluded later on, e.g., in the calculation of a mean ETCO2 for a given trial. PSPHA channels. In every respiration analysis 7 channels are involved. 4 data channels (CH1-CH4) CH1: Calculated pneumo signal CH2: Calculated CO2 (capno) signal CH3: Pneumo signal as read from the affect file CH4: CO2 signal as read from the affect file CH1-CH4 are saved in the data/.XML file after close. W1-W3 are temporary channels. Their name depends on the calculation. They are never saved but can be seen on the data display. There exist also a number of temporary channels only used here. They are: REFVOL, REFCO2, REFINT, CMP, FLWCAL, VOLRAWCL. They will be discussed later.
Respiration processing 51
Opmerking [u61]: [L4/22] Geldt dit enkel voor Ovv of voor alle CO2checks die PSPHA uitvoert (ook bv voor Pexpin)? Opmerking [A62]: {23/9/2008}{ADC4 /23} Voor all plaatsen waar een CO2 check wordt uitgevoerd (mail lij als dit niet het geval is)
Algorithm sequence for respiration analysis Step1 STARTUP This step is executed once after loading the data in PSPHA. If the data was already processed then the output data is regenerated from the information that is stored in the markers. Step 2 INIT Step 2 up to step 14 are executed in sequence when the script: "process data pneumo-co2" is performed. After check of the calibration parameters, the VolCompensate and CO2SHIFT procedure is executed (see Figure 20: Windows for adjusting CO2shift. at the begin of this chapter). For old data and the "USA" data from Ilse volume drift is compensated by fitting a first degree polynomial to the data. For new (affect) data pneumo flow is converted to volume data. Drift compensation is disabled but can be enabled by setting the ProfileParameter: VOLCOMPENSATE to 1 (see Figure 26 RESPI TAB). CO2SHIFT is always performed.
Opmerking [u63]: [L4/23] Co2shift is iets dat de user zelf moet doen, misschien best expliciteren of verwijzen naar stuk in manual waar dit behandeld wordt
Step 3: VOLRemoveSpikes
Opmerking [A64]: {24/9/2008}{ADC4 /24} Verwiçjzing is bijgevoegd. VOLCOMPENSATE kan aangezet worden.
A spike is defined as a data point where there is a sudden "jump" of more then 100 in the value of the data signal from one data point to the next. If more then 50 "spikes" are detected, then the procedure is aborted and the following message appears:
Is Volcompensate hetzelfde alsdrift correctie ? gebeurt dit automatisch?
Opmerking [u65]: [L4/24] Het is niet helemaal duidelijk wat deze stap 3 doet. Is dit om ruis uit de data halen? Vanwaar het crierium van 50 spikes? Zijn het 50 spikes per trial, per breath, per subject…? Opmerking [A66]: {24/9/2008}{ADC4 /25} Dit kwam voor in oude data. Ik heb nooit geweten waar het vandaan kwam. Het waren enorme spikes.
Figure 42 more then 50 spikes detected. If less then 50 spikes, the spikes are removed.
Respiration processing 52
Step 4: CalCulateRefVolandInspTimArray This module calculates REFVOL. For this signal the volume is fitted with a second degree polynomial. 1- all MIN/MAX amplitudes smaller then REFVOL*PAUZE_LIMITare removed. 2- the value REFVOL*PAUZE_LIMITis also used for defining Pexp and Pin. 3- All amplitudes smaller then REFVOL*VOLRIPPLE are considered Oinso/Oexp PAUZE_LIMIT and VOLRIPPLE are parameters defined in the RESPI parameter tab (see Figure 26 RESPI TAB) Step5 CO2RemoveSpikes Spike removal for CO2 is done in the same way as in VOLRemoveSpikes. Step6 NewCalCulateRefCO2 The procedure for calculating the reference CO2 signal is based on the procedure as described by M. Cauberghs in his work and is mentioned in the report of S. Devriese:
Figure 43 Description of FETCO2
Figure 44 CO2 data
Respiration processing 53
Opmerking [u67]: [L4/25] Armand, kan je voor dat je uitlegt wat pspha doet, eens uitleggen wat eigenlijk de bedoeling is van deze stap? Opmerking [A68]: {24/9/2008}{ADC4 /26} Uitleg is bijgevoegd.
Figure 45 REFCO2 The ] marker in "Figure 44 CO2 data" shows a maximum value of 4,55. The [ marker in the REFCO2 data shows a value of 4,74 at this point. The REFCO2 data is series of calculated CO2 maxima connected with straight lines. Therefore the REFCO2 signal is nearly flat. REFCO2 is used for checking OVVexp. Step 7 GetExtrema Find the maxima and minima in the pneumo data. The minimum distance between minima/maxima must be 400 ms. Step 8 RemoveSmallTriples / RemoveSmallMarkers / FinalAnalysisOfInterruption Those three routines forms together the algorithm for transforming minima and maxima in interruptions (Oexo / Oinsp) based on the methods discussed earlier. Step9 PaintPinexpPexpin This routines checks for Pinexp and Pexpin.19 Step10 PaintPexpPin Pexp / Pin are created in the same "paint" way as step9 Step11 CheckWithCO2 This module checks CO2 for Ovvinsp, Ovvexp.
Step 12 CLEANUP Module does a cleanup of marker info due to earlier PSPHA bugs. This module does nothing for resent data.
19
The word "paint" indicates the way of working. Pauses are created by checking and marking the minima / maxima, not by inspecting the data directly.
Respiration processing 54
Step 13 ADD_NOCO2CHREGION_BADREGION_BADCO2REGION This module adds the info: " NOCO2CH " to all pneumo cycles that sits in a. NOCO2CH regions are manually added by the user. The same step is repeated for REJECT and BADCO2 inserted by the user also.
Step 14 WriteOUT Marker information (=pneumo cycle information) is written to the output file and the display table.
Respiration processing 55
Modifying markers by hand Pneumo analysis is so complex that in a number of cases PSPHA does not do the analysis as expected. In such cases the user can add or remove respiration irregularities. Case 1 restore OexpOins
Figure 46 Oexp Oexp/Oinsp always has two "blue" boundaries. These are always a minimum and a maximum. You must click between the boundaries.
Figure 47 Selecting the first option has the following result:
Figure 48 removing Oexp You can "undo" this operation simple by clicking the same region and selecting:
with this result:
Respiration processing 56
Figure 49 Undo operation Selecting the second option from Figure 47 results in:
Figure 50 removing minimum and maximum The markers are removed... forever. Case 2 Transform Pexpin and Pinexp
Figure 51 Pexpin clicking between the two markers of a Pexpin results in:
Respiration processing 57
Selecting one of the first two options (2) results in:
Figure 52 PRECALC results in:
Figure 53 which is essentially the same as clicking on option 1 for this case. The difference between option 1/2 and 3 is that there is no undo possible for option 3. MLEFTINP and MRIGHTINP adjust the pause. UNDO resets a previous action.
Respiration processing 58
Case 3 normal respiration.
O transforms this respiration cycle to a Oexp or Oinsp. Undo is possible as explained in case 1 MLIEFTSPLIT/MRIGHTSPLIT suppose that the [ and ] marker are defined in the respiration cycle.
Figure 54 before Clicking MLEFTSPLIT results in.
Figure 55 inserting a Pinexp The data above seems not very consistent because the maximum is missing; In fact the only purpose of this action is that a Pinexp appears in the output data. Attention: The data seems (to me) rather absurd: the [ or ] marker is defined outside the respiration cycle
Respiration processing 59
Case 4 moving FETCO2 signal in CO data You can move the FETCO2 marker to the place of the [ marker. Pressing CTRL+ [ moves the FETCO2 at the left from the [ marker, pressing CTRL+ ] moves the FETCO2 signal at the right from the [ marker.
Figure 56 CO signal before
Figure 57 result after pressing ctrl+ [ Note that, at this time there is no immediate update of the data table. You need to close and reopen the data to see de updated table.
Respiration processing 60
Opmerking [A69]: {9/19/2008}{TOD O} verwerking en uitleg bijvoegen
PROCESS CO2 only This option process CO2 without take into account the pneumo signal. The procedure just calculate the maxima and minima in the CO2 signal and produces an output CO2.CSV file with this structure: CLIENT TRIALN MAX MAXVAL '3/07/2008 0:25:10' 1 5200 5,19
MAX is the maximum and MAXVAL the value of the CO2 signal at MAX. There can be only one maximum/minimum in a CO2ONLYMARKTETIME time span(see Figure 26 RESPI TAB) Making this parameter higher can remove additional false maxima. Note that the result can be different from the FETCO2 markers (see next picture) due to the fact that FETCO2 is calculated taking the pneumo signal into account: "FETCO2: The CO2 signal maximum between startTe and endTe + (endTe - startTe) * 0.3. Note that this value can be changed manually by the user.
Figure 58 CO2 only processing
Figure 59 Normal Respi processing
Respiration processing 61
5
Chapter
Chapter 5 Skin processing. Intro Skin processing was the first module implemented in PSPHA. The method used in PSPHALeuven version is essentially the same as used for Bruno at Ghent and described in the article.
Figure 60 Skin data Skin conductance response: calculation after smoothing (Psychophysiological Analysis (PSPHA): A modular script-based program for analyzing psychophysiological data. BEHAVIOR RESEARCH METHODS 38: (3) 504-510 AUG 2006 ) The amplitude of the skin conductance response to a particular stimulus is calculated by using the time and the value of a maximum, which is compared with the time and value of a preceding minimum. The default settings are those that are recommended by Dawson, Schell and Filion (2000)20: only minima occurring within 1 to 5 seconds after stimulus onset that are followed by a maximum 1 to 5 seconds later, are considered valid. These settings can, however, be changed. At present, PSPHA is only used to calculate the amplitude of the electrodermal response, but the user can easily adopt PSPHA to calculate other parameters (e.g., latency, rise time, half-recovery time). 20
Dawson, M. E., Schell, A. M., & Filion, D. L. (2000). The electrodermal system. In J. T. Cacioppo, L. G. Tassinary, & G. B. Berntson (Eds.), Handbook of Psychophysiology (pp. 200-223). US, Cambridge University Press.
Respiration processing 62
Before calculation of the maxima and the minima, the data are smoothed with a second degree polynomial: Y=C1+C2*X+C3*X*X. The Marquardt least square fitting procedure is used. We translated available routines for Marquardt least square fitting that were written in C (Press, Flannery, Teukolsky, & Vetterling, 1993)21, into Visual Basic. The number of fitting points can easily be changed by the user. Traditionally, skin conductance is smoothed by using FIR filters (Cook & Miller, 1992)22. FIR filters can be used in PSPHA, but we prefer the Marquardt algorithm. This algorithm calculates the first derivative in each point and is used to identify inflection points. Inflection points may be helpful to detect changes in skin conductance whenever a maximum is not easily detected. Another advantage is the possibility to fit more sophisticated functions (see Lim, Rennie, Barry, Bahramali, Lazzaro, Manor, & Gordon, 1997)23. However, FIR filters are easy to implement. We use FIR filters, for example, for filtering EMG signals. After smoothing, maxima and minima are calculated by identifying the highest or lowest point in an indicated region. In the absence of minima or maxima, negative or positive inflection points are used. When neither a maximum nor a positive inflection point can be found after a minimum or a negative inflection point, the trial will be scored as a 0-response, indicating that the stimulus did not elicit a response.
21
Press, W. H., Flannery, B. P., Teukolsky, S. A., & Vetterling, W. T. (1993). Numerical Recipes in C: The Art of Scientific Computing. Cambridge University Press. 22 Cook, E. W., & Miller, G. A. (1992). Digital filtering: Background and tutorial for psychophysiologists. Psychophysiology, 29, 350-367. 23 Lim C.L., Rennie, C., Barry R. J. , Bahramali, H., Lazzaro, I., Manor, B., & Gordon, E. (1997). Decomposing skin conductance into tonic and phasic components. International Journal of Psychophysiology, 25, 97-109.
Skin processing 63
Opmerking [u70]: [L5/1]Waarom dit algoritme prefereren voor SKIN, terwijl FIR filtering/smoothing toegepast voor EMG? Opmerking [A71]: {25/9/2008}{ADC5 /1} het antwoord staat hier!
Profile Parameters Using this command displays a screen with tabs24:
Figure 61 First TAB in the PARAMETER screen SKIN4ALL Most of these parameters for skin processing are the same for the LEUVEN and the GHENT version (they came from Ghent (Bruno)). SMOOTHPOINTS: Before calculation of the maxima and the minima, the data are smoothed with a second degree polynomial: Y=C1+C2*X+C3*X*X. The Marquardt least square fitting procedure is used25. The number of points must be odd. In this example (9) there are 4 points used before and after each data point. The meaning of the other parameters are explained in chapter 5. A brief information is displayed as indicated in the pink cell.
24
In fact this commands starts another program PSPHAPLUS. PSPHA is still written in the (at this moment) obsolete programming language Visual Basic 6. PSPHAPLUIS is entirely written in VN.BET-2005, Microsoft's "state of the art" programming language. 25 We translated available routines for Marquardt least square fitting that were written in C and decribed in: Numerical Recipes in C: The Art of Scientific Computing (Press, Flannery, Teukolsky, & Vetterling, 1993), into Visual Basic.
Skin processing 64
SKIN
Figure 62 sensitivity parameters for SKIN data Sensitivity parameters transform the incoming data directly into physiological values. Sensitivity is used for skin and EMG data. Affect data that uses sensitivity must contain a column with the values shown (10, 50, 100, 500 or 1000). Conversion is used from the start of a sensitivity value op to the next one. There is no data conversion if no sensitivity data exists,
Figure 63 SCL () parameters Clicking upon the pink cell gives a detailed description of SCL: SCL is calculated by subtracting the mean value in certain time frames before the marker from the mean value in certain time frames after the marker. The length of this time frame is defined by LENGTH and the number of time frames is defined by NUMBER BEFORE/AFTER. In this way, change in skin conductance amplitude changes can be calculated over time. For example, if the marker indicates stimulus onset, and LENGTH is set at 5000, NUMBER BEFORE at 1 and NUMBER AFTER at 5, PSPHA calculates the mean value in the 5 seconds before stimulus onset, and takes that as the baseline value to compare it with mean value in the time frames 0-5s, 510s, …, and 20-25s.
Skin processing 65
PARAMETERS: NUMBER BEFORE : Number of time frames before the marker to calculate SCL NUMBER AFTER: Number of time frames after the marker to calculate SCL LENGHT: Size of time frames (expressed in milliseconds) after the marker to calculate SCL then
Opmerking [A72]: {25/9/2008}{ADC5 /2} NUMBER BEFORE bijgevoegd.
Specific options for Leuven. Passive integers Opmerking [u73]: [L5/3] Graag wat meer uitleg over het nut van passive integers + cross-reference naar waar uitleg staat over hoe ze toe te voegen
Passive integers can be added. Sensitivity
Opmerking [A74]: {25/9/2008} {ADC5/3} Dient besproken te worden in DEEL3 van de manual (te schrijven in Leuven).
As defined earlier, 5 sensitivity values can be defined.
Figure 64 skin sensititity A procedure to calibrate the skin conductance is created in affect (Skin_Calib(1).af4) A document is available that explains how the values for the different levels of sensitivity can be calculated. Great care should be taken to prevent "steps" when the sensitivity is changed inside a trial.
Figure 65 Steps as result from sensitivity switch. Note that there is no skin processing as the " start_insp" active boolean is missing in a trial!
Skin processing 66
Algorithm sequence for skin analysis PSPHA produces two output data file for skin analysis: SKIN.CSV and SKINBIS.CSV. SKIN.CSV is displayed when clicking on the SKIN data channel, SKINBIS.CSV when clicking on the SKINRAW channel. SKIN is data specific for Leuven, SKINBIS is the data processing used in Ghent. SKIN.CSV processing.
Opmerking [A75]: {25/9/2008}{ADC5 /4} ik snap de vraag niet; Alles is toch verder hieronder uitgelegd. Eventueel kan die Ghent opmerking weggelaten worden. Dan is er misschien minder verwarring Opmerking [u76]: [L5/4] Het zou goed zijn hier al kort te vermelden wat de belangrijkste vreschillen zijn tussen we twee versies. Bijvoorbeeld ze vervangen elkaar niet. In de skin.csv staat heel ander einformatie, en worden geen speciale algortimes gedaan om amplitudes te berekenen.
Here is a typical example:
Figure 66 SKIN example Opmerking [u77]: [L5/5] It would be intreseting to provide a pspdeffile together with the output file
with this data in SKIN.CSV: CLIENT '23-2-2007 12:23:44'
TRIALN
KEY
Opmerking [A78]: {25/9/2008}{ADC5 /5} ik snap de opmerking niet PSPDEF heeft hier toch niets mee te maken???
17 'ACT:STAR'
BEG1 END1 MAX1 MAXV1 MIN1 MINV1 MEAN1 600 2600 1700 224,642 600 203,47 217,487 BEG2 END2 MAX2 MAXV2 MIN2 MINV2 MEAN2 2600 4600 2600 214,342 4500 197,024 202,225 BEG3 END3 MAX3 MAXV3 MIN3 MINV3 MEAN3 4600 6600 6600 511,473 4600 197,65 315,668 BEG4 END4 MAX4 MAXV4 MIN4 MINV4 MEAN4 6600 8600 7000 527,779 8600 363,472 472,736 BEG5 END5 MAX5 MAXV5 MIN5 MINV5 MEAN5 8600 10600 8600 363,472 10600 242,708 288,858 stim
probe 6
3
DATE 708081229
Table 2
Skin processing 67
After the clients data and trial number there is "key": the truncated name of the "active boolean". Any name can be used but the name must be defined in the .PSPDEF file as active boolean. In fact multiple "active booleans" can be used in the same trial. The whole processing cycle as will be explained is repeated for each active boolean and a new line is written in the output file. Next figure and the corresponding output is an example.
Opmerking [u79]: [L5/6] Hoeveel kunnen er nu al worden gebruikt en voor welke doeleinden? Ik dacht dat het maximum op 2 stond en dat het dan “CS” en “US” MOET zijn. Als slechts één active boolean wordt gebruikt, moet dat dan niet “start_inspiration” zijn? Opmerking [A80]: {25/9/2008}{ADC5 /6} Met de nieuwe formule methode (zie reading affect data P28) kunnen nu zoveel active booleans worden bijgevoegd naar wens.
Figure 67 multiple markers in one trial CLIENT TRIALN '3-8-2007 19:46:00' 11 '3-8-2007 19:46:00' 12 '3-8-2007 19:46:00' 13 '3-8-2007 19:46:00' 13
KEY
BEG1
END1 MAX1
MAXV1 MIN1
MINV1
MEAN1
'ACT:CS__'
33000 35000
33500 -19,607 34700 -36,247
-27,246
'ACT:CS__'
29000 31000
30700 173,427 29500 160,378
166,531
'ACT:CS__'
28500 30500
28500
19,837 29900
7,935
14,599
'ACT:US__'
41300 43300
41300
90,345 42600
76,955
80,85
Table 3 Multiple makers output data
Skin processing 68
Note that the second "ACT:CS" belongs to the stripe rectangle for the CS boolean as indicated in the .PSPDEF file: 9 active boolean <stripe/> For each stimulus the maximum and minimum time and mean value are calculated for the different time slots as defined in the SKIN general parameters:
Figure 68 skin general (Leuven specific) parameters In this configuration there is 1 slot before the stimulus (STPSBefore) and 4 slots after the stimulus (STPSafter). Each time slot lasts for 2 second (STPSLenght) as can be seen in the data of Table 2. The mean value for the interval between BEG1 and END1 is calculated and given under Mean1
Skin processing 69
SKINBIS.CSV processing. Here is the data from SKINBIS.CSV belonging to the data from Figure 66 SKIN example: CLIENT '23-2-2007 12:23:44'
TRIALN
KEY
17 'ACT:STAR'
RULE 'RULEMN__'
BEGINC BEGINV ENDCH ENDVAL AMPLIT LATENCY RISETIME BASE 4500 197,02 7000 527,78 330,76 1900 2500 220,982 MEAN_AFTER#G MAX MAXV AMPLITUDO MINM3 MINM3V MAXM3 MAXM3V 294,269 7000 527,779 306,798 4500 197,024 7000 527,779 M3VAL BEG1 END1 M4V1 MAX4V1 BEG2 END2 M4V2 MAX4V2 330,755 1600 2600 220,982 9999 2600 3600 206,473 214,342 BEG3 END3 M4V3 MAX4V3 BEG4 END4 M4V4 MAX4V4 3600 4600 197,747 199,71 4600 5600 222,99 271,645 BEG5 END5 M4V5 MAX4V5 BEG6 END6 M4V6 MAX4V6 DATE 5600 6600 404,344 511,473 6600 7600 517,21 527,779 708081229
Table 4 This processing is the same as used by Bruno & co in Ghent. They are conform to the parameters from Figure 69 skin parameters for SKINBIS.CSV.
Figure 69 skin parameters for SKINBIS.CSV Step 1: calculation of minima/maxima/ inflection Minima/maxima are calculated with a minimum distance of "TRESHOLD" (see Figure 69 skin parameters for SKINBIS.CSV). For this method START_INSP is always used, only one
Skin processing 70
stimulus is allowed per trial. If no START_INSP stimulus is present as for the data in Figure 67 multiple markers in one trial, the SKINBIS data are meaningless. Step2 skin processing method 1 Clicking on the red bar for method1 displays the following info: In METHOD 1, SCR amplitude is calculated by subtracting the lowest value (minimum, MIN) in a certain region after the marker [defined by MIN_START, MIN_END] from the highest amplitude (maximum, MAX) in a certain region [defined by MAX_START, MAX_END] after the MIN. If no MIN or MAX is found, SCR is scored as 0. Default settings are based upon Dawson et al. (2000): MIN is searched in the 0.5-4s interval after stimulus onset and MAX is searched in the 0.5-4s interval after MIN. Note that a MIN (respectively MAX) is only a MIN (respectively MAX) if it is the lowest (respectively highest) point of the surrounding values (THRESHOLD). Settings can be adjusted below. PARAMETERS: MIN_START: Start of time window after the marker (expressed in milliseconds) to search for lowest value (MIN) MIN_END: End of time window after the marker (expressed in milliseconds) to search for lowest value (MIN) MAX_START: Start of time window after the marker (expressed in milliseconds) to search for highest value (MAX) MAX_END: End of time window after the marker (expressed in milliseconds) to search for highest value (MAX) TRESHOLD: a MIN (respectively MAX) is only a MIN (respectively MAX) if it is the lowest (respectively highest) point of the surrounding values (THRESHOLD; expressed in milliseconds before and after the MIN/MAX). For example, if TRESHOLD is set at 500. A MIN/MAX will only be recognised as such if it the lowest/highest point relative to all points 500ms before and 500ms after.
Method 1 calculates information as a result of two markers M1 and M2. Two methods are used for obtaining M1 and M2. First M1 is the lowest minimum between GM+ MIN_START and GM+ MIN_END. GM is the stimulus time (the active boolean); MIN_START and MIN_END are defined in the parameters of method 1 in "Figure 69 skin parameters for SKINBIS.CSV" (500 and 4000 in this example) M2 is the highest maximum between M1+ MAX_START and M1+ MAX_END (500 and 4000 in this example). If the search is successful, the following results are written out: RULE: RULEMN BEGINC, BEGINV, ENDCH, ENDVAL: time and value of M1 and M2. AMPLIT: difference between the two markers values LATENCY: time difference between M1 and the stimulus. (for this example the stimulis time is 2600, BEGINCC is 4500, thus LATENCY is 1900 RISETIME: time difference between M1 and M2. If this search fails, M1 is calculated as the lowest inflection point between the same borders (GM+ MIN_START and GM+ MIN_END ).
Skin processing 71
Opmerking [u81]: ^L5/7]Het is niet helemaal duidelijk wat gm is Opmerking [A82]: {25/9/2008}{ADC5 /7} GM=active boolean (tekst is bijgevoegd). Opmerking [u83]: [L5/8] ? M2? Opmerking [A84]: {25/9/2008}{ADC5 /8} ik snap deze opmerking niet
RULE: RULEBP26
Figure 70 RULEBP In the above example the minimum is not found (the MIN_END parameter was set to 2000 to force this rule!). PSPHA shows now the inflection point (BNM: the second derivative had en minimum) and the maximum: MAX. CLIENT '23-2-2007 11:23:44'
TRIALN
KEY
RULE
BEGINC BEGINV ENDCH
28 'ACT:STAR' 'RULEBP__'
5000
375,48
7800
ENDVAL AMPLIT 406,5
Table 5 RULEBP result Step2 skin processing method 1 RULE exceptions RULE: OVERFLOW This occurs if one data point is higher than 2048. RULE: MX_bf_MN The maximum sits before the minimum/inflection point RULE: onlMNoMX one calculated marker is missing.
26
BP=buigpunt is the Dutch word for inflection point
Skin processing 72
31,02
Figure 71 onlMNoMX All results of method 1 are meaningless (BEGINC, BEGINV, ENDCH, ENDVAL, AMPLIT, LATENCY & RISETIME) RULE 'onlMNoMX'
BEGINC BEGINV ENDCH ENDVAL AMPLIT LATENCY RISETIME -1 -1 3900 212,78 0 0 3901
Table 6 onlMNoMX RULE: NOTFOUND No minimum or maximum is found in the selected regions.
Skin processing 73
Figure 72 NOTFOUND TRIALN KEY
RULE BEGINC BEGINV ENDCH ENDVAL AMPLIT LATENCY RISETIME 'NOTFOUND 14 'ACT:STAR' ' -1 -1 -1 -1 0 0 0
Table 7 The maximum at 6500 sits outside the M2 region. Note that the first minimum sits on the same place as the START_INSP. For this reason the label "MIN" is shown27, as can be seen in Figure 80.
27
This option is available only in the PSPHA version 2007.12.2 or later!
Skin processing 74
RULE: DSCENDNG ISRISING Not a single minimum or maximum is found in the selected region. The signal is only rising or descending.
Figure 73 ISRISING CLIENT '23-2-2007 11:23:44'
TRIALN
KEY
RULE
12 'ACT:STAR' 'ISRISING'
BEGINC BEGINV -1
-1
ENDCH -1
ENDVAL AMPLIT -1
Table 8 If you watch the signal above, you will notice that this signal is NOT monotone rising. PSPHA does not detect however the first minimum at 2700 because it sits before the threshold of 3100. When you compare the data in "Figure 72 NOTFOUND" and "Figure 73 ISRISING" the structure seems the same, so why is the first NOTFOUND and the second ISRISING? When PSPHA searches M1 in "Figure 72 NOTFOUND" the second search (for inflection point) is used because the first search (for a minimum) has no result. There is no inflection point (derivative minimum) so PSPHA set NOTFOUND. There is however in the range a minimum (at 6500) so this is not a rising / descending signal). Then the MAXIMUM is searched between 500 and 4000 (because there is no M1 the search region starts at the stimulus time at 3300) There is a minimum at 3300 (see Figure 72 NOTFOUND) so this is also not a rising / descending signal.
Skin processing 75
0
LATENCY RISETIME 0
0
Step3 skin processing method 2
Table 9 Method 2 parameters Clicking on the red bar for method2 displays the following info: In METHOD 2, SCR amplitude is calculated by subtracting the mean value (BASELINE) in a certain time window before the marker [defined by BASELINE_START] from the highest amplitude (maximum, MAX) in a certain region [defined by MAX_START, MAX_END] after the marker. Default settings are based upon Benning et al. (2005): BASELINE is calculated as the mean in the second before stimulus onset and MAX is searched in the 1-5s interval after the marker. PARAMETERS: MAX_START: Start of time window after the marker (expressed in milliseconds) to calculate highest value (MAX) MAX_END: End of time window after the marker (expressed in milliseconds) to calculate highest value (MAX) BASELINE_START: Start of time window before the marker (expressed in milliseconds) to calculate the mean value (BASELINE). If baseline is set at 1000, the mean value in the period from 1 second before up to the marker is calculated. BASE 220,982
MEAN_AFTER#G 294,269
MAX 7000
MAXV AMPLITUDO 527,779 306,798
Table 10 data concerning method 2 BASE : the BASELINE value MEAN_AFTER#G: mean in the region: marker – ‘marker+40000ms’ MAX: place in time of the absolute maximum between MAX_START and MAX_END MAXV: signal value at MAX AMPLITUDO: MAXV-BASELINE. Note that if the value should be negative, it is reset to 0.
Step3 skin processing method 3 There is just one parameter:
Figure 74 method 3 parameter
Skin processing 76
Opmerking [u85]: [L5/9] ? wat is het doel van deze parameter? Marker + 40 s? Opmerking [A86]: {25/9/2008}{ADC5 /9} Dat moet u aan Bruno vragen.
Clicking on the red bar for method3 displays the following info: In METHOD 3, SCR amplitude is calculated as the difference between the highest (MAX) and the lowest value (MIN) in a certain time window (defined by START-END). If MAX comes before MIN, than SCR is scored as 0. METHOD 3 is the most commonly used method to calculate SCR (see e.g. Elaad et aL., 2006). Default setting is 1000-5000s. PARAMETERS: START: Start of time window after the marker (expressed in milliseconds) to calculate highest (MAX) and lowest value (MIN). END: End of time window after the marker (expressed in milliseconds) to calculate highest (MAX) and lowest value (MIN) Data belonging to method 3 are (trial 17 from Table 4): MINM3 4500
MINM3V 197,024
MAXM3 MAXM3V M3VAL 7000 527,779 330,755
MINM3: time of lowest value in time window MINM3V: lowest signal value in time window MAXM3: time of highest value in time window MAXM3V: highest signal value in time window M3VAL: MAXV3-MINV3 Step4 skin processing SCL (method 4) Method 4 is called SCL with the following parameters: Opmerking [u87]: [L5/10]Hier staat geen ‘number before’ in… Opmerking [A88]: {25/9/2008}9ADC5 /10} Is nu bijgevoegd.
Figure 75 SCL (method 4) parameters Clicking on the red bar for SCL displays the following info: SCL is calculated by subtracting the mean value in certain time frames before the marker from the mean value in certain time frames after the marker. The length of this time frame is defined by LENGTH and the number of time frames is defined by NUMBER BEFORE/AFTER. In this way, change in skin conductance amplitude changes can be calculated over time.
Skin processing 77
For example, If the marker indicates stimulus onset, and LENGTH is set at 5000, NUMBER BEFORE at 1 and NUMBER AFTER at 5, PSPHA calculates the mean value in the 5 seconds before stimulus onset, and takes that as the baseline value Mean values are calculated in the time frames 0-5s, 5-10s, …, and 20-25s. PARAMETERS: NUMBER BEFORE : Number of time frames before the marker to calculate SCL NUMBER AFTER: Number of time frames after the marker to calculate SCL LENGHT: Size of time frames (expressed in milliseconds) after the marker to calculate SCL Note that, at this moment, this text is not quit correct: NUMBER BEFORE is always 1 and the LENGHT of this time frame before the marker is called: BASELINE. Data belonging to SCL are (trial 17 from Table 4): BEG1 END1 M4V1 MAX4V1 BEG2 END2 M4V2 MAX4V2 1600 2600 220,982 9999 2600 3600 206,473 214,342 BEG3 END3 M4V3 MAX4V3 BEG4 END4 M4V4 MAX4V4 3600 4600 197,747 199,71 4600 5600 222,99 271,645 BEG5 END5 M4V5 MAX4V5 BEG6 END6 M4V6 MAX4V6 5600 6600 404,344 511,473 6600 7600 517,21 527,779
Data ending with 1 belong to the time frame before the marker (BASELINE)
We zouden eventueel ook graag 1) een maximum berekend zien voor het totale interval na stimulus-onset (bijkomend bij de maxima per interval zoals nu al gedefinieerd). 2) meteen een verschilscore krijgen met de basislijnwaarde. Nu krijgen we de maximum waarde per interval, waarvan we zelf nog de basislijnwaarde moeten aftrekken. Het zou gemakkelijk zijn als dat in PSPHA gebeurt, zodat de output (ook) de stijging in huidgeleiding t.o.v. basislijn geeft
Skin processing 78
Opmerking [A89]: {25/9/2008}{ADC5 /11} Akkoord. Ik moet dit echter met Bruno afspreken want het is de "GENT" tekst die hier staat. Anders moeten we de tekst ontdubbelen. Opmerking [u90]: [L5/11] Liefst aanpassen schept veel verwarring
6
Chapter Opmerking [u91]: [L6/1] -Voor de Leuven en Gent versie apart de verschillende verwerkingsstappen uitleggen en illustreren met grafische voorbeelden. -Smoothing en filtering apart uitleggen Opmerking [A92]: {26/9/2008}{ADC6 /1} Er is voor de leuven data geen smoothing: dit is nu in de tekst bijgevoegd.
Chapter 6 EMG processing. PROFILE PARAMETERS EMG
Figure 76 EMG parameters
EMG processing. 79
Sensitivity As defined earlier, 5 sensitivity values can be defined.
Figure 77 EMG sensititity Great care should be taken to prevent "steps" when the sensitivity is changed inside a trial.
EMG processing. 80
startle_probe The startle probe, which is just an active boolean is created with a special formula in the PSPDEF file: If a formula contains "S.AM("NAM",,N) with NAM as test symbol and N a digit, an active boolean will start at N (TIME in milliseconds) with name: NAM. example:
S.AM("X",,500)
In this example it is set to 500 ms after the start of each trial. Opmerking [A93]: {26/9/2008}{ADC6 /2} Denk eraan: De wijze waarop een Starle probe is gedefinieerd in de pspdef file is veranderd. De vorige werkwijze bleek toch niet te werken.
More then one active boolean can be generated in this way as in the next example: S.AM("X",,500) S.AM("Y",,1000)
Algorithm sequence for EMG analysis PSPHA produces two output data file for EMG analysis: EMG.CSV and EMGBIS.CSV. EMG.CSV is displayed when clicking on the EMG data channel, EMGBIS.CSV is displayed when clicking on the EMGRAW channel. EMG is data specific for Leuven, EMGBIS is the data processing as used in Ghent. EMG.CSV processing. There is no filtering or smoothing before data processing Here is a typical example:
Figure 78 EMG with the output data: CLIENT '23-2-2007 12:45:40'
TRIALN BASELINE MAX 1
15,714
578
MAXV 73
REJECT NON_RESPPONS 0
0
EMG processing. 81
stim
probe 0
load 0
0
DATE 712121103
Table 11 EMG.CSV EMG.CSV uses the following parameters:
Table 12 EMG (Leuven) parameters BASELINE: mean value between startle+BLBEG and startle+BLEND MAX: time of absolute maximum value between startle+MAXBEG and startle+MAXEND MAXV: absolute maximum value between startle+MAXBEG and startle+MAXEND EMG: Changing REJECT and NON_RESPONS parameters It is possible to REJECT each EMG trial or marking it as a NON-RESPONS one. A TRIAL should be REJECT(ed) when the client occasionally blinks just before the startle probe. In that case there is no good baseline and no good response can be calculated. The NON-RESPONSE case occurs when the client does not blink in response to the probe. For each trial the experimenter can press the R key that toggles the value of the REJECT parameter (0 or 1) or the N key that toggles the NON_RESPONS parameter (0 or 1). (see table 12). To prevent accidental key press the experimenter must enable the R and N keys by pressing M just once. EMGBIS.CSV EMGBIS is the EMG processing as done at Ghent. The data for Figure 78 EMG is:
TRIALN MEAN MAX MAXV AMPLITUDO 1 14,311 582 57,82 43,509 LATENCYMAX LATNCY3XLR LATNCY3XRL LATNCY3XDIF 82 67 66 29
Table 13 EMGBIS data The parameters used are:
EMG processing. 82
Figure 79 EMGBIS parameters
Figure 80 RAW EMG data (BLUE) and data after FIR filtering (RED) These data the date are smoothed with a FIR filter. Note that the FIR filter is only calculated for the region: (X) marker (at 500 in this example) and X+MAXENDBRUNO. (at 500+200=700 in this example). FIR filtering is a very time consuming calculation. Therefore it is only used in the area of interest. MEAN: The signal mean between MARKER and MARKER+BASELINEBRUNO. MAX: The highest maximum between MARKER+MAXBEGBRUNO and MARKER+MAXENDBRUNO. MAXV: The signal value at MAX AMPLITUDO: MAXV-MEAN LATENCYMAX: MAX-MARKER (in milliseconds) LATNCY3XLR: distance in ms from MARKER to first point with value MEAN*3 between MARKER+21 and MARKER+80 ms. LATNCY3XRL: distance from MARKER to last point with value MEAN*3 between MARKER+21 and MARKER+80 ms. LATNCY3XDIF: The absolute maximum (MAX) between MARKER+21 and MARKER+80 ms is searched. Then the highest difference between two data points between MAX down to MARKER+21 is searched (DIFMAX). Then the channel with differences between two data points= DIFMAX*0.1 is searched between the DIFMAX point down to MARKER+21 is. The time of this last point is LATNCY3XDIF
EMG processing. 83
LATNCY3XLR, LATNCY3XRL, LATNCY3XDIF are visible if you click on W1:
EMG processing. 84
Figure 81 VALDIF, VALRL & VALLR For this example MARKER is AT 500ms. LATNCY3XLR=67 (=567 in above figure). LATNCY3XRL=66 (566 in above figure). LATNCY3XDIF=29 (=529). You can check this by setting a [ or ] marker at the start of each region. See example in Figure 82
Figure 82 The smoothing algorithm: FIR filter What is FIR filtering FIR filters are one of two primary types of digital filters used in Digital Signal Processing (DSP) applications (the other type being IIR). The impulse response is "finite" because there is no feedback in the filter. The filter is "applied" to the data signal by transforming each data point into another according to the following formula. Specifically28, each output value is computed as the sum of the cross products of the weights and a symmetrical set of adjacent input data points, as follows:
28
NITSCHKE, J. B., MILLER, G.A., COOK III, E. W., (1998). Digital filtering in EEG/ERP analysis: Some technical and empirical comparisons. Behavior Research Methods, Instruments, & Computers 1998, 30 (1), 54-67. (http://dionysus.psych.wisc.edu/Lit/Articles/NitschkeJ1998a.pdf)
EMG processing. 85
Opmerking [A94]: {26/9/2008}{ADC6 /3} Ik heb de uitleg over FIR aangepast en de al te technische tekst verschoven naar deel 2 van de manual.
Yi
j
W * X
i j
i
t i
where W is the series of 2j+1 weights (subscripted -j to +j ), X is the input time series, Y is the filtered time series, and the subscript t refers to each time point in the input series. This cross-multiplication and summing procedure, when carried out across a range of values of t, is referred to as convolution. The 2j+1 weights are symmetric (i.e., Wi Wi ) about an unpaired centre weight, W0. Such filters have a finite impulse response (FIR), a term referring to a filter’s response to a perturbation in an otherwise consistent input function. Filters that define output points solely on the basis of input points are said to have a finite impulse response, because the arithmetic effect of a single aberrant input point (an “impulse”) is confined to the 2j points adjacent to it. As a result, the perturbation disappears after a finite amount of time. A variety of FIR filters have been described in the EEG/ERP literature, Although any filter can be simulated with this approach, we use a "band-pass" filter. The band pass filter is generated with a MS-DOS program FWTGEN.EXE from Cook. RUN after EMG for all trials.
Opmerking [u95]: [L6/2] Werkt dit al?
This command scans all trials at once and makes "aggregate" parameters.
Opmerking [A96]: {26/9/2008}{ADC6 /4} Nu wel
STEP1: MEAN PSPHA scans all MEAN values for all trials starting from trial 2 and calculate the MEAN EMG from al the MEAN trial values (MERGE_MEAN). STEP2: STDEV PSPHA scans all STDEV values for all trials starting from trial 2 and calculates the mean STDEV from al the STDEV trial values (MERGE_STDEV). For each TRIAL, STDEV is the standard deviation for the same range as for the MEAN calculation. STEP3: The MEAN values for all trials is checked. If is does not fall between 0 and MERGE_MEAN+MAXDEV*MERGE_MEAN, a question is asked. The user can accept the date, are replace the MEAN value with an error value (9999) in the trial.
EMG processing. 86
MAXDEV is defined in the EMG parameters list:
Figure 83 MAXDEV After running: "run after EMG for all trials" a message is displayed:
Figure 84 (33,077=MERGE_MEAN+2.5*MERGE_STDEV) After confirming, the next massage is displayed for each out of range trial:
Figure 85 This massage shows: the trial number (5), TRIAL MERGE_MEAN (26,65) and MERGE_STDEV (2,57). (26,65*2,5*2,57-33,077). The values on the second line are the trial STDEV and MEAN. It is obvious that the trial MEAN (47,218) is outside the range 0-33,077). At the end the following message appears:
EMG processing. 87
Figure 86 Note that TrialsSkipped are those without startle. Parameters differs from Trials if there are more then one active boolean in a trial.
EMG processing. 88
7
Chapter
Chapter 7 ECG processing. PROFILE PARAMETERS ECG
Figure 87 EMG parameters
ECG processing. 89
Sensitivity As defined earlier, 5 sensitivity values can be defined.
Figure 88 EMG sensititity Great care should be taken to prevent "steps" when the sensitivity is changed inside a trial.
ECG processing. 90
ECG processing. 91
APPENDIX: UPDATES 29/9/2008 This page is for internal use only. It is in Dutch. De meeste aanpassingen aan PSPHA zijn extra parameters die nu toelaten om bijna alle parameters aan te passen. Ze zijn ingevuld met een default waarde, zodat u PSPHA kunt verder gebruiken zoals vroeger. Er zijn een aantal menu opties, die voor de experimentator van geen nut bleken, verwijderd. De meest belangrijke aanpassing is de STARTLE_PULSE (Pag 28) definitie in de .PSPDEF file (EMG data) U moet dus een (kleine aanpassing maken in een EMG .PSPDEF file voor inlezen van nieuwe EMG data. De reden van deze aanpassing is het invoeren van de mogelijkheid om active booleans te combineren tot nieuwe markers met behulp van een formule (zoals gevraagd) OPMERKING: uw opmerkingen uit de manual zijn blauw Mijn vragen om meer uitleg in het rood stukken uit de manual: groen
Volgende aanpassingen zijn doorgevoerd: 1. Een aantal menu opties (Pag 14) die enkel voor de eindgebruiker van geen nut zijn, zijn verwijderd. 2. Bij SCL is er naast NUMBER AFTER nu ook NUMBER BEFORE bijgevoegd. (manual Pag 66) 3. Het ADJUST CO2 MAX bij ijking (manual Pag 35) is bijgevoegd bij de ModifyProfileParameters 4. active booleans kunnen nu bijgemaakt worden door een formule. Zoals opgemerkt werkte de startle_probe niet goed bij EMG. Dit nu ook vervangen door een formule, waarbij meerdere markers per TRIAL kunnen bijgevoegd worden. (manual Pag 28) 5. moving FETCO2 signal in CO data (manual Pag 60) is vervangen door een betere methode. 6. OP P27: Maar voor de active booleans CS / US / Start_insp (en bij uitbreiding active integer sensitivity) zijn toch headers nodig? Hoe kan het anders werken – is de volgorde bepalend? Bv. neemt PSPHA altijd eerste active boolean als CS, tweede = US, … Wat dan met start_insp? Belangrijke vraag is of CS / US en start_insp kunnen worden gecombineerd en hoe dat dan juist moet gebeuren [zeker als we “has headers” af zetten] has headers heeft nooit een betekenis daar de naam van een data colom in de PSPDEF file (onder ) gegeven wordt. 7. P26 [L3/2] Als de timing van de eerste sample niet overeenkomt met deze sample rate, worden de data voor die trial niet verwerkt.
appendix. 92
Dat probleem duikt op bij SKIN-data. Voorbeeld: sample rate = 10 Hz, eerste timingwaarde = 105. Dan krijg je een error-message en worden de data niet verwerkt. Dit is ook soms ook een probleem bij ademhaling gelieve een voorbeeld op te sturen 8. P38 de opmerking over FETCO2TIM is aangepast. 9. P39 Pinsp: " Armand, kan je ook beschrijven hoe PSPHA dit doet? Wordt er bv naar inflection points gezocht, en hoe…?" Er is tekst over de berekening van Pinsp bijgevoegd. 10. P41 opmerking: Waar ligt de horizontale lijn dan? Op figuur lijkt de laagste ‘top’ gekozen te worden. Dit is eigen aan het marquardt algoritme. Er is een verduidelijking toegevoegd. 11. P42: Pinexp is defined if the distance between the two gauss tops is more then 500 ms. The value 500 is defined in the LEUVEN2007.TXT script. Armand, kan je net zoals bij Pinsp en Pexp ook hier de betreffende regel uit het script kopiëren en hierbij zetten? de waarde van de minimum afstand tussen de 2 (gauss) tops voor Pinexp en Pexpin zijn niet meer vast. Ze kunnen ingesteld worden door 2 parameters in de "ModifyProfileParameters" tab RESPI Ook de parameters DELTAPLAREAU en de minimum waarde voor de afgeleide MINDERIVATIV kan indien nodig aangepast worden. De tekst is aangepast en er is een figuur ter verduidelijking bijgevoegd. 12. P42: Armand, zou het niet beter zijn van een relatief criterium te gebruiken, bv CO2 moet onder de 20% van de 3 voorgaande maxCO2’s blijven? Wil u dat ik dit criterium er permanent inzet of als optie? 13. P42 Daarnaast: is er een manier om deze PinexpBADCO2 toch te aanvaarden als Pinexp, ondanks het feit dat het CO2 criterium niet gehandaafd is? Is in sommige gevallen zinvol, bv bij inademing vanmet CO2-verrijkte lucht U moet gewoon dit gebied in CO2 als noCO2 check instellen. 14. P42 Armand, hoe zit het met overlappende irregularities (hier Oinsp en Pinsp): is er een soort van hiërarchie, en hoe wordt dit verwerkt in de output tabel waar de totale tijd van irregularities in een ademcyclus wordt weergeven? in feite wijst dit op verkeerd geïnterpreteerde signalen. Ik denk dat het in dit geval het beste is om een oisp/oexp weg de vegen met de hand. 15. P44 Meerdere opmerkingen over Pexpin zijn aangepast en de RULE3 is verwijderd. 16. P47:PSPHA does not check CO2 during Oinsp Armand, is het mogelijk om dit criterium van een omkering van het CO2-signaal tijdens Oinsp toe te voegen? Kunt u meer precies zeggen wat u daar mee bedoelt? 17. P49: PSPHA does not check CO2 during Oexp Kan dat toegevoegd worden? idem opmerking hierboven appendix. 93
18. P50(OPM u97) Het is wat vreemd dat CO2OOR hier op de proppen komt. Ergens apart behandelen? Niet duidelijk wat CO2 OOR te maken heeft met Ovv’s De definitie van CO2OOR is naar een volgende paragraaf verplaatst. 19. P52 Step 2 INIT driftcompensatie is een optie die terug is ingevoerd 20. P52 Step 3: VOLRemoveSpikes moet ik deze module verwijderen? 21. P53 REFERENCE VOLUME daar REFINT niet meer gebruikt wordt is het uit PSPHA verwijderd. Er is bijgevoegd waarvoor REFVOL gebruikt wordt. 22. P54 REFCO2: opmerking bijgevoegd waarvoor het gebruikt wordt. 23. EMG zoals aangegeven is de startle_pulse definitie nu met een formule in PSPDEF 24. Voor wat betreft de ademhaling, zijn er los van de manual nog enkele zaken die ik graag verder met u zou opnemen. Ik lijst ze hieronder al op, maar kom er later in meer detail op terug: - algoritmes voor Pexpin vereenvoudigen (zie ook comments in manual)? RULE3 is verwijderd. - Nieuwe mogelijkheden voor herplaatsen markers in CO2-signaal toevoegen in manual is in manual bijgevoegd.(H4 P60) - Driftcorrectie voor pneumo herinvoeren (zie ook comments in manual)? is ingevoerd. - HMS – formaat (data afkomstig van lifeshirt): het lukt niet om de CO2-as te shiften met dit formaat, er verschijnt een boodschap dat ‘flow’ niet gecalibreerd is en de shift kan niet worden gedaan. Zoals je weet moet in dit formaat de flow niet gecalibreerd worden… - zou nu moeten werken - Process only CO2: - o de output tabel is me niet helemaal duidelijk - o de CO2-waarden die gegeven worden (laatste kolom) kloppen niet (verschillen ook van diegene die je krijgt als je “process both pneumo en co2” doet). - o PSPHA slaat verscheidene CO2max-en over (ademhalingen waarbij hij geen max detecteert). - o Zou het ook mogelijk zijn om een BADCO2-kolom in de output te krijgen zodat de aldus gemarkeerde regio’s in de output tabel komen. CO2 only berekend de MAXIMA in het CO2 signaal. Dit lijkt te kloppen. MAAR FETCO2, wat in de pneumo/CO tabel gegeven wordt is anders gedefinieerd: "FETCO2: The CO2 signal maximum between startTe and endTe + (endTe - startTe) *
0.3. Note that as from 14-oct-2007 this value can be changed manually by the user. and FETCO2TIM, the time is added." dus het kan zijn dat er bepaalde CO2 maxima geen FETCO2 waarde hebben. Volgende bedenkingen/vragen dienen eerst overlegd te worden om ze te kunnen implementeren: -
-
smoothing/filtering CO2 signaal: ik snap niet helemaal waarom FIR filtering niet werkt op een traag signaal zoals CO2. FIR heeft een aantal belangrijke voordelen op smoothing (de ‘waveform’ blijft dezelfde bij FIR, maar verschuift wat en wordt afgerond bij smoothing, dacht ik). Ik heb ooit die FIR filtering (bandpass) via VPM uitgeprobeerd op een pneumosignaal (dat ook traag is), en had toen althans geen probleem. Maar misschien ligt het bij co2 anders, Voorbeeld opsturen met FIR parameters!
appendix. 94
-
Sigh-detection implementeren? criteria moeten nog afgesproken worden CO2 criterium voor Oinsp en Oexp implementeren? criteria moeten nog afgesproken worden
appendix. 95