Ejemplo n.º 1
0
    def test_change_custom_bw(self):
        bw = 0.3
        N = Filter.get_filter_length_from_bandwidth(bw)
        self.dialog.ui.doubleSpinBoxCustomBandwidth.setValue(bw)
        self.assertEqual(N, self.dialog.ui.spinBoxCustomKernelLength.value())

        N = 401
        bw = Filter.get_bandwidth_from_filter_length(N)
        self.dialog.ui.spinBoxCustomKernelLength.setValue(N)
        self.assertAlmostEqual(bw, self.dialog.ui.doubleSpinBoxCustomBandwidth.value(),
                               places=self.dialog.ui.doubleSpinBoxCustomBandwidth.decimals())
Ejemplo n.º 2
0
 def on_spin_box_custom_kernel_length_value_changed(self, filter_len: int):
     self.ui.doubleSpinBoxCustomBandwidth.blockSignals(True)
     self.ui.doubleSpinBoxCustomBandwidth.setValue(Filter.get_bandwidth_from_filter_length(filter_len))
     self.ui.doubleSpinBoxCustomBandwidth.blockSignals(False)
Ejemplo n.º 3
0
 def on_spin_box_custom_kernel_length_value_changed(self, filter_len: int):
     self.ui.doubleSpinBoxCustomBandwidth.blockSignals(True)
     self.ui.doubleSpinBoxCustomBandwidth.setValue(Filter.get_bandwidth_from_filter_length(filter_len))
     self.ui.doubleSpinBoxCustomBandwidth.blockSignals(False)