File tree Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Expand file tree Collapse file tree 2 files changed +23
-6
lines changed Original file line number Diff line number Diff line change @@ -324,8 +324,13 @@ def qset_power_thresh(self, text):
324
324
if not text :
325
325
return
326
326
text = text .replace ("," , "." )
327
- power_thresh = float (text )
328
- self .power_thresh = power_thresh
327
+
328
+ try :
329
+ power_thresh = float (text )
330
+ self .power_thresh = power_thresh
331
+ # no parsable input
332
+ except ValueError :
333
+ return
329
334
330
335
if self .DEBUG :
331
336
print ("power thresh set to: " , self .power_thresh )
@@ -336,13 +341,22 @@ def qset_power_thresh(self, text):
336
341
337
342
def qset_ridge_smooth (self , text ):
338
343
339
- # text = text.replace(',','.')
344
+ '''
345
+ rsmooth is the window size for
346
+ the savgol filter
347
+ '''
340
348
341
349
# catch empty line edit
342
350
if not text :
343
351
return
344
352
345
- rsmooth = int (text )
353
+ text = text .replace (',' , '.' )
354
+ try :
355
+ rsmooth = float (text )
356
+ rsmooth = int (text )
357
+ # no parsable input
358
+ except ValueError :
359
+ return
346
360
347
361
# make an odd window length
348
362
if rsmooth == 0 :
Original file line number Diff line number Diff line change @@ -979,9 +979,12 @@ def create_signal(self):
979
979
return
980
980
981
981
# Noise amplitude
982
- if not self .d_edit .hasAcceptableInput ():
982
+ try :
983
+ d = float (self .d_edit .text ())
984
+
985
+ except ValueError :
983
986
self .OutOfBounds = MessageWindow (
984
- "Missing noise amplitude !" , "Value Error"
987
+ "Missing Noise Strength parameter !" , "Value Error"
985
988
)
986
989
return
987
990
You can’t perform that action at this time.
0 commit comments