Ejemplo n.º 1
0
    def new_power_map(self):

        n = len([ed for ed in self.editor_area.editors if isinstance(ed, PowerMapEditor)])

        editor = PowerMapEditor(name="Power Map {:03n}".format(n + 1))
        if self.active_editor:
            editor.editor = self.control_pane.editor

        self._open_editor(editor)
Ejemplo n.º 2
0
    def new_power_map(self):

        n = len([
            ed for ed in self.editor_area.editors
            if isinstance(ed, PowerMapEditor)
        ])

        editor = PowerMapEditor(name='Power Map {:03d}'.format(n + 1))
        if self.active_editor:
            editor.editor = self.control_pane.editor

        self._open_editor(editor)
Ejemplo n.º 3
0
    def open_power_maps(self, ps):

        #         ps = self.open_file_dialog(action='open files',
        #                                       default_directory=paths.power_map_dir
        #                                       )
        #         p = '/Users/ross/Pychrondata_demo/data/scans/powermap-2013-07-17001.hdf5'
        #        p = '/Users/ross/Sandbox/powermap/powermap-2013-07-26005.hdf5'
        #         p = '/Users/ross/Sandbox/powermap/powermap-2013-07-27008.hdf5'
        #        p = '/Users/ross/Sandbox/powermap/Archive 2/powermap-2013-07-31001.hdf5'
        #         p = '/Users/ross/Sandbox/powermap/Archive 2/powermap-2013-07-31002.hdf5'
        #         p = '/Users/ross/Sandbox/powermap-2013-07-26005.hdf5'
        if ps:
            for p in ps:
                try:
                    #                p = '/Users/ross/Sandbox/powermap/Archive 2/powermap-2013-07-31{:03n}.hdf5'.format(i)
                    editor = PowerMapEditor(
                        #                                     name='Power Map {:03n}'.format(n + 1),
                        name='Power Map {}'.format(os.path.basename(p)))
                    editor.load(p)
                    self._open_editor(editor)
                except Exception:
                    self.debug('invalid power map file {}'.format(p))
Ejemplo n.º 4
0
    def open_power_maps(self, ps):

    #         ps = self.open_file_dialog(action='open files',
    #                                       default_directory=paths.power_map_dir
    #                                       )
    #         p = '/Users/ross/Pychrondata_demo/data/scans/powermap-2013-07-17001.hdf5'
    #        p = '/Users/ross/Sandbox/powermap/powermap-2013-07-26005.hdf5'
    #         p = '/Users/ross/Sandbox/powermap/powermap-2013-07-27008.hdf5'
    #        p = '/Users/ross/Sandbox/powermap/Archive 2/powermap-2013-07-31001.hdf5'
    #         p = '/Users/ross/Sandbox/powermap/Archive 2/powermap-2013-07-31002.hdf5'
    #         p = '/Users/ross/Sandbox/powermap-2013-07-26005.hdf5'
        if ps:
            for p in ps:
                try:
                #                p = '/Users/ross/Sandbox/powermap/Archive 2/powermap-2013-07-31{:03n}.hdf5'.format(i)
                    editor = PowerMapEditor(
                        #                                     name='Power Map {:03n}'.format(n + 1),
                        name='Power Map {}'.format(os.path.basename(p))
                    )
                    editor.load(p)
                    self._open_editor(editor)
                except Exception:
                    self.debug('invalid power map file {}'.format(p))