Skip to content

Commit 31a0548

Browse files
committed
bug bug bug
1 parent 409a5f6 commit 31a0548

File tree

3 files changed

+66
-82
lines changed

3 files changed

+66
-82
lines changed

src/ui/quick_detection.py

Lines changed: 5 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -213,32 +213,30 @@ def get_ste_params(self):
213213
return ParamDetector.from_dict(detector_params)
214214

215215
def init_default_hil_input_params(self):
216-
default_params = ParamHIL(2000) # 初始化默认参数,假设采样率是 2000
216+
default_params = ParamHIL(2000)
217217
self.qd_hil_sample_freq_input.setText(str(default_params.sample_freq))
218218
self.qd_hil_pass_band_input.setText(str(default_params.pass_band))
219219
self.qd_hil_stop_band_input.setText(str(default_params.stop_band))
220220
self.qd_hil_epoch_time_input.setText(str(default_params.epoch_time))
221-
self.qd_hil_sliding_window_input.setText(str(default_params.sliding_window))
221+
self.qd_hil_sd_threshold_input.setText(str(default_params.sd_threshold))
222222
self.qd_hil_min_window_input.setText(str(default_params.min_window))
223-
self.qd_hil_n_jobs_input.setText(str(default_params.n_jobs))
224223

225224
def get_hil_params(self):
226225
sample_freq_raw = self.qd_hil_sample_freq_input.text()
227226
pass_band_raw = self.qd_hil_pass_band_input.text()
228227
stop_band_raw = self.qd_hil_stop_band_input.text()
229228
epoch_time_raw = self.qd_hil_epoch_time_input.text()
230-
sliding_window_raw = self.qd_hil_sliding_window_input.text()
229+
sd_threshold_raw = self.qd_hil_sd_threshold_input.text()
231230
min_window_raw = self.qd_hil_min_window_input.text()
232-
n_jobs_raw = self.qd_hil_n_jobs_input.text()
233231

234232
param_dict = {
235233
"sample_freq": float(sample_freq_raw),
236234
"pass_band": float(pass_band_raw),
237235
"stop_band": float(stop_band_raw),
238236
"epoch_time": float(epoch_time_raw),
239-
"sliding_window": float(sliding_window_raw),
237+
"sd_threshold": float(sd_threshold_raw),
240238
"min_window": float(min_window_raw),
241-
"n_jobs": int(n_jobs_raw)
239+
"n_jobs": self.backend.n_jobs
242240
}
243241
detector_params = {"detector_type": "HIL", "detector_param": param_dict}
244242
return ParamDetector.from_dict(detector_params)

src/ui/quick_detection.ui

