adpAd2cpFileTrim: Trim an AD2CP File

View source: R/adp.nortek.ad2cp.R

adpAd2cpFileTrimR Documentation

Trim an AD2CP File

Description

Create an AD2CP file by copying the first n data chunks (regions starting with 0xa5, etc) of another such file. This can be useful in supplying small sample files for bug reports.

Usage

adpAd2cpFileTrim(infile, n = 100L, outfile, debug = getOption("oceDebug"))

Arguments

infile

name of an AD2CP file.

n

integer indicating the number of data chunks to keep. The default is to keep 100 chunks, a common choice for sample files.

outfile

optional name of the new AD2CP file to be created. If this is not supplied, a default is used, by adding ⁠_trimmed⁠ to the base filename, e.g. if infile is "a.ad2cp" then outfile will be a_trimmed.ad2cp.

debug

an integer value indicating the level of debugging. If this is 1L, then a brief indication is given of the processing steps. If it is > 1L, then information is given about each data chunk, which can yield very extensive output.

Value

adpAd2cpFileTrim() returns the name of the output file, outfile, as provided or constructed.

Sample of Usage

# Can only be run by the developer, since it uses a private file.
f  <- "~/Dropbox/oce_secret_data/ad2cp/byg_trimmed.ad2cp"
if (file.exists(f))
    adpAd2cpFileTrim(f, 100L) # this file is already trimmed to 200 chunks

Author(s)

Dan Kelley

See Also

Other things related to adp data: [[,adp-method, [[<-,adp-method, ad2cpCodeToName(), ad2cpHeaderValue(), adp, adp-class, adpConvertRawToNumeric(), adpEnsembleAverage(), adpFlagPastBoundary(), adpRdiFileTrim(), adp_rdi.000, applyMagneticDeclination,adp-method, as.adp(), beamName(), beamToXyz(), beamToXyzAdp(), beamToXyzAdpAD2CP(), beamToXyzAdv(), beamUnspreadAdp(), binmapAdp(), enuToOther(), enuToOtherAdp(), handleFlags,adp-method, is.ad2cp(), plot,adp-method, read.adp(), read.adp.ad2cp(), read.adp.nortek(), read.adp.rdi(), read.adp.sontek(), read.adp.sontek.serial(), read.aquadopp(), read.aquadoppHR(), read.aquadoppProfiler(), rotateAboutZ(), setFlags,adp-method, subset,adp-method, subtractBottomVelocity(), summary,adp-method, toEnu(), toEnuAdp(), velocityStatistics(), xyzToEnu(), xyzToEnuAdp(), xyzToEnuAdpAD2CP()

Other things related to ad2cp data: ad2cpCodeToName(), ad2cpHeaderValue(), is.ad2cp(), read.adp.ad2cp()

Other functions that trim data files: adpRdiFileTrim(), advSontekAdrFileTrim(), oceFileTrim()


oce documentation built on Sept. 11, 2024, 7:09 p.m.