# Is this graph of Wigner-Ville distribution OK?

I am studying some code for smoothed Wigner-Ville distribution.

update 3- solution, graph was over amplified in a 2d overdrive/oversaturation effect. if i divide by 20 only a line is visible.

Update - indeed there is a bug, the current image is from 128 samples of a $44.1\textrm{ kHz}$ signal where sample[i] = sin[i/10.0]; i.e. a $4410 \textrm{ Hz}$ sine wave, to fit inside the 128 samples.

As suggested by JazzManiac, here is the code which is causing errors, it's actually P Kootsookos Cohens.C code, with a minor change, instead of a .raw input audio TFD file i am using a sine wave array in get_my_signal function... A trivial and simple patch, wouldnt you agree? that can't be the error?!

I have a professional C programmer who has been coding for 30 years who provided this version of the code, it's just setting the argc and argv options in advance, to spwvd, hamming, and default window (was 128, is now 1024).

Is smoothed Wigner-Ville the same as smoothed pseudo Wigner-Ville?...

The original author (i.e. me) gets this for each of the three test cases:

• Giving frequencies in Hz but not specifying the sampling rate is meaningless. And no, those do not look correct. You have weird artefacts at what appears to be the pixel level and the distributions do not look remotely correct. And unless you show your input signals and your code, you quite certainly won't get any deeper insight than this. Apr 13 '16 at 18:29
• It looks like you provided us with a nice looking graphics, but without any axes. Please consider updating them.
– jojek
Apr 13 '16 at 19:35
• Hi there, there is certainty that it's a bug, i thought it was aliasing due to the window size being only 128 samples... However JM is right there is indeed an error. I have edited the question and provided the code. Can you please confirm that the get_my_signal generated array should work isntead of a .raw file? Apr 13 '16 at 19:51
• Thanks jojek regarding the graphics, it's actually a 2d graph supplied to the geometry shader of the graphics card, so all the dots are vertices. Apr 13 '16 at 20:04
• I am getting well proportioned graphs now, sometimes the solution is so easy!!! i had to divide the output figures by 20 in order to not multiply all the transients into a mess. So now i am getting super clear straight lines, the last trouble is to figure out why a srate of 44100 is giving me the same as with 441hz and 120hz sine is dissapearing off the graph altogher... don't know why it could be de-tuned. Thanks i am onto something now. display in graphics card is awesome it enables fast zooming and brightness contrans adn post processing via ultra fast gpu parallel tricks very nice! Apr 14 '16 at 18:20