You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: NEWS.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,6 +2,7 @@
2
2
* Added a check for existence of the resource file in DefineTranslation().
3
3
* Improved warning when bottomdepthstart or bottomdepthstop used to calcualte BottomDepth in StoxBiotic() contains missing values.
4
4
* Added error message in StoxAcoustic when the Time is not unique in AcousticData in the ICESAcsoutic format, since StoX uses Time as the LogKey in StoxAcousticData.
5
+
* Added the funciton cropAcoustic() to extract only a subset of the logs of an acoustic file.
#' This function writes a copy of an acoustic file in either the NMDEchosounder og ICESAcoustic format, keeping only the logs specified by the user.
480
+
#'
481
+
#' @param filePath Character: The path to the acoustic file.
482
+
#' @param logsToKeep Numeric: The indiced of the logs to keep. NULL implies to keep all logs.
483
+
#' @param newFilePath Optional, character: The path to the new file, defaulted to \code{filePath} with the suffix before file extension
484
+
#' @param ow Logical: If TRUE overwrite the \code{newFilePath}.
485
+
#' @param suffix Character: The suffix to append to the \code{filePath} before the file extension, in the case that \code{newFilePath} is not specified
stop("The AcousticData has duplicated Time, which results in duplicated LogKey in StoxAcoustic, which is not allowed. The data are from an acoustic file in the ICESAcoustic format, and contains the following duplicated Time (first 30):\n", paste(head(duplicatedTimes, 30), collapse=", "))
# stop("Time in the Beam table is not unique. StoX requires Time to be unique across the rows of the Log table as Time in order to use Time as the LogKey. This problem typically occurs when the resolution of the Time is too low, e.g. hours. Please change the input data so that Time is unique.")
stop("The AcousticData (from an ", format, " file) has duplicated Time, which results in duplicated LogKey in StoxAcoustic, which is not allowed. Please add sufficient time resolution in your input data (preferrable in the data source). The following Time are duplicated (first ", length(badTimes), "):\n", paste(badTimes, collapse="\n"))
# The order here is important, since the allowedTimeFormatsICESAcousticSansSeconds accepts also times WITH seconds. So first convert with seconds, then the remaining sans seconds!!!:
# Fill inn the missing times. This supports different resolutions in the same object, as we check the highest resolution first (with seconds then minutes, as specified in the allowedTimeFormatsICESAcoustic):
0 commit comments