Esempio n. 1
0
    def open_done(self):
        self.is_file_open = True
        self.setWindowTitle('KlustaViewa: {0:s}'.format(
            os.path.basename(self.loader.filename)
        ))

        register(FileLogger(self.loader.log_filename, name='kwik',
                 level=logging.INFO))

        # Start the selection buffer.
        self.buffer = Buffer(self,
            # delay_timer=.1, delay_buffer=.2
            delay_timer=USERPREF['delay_timer'],
            delay_buffer=USERPREF['delay_buffer']
            )
        self.buffer.start()
        self.buffer.accepted.connect(self.buffer_accepted_callback)

        # HACK: force release of Control key.
        self.force_key_release()
        clusters = self.get_view('ClusterView').selected_clusters()
        if clusters:
            self.get_view('ClusterView').unselect()

        # Create the Controller.
        self.controller = Controller(self.loader)
        # Create the cache for the cluster statistics that need to be
        # computed in the background.
        self.statscache = StatsCache(SETTINGS.get('correlograms.ncorrbins', NCORRBINS_DEFAULT))
        # Update stats cache in IPython view.
        ipython = self.get_view('IPythonView')
        if ipython:
            ipython.set_data(stats=self.statscache)

        # Initialize the wizard.
        self.wizard = Wizard()

        # Update the task graph.
        self.taskgraph.set(self)
        # self.taskgraph.update_projection_view()
        self.taskgraph.update_cluster_view()
        self.taskgraph.compute_similarity_matrix()
Esempio n. 2
0
 def __init__(self, parent=None):
     super(BufferTest, self).__init__(parent)
     self.buffer = Buffer(delay_timer=self.delay_timer,
                          delay_buffer=self.delay_buffer)
     self.buffer.accepted.connect(self.accepted)
     self.accepted_list = []