animate.event_3d: -pos- is a string representing the name of a directory...

Usage Arguments

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
animate.event_3d(pos = NULL, cruise = 2009116, event = 1, t = 1,
  acca = 0.01, posout = NULL, imgout = NULL, names_img = "frame",
  names_pos = "regen", fmt = "png", t1 = 1, ndigits = NULL,
  filesize = 3e+08, ind = list(-(1:100), NULL), range = list(),
  subset = NULL, xyzlim = 1, ideal = TRUE, cs = "g", allert = 1e+07,
  adds = NULL, esnm = "MS70", TVG = TRUE, seabed = -500,
  ignoreheave = TRUE, rot = 2, compensation = c("pitch", "roll"),
  origin = 1, dir.data = NULL, Pa = TRUE, bgns = TRUE, fun = "floor",
  schoolcol = "red", schoolsize = 0.3, schoolsample = 1, clock = "bbl",
  view = c("top", "bottom", "south", "west", "north", "east"), zoom = 0.7,
  asp3d = "iso", school = FALSE, add = FALSE, xlab = "x", ylab = "y",
  zlab = "z", sonar.grid = TRUE, clean = FALSE, focus = -200,
  stereoang = 0.01, colleft = "red", colright = "blue", force = FALSE,
  ...)

Arguments

pos

is a string representing the name of a directory containing the positions to plot located in .school files, if previously generated. If pos==NULL, positions are generated from the event.

cruise

is either the idenfication number of the cruise, given as specified by the IMR (yyyynnn), or the path to the directory containing the event to be read.

event

is the identifier of the event, either given as the number of the event, a string contained in the name of the event, or the path of the event directory.

acca

is the acoustic scattering cross sectional area (assuming omnidirectional targets).

posout

specifies the directory in which to put the files containing the regenerated points. If posout==FALSE, no position files are saved, if posout==TRUE or posout==NULL TSD files are stored in the default directory named "..../sv2pos/acca___/tsd", and if 'posout' is a character string, a directory named accordingly is created and TSD files stored. If already existing, the used is asked to confirm overwriting the existing files.

imgout

specifies the directory in which to put the image files of the 3D representation of the regenerated points (plotted using the package rgl). If imgout==FALSE, no image files are saved, if imgout==TRUE or imgout==NULL image files are stored in the default directory named "..../sv2pos/acca___/fmt", and if 'imgout' is a character string, a directory named accordingly is created and image files stored. If already existing, the used is asked to confirm overwriting the existing files.

names_img

is a string representing the names of the png files (excluding numbering and the file extension ".png"). As an example names_img="frame" and 100<length(t)<1000 result in the names "frame001.png", "frame002.png", ... .

names_pos

is a string representing the names of the .school files (excluding numbering and the file extension ".school"). As an example names_pos="regen" and length(t)<1000 result in the names "regen001.school", "regen002.school", ..., but only some of the file names will be used, depending on the size limit of the files.

fmt

is a string representing the format of the image files. Currently supported are "png", "ps", "eps", "tex", "pdf", "svg" and "pgf". If fmt==NULL no images will be saved, only plotted.

t1

is the start index for the numbers included in the image names and .school file names. If t1=123, the first image file will be named "..../sv2pos/acca___/png/frame123.png", for the default values of 'fmt' and 'names_img'.

ndigits

is the number of digits in the numbering indexes in the image names and .school file names. If ndigits=5 and 100<length(t)<1000 the resulting names will be "frame00001.png", "frame00002.png", ..., for the default values of 'fmt' and 'names_img'.

filesize

is the maximum size of the .school files (only used if pos==NULL).

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.

xyzlim

is either a matrix of dimension [2 x 3] where the columns represent the xlim, ylim and zlim of the 3D plot, or an interger index number of the ping from which ranges the xlim, ylim and zlim are set .

ideal

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

cs

is either "g" or "v" representing the global coordinate and the coordinate system of the vessel.

allert

is the limit of the number of points inducing a warning asking the user to continue.

adds

is an optional list of variables overriding the variables in 'data'.

esnm

is the names of the echo sounder, given as a four character string. Currently implemented is "MS70" (may be given in lover case)

TVG

is FALSE if no Time Varied Gain compensation is to be performed on the acoustic data.

seabed

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

ignoreheave

see soundbeam.MS70().

rot

see soundbeam.MS70().

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.MS70.

origin

is a vector of two elements representing the origin of the global coordinate system (G), or the numbering index of the ping regarded as the origin of (G) (ignoring heave so that the x-y-plane of (G) is on the surface of the sea).

dir.data

is the path to the directory in which the projects are stored (see read.event ).

Pa

is TRUE if pressure data are to be returned in Pascal.

bgns

is FALSE if estimated background noise is to be subtracted from the data, resulting in some negative sv-values.

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

\item

schoolcolis the color of the points of the fish positions if school==TRUE or a string representing the directory containing .school files to be read for fish positions.

\item

schoolsizeis the size of the points of the fish positions if school==TRUE or a string representing the directory containing .school files to be read for fish positions.

\item

schoolsampleis the proportion of the fish positions given by the .school specified by 'school', that are to be sampled for plotting. Useful when the number of fish is large.

\item

clockis the position of the clock timing the frames, either given as a vector of length 3 representing the coordinates of the clock, as FALSE for no clock, or as one of

\item

viewdefines the view point of the user, either given as FALSE/NULL for interactive selection of the view point, a 4x4 matrix representing the 'userMatrix' used in rgl.viewpoint() in the "rgl" package, or a string representing one of a set of predefined viewpoints:

