-
Notifications
You must be signed in to change notification settings - Fork 42
/
Copy pathadpRdiFileTrim.Rd
105 lines (99 loc) · 3.45 KB
/
adpRdiFileTrim.Rd
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/adp.rdi.R
\name{adpRdiFileTrim}
\alias{adpRdiFileTrim}
\title{Trim an RDI adp File}
\usage{
adpRdiFileTrim(infile, n = 100L, outfile, debug = getOption("oceDebug"))
}
\arguments{
\item{infile}{name of an RDI file.}
\item{n}{integer indicating the number of data chunks to keep. The default is
to keep 100 chunks, a common choice for sample files.}
\item{outfile}{optional name of the new RDI file to be created. If this is not
supplied, a default is used, by adding \verb{_trimmed} to the base filename, e.g.
if \code{infile} is \code{"a.000"} then \code{outfile} will be \code{a_trimmed.000}.}
\item{debug}{an integer value indicating the level of debugging. If
this is 0, then \code{\link[=read.adp.rdi]{read.adp.rdi()}} proceeds quietly, except for
issuing warnings and errors if necessary. If it is 1, then the R
code of \code{\link[=read.adp.rdi]{read.adp.rdi()}} produces some messages. If it is 2, then also
the underlying C/C++ code produces a message each time a possible
ensemble is detected. If it is 3, then the C/C++ code also produces
information on some details of the ensemble. Levels 2 and 3 are
mainly for use by the developers.}
}
\value{
\code{adpRdiFileTrim()} returns the name of the output file, \code{outfile}, as
provided or constructed.
}
\description{
Create an RDI adp file by copying the first \code{n} data chunks (starting with
byte 0x7f 0x7f) of another such file. This can be useful in supplying small
sample files for bug reports.
}
\section{Sample of Usage}{
\preformatted{
# Can only be run by the developer, since it uses a private file.
file <- "~/data/archive/sleiwex/2008/moorings/m09/adp/rdi_2615/raw/adp_rdi_2615.000"
if (file.exists(file)) {
adpRdiFileTrim(file, 9L, "test.000")
}
}
}
\seealso{
Other things related to adp data:
\code{\link{[[,adp-method}},
\code{\link{[[<-,adp-method}},
\code{\link{ad2cpCodeToName}()},
\code{\link{ad2cpHeaderValue}()},
\code{\link{adp}},
\code{\link{adp-class}},
\code{\link{adpAd2cpFileTrim}()},
\code{\link{adpConvertRawToNumeric}()},
\code{\link{adpEnsembleAverage}()},
\code{\link{adpFlagPastBoundary}()},
\code{\link{adp_rdi.000}},
\code{\link{applyMagneticDeclination,adp-method}},
\code{\link{as.adp}()},
\code{\link{beamName}()},
\code{\link{beamToXyz}()},
\code{\link{beamToXyzAdp}()},
\code{\link{beamToXyzAdpAD2CP}()},
\code{\link{beamToXyzAdv}()},
\code{\link{beamUnspreadAdp}()},
\code{\link{binmapAdp}()},
\code{\link{enuToOther}()},
\code{\link{enuToOtherAdp}()},
\code{\link{handleFlags,adp-method}},
\code{\link{is.ad2cp}()},
\code{\link{plot,adp-method}},
\code{\link{read.adp}()},
\code{\link{read.adp.ad2cp}()},
\code{\link{read.adp.nortek}()},
\code{\link{read.adp.rdi}()},
\code{\link{read.adp.sontek}()},
\code{\link{read.adp.sontek.serial}()},
\code{\link{read.aquadopp}()},
\code{\link{read.aquadoppHR}()},
\code{\link{read.aquadoppProfiler}()},
\code{\link{rotateAboutZ}()},
\code{\link{setFlags,adp-method}},
\code{\link{subset,adp-method}},
\code{\link{subtractBottomVelocity}()},
\code{\link{summary,adp-method}},
\code{\link{toEnu}()},
\code{\link{toEnuAdp}()},
\code{\link{velocityStatistics}()},
\code{\link{xyzToEnu}()},
\code{\link{xyzToEnuAdp}()},
\code{\link{xyzToEnuAdpAD2CP}()}
Other functions that trim data files:
\code{\link{adpAd2cpFileTrim}()},
\code{\link{advSontekAdrFileTrim}()},
\code{\link{oceFileTrim}()}
}
\author{
Dan Kelley
}
\concept{functions that trim data files}
\concept{things related to adp data}