Skip to main content
  • Home
  • Development
  • Documentation
  • Donate
  • Operational login
  • Browse the archive

swh logo
SoftwareHeritage
Software
Heritage
Archive
Features
  • Search

  • Downloads

  • Save code now

  • Add forge now

  • Help

  • fbaeb2c
  • /
  • man
  • /
  • properties.Rd
Raw File Download

To reference or cite the objects present in the Software Heritage archive, permalinks based on SoftWare Hash IDentifiers (SWHIDs) must be used.
Select below a type of object currently browsed in order to display its associated SWHID and permalink.

  • content
  • directory
content badge
swh:1:cnt:c9357efe603e18f5e1d88d3ec824b035c03701cf
directory badge
swh:1:dir:18e6614afcd58febed40a92c6881f70665f28dab

This interface enables to generate software citations, provided that the root directory of browsed objects contains a citation.cff or codemeta.json file.
Select below a type of object currently browsed in order to generate citations for them.

  • content
  • directory
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
Generate software citation in BibTex format (requires biblatex-software package)
Generating citation ...
properties.Rd
\name{p.exp}
\alias{p.exp}
\alias{p.lin}
\alias{p.sig}

\title{
  Common Properties with Distance, to be used with setup.prop.1D
}

\description{
  Functions that define an y-property as a function of the one-dimensional
  x-coordinate. These routines can be used to specify properties and parameters
  as a function of distance, e.g. depth in the water column or the sediment.

  They make a transition from an upper (or upstream) zone, with value
  \code{y.0} to a lower zone with a value \code{y.inf}.

  Particularly useful in combination with \link{setup.prop.1D}
  
  \itemize{
    \item \code{p.exp}: exponentially decreasing transition 
      \deqn{
         y = y_{\inf} + (y_0-y_{\inf}) \exp(-\max(0,x-x_0)/x_a)
      }{
      y=y0+(y0-yinf)*exp(-max(0,(x-x0))/xa}

    \item \code{p.lin}: linearly decreasing transition 
      \deqn{
         y = y_0;  y = y_0 - (y_0-y_{inf})*(x-x_L)/x_{att}) ;
         y = y_{inf}
        }{y=y0 ; y=y0-(y0-yinf)(x-xl)/xatt ; y = yinf}
        
    for \eqn{0 \leq x \leq x_L}, \eqn{x_L \leq x \leq x_L + x_{att}} and
     \eqn{(x \geq x_L + x.att )} respectively.
     
    \item \code{p.sig}: sigmoidal decreasing transition
      \deqn{
         y = y_{inf} + (y_0-y_{inf})\frac{\exp(-(x-x_L)/
         (0.25 x_{att}))}{(1+\exp(-(x-x_L))/(0.25 x_{att}))})
        }{y=yinf+(y0-yinf)exp(-(x-xL)/(0.25xatt)) /
        (1+exp(-(x-xL)/(0.25xatt)))}
  }
}

\usage{
p.exp(x, y.0 = 1, y.inf = 0.5, x.L = 0, x.att = 1)
p.lin(x, y.0 = 1, y.inf = 0.5, x.L = 0, x.att = 1)
p.sig(x, y.0 = 1, y.inf = 0.5, x.L = 0, x.att = 1)
}

\arguments{
  \item{x }{the x-values for which the property has to be calculated.
  }
  \item{y.0 }{the y-value at the origin 
  }
  \item{y.inf }{the y-value at infinity 
  }
  \item{x.L }{the x-coordinate where the transition zone starts;
    for \code{x <= x.0}, the value will be equal
    to \code{y.0}. For \code{x >> x.L + x.att} the value will
    tend to \code{y.inf}
  }
  \item{x.att }{attenuation coefficient in exponential decrease,
    or the size of the transition zone in the linear and sigmoid decrease
  }
}

\value{
  the property value, estimated for each x-value.
}

\details{
  For \code{p.lin}, the width of the transition zone equals \code{x.att} and
  the depth where the transition zone starts is \code{x.L}.
  
  For \code{p.sig}, \code{x.L} is located the middle of the smooth transition zone of approaximate width \code{x.att}.  
  
  For \code{p.exp}, there is no clearly demarcated transition zone;
  there is an abrupt change at \code{x.L} after which the property
  exponentially changes from \code{y.0} towards \code{y.L} with attenuation
  coefficient \code{x.att}; the larger \code{x.att} the less steep the change.

}
\author{
  Filip Meysman <filip.meysman@nioz.nl>,
  Karline Soetaert <karline.soetaert@nioz.nl>
}

\examples{

x <- seq(0, 5, len = 100)
plot(x, p.exp(x, x.L = 2), 
     xlab = "x.coordinate", ylab = "y value", ylim = c(0, 1))
lines(x, p.lin(x, x.L = 2), col = "blue")
lines(x, p.sig(x, x.L = 2), col = "red")
}
 
\keyword{utilities}


back to top

Software Heritage — Copyright (C) 2015–2025, The Software Heritage developers. License: GNU AGPLv3+.
The source code of Software Heritage itself is available on our development forge.
The source code files archived by Software Heritage are available under their own copyright and licenses.
Terms of use: Archive access, API— Content policy— Contact— JavaScript license information— Web API