matlab程序转换python滤波器

img
这是matlab程序,需要转换成python语言,下面是我自己写的python程序,大家帮忙看一下哪里错误了,magH2应该转换成哪个
img