@@ -95,7 +95,9 @@ def _get_sos(sr, filt_min, filt_max, corners):
9595
9696
9797@patch_function ()
98- def pass_filter (patch : PatchType , corners = 4 , zerophase = True , ** kwargs ) -> PatchType :
98+ def pass_filter (
99+ patch : PatchType , corners : int = 4 , zerophase : bool = True , ** kwargs
100+ ) -> PatchType :
99101 """
100102 Apply a Butterworth pass filter (bandpass, highpass, or lowpass).
101103
@@ -146,7 +148,9 @@ def pass_filter(patch: PatchType, corners=4, zerophase=True, **kwargs) -> PatchT
146148
147149
148150@patch_function ()
149- def sobel_filter (patch : PatchType , dim : str , mode = "reflect" , cval = 0.0 ) -> PatchType :
151+ def sobel_filter (
152+ patch : PatchType , dim : str , mode : str = "reflect" , cval : float | int = 0.0
153+ ) -> PatchType :
150154 """
151155 Apply a Sobel filter.
152156
@@ -200,7 +204,11 @@ def _create_size_and_axes(patch, kwargs, samples):
200204@patch_function ()
201205@compose_docstring (sample_explanation = samples_arg_description )
202206def median_filter (
203- patch : PatchType , samples = False , mode = "reflect" , cval = 0.0 , ** kwargs
207+ patch : PatchType ,
208+ samples : bool = False ,
209+ mode : str = "reflect" ,
210+ cval : float = 0.0 ,
211+ ** kwargs ,
204212) -> PatchType :
205213 """
206214 Apply 2-D median filter.
@@ -251,7 +259,7 @@ def median_filter(
251259
252260
253261@patch_function ()
254- def notch_filter (patch : PatchType , q , ** kwargs ) -> PatchType :
262+ def notch_filter (patch : PatchType , q : float , ** kwargs ) -> PatchType :
255263 """
256264 Apply a second-order IIR notch digital filter on patch's data.
257265
@@ -320,7 +328,12 @@ def notch_filter(patch: PatchType, q, **kwargs) -> PatchType:
320328@patch_function ()
321329@compose_docstring (sample_explanation = samples_arg_description )
322330def savgol_filter (
323- patch : PatchType , polyorder , samples = False , mode = "interp" , cval = 0.0 , ** kwargs
331+ patch : PatchType ,
332+ polyorder : int ,
333+ samples : bool = False ,
334+ mode : str = "interp" ,
335+ cval : float = 0.0 ,
336+ ** kwargs ,
324337) -> PatchType :
325338 """
326339 Applies Savgol filter along spenfied dimensions.
@@ -382,7 +395,12 @@ def savgol_filter(
382395@patch_function ()
383396@compose_docstring (sample_explanation = samples_arg_description )
384397def gaussian_filter (
385- patch : PatchType , samples = False , mode = "reflect" , cval = 0.0 , truncate = 4.0 , ** kwargs
398+ patch : PatchType ,
399+ samples : bool = False ,
400+ mode : str = "reflect" ,
401+ cval : float = 0.0 ,
402+ truncate : float = 4.0 ,
403+ ** kwargs ,
386404) -> PatchType :
387405 """
388406 Applies a Gaussian filter along specified dimensions.
0 commit comments