Пример #1
0
 def plot_all(self, figsize=(13, 10)):
     plots = [
         self.raw(),
         self.plottable_vignette(),
         self.radiance(),
         self.undistorted(self.radiance())
     ]
     plot_types = ['Raw', 'Vignette', 'Radiance', 'Undistorted Radiance']
     titles = [
         '{} Band {} {}'.format(str(self.band_name), str(self.band_index),
                                tpe) for tpe in plot_types
     ]
     plotutils.subplotwithcolorbar(2, 2, plots, titles, figsize=figsize)
Пример #2
0
 def __plot(self, imgs, num_cols=3, plot_type=None, colorbar=True, figsize=(14, 14)):
     ''' plot the radiance images for the capture '''
     if plot_type == None:
         plot_type = ''
     else:
         titles = [
             '{} Band {} {}'.format(str(img.band_name), str(img.band_index), plot_type)
             for img
             in self.images
         ]
     num_rows = int(math.ceil(float(len(self.images))/float(num_cols)))
     if colorbar:
         return plotutils.subplotwithcolorbar(num_rows, num_cols, imgs, titles, figsize)
     else:
         return plotutils.subplot(num_rows, num_cols, imgs, titles, figsize)
Пример #3
0
 def __plot(self, images, num_cols=2, plot_type=None, color_bar=True, fig_size=(14, 14)):
     """
     Plot the Images from the Capture.
     :param images: List of Image objects
     :param num_cols: int number of columns
     :param plot_type: str for plot title formatting
     :param color_bar: boolean to determine color bar inclusion
     :param fig_size: Tuple size of the figure
     :return: plotutils result. matplotlib Figure and Axis in both cases.
     """
     if plot_type == None:
         plot_type = ''
     else:
         titles = [
             '{} Band {} {}'.format(str(img.band_name), str(img.band_index),
                                    plot_type if img.band_name.upper() != 'LWIR' else 'Brightness Temperature')
             for img
             in self.images
         ]
     num_rows = int(math.ceil(float(len(self.images)) / float(num_cols)))
     if color_bar:
         return plotutils.subplotwithcolorbar(num_rows, num_cols, images, titles, fig_size)
     else:
         return plotutils.subplot(num_rows, num_cols, images, titles, fig_size)