Confused over Stopband attenuation and stopband ripple I have designed this bandstop filter to a desired specification:

Stopband attenuation = 40db
Passband ripple = 2db
etc ... 



I understand that the stopband ripple can be given by the following:

Stopband ripple = −20log10(δs)
40 = −20log10(δs)
δs=0.01

therefore stop-band ripple δs = 0.01. where I am confused is how this value can be converted into dB so that it can be compared to the stop-band ripple seen in the MATLAB simulation (which is in dB). 40dB is the stopband attenuation, not the stopband ripple (or is it?). the simulation is showing a stopband ripple of around 32dB.... is the stopband attenuated and ripple with same ? what am I missing ? 

thank you for your time
I understand that the stopband ripple can be given by the following:
  
  Stopband ripple = −20log10(δs) 40 = −20log10(δs) δs=0.01


Where does that come from? I have never heard the term "stopband ripple". 

Stopband attenuation of 40 dB means that in the stop band any level of -40dB OR LESS is allowed. How much less than -40dB or where it hits -40dB isn't a controlled variable. -50dB, -60dB etc all are fine.