-
Notifications
You must be signed in to change notification settings - Fork 1
Number of turns #3
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
base: master
Are you sure you want to change the base?
Conversation
… ten jest mój autorski. Mam nadzieję, że poprawny.
mkosturek
left a comment
There was a problem hiding this 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) |
There was a problem hiding this comment.
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) |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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?
Nie można było znaleźć algorytmu na zliczanie zwrotów w sygnale, więc ten jest mój autorski. Mam nadzieję, że poprawny.