def open_done(self): self.is_file_open = True # HACK: force release of Control key. self.force_key_release() channels = self.get_view('ChannelView').selected_channels() if channels: self.get_view('ChannelView').unselect() # Create the Controller. self.controller = Controller(self.loader) # Create the cache for the channel statistics that need to be # computed in the background. # self.statscache = StatsCache(self.loader.ncorrbins) # 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 views. self.update_channel_view() self.update_trace_view()
def load(): # Open the mock data. dir = TEST_FOLDER xmlfile = os.path.join(dir, 'test.xml') l = KlustersLoader(filename=xmlfile) c = Controller(l) return (l, c)
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()