pplot3d_sv2pos.TSD: Returns a list of three elements, where the first element is...

View source: R/pplot3d_sv2pos.TSD.R

pplot3d_sv2pos.TSDR Documentation

Returns a list of three elements, where the first element is a three column matrix of regenerated points of acoustic size 'acca', the second element is a three column matrix of regenerated points of acoustic size 'acca' where the number of points in each voxel is no larger than 'nlim', and the third element is a three column matrix of regenerated points of acoustic size acca/fact. !!!Only one time step is treated!!!!

Description

Returns a list of three elements, where the first element is a three column matrix of regenerated points of acoustic size 'acca', the second element is a three column matrix of regenerated points of acoustic size 'acca' where the number of points in each voxel is no larger than 'nlim', and the third element is a three column matrix of regenerated points of acoustic size acca/fact. !!!Only one time step is treated!!!!

Usage

pplot3d_sv2pos.TSD(
  data,
  N = 1e+05,
  acca = NULL,
  fun = "mod",
  t = 1,
  esnm = "MS70",
  var = c("vbsc", "sgsc", "pr0s", "sgs0", "sgsE", "sgsi", "sgsI", "psis", "tlns"),
  ind = list(-(1:100), NULL),
  range = list(),
  subset = NULL,
  beamstypes = 1,
  cs = "g",
  ideal = TRUE,
  allert = NULL,
  plot = TRUE,
  seabed = -12000,
  rot = 1,
  compensation = c("pitch", "roll"),
  nlim = NULL,
  fact = NULL,
  cols = c("black", "navyblue", "magenta4", "red3", "darkorange2", "yellow"),
  stretch = 1,
  scale.voxels = 1,
  rand.gen = c("unif", "beta", "norm"),
  total.out = FALSE,
  ...
)

Arguments

data

is the list of TSD inputs as returned from read.event(var=c("vbsc","voxels","vessel")). Should only contain one ping/timestep.

N

is the approximate number of points plotted.

acca

is the acoustic scattering cross sectional area (assuming omnidirectional targets). Overriding 'N' if given.

fun

is the name of the funciton used for obtaining the number of points in each voxel by "rounding off" to integers. The string given in 'fun' must be the name of a function taking 'x' as the input, such as "floor", "round", "ceiling" and "mod", where the last function is defined in sv2pos() and draws between floor(x) and ceiling(x) with probability P(ceiling(x))=x%%1. Also, there is the option of adding a numeric to "mod", such as "mod3" or "mod4.2", to indicate that all voxels with number of points below the given numeric, are set to zero.

t

is a single integer giving the time step number of which to regenerate points in the case that data$vbsc has a third dimension indicating time. 't' must be given as a single integer in the range seq_len(dim(data$vbsc)[3]).

esnm

is the name of the acoustical instrument, given as a four character string. See sonR_implemented() for the implemented systems. May be given in 'data', and in lower case.

var

is a string specifying the variable to plot. Currently supported are "vbsc", for volume backscattering data, "sgsc"/"sgs0"/"sgsE"/"sgsi"/"sgsI", for thresholded segmentation data, "pr0s" or "psis" for unhtresholded not-school probability data, and "tlns" for pure estimated noise.

ind

is a list of indexes, as typed into the [] of an array, where 0 and NULL denotes all indexes.

range

is a list of elements with names matching names if 'data', specifying the range of the corresponding elements.

subset

is a numeric or logical vector/expression indicating elements or rows to keep. Missing values are taken as false, and subset=0 or subset=NULL indicates no subsetting.

beamstypes

is either a numeric or a string giving the variable to extract from the output from voxel.edge.TSD(), where "rect" denotes rectangular beams and "circ" denotes circular beams. Default is to select the first in the list, which is usually the rectangular beams if both rectangular and circualr are returned.

cs

is either "g" or "v" representing the global coordinate and the coordinate system of the vessel, in which the data are plotted.

ideal

is TRUE to represent the simple case where the speed of sound 'data$asps' is invariant of depth.

allert

is the limit of the number of points inducing a warning asking the user to continue. Default is NULL, indicating no check for the number of points to be generated.

plot

TRUE if the data should be plotted.

seabed

is the depth of the seabed, at which the beams are reflected when calculating the midpoints of voxels.

rot

see soundbeam.TSD().

compensation

is a vector of string giving which rotation values that are compensated for in the sonar. Only c("pitch","roll") is available for the current version. Used in soundbeam.TSD.

nlim

is the maximum number of points in a voxel, before the number of points is recalculated to n*fact.

fact

is either NULL, indicating that points in voxels where the number of points is larger than 'nlim' are to be returned as they are, or the factor by which to scale the number of points in voxels exceeding the value of 'nlim'.

cols

is a two element vector specifying the color of the normal points and the points that are generated in voxels in which n>nlim.

stretch

is used to stretch the voxels of the ME70 multibeam echosounder in the direction of motion, so that space in between voxels is smoothed out.

scale.voxels

is a factor by which to enlarge the extent of each spherical element inside which points are drawn. If scale.voxels=2, the radial positions are drawn from -0.5 to 1.5 of the extent of the radial boundaries, so that point extend into the previous and next radial interval. The same applies to all three directions.

rand.gen

is either a string naming the random generating function to use when drawing positions inside the spherical segments, or a (symetrical) function. If rand.gen[1]=="beta", the symmetrical beta function is used (shape1=shape2=2).

total.out

is TRUE if ONLY the total backscatter (calculated as the sum of the products of volume backscattering coefficient and volume) should be returned, and the function terminated before regeneration of points.

...

are inputs passed on to plot3d().


arnejohannesholmin/cpplot3d documentation built on April 14, 2024, 11:36 p.m.