% This is part of the TFTB Reference Manual.
% Copyright (C) 1996 CNRS (France) and Rice University (US).
% See the file refguide.tex for copying conditions.


\markright{tfrspaw}
\section*{\hspace*{-1.6cm} tfrspaw}

\vspace*{-.4cm}
\hspace*{-1.6cm}\rule[0in]{16.5cm}{.02cm}
\vspace*{.2cm}

{\bf \large \sf Purpose}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
Smoothed pseudo affine Wigner time-frequency distributions.
\end{minipage}
\vspace*{.5cm}

{\bf \large \sf Synopsis}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
\begin{verbatim}
[tfr,t,f] = tfrspaw(x)
[tfr,t,f] = tfrspaw(x,t)
[tfr,t,f] = tfrspaw(x,t,k)
[tfr,t,f] = tfrspaw(x,t,k,nh0)
[tfr,t,f] = tfrspaw(x,t,k,nh0,ng0)
[tfr,t,f] = tfrspaw(x,t,k,nh0,ng0,fmin,fmax)
[tfr,t,f] = tfrspaw(x,t,k,nh0,ng0,fmin,fmax,N)
[tfr,t,f] = tfrspaw(x,t,k,nh0,ng0,fmin,fmax,N,trace)
\end{verbatim}
\end{minipage}
\vspace*{.5cm}

{\bf \large \sf Description}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
        {\ty tfrspaw} generates the auto- or cross- smoothed pseudo affine
        Wigner distributions. Its general expression writes
\begin{eqnarray*}
\tilde{P}_x^k(t,\nu)=\int_{-\infty}^{+\infty}
\dfrac{\mu_k(u)}{\sqrt{\lambda_k(u)\lambda_k(-u)}}\  
T_x(t,\lambda_k(u)\nu;\psi)\ T_x^*(t,\lambda_k(-u)\nu;\psi)\ du,
\end{eqnarray*}
where $T_x(t,\nu;\psi)$ is the continuous wavelet transform,
\[\psi(t)=(\pi t_0^2)^{-1/4}\exp\left[-\frac{1}{2}(t/t_0)^2 +
j2\pi\nu_0t\right]\] is the Morlet wavelet, and
$\lambda_k(u,k)=\left(\dfrac{k(e^{-u}-1)}{e^{-ku}-1}\right)^{\frac{1}{k-1}}.$\\

\hspace*{-.5cm}\begin{tabular*}{14cm}{p{1.5cm} p{9.5cm} c}
Name & Description & Default\\
\hline
        {\ty x} & signal (in time) to be analyzed. If {\ty x=[x1 x2]}, {\ty tfrspaw}
           computes the cross-smoothed pseudo affine Wigner distribution.
                                                {\ty (Nx=length(X))}\\
        {\ty t} & time instant(s) on which the {\ty tfr} is evaluated & {\ty (1:Nx)}\\
        {\ty k} & label of the distribution          & 0\\
      & \hspace*{.2cm} {\ty k=-1  :} smoothed pseudo active Unterberger  \\
      & \hspace*{.2cm} {\ty k=0   :} smoothed pseudo Bertrand \\
      & \hspace*{.2cm} {\ty k=1/2 :} smoothed pseudo D-Flandrin \\
      & \hspace*{.2cm} {\ty k=2   :} affine smoothed pseudo Wigner-Ville\\

\hline\end{tabular*}\end{minipage} 
%\newpage
\hspace*{1.5cm}\begin{minipage}[t]{13.5cm}
\hspace*{-.5cm}\begin{tabular*}{14cm}{p{1.5cm} p{9cm} c}
Name & Description & Default value\\\hline

        {\ty nh0} & half length of the analyzing wavelet at coarsest scale.  
           A Morlet wavelet is used. {\ty nh0} controls the frequency 
           smoothing of the smoothed pseudo affine Wigner distribution
                                                & {\ty sqrt(Nx)}\\
        {\ty ng0} & half length of the time smoothing window. 
        {\ty ng0=0} corresponds to the pseudo affine Wigner distribution  
                                                & {\ty 0}\\
        {\ty fmin, fmax} & respectively lower and upper frequency bounds of 
           the analyzed signal. These parameters fix the equivalent 
           frequency bandwidth (expressed in Hz). When unspecified, you
           have to enter them at the command line from the plot of the
           spectrum. {\ty fmin} and {\ty fmax} must be $>${\ty 0} and $\leq${\ty 0.5}\\
        {\ty N} & number of analyzed voices & auto\footnote{This value,
	determined from {\ty fmin} and {\ty fmax}, is the 
	next-power-of-two of the minimum value checking the non-overlapping
	condition in the fast Mellin transform.}\\
        {\ty trace} & if nonzero, the progression of the algorithm is shown
                                                & {\ty 0}\\
     \hline {\ty tfr} & time-frequency matrix containing the coefficients of the
           decomposition (abscissa correspond to uniformly sampled time,
           and ordinates correspond to a geometrically sampled
           frequency). First row of {\ty tfr} corresponds to the lowest 
           frequency\\
        {\ty f} & vector of normalized frequencies (geometrically sampled 
           from {\ty fmin} to {\ty fmax})\\
 
\hline
\end{tabular*}
\vspace*{.1cm}

When called without output arguments, {\ty tfrspaw} runs {\ty tfrqview}.
\end{minipage}
\vspace*{.5cm}

{\bf \large \sf Example}
\begin{verbatim}
         sig=altes(64,0.1,0.45); 
         tfrspaw(sig);
\end{verbatim}
\vspace*{.4cm}

{\bf \large \sf See Also}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
all the {\ty tfr*} functions.
\end{minipage}
\vspace*{.4cm}

{\bf \large \sf Reference}\\
\hspace*{1.5cm}
\begin{minipage}[t]{13.5cm}
[1] P. Gonçalvès, R. Baraniuk ``Pseudo Affine Wigner Distributions and
Kernel Formulation'' Submitted to IEEE Transactions on Signal Processing,
1996. 
\end{minipage}

