Skip to content

Conversation

@bartoszrud
Copy link

Nie można było znaleźć algorytmu na zliczanie zwrotów w sygnale, więc ten jest mój autorski. Mam nadzieję, że poprawny.

… ten jest mój autorski. Mam nadzieję, że poprawny.
Copy link
Contributor

@mkosturek mkosturek left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Przydałoby się jeszcze wystawić interfejs do funkcji w pliku
meditool/examinations/emg/features.py

number_of_turns+=1
point0=point1

print(standard_deviation)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Te rzeczy nie są potrzebne w ramach tej funcji. Ma zwrócić liczbę, bez efektów ubocznych po drodze (np. właśnie printów i plotów) :)

"""
dl = signal.size
dl=dl/fp
t = np.arange(0,dl,1/fp)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fp jest wykorzystywane tylko do wyliczenia t, a t jest wykorzystywane tylko do stworzenia wykresu, który w tej funkcji nie jest potrzebny, więc można fp wyrzucić całkowicie z argumentów metody.

"""Method for counting number of turns in signal.
:param fp: sampling rate
:param signal: numpy.ndarray with signal values
:param const: parameter that defines multiple of standard deviation. This multiple is a minimum value of signal change which function interprets as a turn.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Zmieniłbym nazwę argumentu na bardziej znaczącą, czyli np minimal_signal_change

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Czy wtedy zachować formę, czyli parametr w zależności od odchylenia standardowego, czy po prostu ma to być wartość bezwzględna określająca jak duża ma być minimalna zmiana w sygnale?

@mkosturek mkosturek self-requested a review March 13, 2019 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants