📄 paper.tex
字号:
\title{User's manual for SLIM programs in Madagascar}\email{ghennenfent@eos.ubc.ca}\author{Gilles Hennenfent}\footnotetext[1]{\emph{Seismic Laboratory for Imaging and Modeling, Dept. of Earth and Ocean Sciences, the University of British Columbia, Vancouver, BC, Canada}}\maketitle\begin{abstract} This guide documents the contributions to Madagascar made by authors from the Seismic Laboratory for Imaging and Modeling (\href{http://slim.eos.ubc.ca}{SLIM}) at the University of British Columbia (\href{http://www.ubc.ca}{UBC}).\end{abstract}\section{Copyright}%Copyright (c) The University of British Columbia at Vancouver,2005-2007.\section{License}%\noindent This program is free software; you can redistribute itand/or modify it under the terms of the GNU General Public License aspublished by the Free Software Foundation; either version 2 of theLicense, or (at your option) any later version.\section{Disclaimer}%This program is distributed in the hope that it will be useful, butWITHOUT ANY WARRANTY; without even the implied warranty ofMERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNUGeneral Public License for more details.\\%You should have received a copy of the GNU General Public Licensealong with this program; if not, write to the Free SoftwareFoundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307USA.\newpage\section{Utilities}\noindent\doublebox{\parbox{\textwidth}{\input{sfthr}}}\noindentConsider the vector $\vector{x}:=\{x_i\}_{0\leq i <m}\in\mathbb{R}^m$.Soft thresholding is defined as%\begin{equation}\label{eq:soft}\mathcal{S}_\gamma(\vector{x}):=\{\mbox{sign}(x_i)\cdot\max(|x_i|-\gamma,0)\}_{0\leq i <m},\end{equation}%with $\gamma$ a positive threshold level. Hard thresholding is definedas%\begin{equation}\label{eq:hard}\mathcal{H}_\gamma(\vector{x}):=\{\max(|x_i|-\gamma,0)\cdot x_i\}_{0\leq i <m}.\end{equation}%Finally, non-negative Garrote (nng) thresholding is defined as%\begin{equation}\label{eq:nng}\mathcal{T}^{nng}_\gamma(\vector{x}):=\{\max(|x_i|-\gamma,0)\cdot (x_i-\gamma^2/x_i)\}_{0\leq i <m}.\end{equation}\inputdir{sfthr}\multiplot{4}{data,soft,hard,nng}{width=.45\textwidth}{Thresholding example. Line whose range is symmetric about the origin (a) thresholded using soft (b), hard (c), and NNG (d) methods.}The extension to positive varying threshold level is straightforwardby replacing $\gamma$ by $\gamma_i$ inEq.'s~\eqref{eq:soft},\eqref{eq:hard}, and \eqref{eq:nng}.In Madagascar, to soft threshold a dataset with a constant, use e.g.%\begin{verbatim}bash$ sfmath n1=100 n2=1 output='1' | sfnoise rep=y >data.rsfbash$ sfthr <data.rsf thr=2 >res1.rsf\end{verbatim}%or replace the last command by%\begin{verbatim}bash$ sfthr <data.rsf thr=2 method=soft >res2.rsf\end{verbatim}%This is also equivalent to soft thresholding \texttt{data.rsf} with avector of same size \texttt{mythr.rsf} whose entries are all set to 2.%\begin{verbatim}bash$ sfmath n1=100 n2=1 output='2' >mythr.rsfbash$ sfthr <data.rsf fthr=mythr.rsf method=soft >res3.rsf\end{verbatim}%If \texttt{thr=.5} and \texttt{fthr=mythr.rsf} are specified at thesame time, the effective threshold level is 1, obtained by multiplying\texttt{mythr.rsf} entries by 0.5%\begin{verbatim}bash$ sfthr <data.rsf thr=.5 fthr=mythr.rsf method=soft >res4.rsf\end{verbatim}\multiplot{4}{data1,soft1,hard1,nng1}{width=.45\textwidth}{Random vector thresholding example.}Note that thresholding is an element-wise operation. \texttt{sfthr}can thus deal with arbitrarily large datasets.\noindent\doublebox{\parbox{\textwidth}{\input{sfsort}}}\noindent\texttt{sfsort} is useful for sorting Madagascar vectors either inascending or descending order with respect to their amplitudes. Thesorting is done using \texttt{qsort} from stdlib.h. This function isan implementation of the quicksort algorithm. \texttt{sfsort} has twomodes: 1) in-core if the user-specified memsize is big enough to loadthe full dataset in memory and sort it, and else 2) out-of-core. Inthe latter case, we implemented a divide and conquer approach. Thelarge dataset is first divided into pieces that fit in memory. Thesepieces are sorted and written to disk in temporary files. The secondstep is a merge process of the temporary files.\inputdir{sfsort}\multiplot{3}{datasort,incore,outofcore}{width=.3\textwidth}{Sorting example.}\section{Transforms}\noindent\doublebox{\parbox{\textwidth}{\input{sffdct}}}\inputdir{sffdct}\multiplot{3}{model,data,res}{width=.3\textwidth}{Data denoising. (a) Noise-free data, (b) noisy data, and (c) denoised data using sffdct.}%%% Local Variables: %%% mode: latex%%% TeX-master: t%%% TeX-master: t%%% TeX-master: t%%% TeX-master: t%%% End:
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -