# File rbSnack/tkSnack.rb, line 1010 def initialize(aList=nil, bList=nil, options=nil, &op_block) aList=[aList] if aList.type==Numeric bList=[bList] if bList.type==Numeric opt={} opt["denominator"]=aList unless aList==nil opt["numerator"] =bList unless bList==nil opt.update(options) unless options==nil opt=SnOp::makeOps(opt, &op_block) #p opt #We put a0 (=1) onto the list before passing to irr aList=[1] aList.concat(opt["denominator"]) if opt.has_key? "denominator" opt["denominator"]=aList raise "must supply an impulse response list" unless opt.has_key?("numerator") and opt["numerator"]!=nil and opt["numerator"].length>0 #kludge for impulse portion (see FIRFilter) bList=opt["numerator"] #kludge b0=bList.shift #kludge bList<<b0 #kludge bList.reverse! #kludge opt["numerator"]=bList #kludge @name=Snack::exeTkCmd( ['snack::filter','iir'], opt) end