-
Notifications
You must be signed in to change notification settings - Fork 5
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
Error in pdf function #3
Comments
Hello, do you have some test data that I can use? That way I can compare the results you get with Ledalab. |
https://drive.google.com/file/d/1ABRC3nIXdZo5i-MLzVmQJlr4WQ1THiSQ/view?usp=sharing |
Hi, I did a test and the results look ok to me. Are you using the latest version? I think the changes you suggested were already done (in commit af1969b, Aug 4, 2019) |
You are right, it is working perfectly |
Alright, thank you |
Hi!
I continue using your code and i have seen a part of the code that is problematic for me:
utils.py: window = norm.pdf(np.arange(0, winwidth + 1), winwidth // 2, winwidth // 8) (line 162)
the problem is that in my code the input of the function 'smooth(data, winwidth_in)' the parameter winwidth_in is 4 so the output of the pdf function is a list of nan.
A posible solution i have checked (but I'm not sure of it) is to change it to:
window = norm.pdf(np.arange(0, winwidth + 1), winwidth / 2, winwidth / 8)
because the operator // get the floor division but in the previous order you have:
winwidth = int(np.floor(winwidth_in // 2) * 2) # force even winsize for odd window
So winwidth will be always even so the division 'winwidth / 2' shoud always be equals to 'winwidth // 2' but I don't understand why in this case not.
If you have any idea why i have this problem it would be great, but thank you anyways for this wonderful program.
PS: I work with e4_empatica data which have 4 Hz
The text was updated successfully, but these errors were encountered: