2929 from artisanlib .main import ApplicationWindow # noqa: F401 # pylint: disable=unused-import
3030 from artisanlib .atypes import ProfileData # pylint: disable=unused-import
3131 from matplotlib .lines import Line2D # type:ignore[untyped-import,unused-ignore] # pylint: disable=unused-import
32- from matplotlib .backend_bases import PickEvent # type:ignore[untyped-import,unused-ignore] # pylint: disable=unused-import
32+ from matplotlib .backend_bases import PickEvent , Event # type:ignore[untyped-import,unused-ignore] # pylint: disable=unused-import
3333 from matplotlib .legend import Legend # type:ignore[untyped-import,unused-ignore] # pylint: disable=unused-import
3434 from PyQt6 .QtWidgets import QLayoutItem , QLayout , QScrollBar # pylint: disable=unused-import
3535 from PyQt6 .QtGui import QStandardItem , QKeyEvent , QDropEvent , QDragEnterEvent , QCloseEvent # pylint: disable=unused-import
3636 from PyQt6 .QtCore import QMimeData # pylint: disable=unused-import
3737
3838from artisanlib .util import (deltaLabelUTF8 , decodeLocal , decodeLocalStrict , stringfromseconds , fromFtoCstrict ,
39- fromCtoFstrict , fill_gaps , float2float , deserialize , float2str )
39+ fromCtoFstrict , fill_gaps , float2float , deserialize , float2str , smooth_list )
4040from artisanlib .suppress_errors import suppress_stdout_stderr
4141from artisanlib .dialogs import ArtisanDialog
4242from artisanlib .widgets import MyQComboBox
@@ -364,8 +364,10 @@ def recompute(self) -> None:
364364 timex_lin = numpy .linspace (self .timex [0 ],self .timex [- 1 ],len (self .timex ))
365365 else :
366366 timex_lin = None
367- self .stemp1 = list (self .aw .qmc .smooth_list (self .timex ,self .temp1 ,window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ))
368- self .stemp2 = list (self .aw .qmc .smooth_list (self .timex ,self .temp2 ,window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ))
367+ self .stemp1 = list (smooth_list (self .timex ,self .temp1 ,window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ,
368+ medfilt_factor = self .aw .qmc .median_filter_factor , filter_dropouts = self .aw .qmc .filterDropOuts ))
369+ self .stemp2 = list (smooth_list (self .timex ,self .temp2 ,window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ,
370+ medfilt_factor = self .aw .qmc .median_filter_factor , filter_dropouts = self .aw .qmc .filterDropOuts ))
369371 # we resample the temperatures of extra device curves to regular interval timestamps
370372 self .extrastemp1 = []
371373 self .extrastemp2 = []
@@ -374,12 +376,16 @@ def recompute(self) -> None:
374376 timex_lin = numpy .linspace (timex [0 ],timex [- 1 ],len (timex ))
375377 else :
376378 timex_lin = None
377- self .extrastemp1 .append (list (self .aw .qmc .smooth_list (timex ,self .extratemp1 [i ],window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin )))
378- self .extrastemp2 .append (list (self .aw .qmc .smooth_list (timex ,self .extratemp2 [i ],window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin )))
379+ self .extrastemp1 .append (list (smooth_list (timex ,self .extratemp1 [i ],window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ,
380+ medfilt_factor = self .aw .qmc .median_filter_factor , filter_dropouts = self .aw .qmc .filterDropOuts )))
381+ self .extrastemp2 .append (list (smooth_list (timex ,self .extratemp2 [i ],window_len = self .aw .qmc .curvefilter ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ,
382+ medfilt_factor = self .aw .qmc .median_filter_factor , filter_dropouts = self .aw .qmc .filterDropOuts )))
379383 # recompute deltas
380384 cf = self .aw .qmc .curvefilter * 2 # we smooth twice as heavy for PID/RoR calculation as for normal curve smoothing
381- t1 = self .aw .qmc .smooth_list (self .timex ,self .temp1 ,window_len = cf ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin )
382- t2 = self .aw .qmc .smooth_list (self .timex ,self .temp2 ,window_len = cf ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin )
385+ t1 = smooth_list (self .timex ,self .temp1 ,window_len = cf ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ,
386+ medfilt_factor = self .aw .qmc .median_filter_factor , filter_dropouts = self .aw .qmc .filterDropOuts )
387+ t2 = smooth_list (self .timex ,self .temp2 ,window_len = cf ,decay_smoothing = decay_smoothing_p ,a_lin = timex_lin ,
388+ medfilt_factor = self .aw .qmc .median_filter_factor , filter_dropouts = self .aw .qmc .filterDropOuts )
383389 if self .timeindex [0 ]> - 1 :
384390 RoR_start = min (self .timeindex [0 ]+ 10 , len (self .timex )- 1 )
385391 else :
@@ -1094,7 +1100,7 @@ def __init__(self, parent:QWidget, aw:'ApplicationWindow', foreground:str|None =
10941100 self .disableButtons ()
10951101 self .aw .disableEditMenus (compare = True )
10961102
1097- self .pick_handler_id = self .aw .qmc .fig .canvas .mpl_connect ('pick_event' , self .onpick_event )
1103+ self .pick_handler_id = self .aw .qmc .fig .canvas .mpl_connect ('pick_event' , cast ( 'Callable[[Event],None]' , self .onpick_event ) )
10981104
10991105 settings = QSettings ()
11001106 if settings .contains ('CompareGeometry' ):
0 commit comments