:param cutout: source cutout object to be display
        :type cutout: source.SourceCutout
176585
def display(self, cutout, use_pixel_coords=False):
        
        logging.debug("Current display list contains: {}".format(self._displayables_by_cutout.keys()))
        logging.debug("Looking for {}".format(cutout))
        assert isinstance(cutout, SourceCutout)
        if cutout in self._displayables_by_cutout:
            displayable = self._displayables_by_cutout[cutout]
        else:
            displayable = self._create_displayable(cutout)
            self._displayables_by_cutout[cutout] = displayable
        self._detach_handlers(self.current_displayable)
        self.current_cutout = cutout
        self.current_displayable = displayable
        self._attach_handlers(self.current_displayable)
        self._do_render(self.current_displayable)
        self.mark_apertures(cutout, pixel=use_pixel_coords)
        self.draw_uncertainty_ellipse(cutout)
891990
def show(self):
        """"""

        # noinspection PyPackageRequirements
        from IPython.display import Image, display

        fname = self.render()
        display(Image(filename=fname))
434129
def paintEvent(self, event):
        
        super(DebuggerPanel, self).paintEvent(event)
        painter = QPainter(self)
        painter.fillRect(event.rect(), self.editor.sideareas_color)

        for top, line_number, block in self.editor.visible_blocks:
            if self.line_number_hint == line_number:
                self._draw_breakpoint_icon(top, painter, 'transparent')
            if self._current_line_arrow == line_number and not self.stop:
                self._draw_breakpoint_icon(top, painter, 'arrow')

            data = block.userData()
            if data is None or not data.breakpoint:
                continue

            if data.breakpoint_condition is None:
                self._draw_breakpoint_icon(top, painter, 'breakpoint')
            else:
                self._draw_breakpoint_icon(top, painter, 'condition')
330595
def showEvent(self, event):
        
        super(XWalkthroughWidget, self).showEvent(event)
        
        self.autoLayout()
        self.restart()
        self.setFocus()
        self.raise_()
610124
def show_popup(self, *args, **kwargs):
        
        self.mw = JB_MainWindow(parent=self, flags=QtCore.Qt.Dialog)
        self.mw.setWindowTitle(self.popuptitle)
        self.mw.setWindowModality(QtCore.Qt.ApplicationModal)
        w = QtGui.QWidget()
        self.mw.setCentralWidget(w)
        vbox = QtGui.QVBoxLayout(w)
        pte = QtGui.QPlainTextEdit()
        pte.setPlainText(self.get_popup_text())
        vbox.addWidget(pte)
        # move window to cursor position
        d = self.cursor().pos() - self.mw.mapToGlobal(self.mw.pos())
        self.mw.move(d)
        self.mw.show()
1341186
def opt_display(self, display):
        
        key = get_enum_key(display, DISPLAYS)
        if key is not None:
            self.conf["display"] = key
            self.display = DISPLAYS[key]
            print("Set display %r" % key)
        else:
            print("Unknown display %r" % display)
1364399
def on_open_output_tool_clicked(self):
        
        output_path = self.output_path.text()
        if not output_path:
            output_path = os.path.expanduser('~')
        # noinspection PyCallByClass,PyTypeChecker
        filename, __ = QFileDialog.getSaveFileName(
            self, tr('Output file'), output_path, tr('Raster file (*.tif)'))
        if filename:
            self.output_path.setText(filename)
520115
def get_scaled_cutout_basic(self, x1, y1, x2, y2, scale_x, scale_y,
                                method='basic'):
        

        new_wd = int(round(scale_x * (x2 - x1 + 1)))
        new_ht = int(round(scale_y * (y2 - y1 + 1)))

        return self.get_scaled_cutout_wdht(x1, y1, x2, y2, new_wd, new_ht,
                                           # TODO:
                                           # this causes a problem for the
                                           # current Glue plugin--update that
                                           #method=method
                                           )
1280877
def showcutoffs(self, redblue = False):
        
        
        highmask = self.numpyarray > self.z2
        lowmask = self.numpyarray < self.z1
        if redblue == False :
            if self.negative :
                self.drawmask(highmask, colour = 255)
                self.drawmask(lowmask, colour = 0)
            else :
                self.drawmask(highmask, colour = 0)
                self.drawmask(lowmask, colour = 255)
        else :
            
            self.drawmask(highmask, colour = (255, 0, 0))
            self.drawmask(lowmask, colour = (0, 0, 255))
