Second quartile noise estimation in python