This function defines the BioticAssignment process data, linking biotic Hauls with acoustic PSUs by Layer.

DefineBioticAssignment(
  processData,
  UseProcessData = FALSE,
  DefinitionMethod = c("Manual", "Stratum", "Radius", "EllipsoidalDistance",
    "DeleteAllAssignments", "ResourceFile"),
  StoxBioticData,
  FileName = character(),
  StratumPolygon,
  AcousticPSU,
  LayerDefinition = c("FunctionParameter", "FunctionInput"),
  LayerDefinitionMethod = c("WaterColumn", "HighestResolution", "Resolution", "Table"),
  Resolution = double(),
  LayerTable = data.table::data.table(),
  AcousticLayer = NULL,
  StoxAcousticData,
  Radius = double(),
  MinNumberOfHauls = double(),
  Distance = double(),
  TimeDifference = double(),
  BottomDepthDifference = double(),
  LongitudeDifference = double(),
  LatitudeDifference = double()
)

Arguments

processData

The current data produced by a previous instance of the function.

UseProcessData

Logical: If TRUE use the existing function output in the process.

DefinitionMethod

Character: A string naming the method to use, one of "Stratum", to assign all stations of each stratum to all acoustic PSUs; "Radius", to assign all stations within the radius given in Radius to each acoustic PSU; and "EllipsoidalDistance" to provide MinNumberOfHauls, Distance, TimeDifference, BottomDepthDifference, LongitudeDifference, LatitudeDifference, specifying the axes of an ellipsoid inside which to assign stations to acoustic PSUs, and "ResourceFile" to read from a project.xml file from StoX <= 2.7. Note that in the latter case it is assumed that the contents of the project.xml file is actually used in the StoX <= 2.7 project, i.e. that UseProcessData = TRUE in BioStationAssignment().

StoxBioticData

StoxBioticData (defined in RstoxData).

FileName

The path to the StoX 2.7 project.xml file to read "bioticassignment", "suassignment" and "psustratum" from, in the case that DefinitionMethod is "ResourceFile". Must include file extension.

StratumPolygon

The StratumPolygon process data.

AcousticPSU

The AcousticPSU process data.

LayerDefinition

The method to use for defining the Layers, one of FunctionParameter to define the Layers on the fly in this function, or FunctionInput to import Layer process data from a previously run process using the function DefineAcousticLayer.

LayerDefinitionMethod

See DefineAcousticLayer

Resolution

Numeric: A single numeric giving the thickness of the layers.

LayerTable

A table of Layer name, MinLayerDepth in meters and MaxLayerDepth in meters, defining the Layers.

AcousticLayer

The AcousticLayer process data.

StoxAcousticData

StoxAcousticData (defined in RstoxData).

Radius

Numeric: The radius inside which to assign biotic stations to each acoustic PSU.

MinNumberOfHauls

For DefinitionMethod "EllipsoidalDistance": Integer minimum number of hauls selected inside the ellipsoid. If the number of hauls inside the ellispoid is lower than the MinNumberOfHauls, the MinNumberOfHauls closest Hauls will be used (in ellipsoidal distance).

Distance

For DefinitionMethod "EllipsoidalDistance": The semi axis of the ellipsoid representing distance in nautical miles.

TimeDifference

For DefinitionMethod "EllipsoidalDistance": The semi axis of the ellipsoid representing time difference in hours.

BottomDepthDifference

For DefinitionMethod "EllipsoidalDistance": The semi axis of the ellipsoid representing difference in bottom depth in meters.

LongitudeDifference

For DefinitionMethod "EllipsoidalDistance": The semi axis of the ellipsoid representing difference in longitude in degrees.

LatitudeDifference

For DefinitionMethod "EllipsoidalDistance": The semi axis of the ellipsoid representing difference in latitude in degrees.

Value

An object of StoX data type BioticAssignment.

Details

The DefineBioticAssignment function creates a list of which biotic hauls are assigned to each acoustic primary sampling unit (PSU) and assignment layer. An assignment layer is made up of one or more layers. The assigned biotic hauls are given the default weighting factor of 1. The list of assigned biotic stations will in another function be used to make a total combined length frequency distribution from all the individual haul distributions that have been assigned.

