Exemplo n.º 1
0
    def setUp(self):
        super().setUp()

        plugin = PCAPlugin()
        self.op = op = plugin.get_operation()
        
        op.name = "PCA"
        op.channels_list = [_Channel(channel = "V2-A", scale = "log"),
                            _Channel(channel = "V2-H", scale = "log"),
                            _Channel(channel = "Y2-A", scale = "log"),
                            _Channel(channel = "Y2-H", scale = "log")]
        op.num_components = 2
                
        op.subset_list.append(CategorySubset(name = "Well",
                                             values = ['A', 'B']))
        op.subset_list.append(RangeSubset(name = "Dox",
                                          values = [0.0, 10.0, 100.0]))
        
        self.wi = wi = WorkflowItem(operation = op,
                                    status = 'waiting',
                                    view_error = "Not yet plotted")
        
        self.workflow.workflow.append(wi)
        self.workflow.selected = wi
        
        # run estimate
        op.do_estimate = True
        self.workflow.wi_waitfor(self.wi, 'status', 'valid')
Exemplo n.º 2
0
    def setUp(self):
        ImportedDataTest.setUp(self)

        plugin = PCAPlugin()
        self.op = op = plugin.get_operation()

        op.name = "PCA"
        op.channels_list = [
            _Channel(channel="V2-A", scale="log"),
            _Channel(channel="V2-H", scale="log"),
            _Channel(channel="Y2-A", scale="log"),
            _Channel(channel="Y2-H", scale="log")
        ]
        op.num_components = 2

        op.subset_list.append(CategorySubset(name="Well", values=["A", "B"]))

        self.wi = wi = WorkflowItem(operation=op)

        self.workflow.workflow.append(wi)
        self.workflow.selected = wi

        # run estimate
        op.do_estimate = True
        self.assertTrue(wait_for(wi, 'status', lambda v: v == 'valid', 30))
Exemplo n.º 3
0
    def testAddChannel(self):
        self.workflow.wi_sync(self.wi, 'status', 'waiting')
        self.op.channels_list.append(_Channel(channel = "B1-A", scale = "log"))
        self.workflow.wi_waitfor(self.wi, 'status', 'invalid')
        self.assertTrue(self.workflow.remote_eval("self.workflow[-1].result is None"))

        self.workflow.wi_sync(self.wi, 'status', 'waiting')
        self.op.do_estimate = True
        self.workflow.wi_waitfor(self.wi, 'status', 'valid')
        self.assertTrue(self.workflow.remote_eval("self.workflow[-1].result is not None"))
Exemplo n.º 4
0
    def testAddChannel(self):
        self.op.channels_list.append(_Channel(channel="B1-A", scale="log"))
        self.assertTrue(
            wait_for(self.wi, 'status', lambda v: v == 'invalid', 5))
        self.assertTrue(
            self.workflow.remote_eval("self.workflow[-1].result is None"))

        self.op.do_estimate = True
        self.assertTrue(wait_for(self.wi, 'status', lambda v: v == 'valid', 5))
        self.assertTrue(
            self.workflow.remote_eval("self.workflow[-1].result is not None"))