There are 2 functions.
log_fir() calculates phase of a minimum phase function having specified gain.
It utilizes the fact that exp(a0+a1/z+a2/z^2+..) is the minimum phase
function. The gain is exp(a0+a1*cos(w)+..) and the phase is
exp(-(a1*sin(w)+..)). So by selecting a0,a1,.. from the specified gain,
the phase can be obtained.
piir() calculates the stable IIR filter from the specified phase. The method is
shown in.
M.Kisaka: Phase design of an IIR filter and its application to an inverse
system, Proceeding of the 2006 IEEE international conference on control
system,Munich, Germany,Oct.2619/2622(2006)