In addition to the option of modifying assignments manually through the StoX graphically user interface, several automatic assignment methods are available. The automated methods are applied by assignment layer on the biotic stations that are associated with each assignment layer. By default, the function parameter UseProcessData is set to true, ensuring that assignment from previous execution is availabe upon execution. UseProcessData may be set to false to redo or update assignemts.

Layer definitions needed for assignment can be done in two ways using the function parameter:

LayerDefinition

The available parameters are: FunctionInput which utelizes input AcousticLayer process data generated in a previous process. This object contains the layer definitions

alternatively,

FunctionParameter which use function input data type AcousticData and function parameter LayerDefinitionMethod. The available methods are:

Watercolomn method which defines one layer for the entire watercolumn HighestResolution method which makes the highest possible number of layers based on the resolution in the input AcousticData. Resolution method is assosiated with function parameter Resolution which gives the desired thickness (in meters) of the layers.

The available automatic assignment methods are:

Stratum

All biotic hauls within each stratum are assigned to all the acoustic PSUs of the stratum.

Radius

All biotic stations within the given radius (function parameter Radius (nautical miles)) of one or more of the elementary distance sampling units (EDSU) that makes up a PSU, are assigned to that PSU. The start position of both the biotic station and the EDSU is used for distance calculations. The method does not take into consideration whether the biotic station is in the same stratum as the PSU or even outside the boundaries of the strata system. The function parameter MinNumberOfHauls set a minimum number of hauls for each assignment. This implies that the search for hauls may go beyond the given radius.

EllipsoidalDistance

This assignment method uses the ellipsoidal distance doi:10.1016/j.fishres.2007.07.013 (Johnsen and Iilende, 2007, equation 8). All biotic stations that fulfills the selection criteria (scalar product f <= 1) on one or more EDSUs of a PSU, will be assigned to the PSU. The scalar product of the method is calculated as:

$$f(d,t,b,l,o)=\left(\frac{\Delta d}{r_d}\right)^2 + \left(\frac{\Delta t}{r_t}\right)^2 + \left(\frac{\Delta b}{r_b}\right)^2 + \left(\frac{\Delta l}{r_l}\right)^2 + \left(\frac{\Delta o}{r_0}\right)^2$$

where:

\(f\) = scalar product

\(\Delta d\) = great circle distance between the acoustic EDSU position and the biotic station (nautical miles). Start positions for the biotic station and the EDSU are used.

\(\Delta t\) = time difference between the acoustic EDSU and the biotic station recordings (hours). Start time for the biotic station and the EDSU are used.

\(\Delta b\) = difference in bottom depth at the locations of the acoustic EDSU and the biotic station (meters). For the EDSU, the bottom depth is calculated as the average depth from the minimum and maximum depth recorded over the EDSU distance. The biotic station depth is calculated as the average at the start and stop of the station.

\(\Delta l\) = difference in latitude between the acoustic EDSU and the biotic station (degrees)

\(\Delta o\) = difference in longitude between the acoustic EDSU and the biotic station (degrees)

\(r_d\) = reference value for great circle distance difference (nautical miles). Defined by function parameter Distance)

\(r_t\) = reference value for time difference (hours). Defined by function parameter TimeDifference)

\(r_b\) = reference value for bottom depth difference (meters). Defined by function parameter BottomDepthDifference)

\(r_l\) = reference value for latitude difference (degrees). Defined by function parameter LatitudeDifference)

\(r_o\) = reference value for longitude difference (degrees). Defined by function parameter LongitudeDifference)

The function parameter MinNumberOfHauls can override the requirement to fulfill the selection criteria (scalar product f <=1) if the number of assigned hauls are lower than the MinNumberOfHauls parameter value. Hauls with a scalar product value closest to the minimum selection criteria, will be included in the assignment list to ensure that a minimum number of stations are assigned.

NOTE! The end user will get a warning if one or more acoustic PSUs have not been assigned any biotic hauls.

References

Johnsen E., Iilende T., 2007, Factors affecting the diel variation in commercial CPUE of Namibian hake. Can new information improve standard survey estimates?, Fisheries Research 88 (2007) p70 to 79, doi:10.1016/j.fishres.2007.07.013

See also

BioticAssignmentWeighting for weighting BioticAssignment.