Skip to content
Snippets Groups Projects
Verified Commit 47acef5b authored by Tobias Hangleiter's avatar Tobias Hangleiter
Browse files

Fix doctest

parent dc297265
Branches
Tags
1 merge request!66Extend simulator module
......@@ -161,21 +161,21 @@ the filter properties using the spectrometer:
>>> from qutil.functools import partial
>>> from python_spectrometer import daq, Spectrometer
>>> def compare_filters(type: str, order: int):
>>> def compare_filters(typ: str, order: int):
... spect = Spectrometer(daq.QoptColoredNoise(), savepath=mkdtemp(),
... plot_dB_scale=True, plot_density=False)
... plot_dB_scale=True, plot_density=False,
... threaded_acquisition=False)
... spect.take('Baseline', n_seg=10, fs=1e4, df=0.1)
... spect.procfn = getattr(sp.real_space, f'{type}_filter')
... spect.take(f'Real space {order}. order {type} filter',
... spect.procfn = getattr(sp.real_space, f'{typ}_filter')
... spect.take(f'Real space {order}. order {typ} filter',
... n_seg=10, f_max=1e2, fs=1e4, df=0.1, order=order)
... spect.procfn = sp.real_space.Id
... spect.psd_estimator = partial(
... sp.real_space.welch,
... fourier_procfn=getattr(sp.fourier_space, f'{type}_filter')
... fourier_procfn=getattr(sp.fourier_space, f'{typ}_filter')
... )
... spect.take(f'Fourier space {order}. order {type} filter',
... spect.take(f'Fourier space {order}. order {typ} filter',
... n_seg=10, f_max=1e2, fs=1e4, df=0.1, order=order)
... return spect
RC and Butterworth first order filters are the same (up to real-space
implementation):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment