Ejemplo n.º 1
0
    def show_scene_section(self, x1: float, x2: float):
        start = int(x1) if x1 > 0 else 0
        end = int(x2) if x2 < self.num_samples else self.num_samples
        path = path_creator.create_path(np.log10(self.plot_data), start, end)
        self.path_item.setPath(path)

        try:
            peak_path = path_creator.create_path(np.log10(self.peak), start, end)
            self.peak_item.setPath(peak_path)
        except RuntimeWarning:
            pass
Ejemplo n.º 2
0
    def show_scene_section(self, x1: float, x2: float, subpath_ranges=None, colors=None):
        start = int(x1) if x1 > 0 else 0
        end = int(x2) if x2 < self.num_samples else self.num_samples
        paths = path_creator.create_path(np.log10(self.plot_data), start, end)
        self.set_path(paths, colors=None)

        try:
            if len(self.peak) > 0:
                peak_path = path_creator.create_path(np.log10(self.peak), start, end)[0]
                self.peak_item.setPath(peak_path)
        except RuntimeWarning:
            pass
Ejemplo n.º 3
0
    def show_scene_section(self,
                           x1: float,
                           x2: float,
                           subpath_ranges=None,
                           colors=None):
        start = int(x1) if x1 > 0 else 0
        end = int(x2) if x2 < self.num_samples else self.num_samples
        paths = path_creator.create_path(np.log10(self.plot_data), start, end)
        self.set_path(paths, colors=None)

        try:
            if len(self.peak) > 0:
                peak_path = path_creator.create_path(np.log10(self.peak),
                                                     start, end)[0]
                self.peak_item.setPath(peak_path)
        except RuntimeWarning:
            pass
Ejemplo n.º 4
0
    def show_scene_section(self, x1: float, x2: float, subpath_ranges=None, colors=None):
        """

        :param x1: start of section to show
        :param x2: end of section to show
        :param subpath_ranges: for coloring subpaths
        :type subpath_ranges: list of tuple
        :param colors: for coloring the subpaths
        :type color: list of QColor
        :return:
        """
        paths = path_creator.create_path(self.plot_data, start=self.__limit_value(x1),
                                         end=self.__limit_value(x2),
                                         subpath_ranges=subpath_ranges)
        self.set_path(paths, colors=colors)
Ejemplo n.º 5
0
 def show_scene_section(self, x1: float, x2: float):
     path = path_creator.create_path(self.plot_data, self.__limit_value(x1), self.__limit_value(x2))
     self.path_item.setPath(path)