classdef Tape
    %TAPE Summary of this class goes here
    %   Detailed explanation goes here    
    properties
        name;
        truth;
        
        tm;
        pcg;
        ecg;
        
        fsig;
        
        seg_ind;
        s1_end;
        s2_beg;
        s2_end;
        n_beats;
        beat_len;
        assigned_states;
        
        inv_beats;
        n_inv_beats;
    end
    
    methods
        function t = Tape(name, truth, tm, signal)
            if nargin > 0
                t.name = name;
                t.truth = truth;
                t.tm = tm;
                t.pcg = signal(:,1); 
                t.pcg(isnan(t.pcg)) = 0;
                if size(signal, 2) > 1
                    t.ecg = signal(:,2);
                end
            end
        end
        
        function l = has_ecg(obj)
            l = ~isempty(obj.ecg);
        end
        
        function l = has_segmentation(obj)
            l = ~isempty(obj.seg_ind);
        end
    end
end

