@@ -453,8 +453,10 @@ def initUI(self):
453
453
self .ztc = QCheckBox ()
454
454
self .dzc = QCheckBox ()
455
455
self .Cc = QCheckBox ()
456
- self .lfc = QCheckBox ('Low frequency weighting' )
457
- self .lfc .setChecked (False )
456
+ self .lfc = QComboBox ()
457
+ self .lfc .addItem ('No weighting' )
458
+ self .lfc .addItem ('Low frequency weighting' )
459
+ self .lfc .addItem ('Variance weighting' )
458
460
459
461
self .beta_lb = QLineEdit (locale .toString (1.5 , format = 'f' , precision = 1 ))
460
462
self .beta_lb .setEnabled (False )
@@ -845,7 +847,6 @@ def initUI(self):
845
847
self .mp .Ced .editingFinished .connect (self .updateSpectrum )
846
848
self .mp .fit2step .clicked .connect (self .fitSpec2step )
847
849
self .mp .fit .clicked .connect (self .fitSpectrum )
848
- self .mp .lfc .stateChanged .connect (self .updateSpectrum )
849
850
850
851
self .sp .type .currentIndexChanged .connect (self .computeSpectrum )
851
852
self .sp .detrend .currentIndexChanged .connect (self .computeSpectrum )
@@ -974,7 +975,7 @@ def updateSpectrum(self):
974
975
zt = locale .toDouble (self .mp .zted .text ())[0 ]
975
976
dz = locale .toDouble (self .mp .dzed .text ())[0 ]
976
977
C = locale .toDouble (self .mp .Ced .text ())[0 ]
977
- self .splot .plot (f , (beta , zt , dz , C ), self .sp .log .isChecked (), self . mp . lfc . isChecked () )
978
+ self .splot .plot (f , (beta , zt , dz , C ), self .sp .log .isChecked ())
978
979
else :
979
980
self .splot .plot2D (f , self .sp .log .isChecked ())
980
981
@@ -1020,10 +1021,11 @@ def computeSpectrum(self, x=None, y=None):
1020
1021
elif self .forage != None :
1021
1022
f = self .forage
1022
1023
elif self .forages != None :
1023
- f = self .forages [self .bh .bhlist .currentIndex ()]
1024
-
1024
+ index = self .bh .bhlist .currentIndex ()
1025
+ f = self .forages [index ]
1026
+
1025
1027
self .statusBar ().clearMessage ()
1026
- self .statusBar ().showMessage ('Borehole: ' + f .site_name )
1028
+ self .statusBar ().showMessage ('Borehole no ' + str ( index ) + ' : '+ f .site_name )
1027
1029
1028
1030
if f != None :
1029
1031
ww = 1000.0 * locale .toDouble (self .sp .winsize .text ())[0 ]
@@ -1211,7 +1213,9 @@ def fitSpectrum(self):
1211
1213
ztc = self .mp .ztc .isChecked ()
1212
1214
dzc = self .mp .dzc .isChecked ()
1213
1215
Cc = self .mp .Cc .isChecked ()
1214
- lfc = self .mp .lfc .isChecked ()
1216
+ lfc = self .mp .lfc .currentIndex ()
1217
+ if lfc == 2 :
1218
+ lfc = f .std_r ** 2
1215
1219
1216
1220
meth = self .mp .method
1217
1221
@@ -1352,7 +1356,10 @@ def fitSpec2step(self):
1352
1356
zt = locale .toDouble (self .mp .zted .text ())[0 ]
1353
1357
dz = locale .toDouble (self .mp .dzed .text ())[0 ]
1354
1358
C = locale .toDouble (self .mp .Ced .text ())[0 ]
1355
- lfc = self .mp .lfc .isChecked ()
1359
+
1360
+ lfc = self .mp .lfc .currentIndex ()
1361
+ if lfc == 2 :
1362
+ lfc = f .std_r ** 2
1356
1363
1357
1364
meth = self .mp .method
1358
1365
0 commit comments