-1

I'm trying to understand the following code, specifically how to use the results of scipy.signal.freqz where w in w, h = freqz(b, a, worN=8000) is in radians/samples.

I need to convert this to the range of $[0.0, 1.0]$ where $0.5$ corresponds to Nyquist frequency and $1.0$ to sample rate. And I'm trying to figure out the smartest way of doing this and whether I can use a general "any number range to any number range" algorithm or whether the radians/samples unit poses some problems regarding this?

NOTE: I know how to convert frequency from $\textrm{Hz}$ to radians-per-sample.

mavavilj
  • 1,414
  • 3
  • 17
  • 39

1 Answers1

0

As you noted in your comment, the normalized frequency range [0, 1) cycles/sample corresponds to the range [0, 2*pi) radians/sample. Therefore, given a frequency in the [0, 1) range, simply multiply by 2*pi to convert to radians/sample.

Jason R
  • 24,595
  • 2
  • 67
  • 74