Open spranav1205 opened 1 month ago
@spranav1205 thanks! A few comments: edge cases should not be plainly 0.5, but account for the exact percentage of zeros and one in a given bin. Also, I suggest implementing tests that demonstrate that the new impulse response is working correctly. I think the formulas you are using will not give the expected results!
The version I have written (and tested :sob:) assigns one if the impulse response lies on a sampling time plainly and 0.5 at the edge. I can write one where the next node (or the previous) is assigned based on how many ones and zeros lie in the bin (essentially the area right?). Is that what we are looking for??
Relevant Issue(s)/PR(s) #851
Textbook implementation of impulse response.
Edge cases are 0.5 and phase is taken into account. The response maybe zero if the width doesn't fall on the sampling times, a warning can be issued for the same.
Eg. start = 3 width = 5 dt = 4 = [0,1,0.5] start = 4 width = 4 dt = 4 = [0,0.5,0.5] start = 1 width = 3 dt = 4 = [0,0.5]
ps. the code has redundancies which I can remove once finalized