[minor] some tweaks (convenience)
[update] raising PickingFailedException when CF cannot be calculated due to missing signal (too short waveform)
This commit is contained in:
parent
47205ca493
commit
05642e775b
5
PyLoT.py
5
PyLoT.py
@ -3687,10 +3687,13 @@ class MainWindow(QMainWindow):
|
|||||||
if not self.okToContinue():
|
if not self.okToContinue():
|
||||||
return
|
return
|
||||||
if not fnm:
|
if not fnm:
|
||||||
dlg = QFileDialog(parent=self)
|
settings = QSettings()
|
||||||
|
dir = settings.value('current_project_path')
|
||||||
|
dlg = QFileDialog(parent=self, directory=dir)
|
||||||
fnm = dlg.getOpenFileName(self, 'Open project file...', filter='Pylot project (*.plp)')[0]
|
fnm = dlg.getOpenFileName(self, 'Open project file...', filter='Pylot project (*.plp)')[0]
|
||||||
if not fnm:
|
if not fnm:
|
||||||
return
|
return
|
||||||
|
settings.setValue('current_project_path', os.path.split(fnm)[0])
|
||||||
if not os.path.exists(fnm):
|
if not os.path.exists(fnm):
|
||||||
QMessageBox.warning(self, 'Could not open file',
|
QMessageBox.warning(self, 'Could not open file',
|
||||||
'Could not open project file {}. File does not exist.'.format(fnm))
|
'Could not open project file {}. File does not exist.'.format(fnm))
|
||||||
|
@ -199,7 +199,7 @@ class AICPicker(AutoPicker):
|
|||||||
# minimum in AIC function
|
# minimum in AIC function
|
||||||
icfmax = np.argmax(cf)
|
icfmax = np.argmax(cf)
|
||||||
|
|
||||||
# MP MP testing threshold
|
# TODO: If this shall be kept, maybe add thresh_factor to pylot parameters
|
||||||
thresh_hit = False
|
thresh_hit = False
|
||||||
thresh_factor = 0.7
|
thresh_factor = 0.7
|
||||||
thresh = thresh_factor * cf[icfmax]
|
thresh = thresh_factor * cf[icfmax]
|
||||||
@ -211,7 +211,6 @@ class AICPicker(AutoPicker):
|
|||||||
if sample <= cf[index - 1]:
|
if sample <= cf[index - 1]:
|
||||||
icfmax = index - 1
|
icfmax = index - 1
|
||||||
break
|
break
|
||||||
# MP MP ---
|
|
||||||
|
|
||||||
# find minimum in AIC-CF front of maximum of HOS/AR-CF
|
# find minimum in AIC-CF front of maximum of HOS/AR-CF
|
||||||
lpickwindow = int(round(self.PickWindow / self.dt))
|
lpickwindow = int(round(self.PickWindow / self.dt))
|
||||||
|
Loading…
x
Reference in New Issue
Block a user