def set_intervals_and_averages(self, ten=True, fifty=True, all_avg=False):
        print("Processing file: " + self.filename)
        if (self.filtered_MLII == []):
            filter_FIR = denoise.ECG_FIR_filter()
            signal_MLII = denoise.denoising_signal_FIR(self.MLII, filter_FIR)
            self.filtered_MLII = signal_MLII
            print("Filtered MLII records from : " + self.filename)

        if (self.segmented_R_pos == []):
            print("Finding R pos")
            self.segmented_beat_class, self.segmented_class, self.segmented_R_pos, self.segmented_R_pos = hs.r_peak_and_annotation(
                self.filtered_MLII, self.annotations,
                list(range(0, len(self.filtered_MLII))))

        QRS_properties, P_Q_properties, P_Q_neg, P_R_properties, P_R_neg, S_T_properties, S_T_neg, R_T_properties, R_T_neg, P_T_properties, neg_P_T, P_T_neg, neg_P_T_neg = interval.interval_and_average(
            self, ten, fifty, all_avg)

        self.QRS_interval = QRS_properties
        self.P_Q_interval = P_Q_properties
        self.neg_P_Q_interval = P_Q_neg
        self.P_R_interval = P_R_properties
        self.neg_P_R_interval = P_R_neg

        self.S_T_interval = S_T_properties
        self.neg_S_T_interval = S_T_neg
        self.R_T_interval = R_T_properties
        self.neg_R_T_interval = R_T_neg

        self.P_T_interval = P_T_properties
        self.neg_P_T_interval = neg_P_T
        self.P_neg_T_interval = P_T_neg
        self.neg_P_neg_T_interval = neg_P_T_neg
        print("Done proecessing: " + self.filename)
    def set_P_T_points_MLII(self,
                            time_limit_from_r=0.1,
                            sample_from_point=[5, 5],
                            to_area=False,
                            to_savol=False,
                            Order=9,
                            window_len=31,
                            left_limit=50,
                            right_limit=50,
                            distance=1,
                            width=[0, 100],
                            plateau_size=[0, 100]):
        print("Processing file: " + self.filename)
        if (self.filtered_MLII == []):
            filter_FIR = denoise.ECG_FIR_filter()
            signal_MLII = denoise.denoising_signal_FIR(self.MLII, filter_FIR)
            self.filtered_MLII = signal_MLII
            print("Filtered MLII records from : " + self.filename)

        if (self.segmented_R_pos == []):
            print("Finding R pos")
            self.segmented_beat_class, self.segmented_class, self.segmented_R_pos, self.segmented_R_pos = hs.r_peak_and_annotation(
                self.filtered_MLII, self.annotations,
                list(range(0, len(self.filtered_MLII))))

        p_positives, p_negatives, p_properties, t_positives, t_negatives, t_properties = waveform.p_and_t_peak_properties_extractor(
            self, time_limit_from_r, sample_from_point, to_area, to_savol,
            Order, window_len, left_limit, right_limit, distance, width,
            plateau_size)

        self.P_points = p_positives
        self.P_points_properites = p_properties
        self.P_neg_points = p_negatives
        self.T_points = t_positives
        self.T_points_properites = t_properties
        self.T_neg_points = t_negatives
        print("Done proecessing: " + self.filename)
    def set_rr_intervals(self, ten=True, fifty=True, all_avg=True):
        print("Processing file: " + self.filename)
        if (self.filtered_MLII == []):
            filter_FIR = denoise.ECG_FIR_filter()
            signal_MLII = denoise.denoising_signal_FIR(self.MLII, filter_FIR)
            self.filtered_MLII = signal_MLII
            print("Filtered MLII records from : " + self.filename)

        if (self.segmented_R_pos == []):
            print("Finding R pos")
            self.segmented_beat_class, self.segmented_class, self.segmented_R_pos, self.segmented_R_pos = hs.r_peak_and_annotation(
                self.filtered_MLII, self.annotations,
                list(range(0, len(self.filtered_MLII))))

        self.rr_interval = rr_int.rr_interval_and_average(
            self, ten, fifty, all_avg)
        print("Done proecessing: " + self.filename)
    def set_r_properties_MLII(self,
                              sample_from_R=[5, 5],
                              to_area=False,
                              to_savol=True,
                              Order=9,
                              window_len=41,
                              left_limit=50,
                              right_limit=50,
                              distance=1,
                              width=[0, 100],
                              plateau_size=[0, 100]):
        print("Processing file: " + self.filename)
        if (self.filtered_MLII == []):
            filter_FIR = denoise.ECG_FIR_filter()
            signal_MLII = denoise.denoising_signal_FIR(self.MLII, filter_FIR)
            self.filtered_MLII = signal_MLII
            print("Filtered MLII records from : " + self.filename)

        if (self.segmented_R_pos == []):
            print("Finding R pos")
            self.segmented_beat_class, self.segmented_class, self.segmented_R_pos, self.segmented_R_pos = hs.r_peak_and_annotation(
                self.filtered_MLII, self.annotations,
                list(range(0, len(self.filtered_MLII))))

        self.R_pos_properites = waveform.r_peak_properties_extractor(
            self, sample_from_R, to_area, to_savol, Order, window_len,
            left_limit, right_limit, distance, width, plateau_size)
        print("Done proecessing: " + self.filename)