phetsims / fourier-making-waves

"Fourier: Making Waves" is an educational simulation in HTML5, by PhET Interactive Simulations.
GNU General Public License v3.0
6 stars 3 forks source link

Odd y-axis scale for Wave Packet Width = 4pi #128

Closed pixelzoom closed 3 years ago

pixelzoom commented 3 years ago

In this scenario, @kathy-phet reported its odd that y-axis scale is 0.99:

screenshot_250

pixelzoom commented 3 years ago

The Java version behaves the same way - the max amplitude for width=4pi is noticeably smaller than the max amplitude for width=3pi. It doesn't result in a y-axis scale change in the Java version, because the Java version handles y-axis scale differently. But you can definitely see the change in the sum waveform, and the tick marks/labels on the y-axis do move.

I'm not sure if this is a bug in the model, or correct behavior. @arouinfar what do you think?

pixelzoom commented 3 years ago

Java version screenshots, showing width=3pi vs 4pi:

screenshot_253

screenshot_254

pixelzoom commented 3 years ago

Sorry, I didn't turn on "x-space envelope" in the above Java screenshots. But I tested again, and I see similar behavior when "x-space envelope" is checked.

arouinfar commented 3 years ago

If the wave packet is centered at 10-14 pi, the max value looks fine to me. I only see an issue when it's centered at 9 or 15 pi (the min/max). Perhaps the max amplitude dips because there's more of the distribution's tail (which has very low amplitudes) is included in the sum?

Would the changes to autoscale in #139 hide this issue @pixelzoom?

pixelzoom commented 3 years ago

Perhaps the max amplitude dips because there's more of the distribution's tail (which has very low amplitudes) is included in the sum?

How do we confirm this hypothesis? And if that's the case, should we put something in Teacher Tips?

Would the changes to autoscale in #139 hide this issue @pixelzoom?

139 auto-scale changes are specific to the Discrete screen. Auto-scale for the Wave Packet screen is not changing.

arouinfar commented 3 years ago

The Java version behaves the same way - the max amplitude for width=4pi is noticeably smaller than the max amplitude for width=3pi.

This is to be expected. The larger the standard deviation, the shorter the peak. Here's an example from the Wiki page on Gaussians. image

I think the sim was behaving correctly, but given the changes in https://github.com/phetsims/fourier-making-waves/issues/159, this issue is now moot. Closing.