\item

zoomis the zoom value of the plot, utilized in rgl.viewpoint().

\item

asp3dis used to set the dimension of the plotting frame (see aspect3d())

\item

schoolis either a logical indicating whether fish positions stored in .school files present in the event specified by 'event' (and 'cruise' and 'dir.data') are to be plotted colored 'col.school' and sized 'size.school', or a string representing the directory of the .school files to read fish positions from.

\item

addis TRUE if points are to be added to an existing plot.

\item

...are inputs passed on to plot3d().

—pos— is a string representing the name of a directory containing the positions to plot located in .school files, if previously generated. If pos==NULL, positions are generated from the event. —cruise— is either the idenfication number of the cruise, given as specified by the IMR (yyyynnn), or the path to the directory containing the event to be read. —event— is the identifier of the event, either given as the number of the event, a string contained in the name of the event, or the path of the event directory. —acca— is the acoustic scattering cross sectional area (assuming omnidirectional targets). —posout— specifies the directory in which to put the files containing the regenerated points. If posout==FALSE, no position files are saved, if posout==TRUE or posout==NULL TSD files are stored in the default directory named "..../sv2pos/acca___/tsd", and if 'posout' is a character string, a directory named accordingly is created and TSD files stored. If already existing, the used is asked to confirm overwriting the existing files. —imgout— specifies the directory in which to put the image files of the 3D representation of the regenerated points (plotted using the package rgl). If imgout==FALSE, no image files are saved, if imgout==TRUE or imgout==NULL image files are stored in the default directory named "..../sv2pos/acca___/fmt", and if 'imgout' is a character string, a directory named accordingly is created and image files stored. If already existing, the used is asked to confirm overwriting the existing files. —names_img— is a string representing the names of the png files (excluding numbering and the file extension ".png"). As an example names_img="frame" and 100<length(t)<1000 result in the names "frame001.png", "frame002.png", ... . —names_pos— is a string representing the names of the .school files (excluding numbering and the file extension ".school"). As an example names_pos="regen" and length(t)<1000 result in the names "regen001.school", "regen002.school", ..., but only some of the file names will be used, depending on the size limit of the files. —fmt— is a string representing the format of the image files. Currently supported are "png", "ps", "eps", "tex", "pdf", "svg" and "pgf". If fmt==NULL no images will be saved, only plotted. —t1— is the start index for the numbers included in the image names and .school file names. If t1=123, the first image file will be named "..../sv2pos/acca___/png/frame123.png", for the default values of 'fmt' and 'names_img'. —ndigits— is the number of digits in the numbering indexes in the image names and .school file names. If ndigits=5 and 100<length(t)<1000 the resulting names will be "frame00001.png", "frame00002.png", ..., for the default values of 'fmt' and 'names_img'. —filesize— is the maximum size of the .school files (only used if pos==NULL). —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. —xyzlim— is either a matrix of dimension [2 x 3] where the columns represent the xlim, ylim and zlim of the 3D plot, or an interger index number of the ping from which ranges the xlim, ylim and zlim are set . —ideal— is TRUE to represent the simple case where the speed of sound 'data$asps' is invariant of depth. —cs— is either "g" or "v" representing the global coordinate and the coordinate system of the vessel. —allert— is the limit of the number of points inducing a warning asking the user to continue. —adds— is an optional list of variables overriding the variables in 'data'. —esnm— is the names of the echo sounder, given as a four character string. Currently implemented is "MS70" (may be given in lover case) —TVG— is FALSE if no Time Varied Gain compensation is to be performed on the acoustic data. —seabed— is the depth of the seabed, at which the beams are reflected when calculating the midpoints of voxels. —ignoreheave— see soundbeam.MS70(). —rot— see soundbeam.MS70(). —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.MS70. —origin— is a vector of two elements representing the origin of the global coordinate system (G), or the numbering index of the ping regarded as the origin of (G) (ignoring heave so that the x-y-plane of (G) is on the surface of the sea). —dir.data— is the path to the directory in which the projects are stored (see read.event ). —Pa— is TRUE if pressure data are to be returned in Pascal. —bgns— is FALSE if estimated background noise is to be subtracted from the data, resulting in some negative sv-values. —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 —schoolcol— is the color of the points of the fish positions if school==TRUE or a string representing the directory containing .school files to be read for fish positions. —schoolsize— is the size of the points of the fish positions if school==TRUE or a string representing the directory containing .school files to be read for fish positions. —schoolsample— is the proportion of the fish positions given by the .school specified by 'school', that are to be sampled for plotting. Useful when the number of fish is large. —clock— is the position of the clock timing the frames, either given as a vector of length 3 representing the coordinates of the clock, as FALSE for no clock, or as one of NA —view— defines the view point of the user, either given as FALSE/NULL for interactive selection of the view point, a 4x4 matrix representing the 'userMatrix' used in rgl.viewpoint() in the "rgl" package, or a string representing one of a set of predefined viewpoints: NA —zoom— is the zoom value of the plot, utilized in rgl.viewpoint(). —asp3d— is used to set the dimension of the plotting frame (see aspect3d()) —school— is either a logical indicating whether fish positions stored in .school files present in the event specified by 'event' (and 'cruise' and 'dir.data') are to be plotted colored 'col.school' and sized 'size.school', or a string representing the directory of the .school files to read fish positions from. —add— is TRUE if points are to be added to an existing plot. —...— are inputs passed on to plot3d(). NA ## Not run:


arnejohannesholmin/AJ documentation built on May 27, 2019, 4:06 a.m.