Skip to content

Commit 295e62d

Browse files
author
YudaiSeino
committed
Defaults filter_oder to None
1 parent e693e24 commit 295e62d

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/sorunlib/stimulator.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ def _stop():
4949
def calibrate_tau(duration_step=20,
5050
speeds_rpm=[225, 495, 945, 1395, 1845, 2205],
5151
forward=True, do_setup=True, stop=True,
52-
downsample_factor=8, filter_disable=False, filter_order=4, filter_cutoff=None):
52+
downsample_factor=8, filter_disable=False, filter_order=None, filter_cutoff=None):
5353
"""Time constant calibration using the stimulator.
5454
5555
Parameters
@@ -70,7 +70,7 @@ def calibrate_tau(duration_step=20,
7070
filter_disable : bool, optional
7171
If True, will disable the downsample filter before streaming. Defaults to True.
7272
filter_order : int, optional
73-
Order of the downsample filter for SMuRF. Defaults to 4.
73+
Order of the downsample filter for SMuRF. Defaults to None.
7474
filter_cutoff : float, optional
7575
The cutoff frequency in Hz for the downsample filter for SMuRF. Defaults to None.
7676
Will be (63/200)*sampling_rate if None.
@@ -88,7 +88,7 @@ def calibrate_tau(duration_step=20,
8888
filter_cutoff = int(63/200 * 4000/downsample_factor)
8989
tag += f', filter_cutoff {filter_cutoff:.0f}',
9090

91-
if filter_order != 4:
91+
if filter_order is not None and filter_order != 4:
9292
tag += f', filter_order {filter_order:.0f}'
9393

9494
run.smurf.stream('on',
@@ -127,7 +127,7 @@ def calibrate_tau(duration_step=20,
127127

128128
def calibrate_gain(duration=60, speed_rpm=90,
129129
forward=True, do_setup=True, stop=True,
130-
downsample_factor=8, filter_disable=False, filter_order=4, filter_cutoff=None):
130+
downsample_factor=8, filter_disable=False, filter_order=None, filter_cutoff=None):
131131
"""Gain calibration with the stimulator
132132
133133
Parameters
@@ -149,7 +149,7 @@ def calibrate_gain(duration=60, speed_rpm=90,
149149
filter_disable : bool, optional
150150
If True, will disable the downsample filter before streaming. Defaults to True.
151151
filter_order : int, optional
152-
Order of the downsample filter for SMuRF. Defaults to 4.
152+
Order of the downsample filter for SMuRF. Defaults to None.
153153
filter_cutoff : float, optional
154154
The cutoff frequency in Hz for the downsample filter for SMuRF. Defaults to None.
155155
Will be (63/200)*sampling_rate if None.
@@ -176,7 +176,7 @@ def calibrate_gain(duration=60, speed_rpm=90,
176176
tag += f', filter_disable {filter_disable}'
177177
else:
178178
tag += f', filter_cutoff {filter_cutoff:.0f}',
179-
if filter_order != 4:
179+
if filter_order is not None and filter_order != 4:
180180
tag += f', filter_order {filter_order:.0f}'
181181

182182
run.smurf.stream('on',

0 commit comments

Comments
 (0)