Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Docs] update docs to reflect implementation of respiration signal cleaning with khodadad2018 #952

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions neurokit2/rsp/rsp_clean.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ def rsp_clean(rsp_signal, sampling_rate=1000, method="khodadad2018", **kwargs):

Clean a respiration signal using different sets of parameters, such as:

* **khodadad2018**: Linear detrending followed by a fifth order 2Hz low-pass IIR Butterworth
filter)
* **khodadad2018**: Second order 0.05-3 Hz bandpass Butterworth filter. Note that the
implementation differs from the referenced paper (see issue #950).
* **BioSPPy**: Second order 0.1-0.35 Hz bandpass Butterworth filter followed by a constant
detrending).
* **hampel**: Applies a median-based Hampel filter by replacing values which are 3 (can be
Expand Down
13 changes: 3 additions & 10 deletions neurokit2/rsp/rsp_methods.py
Original file line number Diff line number Diff line change
Expand Up @@ -106,14 +106,7 @@ def rsp_methods(
report_info["text_cleaning"] = f"The raw signal, sampled at {sampling_rate} Hz,"
if method_cleaning in ["khodadad", "khodadad2018"]:
report_info["text_cleaning"] += (
" linear detrending followed by a fifth order 2Hz low-pass IIR Butterworth filter; "
+ "following Khoadadad et al., 2018."
)

refs.append(
"""Khodadad, D., Nordebo, S., Müller, B., Waldmann, A., Yerworth, R., Becher, T.,... & Bayford, R. (2018).
Optimized breath detection algorithm in electrical impedance tomography.
Physiological measurement, 39(9), 094001."""
" was preprocessed using a second order 0.05-3 Hz bandpass Butterworth filter."
)
elif method_cleaning in ["hampel", "power", "power2020"]:
report_info["text_cleaning"] += (
Expand All @@ -136,10 +129,10 @@ def rsp_methods(
elif method_cleaning in ["none"]:
report_info[
"text_cleaning"
] += "was directly used for peak detection without preprocessing."
] += " was directly used for peak detection without preprocessing."
else:
# just in case more methods are added
report_info["text_cleaning"] += f"was cleaned following the {method} method."
report_info["text_cleaning"] += f" was cleaned following the {method} method."

# 2. Peaks
# ----------
Expand Down
Loading