Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Vasudevan, Rama K
pycroscopy
Commits
98b51409
Commit
98b51409
authored
Nov 08, 2017
by
syz
Browse files
fixed bug in noise floor calculation
parent
9479fc96
Changes
1
Hide whitespace changes
Inline
Side-by-side
pycroscopy/processing/gmode_utils.py
View file @
98b51409
...
...
@@ -55,7 +55,6 @@ def test_filter(resp_wfm, frequency_filters=None, noise_threshold=None,
handles to the axes in the plotted figure if requested, else None
"""
show_loops
=
excit_wfm
is
not
None
and
show_plots
if
frequency_filters
is
None
and
noise_threshold
is
None
:
...
...
@@ -64,7 +63,6 @@ def test_filter(resp_wfm, frequency_filters=None, noise_threshold=None,
if
noise_threshold
is
not
None
:
if
noise_threshold
>=
1
or
noise_threshold
<=
0
:
raise
ValueError
(
'Noise threshold must be within (0 1)'
)
noise_floor
=
getNoiseFloor
(
resp_wfm
,
noise_threshold
)[
0
]
samp_rate
=
1
composite_filter
=
1
...
...
@@ -81,6 +79,9 @@ def test_filter(resp_wfm, frequency_filters=None, noise_threshold=None,
fft_pix_data
=
np
.
fft
.
fftshift
(
np
.
fft
.
fft
(
resp_wfm
))
if
noise_threshold
is
not
None
:
noise_floor
=
getNoiseFloor
(
fft_pix_data
,
noise_threshold
)[
0
]
if
show_plots
:
l_ind
=
int
(
0.5
*
num_pts
)
if
isinstance
(
composite_filter
,
np
.
ndarray
):
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment