function x = iatomfm2sym(c,pat)
% iatfm2sym.m - (pseudo-)inverse transform of wave atom frame with redundancy 2, symmetric version
%
% input:
%   y:    2N-by-N image containing all wave atom coefficients
%         the coefficients with b=1 are in the first half y(1:N,:), while
%         the coefficients with b=2 are in the second half y(N+1:2*N,:)
%   pat:  type of frequency partition which satsifies parabolic scaling relationship
%         equal to 'p' or 'q'
%
% output:
%   x:    N-by-N image
%
% Written by M.J. Fadili, 2007

x = double(iatomfm2sym_mex(single(c),pat));

%c1 = (c(1:end/2,:)+c(end/2+1:end,:))/2;
%c2 = (c(1:end/2,:)-c(end/2+1:end,:))/2;

%x = double(iatom2sym_mex(single(c1),pat,[1 1])) + double(iatom2sym_mex(single(c2),pat,[-1 -1]));
