##// END OF EJS Templates
Cleaned code, fixed bugs/errors, updated plotting part....
Cleaned code, fixed bugs/errors, updated plotting part. Improved time performance but it still needs to be optimized (CS)

File last commit:

r23:24
r23:24
Show More
FSfarras.py
63 lines | 1.8 KiB | text/x-python | PythonLexer
'''
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