From 67131037ad73ba42a9f1f124c795abb8a8dc9603 Mon Sep 17 00:00:00 2001 From: Hugo Gruson <10783929+Bisaloo@users.noreply.github.com> Date: Fri, 8 Nov 2024 14:46:52 +0100 Subject: [PATCH] Update axis1 and axis2 according to the changes --- R/jnd2xyz.R | 20 ++++++++++++-------- man/jnd2xyz.Rd | 20 ++++++++++++-------- man/jndrot.Rd | 22 +++++++++++++--------- 3 files changed, 37 insertions(+), 25 deletions(-) diff --git a/R/jnd2xyz.R b/R/jnd2xyz.R index 06c39d7b..60889e98 100644 --- a/R/jnd2xyz.R +++ b/R/jnd2xyz.R @@ -17,14 +17,18 @@ #' (for no first rotation in the 3-dimensional case) or must match name #' in the original data that was used for [coldist()]. Defaults to 'u'. #' (only used if data has 3 dimensions). -#' @param axis1 A vector of length 3 composed of 0's and 1's, with -#' 1's representing the axes (x, y, z) to rotate around. Defaults to c(1, 1, 0), such -#' that the rotation aligns with the xy plane (only used if data has 2 or 3 dimensions). -#' Ignored if `ref1` is `NULL` (in 3-dimensional case only) -#' @param axis2 A vector of length 3 composed of 0's and 1's, with -#' 1's representing the axes (x, y, z) to rotate around. Defaults to c(0, 0, 1), such -#' that the rotation aligns with the z axis (only used if data has 3 dimensions). -#' Ignored if `ref2` is `NULL` (in 3-dimensional case only) +#' @param axis1 A vector of length number of cones minus 1 composed of 0's and +#' 1's, with 1's representing the axes (x, y, z) to rotate around. Defaults to +#' c(1, 1, 0) in 3 dimensions, such that the rotation aligns with the xy plane, +#' and c(1, 0) in 2 dimentions, such that the rotation is centered on the x +#' axis. Ignored if `ref1` is `NULL` (in 3-dimensional case only). Ignored for +#' dichromats. +#' @param axis2 A vector of length number of cones minus 1 composed of 0's and +#' 1's, with 1's representing the axes (x, y, z) to rotate around. Defaults to +#' c(0, 0, 1) in 3 dimensions, such that the rotation aligns with the z axis, +#' and c(0, 1) in 2 dimentions, such that the rotation is centered on the y +#' axis. Ignored if `ref1` is `NULL` (in 3-dimensional case only). Ignored for +#' dichromats. #' #' @examples #' # Load floral reflectance spectra diff --git a/man/jnd2xyz.Rd b/man/jnd2xyz.Rd index 4b39a1aa..f3a425f2 100644 --- a/man/jnd2xyz.Rd +++ b/man/jnd2xyz.Rd @@ -35,15 +35,19 @@ in the original data that was used for \code{\link[=coldist]{coldist()}}. Defaul in the original data that was used for \code{\link[=coldist]{coldist()}}. Defaults to 'u'. (only used if data has 3 dimensions).} -\item{axis1}{A vector of length 3 composed of 0's and 1's, with -1's representing the axes (x, y, z) to rotate around. Defaults to c(1, 1, 0), such -that the rotation aligns with the xy plane (only used if data has 2 or 3 dimensions). -Ignored if \code{ref1} is \code{NULL} (in 3-dimensional case only)} +\item{axis1}{A vector of length number of cones minus 1 composed of 0's and +1's, with 1's representing the axes (x, y, z) to rotate around. Defaults to +c(1, 1, 0) in 3 dimensions, such that the rotation aligns with the xy plane, +and c(1, 0) in 2 dimentions, such that the rotation is centered on the x +axis. Ignored if \code{ref1} is \code{NULL} (in 3-dimensional case only). Ignored for +dichromats.} -\item{axis2}{A vector of length 3 composed of 0's and 1's, with -1's representing the axes (x, y, z) to rotate around. Defaults to c(0, 0, 1), such -that the rotation aligns with the z axis (only used if data has 3 dimensions). -Ignored if \code{ref2} is \code{NULL} (in 3-dimensional case only)} +\item{axis2}{A vector of length number of cones minus 1 composed of 0's and +1's, with 1's representing the axes (x, y, z) to rotate around. Defaults to +c(0, 0, 1) in 3 dimensions, such that the rotation aligns with the z axis, +and c(0, 1) in 2 dimentions, such that the rotation is centered on the y +axis. Ignored if \code{ref1} is \code{NULL} (in 3-dimensional case only). Ignored for +dichromats.} } \description{ Converts a \code{\link[=coldist]{coldist()}} output into Cartesian coordinates that are diff --git a/man/jndrot.Rd b/man/jndrot.Rd index af150b1e..3fa338a6 100644 --- a/man/jndrot.Rd +++ b/man/jndrot.Rd @@ -28,15 +28,19 @@ in the original data that was used for \code{\link[=coldist]{coldist()}}. Defaul in the original data that was used for \code{\link[=coldist]{coldist()}}. Defaults to 'u'. (only used if data has 3 dimensions).} -\item{axis1}{A vector of length 3 composed of 0's and 1's, with -1's representing the axes (x, y, z) to rotate around. Defaults to c(1, 1, 0), such -that the rotation aligns with the xy plane (only used if data has 2 or 3 dimensions). -Ignored if \code{ref1} is \code{NULL} (in 3-dimensional case only)} - -\item{axis2}{A vector of length 3 composed of 0's and 1's, with -1's representing the axes (x, y, z) to rotate around. Defaults to c(0, 0, 1), such -that the rotation aligns with the z axis (only used if data has 3 dimensions). -Ignored if \code{ref2} is \code{NULL} (in 3-dimensional case only)} +\item{axis1}{A vector of length number of cones minus 1 composed of 0's and +1's, with 1's representing the axes (x, y, z) to rotate around. Defaults to +c(1, 1, 0) in 3 dimensions, such that the rotation aligns with the xy plane, +and c(1, 0) in 2 dimentions, such that the rotation is centered on the x +axis. Ignored if \code{ref1} is \code{NULL} (in 3-dimensional case only). Ignored for +dichromats.} + +\item{axis2}{A vector of length number of cones minus 1 composed of 0's and +1's, with 1's representing the axes (x, y, z) to rotate around. Defaults to +c(0, 0, 1) in 3 dimensions, such that the rotation aligns with the z axis, +and c(0, 1) in 2 dimentions, such that the rotation is centered on the y +axis. Ignored if \code{ref1} is \code{NULL} (in 3-dimensional case only). Ignored for +dichromats.} } \description{ Rotate Cartesian coordinates obtained from \code{\link[=jnd2xyz]{jnd2xyz()}}