|
|
'''
|
|
|
Created on May 26, 2014
|
|
|
|
|
|
@author: Yolian Amaro
|
|
|
'''
|
|
|
|
|
|
#import pywt
|
|
|
import numpy as np
|
|
|
|
|
|
def FSfarras():
|
|
|
#function [af, sf] = FSfarras
|
|
|
|
|
|
# Farras filters organized for the dual-tree
|
|
|
# complex DWT.
|
|
|
#
|
|
|
# USAGE:
|
|
|
# [af, sf] = FSfarras
|
|
|
# OUTPUT:
|
|
|
# af{i}, i = 1,2 - analysis filters for tree i
|
|
|
# sf{i}, i = 1,2 - synthesis filters for tree i
|
|
|
# See farras, dualtree, dualfilt1.
|
|
|
#
|
|
|
# WAVELET SOFTWARE AT POLYTECHNIC UNIVERSITY, BROOKLYN, NY
|
|
|
# http://taco.poly.edu/WaveletSoftware/
|
|
|
#
|
|
|
# Translated to Python by Yolian Amaro
|
|
|
|
|
|
|
|
|
a1 = np.array( [
|
|
|
[ 0, 0],
|
|
|
[-0.08838834764832, -0.01122679215254],
|
|
|
[ 0.08838834764832, 0.01122679215254],
|
|
|
[ 0.69587998903400, 0.08838834764832],
|
|
|
[ 0.69587998903400, 0.08838834764832],
|
|
|
[ 0.08838834764832, -0.69587998903400],
|
|
|
[-0.08838834764832, 0.69587998903400],
|
|
|
[ 0.01122679215254, -0.08838834764832],
|
|
|
[ 0.01122679215254, -0.08838834764832],
|
|
|
[0, 0]
|
|
|
] );
|
|
|
|
|
|
a2 = np.array([
|
|
|
[ 0.01122679215254, 0],
|
|
|
[ 0.01122679215254, 0],
|
|
|
[-0.08838834764832, -0.08838834764832],
|
|
|
[ 0.08838834764832, -0.08838834764832],
|
|
|
[ 0.69587998903400, 0.69587998903400],
|
|
|
[ 0.69587998903400, -0.69587998903400],
|
|
|
[ 0.08838834764832, 0.08838834764832],
|
|
|
[-0.08838834764832, 0.08838834764832],
|
|
|
[ 0, 0.01122679215254],
|
|
|
[ 0, -0.01122679215254]
|
|
|
]);
|
|
|
|
|
|
|
|
|
af = np.array([ [a1,a2] ], dtype=object)
|
|
|
|
|
|
s1 = a1[::-1]
|
|
|
s2 = a2[::-1]
|
|
|
|
|
|
sf = np.array([ [s1,s2] ], dtype=object)
|
|
|
|
|
|
return af, sf
|
|
|
|