title: Converting from samplerate/cutoff frequency to pi-radians/sample in a discrete time sampled IIR filter system
body: <p>I am working on doing some digital filter work using Python and Numpy/Scipy.</p>
  
  <p>I'm using scipy.signal.iirdesign to generate my filter coefficents, but it requires the filter passband coefficents in a format I am not familiar with</p>
  
  <pre><code>wp, ws : float
  
    Passband and stopband edge frequencies, normalized from 0 to 1 (1 corresponds 
        to pi radians / sample). 
    For example:
    Lowpass: wp = 0.2, ws = 0.3
    Highpass: wp = 0.3, ws = 0.2
  </code></pre>
  
  <p>(<a href="http://docs.scipy.org/doc/scipy/reference/generated/scipy.signal.iirfilter.html#scipy.signal.iirfilter" rel="nofollow">from here</a>)</p>
  
  <p>I'm not familiar with digital filters (I'm coming from a hardware design background). In an analog context,  I would determine the desired slope and the 3db down point, and calculate component values from that.</p>
  
  <p>In this context, how do I take a known sample rate, a desired corner frequency, and a desired rolloff, and calculate the <code>wp, ws</code> values from that?</p>
  
  <p>(This might be more appropriate for math.stackexchange. I'm not sure)</p>