Lines changed: 60 additions & 74 deletions
Original file line numberDiff line numberDiff line change
@@ -1842,8 +1842,8 @@
18421842
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
18431843
</property>
18441844
<layout class="QGridLayout" name="gridLayout">
1845-
<item row="0" column="0">
1846-
<widget class="QLabel" name="label_103">
1845+
<item row="3" column="0">
1846+
<widget class="QLabel" name="label_100">
18471847
<property name="font">
18481848
<font>
18491849
<family>Arial</family>
@@ -1852,15 +1852,15 @@
18521852
</font>
18531853
</property>
18541854
<property name="text">
1855-
<string>Sample Frequency</string>
1855+
<string>SD Threshold</string>
18561856
</property>
18571857
<property name="alignment">
18581858
<set>Qt::AlignCenter</set>
18591859
</property>
18601860
</widget>
18611861
</item>
1862-
<item row="0" column="1">
1863-
<widget class="QLineEdit" name="qd_hil_sample_freq_input">
1862+
<item row="1" column="4">
1863+
<widget class="QLineEdit" name="qd_hil_stop_band_input">
18641864
<property name="font">
18651865
<font>
18661866
<family>Arial</family>
@@ -1870,8 +1870,8 @@
18701870
</property>
18711871
</widget>
18721872
</item>
1873-
<item row="0" column="2">
1874-
<widget class="QLabel" name="label_108">
1873+
<item row="1" column="0">
1874+
<widget class="QLabel" name="label_104">
18751875
<property name="font">
18761876
<font>
18771877
<family>Arial</family>
@@ -1880,32 +1880,26 @@
18801880
</font>
18811881
</property>
18821882
<property name="text">
1883-
<string>Hz</string>
1883+
<string>Pass Band</string>
18841884
</property>
18851885
<property name="alignment">
1886-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
1886+
<set>Qt::AlignCenter</set>
18871887
</property>
18881888
</widget>
18891889
</item>
1890-
<item row="0" column="3">
1891-
<widget class="QLabel" name="label_102">
1890+
<item row="2" column="4">
1891+
<widget class="QLineEdit" name="qd_hil_epoch_time_input">
18921892
<property name="font">
18931893
<font>
18941894
<family>Arial</family>
18951895
<pointsize>11</pointsize>
18961896
<bold>false</bold>
18971897
</font>
18981898
</property>
1899-
<property name="text">
1900-
<string>Number of Jobs</string>
1901-
</property>
1902-
<property name="alignment">
1903-
<set>Qt::AlignCenter</set>
1904-
</property>
19051899
</widget>
19061900
</item>
1907-
<item row="0" column="4">
1908-
<widget class="QLineEdit" name="qd_hil_n_jobs_input">
1901+
<item row="0" column="1">
1902+
<widget class="QLineEdit" name="qd_hil_sample_freq_input">
19091903
<property name="font">
19101904
<font>
19111905
<family>Arial</family>
@@ -1915,8 +1909,8 @@
19151909
</property>
19161910
</widget>
19171911
</item>
1918-
<item row="1" column="0">
1919-
<widget class="QLabel" name="label_104">
1912+
<item row="0" column="2">
1913+
<widget class="QLabel" name="label_108">
19201914
<property name="font">
19211915
<font>
19221916
<family>Arial</family>
@@ -1925,15 +1919,15 @@
19251919
</font>
19261920
</property>
19271921
<property name="text">
1928-
<string>Pass Band</string>
1922+
<string>Hz</string>
19291923
</property>
19301924
<property name="alignment">
1931-
<set>Qt::AlignCenter</set>
1925+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
19321926
</property>
19331927
</widget>
19341928
</item>
1935-
<item row="1" column="1">
1936-
<widget class="QLineEdit" name="qd_hil_pass_band_input">
1929+
<item row="2" column="1">
1930+
<widget class="QLineEdit" name="qd_hil_min_window_input">
19371931
<property name="font">
19381932
<font>
19391933
<family>Arial</family>
@@ -1943,8 +1937,8 @@
19431937
</property>
19441938
</widget>
19451939
</item>
1946-
<item row="1" column="2">
1947-
<widget class="QLabel" name="label_96">
1940+
<item row="0" column="0">
1941+
<widget class="QLabel" name="label_103">
19481942
<property name="font">
19491943
<font>
19501944
<family>Arial</family>
@@ -1953,43 +1947,43 @@
19531947
</font>
19541948
</property>
19551949
<property name="text">
1956-
<string>Hz</string>
1950+
<string>Sample Frequency</string>
19571951
</property>
19581952
<property name="alignment">
1959-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
1953+
<set>Qt::AlignCenter</set>
19601954
</property>
19611955
</widget>
19621956
</item>
1963-
<item row="1" column="3">
1964-
<widget class="QLabel" name="label_107">
1957+
<item row="3" column="1">
1958+
<widget class="QLineEdit" name="qd_hil_sd_threshold_input">
19651959
<property name="font">
19661960
<font>
19671961
<family>Arial</family>
19681962
<pointsize>11</pointsize>
19691963
<bold>false</bold>
19701964
</font>
19711965
</property>
1972-
<property name="text">
1973-
<string>Stop Band</string>
1974-
</property>
1975-
<property name="alignment">
1976-
<set>Qt::AlignCenter</set>
1977-
</property>
19781966
</widget>
19791967
</item>
1980-
<item row="1" column="4">
1981-
<widget class="QLineEdit" name="qd_hil_stop_band_input">
1968+
<item row="2" column="2">
1969+
<widget class="QLabel" name="label_95">
19821970
<property name="font">
19831971
<font>
19841972
<family>Arial</family>
19851973
<pointsize>11</pointsize>
19861974
<bold>false</bold>
19871975
</font>
19881976
</property>
1977+
<property name="text">
1978+
<string>sec</string>
1979+
</property>
1980+
<property name="alignment">
1981+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
1982+
</property>
19891983
</widget>
19901984
</item>
1991-
<item row="2" column="0">
1992-
<widget class="QLabel" name="label_97">
1985+
<item row="2" column="3">
1986+
<widget class="QLabel" name="label_101">
19931987
<property name="font">
19941988
<font>
19951989
<family>Arial</family>
@@ -1998,15 +1992,15 @@
19981992
</font>
19991993
</property>
20001994
<property name="text">
2001-
<string>Min Window</string>
1995+
<string>Epoch Time</string>
20021996
</property>
20031997
<property name="alignment">
20041998
<set>Qt::AlignCenter</set>
20051999
</property>
20062000
</widget>
20072001
</item>
2008-
<item row="2" column="1">
2009-
<widget class="QLineEdit" name="qd_hil_min_window_input">
2002+
<item row="1" column="1">
2003+
<widget class="QLineEdit" name="qd_hil_pass_band_input">
20102004
<property name="font">
20112005
<font>
20122006
<family>Arial</family>
@@ -2016,8 +2010,8 @@
20162010
</property>
20172011
</widget>
20182012
</item>
2019-
<item row="2" column="2">
2020-
<widget class="QLabel" name="label_95">
2013+
<item row="2" column="0">
2014+
<widget class="QLabel" name="label_97">
20212015
<property name="font">
20222016
<font>
20232017
<family>Arial</family>
@@ -2026,15 +2020,15 @@
20262020
</font>
20272021
</property>
20282022
<property name="text">
2029-
<string>ms</string>
2023+
<string>Min Window</string>
20302024
</property>
20312025
<property name="alignment">
2032-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
2026+
<set>Qt::AlignCenter</set>
20332027
</property>
20342028
</widget>
20352029
</item>
2036-
<item row="2" column="3">
2037-
<widget class="QLabel" name="label_101">
2030+
<item row="1" column="3">
2031+
<widget class="QLabel" name="label_107">
20382032
<property name="font">
20392033
<font>
20402034
<family>Arial</family>
@@ -2043,26 +2037,15 @@
20432037
</font>
20442038
</property>
20452039
<property name="text">
2046-
<string>Epoch Time</string>
2040+
<string>Stop Band</string>
20472041
</property>
20482042
<property name="alignment">
20492043
<set>Qt::AlignCenter</set>
20502044
</property>
20512045
</widget>
20522046
</item>
2053-
<item row="2" column="4">
2054-
<widget class="QLineEdit" name="qd_hil_epoch_time_input">
2055-
<property name="font">
2056-
<font>
2057-
<family>Arial</family>
2058-
<pointsize>11</pointsize>
2059-
<bold>false</bold>
2060-
</font>
2061-
</property>
2062-
</widget>
2063-
</item>
2064-
<item row="3" column="0">
2065-
<widget class="QLabel" name="label_100">
2047+
<item row="1" column="5">
2048+
<widget class="QLabel" name="label_96">
20662049
<property name="font">
20672050
<font>
20682051
<family>Arial</family>
@@ -2071,26 +2054,32 @@
20712054
</font>
20722055
</property>
20732056
<property name="text">
2074-
<string>Sliding Window</string>
2057+
<string>Hz</string>
20752058
</property>
20762059
<property name="alignment">
2077-
<set>Qt::AlignCenter</set>
2060+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
20782061
</property>
20792062
</widget>
20802063
</item>
2081-
<item row="3" column="1">
2082-
<widget class="QLineEdit" name="qd_hil_sliding_window_input">
2064+
<item row="2" column="5">
2065+
<widget class="QLabel" name="label_111">
20832066
<property name="font">
20842067
<font>
20852068
<family>Arial</family>
20862069
<pointsize>11</pointsize>
20872070
<bold>false</bold>
20882071
</font>
20892072
</property>
2073+
<property name="text">
2074+
<string>sec</string>
2075+
</property>
2076+
<property name="alignment">
2077+
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
2078+
</property>
20902079
</widget>
20912080
</item>
2092-
<item row="3" column="2">
2093-
<widget class="QLabel" name="label_111">
2081+
<item row="1" column="2">
2082+
<widget class="QLabel" name="label_9">
20942083
<property name="font">
20952084
<font>
20962085
<family>Arial</family>
@@ -2099,10 +2088,7 @@
20992088
</font>
21002089
</property>
21012090
<property name="text">
2102-
<string>sec</string>
2103-
</property>
2104-
<property name="alignment">
2105-
<set>Qt::AlignLeading|Qt::AlignLeft|Qt::AlignVCenter</set>
2091+
<string>Hz</string>
21062092
</property>
21072093
</widget>
21082094
</item>

src/views/main_window_view.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -548,7 +548,7 @@ def create_detection_parameter_tab_hil(self):
548548
parameter_layout.addWidget(label8, 3, 2)
549549
parameter_layout.addWidget(label5, 4, 0)
550550
parameter_layout.addWidget(self.window.hil_sd_threshold_input, 4, 1)
551-
parameter_layout.addWidget(label9, 4, 2)
551+
# parameter_layout.addWidget(label9, 4, 2)
552552
parameter_layout.addWidget(label6, 5, 0)
553553
parameter_layout.addWidget(self.window.hil_min_window_input, 5, 1)
554554
parameter_layout.addWidget(label10, 5, 2)

0 commit comments

Comments
 (0)