def _prepare_data(self, stack): ''' This is called as the 2d chaco plot window is being set up. The return values are not used for plotting but are used for getting the tick marker scales and colorbar scale. I bin it down to a small arbitrary number of bins to keep things fast. ''' self.update_content = True self.loop1 = True # stack = stack_datasets(datasets) self.dataset_stack = stack BINS = 4 xi, yi, zi = bin_data(stack, BINS) return xi, yi, zi
def _prepare_data(self, datasets): stack = stack_datasets(datasets) x, y, z = bin_data(stack, 600) xi, yi, zi = cubic_interpolate(x, y, z, 600, 600) zi = np.clip(zi, 1, zi.max()) return xi, yi, zi