python-wigner-distribution icon indicating copy to clipboard operation
python-wigner-distribution copied to clipboard

Is this a bug?

Open dadadada-147 opened this issue 4 years ago • 3 comments

https://github.com/ljbkusters/python-wigner-distribution/blob/34910d37e86e72d4b6a829ec2b1c3687e4d59b1f/toolkits/wigner_toolkit.py#L135

my input of wvd is 256x256 matrix. Run this code will raise IndexError: 38407 is out of bounds for axis 0 with size 16. that means smoothing_index_best_guess = numpy.argmax(numpy.abs(first_derivative)) will get 38407. Is this a bug ?

dadadada-147 avatar Aug 02 '22 10:08 dadadada-147

I will have a look at it some time soon, I'm quite busy with other projects at the moment but I don't remember seeing something like this occuring before.

ljbkusters avatar Aug 08 '22 16:08 ljbkusters

Okay so I did have some time to review this after all and aparently I messed up the indexation. I worked with this code a few months ago but had to rewrite it from scratch and I must have at that point made some indexation mistake. Anyway, this bug should be fixed now with the latest commit. To be fair, this function has not yet been tested thorougly enough so I'm not sure if it will work as intended though I previously managed to get interesting results (again, this was part of another code base, and I had to redo the code here from scratch), so I know the method works in practice, just not if this implementation is valid.

ljbkusters avatar Aug 08 '22 18:08 ljbkusters

thanks a lot

dadadada-147 avatar Aug 10 '22 05:08 dadadada-147