AllenDowney / ThinkDSP

Think DSP: Digital Signal Processing in Python, by Allen B. Downey.
https://allendowney.github.io/ThinkDSP/
3.93k stars 3.2k forks source link

ts = np.linspace(0, 1, framerate) #55

Closed ShmuelBenEzra closed 5 years ago

ShmuelBenEzra commented 6 years ago

it should be ts = np.linspace(0, 1, framerate+1) in order to preserve framerate = 1/(ts[1] - ts[0]) for example in 6.1

AllenDowney commented 6 years ago

I will check this out as soon as I can. Thanks!

On Mon, Aug 13, 2018 at 3:12 PM, Shmuel Ben-Ezra notifications@github.com wrote:

it should be ts = np.linspace(0, 1, framerate+1) in order to preserve framerate = 1/(ts[1] - ts[0]) for example in 6.1

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/AllenDowney/ThinkDSP/issues/55, or mute the thread https://github.com/notifications/unsubscribe-auth/ABy37Y_nGthFrhy-HDk7nzCAZ3iC5whlks5uQc-cgaJpZM4V7EKO .

AllenDowney commented 5 years ago

I went with a slightly different solution:

ts = np.linspace(0, 1, framerate, endpoint=False)

So I have exactly framerate points with spacing 1/framerate

Thanks!