-
Notifications
You must be signed in to change notification settings - Fork 66
Adding norm parameter to smooth, and allowing for smoothing in the decode1d and 2d functions #249
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
Conversation
dhruvm9
commented
Mar 22, 2024
- The Gaussian window used in smooth can either be normalized (norm=True), or not (norm=False).
- decode1d and decode2d now take the arguments of smooth as optional arguments, which allow for smoothing of the group before decoding. The default values of the call for smooth do no smoothing.
Pull Request Test Coverage Report for Build 8393458494Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 8393458494Details
💛 - Coveralls |
Pull Request Test Coverage Report for Build 8528172187Details
💛 - Coveralls |
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.
You need to write the test for it in the file tests/test_decoding.py
@@ -445,7 +445,7 @@ def convolve(self, array, ep=None, trim="both"): | |||
|
|||
return self.__class__(t=time_array, d=new_data_array, time_support=ep) | |||
|
|||
def smooth(self, std, size): | |||
def smooth(self, std, size, norm=False): |
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.
Norm should be True by default.
Description | ||
Size of the Gaussian window | ||
norm : bool | ||
To toggle between having a normalized Gaussian kernel or not. Default value is false. |
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.
Change to True
Size of the Gaussian window to be used for smoothing the data. Default value is None. | ||
smoothing_std : float | ||
Standard deviation of the Gaussian kernel for smoothing. Default value is 0. | ||
norm : bool |
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.
You should explain more here what it does. When computing a spike count, it smooth it and preserves the spike count in the 0 bin.
size of the Gaussian window to be used for smoothing the data. Default value is None. | ||
smoothing_std : float | ||
Standard deviation of the Gaussian kernel for smoothing. Default value is 0. | ||
norm : bool |
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.
same here