Skip to content

Commit

Permalink
icd lowercase
Browse files Browse the repository at this point in the history
  • Loading branch information
DMegaritis committed Feb 3, 2024
1 parent 78177ec commit eae65df
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 10 deletions.
4 changes: 2 additions & 2 deletions examples/icd/_01_icd_ionescu.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
"""
ICD Ionescu
icd Ionescu
===========
This example shows how to use the ICD Ionescu algorithm and how its results compare to the original
This example shows how to use the icd Ionescu algorithm and how its results compare to the original
matlab implementation.
"""
Expand Down
1 change: 0 additions & 1 deletion examples/icd/_02_shin_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,6 @@

detected_ics = iterator.results_.ic_list
detected_ics

# %%
# Matlab Outputs
# --------------
Expand Down
2 changes: 1 addition & 1 deletion examples/icd/_03_hklee_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@

import pandas as pd
from matplotlib import pyplot as plt
from gaitlink.ICD._hklee_algo_improved import IcdHKLeeImproved
from gaitlink.icd._hklee_algo_improved import IcdHKLeeImproved
from gaitlink.data import LabExampleDataset

# %%
Expand Down
4 changes: 2 additions & 2 deletions gaitlink/icd/_hklee_algo_improved.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from typing_extensions import Self, Unpack

from gaitlink.data_transform import EpflDedriftedGaitFilter, EpflGaitFilter
from gaitlink.ICD.base import BaseIcDetector, base_icd_docfiller
from gaitlink.icd.base import BaseIcDetector, base_icd_docfiller


@base_icd_docfiller
Expand Down Expand Up @@ -173,7 +173,7 @@ def detect(self, data: pd.DataFrame, *, sampling_rate_hz: float, **_: Unpack[dic

self.final_filtered_signal_ = final_filtered

#Resample to 100Hz for consistency with the original data (for ICD) or to 120 for consistency with original paper
#Resample to 100Hz for consistency with the original data (for icd) or to 120 for consistency with original paper
NEW_SAMPLING_RATE_HZ = 120
signal_upsampled = (
Resample(NEW_SAMPLING_RATE_HZ)
Expand Down
6 changes: 3 additions & 3 deletions gaitlink/icd/_icd_ionescu.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@

@base_icd_docfiller
class IcdIonescu(BaseIcDetector):
"""Implementation of the ICD algorithm by McCamley et al. (2012) [1]_ modified by Ionescu et al. (2020) [2]_.
"""Implementation of the icd algorithm by McCamley et al. (2012) [1]_ modified by Ionescu et al. (2020) [2]_.
The algorithm includes the following steps starting from vertical acceleration
of the lower-back during a gait sequence:
Expand All @@ -34,7 +34,7 @@ class IcdIonescu(BaseIcDetector):
Parameters
----------
pre_filter
A pre-processing filter to apply to the data before the ICD algorithm is applied.
A pre-processing filter to apply to the data before the icd algorithm is applied.
cwt_width
The width of the wavelet
Expand Down Expand Up @@ -91,7 +91,7 @@ def detect(self, data: pd.DataFrame, *, sampling_rate_hz: float, **_: Unpack[dic
self.sampling_rate_hz = sampling_rate_hz

# 0. SELECT RELEVANT COLUMNS
# For the ICD algorithm only vertical acceleration (i.e. x-component) is required.
# For the icd algorithm only vertical acceleration (i.e. x-component) is required.
relevant_columns = ["acc_x"] # acc_x: vertical acceleration
acc_v = data[relevant_columns]
acc_v = acc_v.to_numpy()
Expand Down
2 changes: 1 addition & 1 deletion tests/test_icd/test_icd_hklee_improved.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
from tpcp.testing import TestAlgorithmMixin

from gaitlink.data import LabExampleDataset
from gaitlink.ICD._hklee_algo_improved import IcdHKLeeImproved
from gaitlink.icd._hklee_algo_improved import IcdHKLeeImproved
from gaitlink.pipeline import GsIterator


Expand Down

0 comments on commit eae65df

Please sign in to comment.