def setup_method(self, method): self.data = Data(label='d1') self.data.coords = SimpleCoordinates() with NumpyRNGContext(12345): self.data['x'] = random_with_nan(48, 5).reshape((6, 4, 2)) self.data['y'] = random_with_nan(48, 12).reshape((6, 4, 2)) self.data_collection = DataCollection([self.data]) self.app = GlueApplication(self.data_collection) self.viewer = self.app.new_data_viewer(ProfileViewer) self.viewer.add_data(self.data)
def setup_method(self, method): self.data = Data(label='d1') self.data.coords = SimpleCoordinates() self.data['x'] = np.arange(24).reshape((3, 4, 2)) self.app = GlueApplication() self.session = self.app.session self.hub = self.session.hub self.data_collection = self.session.data_collection self.data_collection.append(self.data) self.viewer = self.app.new_data_viewer(ProfileViewer)
def setup_method(self, method): self.data = Data(label='d1') self.data.coords = SimpleCoordinates() self.data['x'] = np.arange(240).reshape((30, 4, 2)).astype(float) self.app = GlueApplication() self.session = self.app.session self.hub = self.session.hub self.data_collection = self.session.data_collection self.data_collection.append(self.data) self.viewer = self.app.new_data_viewer(ProfileViewer) self.viewer.state.function = 'mean' self.viewer.toolbar.active_tool = 'profile-analysis' self.profile_tools = self.viewer.toolbar.tools[ 'profile-analysis']._profile_tools