Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Corrections from Luís Guimarães #85

Closed
AllenDowney opened this issue Feb 23, 2022 · 1 comment
Closed

Corrections from Luís Guimarães #85

AllenDowney opened this issue Feb 23, 2022 · 1 comment

Comments

@AllenDowney
Copy link
Owner

(Typos)

  • Page 66 (Chapter 6):
    "So each element of y is the sum of four frequency component"
    I suppose it should be written 'ys' and not 'y'

  • chap02soln - Markdown text right before "Exercise 3":
    "TIf you compare it to this 500 Hz sine wave, you might hear what I mean."
    Very minimal but I presume it is supposed to be written "If" and not "TIf".

  • Page 84 (Chapter 7):
    "Instead, I will rewrite it to take just ys and compute freq and ts itself."
    I think it should be written 'fs' and not 'freq'.

  • Page 86 (Chapter 7):
    "The Spectrum class in thinkdsp is based on np.ftt.rfft"
    The name of the module is "np.fft.rfft"

  • Page 90 (Chapter 8):
    "padded is a version of the window with zeros added to the end so it has the same length as segment.ys prod is the product of the window and the wave array."
    Based on previous chapters, I think it's missing a '\n' between 'segment.ys' and 'prod'

  • Page 91 (Chapter 8):
    "rolled = np.roll(rolled, 1)"
    It is supposed to be written 'padded' instead of 'rolled', right?

  • Page 95 (Chapter 8):
    "And for any filter than can be expressed by element-wise multiplication in the frequency domain, there is a corresponding window."
    I think you meant to write 'that' and not 'than'.

  • Page 99 (Chapter 8):
    "To compute autocorrelation using convolution, have to zero-pad the signal to double the length."
    It sounds like you meant to write "we have" instead of just 'have'.

Page 100 (Chapter 8):
"In addition to the Gaussian window we used in this window, create a Hamming window with the same size."
I think you meant to write "(...) we used in this chapter (...)".

Page 102 (Chapter 8):
"ys = df.close.values[::-1]
close = thinkdsp.Wave(ys, framerate=1)
spectrum = wave.make_spectrum()"
It should be "close.make_spectrum()" instead of "wave.make_spectrum()"

Page 116 (Chapter 10):
"(...) we can compute the impulse response by multiplying spectrum of the impulse and the filter, (...)"
This sentence seems to be missing a "the" before the word "spectrum".

Page 127 (Chapter 11):
"I’ll uses that to explain amplitude modulation (AM)"
I think "use" should be used in place of "uses"

  • Page 131 (chapter 11):
    "“Sampling” is the process of measuring an analog signal at an series of points in time, usually with equal spacing"
    I've always thought that we used 'a' if the following word started with a consonant sound and 'an' if it started with a vowel sound. Not sure if it is a mistake on "an series" but it definitely sounds like one to me.

  • Page 137 (chapter 11):
    "Figure 11.7 (right) shows what this filter looks like. Of course, multiplication by the this filter, in the frequency domain, corresponds to convolution with a window in the time domain. We can find out what that window is by computing the inverse DFT of the filter, which is shown in Figure 11.7 (left)."
    The 'right' and 'left' indicators are swapped as well as in the figure's caption.

(Miscellaneous)

  • chap02soln - Exercise 1, evaluate:
    "cycles = self.freq * ts + self.offset / np.pi / 2"
    But in the book, in the evaluate function of SquareSignal it is written:
    "cycles = self.freq * ts + self.offset / PI2"
    It might be less confusing for readers if both "cycles" variables are defined the same way, since they have the same values.

  • Page 73 (Chapter 6 - Exercises):
    Exercise 6.2 mentions sparse arrays but the solution on chap06soln does not. I'm not sure if this was intended or not.

  • Page 84 (Chapter 7):
    In the definition of 'idft' (in the book) shouldn't it receive 'amps' as an argument and then return 'ys' instead of receiving 'ys' and returning 'amps'?

  • thinkdsp.py:
    The 'read_wave' function doesn't seem to work well for 24 bit depths (introduces crackling).

  • chap11.ipynb
    You mention in chapter 8 (page 95) the boxcar filter as being the DFT of the boxcar window. However, in chap11.ipynb, you mention the boxcar filter as being the filter that looks like the boxcar window rather than the DFT of the boxcar window. I found this confusing that's why I'm mentioning it.

  • Page 131 (chapter 11):
    "The result is quite close to the original wave, although about half of the power is lost after demodulating and filtering. But that’s not a problem in practice, because much more of the power is lost in transmitting and receiving the broadcast signal. We have to amplify the result anyway, another factor of 2 is not an issue."

I don't want to be annoying but every time I read this paragraph it always sounds like fallacious reasoning to me because I'm guessing that, even with the power losses of transmission, it would be an issue if the power lost after demodulating and filtering ruined the sound. So maybe the real reason why the power lost after demodulating and filtering is not a problem is that multiplying by a factor of 2 does not damage the sound quality in a significant way.

@AllenDowney
Copy link
Owner Author

I have made corrections based on these comments.

Many thanks to Luís!

AllenDowney added a commit that referenced this issue Feb 23, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant