\HeaderA{rsac}{READ A BINARY SAC FILE}{rsac}
\begin{Description}\relax
This function reads the header information and data of a SAC binary
file into a list.
\end{Description}
\begin{Usage}
\begin{verbatim}
  rsac(files, endian = .Platform$endian)
\end{verbatim}
\end{Usage}
\begin{Arguments}
\begin{ldescription}
\item[\code{files}] name of file to be read.
\item[\code{endian}] the endian-ness of the file. See
\code{\LinkA{readBin}{readBin}}.
\end{ldescription}
\end{Arguments}
\begin{Value}
an object of class \code{"rsac"}, which is a list containing the
following elements: 
\begin{ldescription}
\item[\code{amp}] data.
\item[\code{dt}] Increment between evenly spaced samples (nominal
value).
\item[\code{depmin}] Minimum value of dependent variable.
\item[\code{depmax}] Maximum value of dependent variable.
\item[\code{scale}] Multiplying scale factor for dependent variable.
\item[\code{odelta}] Observed increment if different from nominal
value.
\item[\code{b}] Beginning value of the independent variable.
\item[\code{e}] Ending value of the independent variable.
\item[\code{o}] Event origin time (seconds relative to reference
time.
\item[\code{a}] First arrival time, seconds relative to reference
time.
\item[\code{f}] End of event time.
\item[\code{stla}] Station latitude (degrees, north positive).
\item[\code{stlo}] Station longitude (degrees, east positive).
\item[\code{stel}] Station elevation (meters).
\item[\code{stdp}] Station depth below surface (meters). 
\item[\code{evla}] Event latitude (degrees, north positive).
\item[\code{evlo}] Event longitude (degrees, east positive).
\item[\code{evel}] Event elevation (meters).
\item[\code{evdp}] Event depth below surface (meters).
\item[\code{mag}] Event magnitude.
\item[\code{dist}] Station to event distance (km).
\item[\code{az}] Event to station azimuth (degrees).
\item[\code{baz}] Station to event azimuth (degrees).
\item[\code{gcarc}] Station to event great circle arc length
(degrees).
\item[\code{cmpaz}] Component azimuth (degrees clockwise from
north).
\item[\code{cmpinc}] Component incident angle (degrees from
vertical).
\item[\code{nzyear}] GMT year corresponding to reference (zero) time
in file.
\item[\code{nzjday}] GMT julian day.
\item[\code{nzhour}] GMT hour.
\item[\code{nzmin}] GMT minute.
\item[\code{nzsec}] GMT second.
\item[\code{nzmsec}] GMT millisecond.
\item[\code{norid}] Origin ID.
\item[\code{nevid}] Event ID.
\item[\code{N}] Number of points in time series.
\item[\code{units}] Type of dependent variable (IUNKN=Unknown;
IDISP=Displacement in nm; IVEL=Velocity in nm/sec; IVOLTS=Velocity
in volts; IACC=Acceleration in nm/sec/sec).
\item[\code{iztype}] Reference time equivalence (IUNKN=Unknown;
IB=Begin time; IDAY=Midnight of refernece GMT day; IO=Event origin
time; IA=First arrival time; ITn=User defined time pick n, n=0,9).
\item[\code{leven}] \code{TRUE} if data is evenly spaced.
\item[\code{lpspol}] \code{TRUE} if station components have a positive
polarity (left-hand rule).
\item[\code{sta}] Station name.
\item[\code{kevnm}] Event name.
\item[\code{khole}] Hole identification if nuclear event.
\item[\code{ko}] Event origin time identification.
\item[\code{ka}] First arrival time identification.
\item[\code{comp}] Component name.
\item[\code{knetwork}] Name of seismic network.
\item[\code{kinst}] Generic name of recording instrument.
\end{ldescription}
\end{Value}
\begin{Author}\relax
Eric M. Thompson \textless{}eric.thompson@tufts.edu\textgreater{}
\end{Author}
\begin{References}\relax
\url{http://www.llnl.gov/sac/}
\end{References}
\begin{Examples}
\begin{ExampleCode}

x <- rsac(system.file("bigendian/2003.356.19.15.31.0000.NC.NTAB..EHZ.D.SAC", package = "Rsac"), endian = "big")

plot(x)

\end{ExampleCode}
\end{Examples}

