예제 #1
0
    def setUp(self):
        super(SingletViewerTest, self).setUp()

        self.canvas = Mock()
        self.viewer = SingletViewer(self.rootframe, self.canvas)
        self.do_render = Mock()
        self.viewer._do_render = self.do_render
예제 #2
0
    def __init__(self, mainframe):
        # Note: the figure we pass in is just a temporary placeholder.
        # 'Displayable Items' provide their own figure which the canvas can
        # be made to use, but it also requires one on its creation.
        #self.canvas = FigureCanvas(mainframe.main_panel, wx.ID_ANY, plt.figure())
        #mainframe.add_to_main_sizer(self.canvas)

        self._singlet_viewer = SingletViewer(mainframe.main_panel)
        self._triplet_viewer = TripletViewer(mainframe.main_panel)

        self._image_viewer = self._singlet_viewer
예제 #3
0
파일: insp_mplview.py 프로젝트: ijiraq/MOP
def main():
    app = wx.App()
    rootframe = wx.Frame(None)

    viewer = SingletViewer(rootframe)

    hdulist = fits.open(context.get_test_data_path(TEST_FILE))
    fits_image = Mock()
    fits_image.as_hdulist.return_value = hdulist

    viewer.display(fits_image)

    viewer.draw_marker(50, 50, 10)
    viewer.draw_marker(20, 70, 5)

    rootframe.Show()
    app.MainLoop()