Commit 2d33ce4c authored by Daniel Armbruster's avatar Daniel Armbruster Committed by thomas.forbriger
Browse files

documentation of any2matlab addapted to the new package mechanism

This is a legacy commit from before 2015-03-01.
It may be incomplete as well as inconsistent.
See COPYING.legacy and README.history for details.

SVN Path:     http://gpitrsvn.gpi.uni-karlsruhe.de/repos/TFSoftware/branches/any2matlab0.4
SVN Revision: 3896
SVN UUID:     67feda4a-a26e-11df-9d6e-31afc202ad0c
parent fbf045e8
......@@ -10,32 +10,34 @@
\maketitle
%\clearpage
This manual describes how to install Thomas Forbriger's C++-libraries to get run
\texttt{any2matlab.cc}. \texttt{any2matlab.cc} allows you to import seismic data
This manual describes how to install \texttt{any2matlab} out of a
\texttt{any2matlab} package file including the installation of Thomas
Forbriger's C++-libraries to get run \texttt{any2matlab.cc}.
\texttt{any2matlab.cc} allows you to import seismic data
files with \emph{MATLAB} by using Thomas Forbriger's C++-libraries.
\section{Installation}
\section{Installation out of an \texttt{any2matlab} package}
The only file you need to install if you want to use \texttt{any2matlab.cc}
local on your machine is \texttt{any2matlabYYYYMMDD.tar.bz2}. \texttt{YYYYMMDD}
is representive for the version date of the file. At first you have to create a
directory where you want to install the libraries and the MATLAB
\texttt{MEX}-file. By way of example in the documentation we create a directory
called \texttt{datread} in your \texttt{\$HOME}-directory with the command:
locally on your machine is \texttt{any2matlabYYYYMMDD.tar.bz2} or
\texttt{any2matlabYYYYMMDD.tar.gz}. \texttt{YYYYMMDD} is representive for the
version date of the file. By way of example in the documentation we extract the
package into your local \texttt{\$HOME} directory with the command:
\smallskip
\texttt{mkdir -pv $\sim$/datread}
\texttt{tar -xvjf any2matlab*.tar.bz2 -C \$HOME}
\smallskip
Now extract \texttt{any2matlabYYYYMMDD.tar.bz2} to \texttt{$\sim$/datread} typing
Comment: Depending on the format of your package file it could be that you have
to type
\smallskip
\texttt{tar -xvjf any2matlabYYYYMMDD.tar.bz2 -C $\sim$/datread}
\texttt{tar -xvzf any2matlab*.tar.gz -C \$HOME}
\smallskip
And cruise to \texttt{$\sim$/datread} with
Now in your \texttt{\$HOME} directory you will find a folder called
\texttt{any2matlabYYYYMMDD}. We next will cruise to this folder with
\smallskip
\texttt{cd $\sim$/datread}
\texttt{cd \$HOME/any2matlab*}
\bigskip
Before you are able to compile the whole stuff just start MATLAB and type
......@@ -61,16 +63,16 @@ Typing into the commandline prompt
will give you the version numbers of your currently used compilers. To be safe
from any exceptions of MATLAB the compiler version should be less than or equal
to the compiler version which is supported by MATLAB. For example supports
\emph{MATLAB 2010b} the \texttt{gcc} and \texttt{g++} up to version 4.3. If you
will build the programs with e.g. \texttt{g++-4.4} a similar exception like
\emph{MATLAB 2011a} the \texttt{gcc} and \texttt{g++} up to version 4.3.x. If
you will build the programs with e.g. \texttt{g++-4.4} a similar exception like
\smallskip
\texttt{../glnx86/libstdc++.so.6: version 'GLIBCXX\_3.4.11' not found}
\smallskip
can occur. You get the supported and compatible compilers for MATLAB for the
current release under
\url{http://www.mathworks.com/support/compilers/R2010a/index.html} and for
can occur while executing the program. You get the supported and compatible
compilers for MATLAB for the current release under
\url{http://www.mathworks.com/support/compilers/current\_release/} and for
previous releases under
\url{http://www.mathworks.com/support/compilers/previous\_releases.html}.
......@@ -81,35 +83,49 @@ Library} is installed on your operating system. If not, you have to install it.
\medskip
If your compiler version satisfies the terms and conditions and the GSL is
available you are able to install the libraries and \texttt{any2matlab.cc}.
Executing
Be sure that you are located in the proper directory which means you are located
in
\smallskip
\texttt{. settings.sh `pwd`}
\texttt{\$HOME/any2matlabYYYYMMDD}
If not cruise to this directory typing
\smallskip
in the commandline prompt sets the global pathes and the variables. Note the
back quotes around \texttt{pwd} and the dot at the beginning of the command. Be
aware that you have to be located in our example directory
\texttt{$\sim$/datread}.\\
You must execute the following command in the same commandline prompt. Entering
\texttt{cd \$HOME/any2matlab*}
Read the \texttt{README} files to be sure that all variables are set to your
satisfaction. If you don't want to take care for setting environment variables
just use the \texttt{TFbashrc} file which comes along with this package. Put
this file into your \texttt{\$HOME}-directory by typing
\smallskip
\texttt{make install}
\texttt{cp TFbashrc \$HOME/.TFbashrc}
Now put the following line into your allready existing \texttt{\$HOME/.bashrc} file.
\smallskip
will install the libraries and \texttt{any2matlab.cc}. The binary file of
\texttt{any2matlab.cc} is located in the \texttt{$\sim$/datread/bin} directory.
If you enter
\texttt{test -s \$HOME/.TFbashrc \&\& . \$HOME/.TFbashrc || true}
If you are ready with this matters update your environment variables writing
\smallskip
\texttt{make help}
\texttt{source \$HOME/.bashrc}
Now you are ready to execute the \texttt{install.sh} script which handles the
installation on your machine.
\smallskip
a short help will be displayed.
\texttt{./install.sh}
After finishing successfully you can find a executable located in
\smallskip
\texttt{\$LOCBINDIR/matlab/}
\bigskip
If you want to test the program just open MATLAB and use the testfile
\texttt{$\sim$/datread/src/mex*/tesiff.sff}. Typing
\texttt{\$HOME/any2matlab*/src/obsolete/tesiff.sff}. Typing
\smallskip
\texttt{any2matlab('tesiff.sff')}
......@@ -127,25 +143,29 @@ will return you an \texttt{1x8} struct array with the data.
\texttt{name} from \texttt{ftype} e.g. \texttt{data.sff}
\item \texttt{name} is the filename of the datafile in an arbitrary form.
\texttt{ftype} is one of the options below.
\item \texttt{name} is the filename of the datafile in an arbitrary form.
i\item \texttt{name} is the filename of the datafile in an arbitrary form.
\texttt{ftype} is one of the options below. \texttt{dtype} is the datatype of
the \texttt{trace} field of \texttt{tfstruct}. Valid options are
\texttt{int} for importing integerdata for less memory use or \texttt{double}
for double data which is set as default.\\
\textbf{Attention:} The integer data is generated by cutting off the decimals of
the double data. Due to rounding problems on computers it can occur, that a
double number of $9.999\times10^1$ will be casted to $0$ (zero).
double number of $9.999\times10^{-1}$ will be casted to $0$ (zero).
See:
\url{http://openbook.galileocomputing.de/c\_von\_a\_bis\_z/007\_c\_typumwandlung\_001.htm}
\item \texttt{ftype} is one of the following filetypes:
\begin{itemize}
\item \texttt{pdas}
\item \texttt{sff}
\item \texttt{hpmo}
\item \texttt{bonjer}
\item \texttt{mseed}
\item \texttt{sac}
\item \texttt{gse}
\item \texttt{mseed}: MiniSEED (SeisComP, EDL, etc.)
\item \texttt{pdas}: PDAS100 (i.e. DaDisp)
\item \texttt{sac}: SAC binary format
\item \texttt{sff}: Stuttgart File Format
\item \texttt{gse}: raw GSE format
\item \texttt{hpmo}: HP-MO data format defined by W. Grossmann (BFO)
\item \texttt{bonjer}: K2 ASCII data format (defined by K. Bonjer?)
\item \texttt{tsoft}: TSOFT format
(\url{http://seismologie.oma.be/TSOFT/tsoft.html})
\item \texttt{tfascii}: output data of T. Forbriger's any2ascii
\item \texttt{su}: Seismic Unix format
\end{itemize}
\item \texttt{tfstruct} is a MATLAB struct with the following fields:
\begin{itemize}
......@@ -162,16 +182,42 @@ See:
\item \texttt{instype}: Instrument type. type: string
\item \texttt{trace}: $ \left[\text{\texttt{samps} x 1 double}\right]$ as
default\\
\qquad$\,$ or:\qquad$\left[\text{\texttt{samps} x 1 int}\right]$ for less memory use
\qquad$\,$ or:i\qquad$\left[\text{\texttt{samps} x 1 int}\right]$ for less memory use
\end{itemize}
\end{itemize}
\section{Misc}
The archive contains additional to this documentation a \texttt{html} documentation of
\texttt{any2matlab.*} and a \texttt{man} page in the \texttt{documentation} directory. You can open
the \texttt{html} documentation with your commen browser. The man page you can view with the command
The archive contains additional to this documentation a \texttt{html}
documentation of \texttt{any2matlab.*} and a \texttt{man} page in the
\texttt{documentation} directory. You can open the \texttt{html} documentation
with your commen browser. The man page you can view with the command
\smallskip
\texttt{man $\sim$/datread/documentation/man/any2matlab.cc.3}
\section{Package maintainers}
If you are package maintainer and you want to build a new any2matlab package
cruise to the \texttt{any2matlab} directory in your working copy of the software
repository. Generally the path should be
\smallskip
\texttt{<path to working copy>/src/matlab/any2matlab}
Next be sure that your environment variables are set properly in your
\texttt{$\sim$/.TFbashrc} file. Check the content of
\begin{itemize}
\item \texttt{\$SVNTF}
\item \texttt{\$TF\_PUBLICATIONPATH} (place to drop packages)
\item \texttt{\$TF\_MAKEPKG} (path of Makefile.packages)
\end{itemize}
Now you are ready to build a package with the command
\smallskip
\texttt{make -f Makefile.package fullpackage}
The package files you will find in your \texttt{\$TF\_PUBLICATIONPATH}.
\end{document}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment