TEAP (Toolbox for Emotion Analysis using Physiological Signals) doc
qc_histo.m
Go to the documentation of this file.
1 function HDR = qc_histo(fn,arg2)
2 % QC_HISTO performs quality control using histogram and entropy analysis
3 %
4 % R = qc_histo(filename [,CHAN]);
5 %
6 % plota(R); displays the result as in [1]
7 %
8 % References:
9 % [1] A. Schlögl, B. Kemp, T. Penzel, D. Kunz, S.-L. Himanen, A. Värri, G. Dorffner, G. Pfurtscheller.
10 % Quality Control of polysomnographic Sleep Data by Histogram and Entropy Analysis.
11 % Clin. Neurophysiol. 1999, Dec; 110(12): 2165 - 2170.
12 % http://dx.doi.org/10.1016/S1388-2457(99)00172-8
13 
14 
15 % $Id: qc_histo.m 2202 2009-10-27 12:06:45Z schloegl $
16 % Copyright (C) 2006 by Alois Schloegl <a.schloegl@ieee.org>
17 % This is part of the BIOSIG-toolbox http://biosig.sf.net/
18 %
19 
20 % This program is free software; you can redistribute it and/or
21 % modify it under the terms of the GNU General Public License
22 % as published by the Free Software Foundation; either version 2
23 % of the License, or (at your option) any later version.
24 %
25 % This program is distributed in the hope that it will be useful,
26 % but WITHOUT ANY WARRANTY; without even the implied warranty of
27 % MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28 % GNU General Public License for more details.
29 %
30 % You should have received a copy of the GNU General Public License
31 % along with this program; if not, write to the Free Software
32 % Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
33 
34 
35 MODE=[];
36 if nargin<2,
37  CHAN=0;
38 elseif ~isnumeric(arg2)
39  CHAN=0;
40  MODE=arg2;
41 else
42  CHAN = arg2;
43 end;
44 
45 HDR = sopen(fn,'r',CHAN,MODE);
46 [s,HDR] = sread(HDR);
47 sclose(HDR);
48 
49 HDR.HIS = histo3(s);
50 HDR.RES = hist2res(HDR.HIS);
51 %HDR.RES = y2res(s);
52 %HDR.Threshold = repmat([-1,1]/1e2,HDR.NS,1);
53 HDR.datatype = 'qc:histo';
54 
55 [HDR.AR,HDR.RC,HDR.PE] = lattice(center(s)',50);
56 
57 
hist2res
function hist2res(in H, in fun)
sclose
function sclose(in HDR)
qc_histo
function qc_histo(in fn, in arg2)
sopen
function sopen(in arg1, in PERMISSION, in CHAN, in MODE, in arg5, in arg6)
sread
function sread(in HDR, in NoS, in StartPos)