1027557
def show_selection(self, star):
        
        try:
            # NOTE: this works around a quirk of Qt widget set where
            # selecting programatically in the table triggers the widget
            # selection callback (see select_star_cb() in Catalogs.py for Qt)
            self._select_flag = True
            self.mark_selection(star)

        finally:
            self._select_flag = False
993564
def show(self, fmt=None):
        
        # force any delayed redraws
        # TODO: this really needs to be addressed in get_rgb_image_as_bytes()
        # of the various superclasses, as it affects other backends as well
        self.redraw_now()

        from IPython.display import Image

        if fmt is None:
            # what format are we using for the HTML5 canvas--use that
            settings = self.get_settings()
            fmt = settings.get('html5_canvas_format', 'png')

        return Image(data=bytes(self.get_rgb_image_as_bytes(format=fmt)),
                     format=fmt, embed=True)
88126
def cutout_source(x_pos, y_pos, image, kernelsize, shift=True):
    
    if kernelsize % 2 == 0:
        raise ValueError("even pixel number kernel size not supported!")
    x_int = int(round(x_pos))
    y_int = int(round(y_pos))
    n = len(image)
    d = (kernelsize - 1)/2
    x_max = int(np.minimum(x_int + d + 1, n))
    x_min = int(np.maximum(x_int - d, 0))
    y_max = int(np.minimum(y_int + d + 1, n))
    y_min = int(np.maximum(y_int - d, 0))
    image_cut = copy.deepcopy(image[y_min:y_max, x_min:x_max])
    shift_x = x_int - x_pos
    shift_y = y_int - y_pos
    if shift is True:
        kernel_shift = de_shift_kernel(image_cut, shift_x, shift_y, iterations=50)
    else:
        kernel_shift = image_cut
    kernel_final = np.zeros((kernelsize, kernelsize))

    k_l2_x = int((kernelsize - 1) / 2)
    k_l2_y = int((kernelsize - 1) / 2)

    xk_min = np.maximum(0, -x_int + k_l2_x)
    yk_min = np.maximum(0, -y_int + k_l2_y)
    xk_max = np.minimum(kernelsize, -x_int + k_l2_x + n)
    yk_max = np.minimum(kernelsize, -y_int + k_l2_y + n)

    kernel_final[yk_min:yk_max, xk_min:xk_max] = kernel_shift
    return kernel_final
299654
def remake_display(self, *args):
        
        Builder.load_string(self.kv)
        if hasattr(self, '_kv_layout'):
            self.remove_widget(self._kv_layout)
            del self._kv_layout
        self._kv_layout = KvLayout()
        self.add_widget(self._kv_layout)
489063
def show(self, **kwargs):
        """"""
        show_kwargs = copy.deepcopy(self._show_kwargs)
        show_kwargs.update(kwargs)
        return show_menu(self.entries, **show_kwargs)
504930
def display_channel(soup):
    
    display_channel = []

    tags = raw_parser.display_channel(soup)
    for tag in tags:
        display_channel.append(node_text(tag))

    return display_channel
1265202
def toggle_view(self, *args, **kwargs):
        
        group_to_display = self.views.popleft()
        self.cur_view.value = group_to_display
        for repo in self.tools_tc:
            for tool in self.tools_tc[repo]:
                t_groups = self.manifest.option(tool, 'groups')[1]
                if group_to_display not in t_groups and \
                        group_to_display != 'all groups':
                    self.tools_tc[repo][tool].value = False
                    self.tools_tc[repo][tool].hidden = True
                else:
                    self.tools_tc[repo][tool].value = True
                    self.tools_tc[repo][tool].hidden = False
        # redraw elements
        self.display()
        # add view back to queue
        self.views.append(group_to_display)
939004
def display(self, ret, indent, prefix, out):
        '''
        
        '''
        if isinstance(ret, six.string_types):
            lines = ret.split('\n')
            for line in lines:
                out += '{0}{1}{2}{3}{4}\n'.format(
                        self.colors['RED'],
                        ' ' * indent,
                        prefix,
                        line,
                        self.colors['ENDC'])
        elif isinstance(ret, dict):
            for key in sorted(ret):
                val = ret[key]
                out += '{0}{1}{2}{3}{4}:\n'.format(
                        self.colors['CYAN'],
                        ' ' * indent,
                        prefix,
                        key,
                        self.colors['ENDC'])
                out = self.display(val, indent + 4, '', out)
        return out