Commit 532f1c82 authored by GODARD Vincent's avatar GODARD Vincent
Browse files

Adding prm (production rates) and Lambda (attenuation length) as built in...

Adding prm (production rates) and Lambda (attenuation length) as built in paramters accessible to the user.
parent 9dd2d5a3
......@@ -17,3 +17,5 @@ Imports:
pracma,
shiny,
shinyWidgets
Depends:
R (>= 2.10)
#' A set of reference parameters for SLHL production rates and decay constant
#'
#' 10Be, 26Al and 14C spallation production rates from Borchers et al. (2016).
#' 10Be and 26Al muons production rates are from Braucher et al. (2011).
#' 14C muons production rate is from Lupker et al. (2015).
#'
#' Borchers, B., Marrero, S., Balco, G., Caffee, M., Goehring, B., Lifton, N., Nishiizumi, K., Phillips, F., Schaefer, J., & Stone, J. (2016). Geological calibration of spallation production rates in the CRONUS-Earth project. Quaternary Geochronology, 31, 188–198. https://doi.org/10.1016/j.quageo.2015.01.009
#'
#' Braucher, R., Merchel, S., Borgomano, J., & Bourlès, D. L. (2011). Production of cosmogenic radionuclides at great depth: A multi element approach. Earth and Planetary Science Letters, 309(1–2), 1–9. http://dx.doi.org/10.1016/j.epsl.2011.06.036
#'
#' Lupker, M., Hippe, K., Wacker, L., Kober, F., Maden, C., Braucher, R., Bourlès, D., Romani, J. R. V., & Wieler, R. (2015). Depth-dependence of the production rate of in situ14C in quartz from the Leymon High core, Spain. Quaternary Geochronology, 28, 80–87. https://doi.org/10.1016/j.quageo.2015.04.004
#'
#' @format A matrix with nuclides in columns and production rates or decay constant in rows
#' \describe{
#' \item{Pspal}{SLHL spallation production rate for scaling scheme st (at/g/a)}
#' \item{Pstop}{SL stopping muons production rate (at/g/a)}
#' \item{Pfast}{SL fast muons production rate (at/g/a)}
#' \item{lambda}{Decay constant (1/a)}
#' }
#'
"prm"
#' A set of attenuation lengths for cosmogenic nuclides production pathways
#'
#'
#' @format A vector with 3 elements
#' \describe{
#' \item{Lspal}{Spallogenic neutrons attenuation length (g/cm2)}
#' \item{Lstop}{Stopping muons attenuation length (g/cm2)}
#' \item{Lfast}{Fast muons attenuation length (g/cm2)}
#' }
#'
"Lambda"
......@@ -14,7 +14,7 @@
#' @keywords
#' @export
#' @examples
#' sato_muons
#'
sato_muons <- function(h,Rc,s) {
# Sato et al. (2008) Neutron Spectrum
......
......@@ -15,7 +15,7 @@
#' @keywords
#' @export
#' @examples
#' sato_neutrons_low
#'
sato_neutrons_low <- function(h,Rc,s,w) {
#reduced version that does not do cross-sections but includes thermal and
......
......@@ -11,7 +11,7 @@
#' @param lon2 longitude of point 2 (degrees)
#' @keywords
#' @examples
#' angdist
#'
angdist<-function(lat1,lon1,lat2,lon2){
lata = d2r(lat1)
lona = d2r(lon1)
......@@ -31,7 +31,7 @@ angdist<-function(lat1,lon1,lat2,lon2){
#' @param a angle (degrees)
#' @keywords
#' @examples
#' d2r
#'
d2r<-function(a){
return(a/180*pi)
}
......@@ -45,7 +45,7 @@ d2r<-function(a){
#' @param a angle (radians)
#' @keywords
#' @examples
#' r2d
#'
r2d<-function(a){
return(a/pi*180)
}
......
File added
File added
# data accessible to the users ----
# Production and decay parameters
prm = matrix(c( 4.01 , 0.012 , 0.039 , log(2)/1.36e6,
27.93 , 0.84 , 0.081 , log(2)/0.717e6,
12.24 , 3.31 , 0 ,log(2)/5730),
nrow = 4,ncol=3 )
colnames(prm) <- c("Be10","Al26","C14") # we just give names to the columns of the matrix
rownames(prm) <- c("Pspal","Pstop","Pfast","lambda") # we just give names to the rows of the matrix
## references values for production and decay
Lambda = c(160,1500,4320) # g/cm2
names(Lambda) <- c("Lspal","Lstop","Lfast") # we just give names to the element of the vector
## export -----
usethis::use_data(prm,Lambda, internal = FALSE, overwrite = TRUE)
A set of utilities for the analysis of Terrestrial Cosmogenic Nuclides (TCN) concentrations under complex exposure and erosion histories of the Earth surface
## Installation
The simplest way to install the package is using `devtools` :
devtools::install_git(url = "https://gitlab.osupytheas.fr/vgodard/tcntools")
## Tutorials
- [Scaling](https://people.cerege.fr/~vgodard/tcntools/TCNtools_scaling.html)
- [Eulerian solver](https://people.cerege.fr/~vgodard/tcntools/TCNtools_eulerian_solver.html)
- [2 nuclides plots](https://people.cerege.fr/~vgodard/tcntools/TCNtools_2_nuclides_plots.html)
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{Lambda}
\alias{Lambda}
\title{A set of attenuation lengths for cosmogenic nuclides production pathways}
\format{
A vector with 3 elements
\describe{
\item{Lspal}{Spallogenic neutrons attenuation length (g/cm2)}
\item{Lstop}{Stopping muons attenuation length (g/cm2)}
\item{Lfast}{Fast muons attenuation length (g/cm2)}
}
}
\usage{
Lambda
}
\description{
A set of attenuation lengths for cosmogenic nuclides production pathways
}
\keyword{datasets}
......@@ -19,5 +19,5 @@ angdist(lat1, lon1, lat2, lon2)
Calculates angular distance theta between points on a sphere specified by latitude and longitude
}
\examples{
angdist
}
......@@ -13,5 +13,5 @@ d2r(a)
Degrees to radians conversion
}
\examples{
d2r
}
% Generated by roxygen2: do not edit by hand
% Please edit documentation in R/data.R
\docType{data}
\name{prm}
\alias{prm}
\title{A set of reference parameters for SLHL production rates and decay constant}
\format{
A matrix with nuclides in columns and production rates or decay constant in rows
\describe{
\item{Pspal}{SLHL spallation production rate for scaling scheme st (at/g/a)}
\item{Pstop}{SL stopping muons production rate (at/g/a)}
\item{Pfast}{SL fast muons production rate (at/g/a)}
\item{lambda}{Decay constant (1/a)}
}
}
\usage{
prm
}
\description{
10Be, 26Al and 14C spallation production rates from Borchers et al. (2016).
10Be and 26Al muons production rates are from Braucher et al. (2011).
14C muons production rate is from Lupker et al. (2015).
}
\details{
Borchers, B., Marrero, S., Balco, G., Caffee, M., Goehring, B., Lifton, N., Nishiizumi, K., Phillips, F., Schaefer, J., & Stone, J. (2016). Geological calibration of spallation production rates in the CRONUS-Earth project. Quaternary Geochronology, 31, 188–198. https://doi.org/10.1016/j.quageo.2015.01.009
Braucher, R., Merchel, S., Borgomano, J., & Bourlès, D. L. (2011). Production of cosmogenic radionuclides at great depth: A multi element approach. Earth and Planetary Science Letters, 309(1–2), 1–9. http://dx.doi.org/10.1016/j.epsl.2011.06.036
Lupker, M., Hippe, K., Wacker, L., Kober, F., Maden, C., Braucher, R., Bourlès, D., Romani, J. R. V., & Wieler, R. (2015). Depth-dependence of the production rate of in situ14C in quartz from the Leymon High core, Spain. Quaternary Geochronology, 28, 80–87. https://doi.org/10.1016/j.quageo.2015.04.004
}
\keyword{datasets}
......@@ -13,5 +13,5 @@ r2d(a)
Radians to degrees conversion
}
\examples{
r2d
}
......@@ -24,5 +24,5 @@ Lifton, N., Sato, T., & Dunai, T. J. (\strong{2014}). Scaling in situ cosmogenic
https://doi.org/10.1016/j.epsl.2013.10.052
}
\examples{
sato_muons
}
......@@ -26,5 +26,5 @@ Lifton, N., Sato, T., & Dunai, T. J. (\strong{2014}). Scaling in situ cosmogenic
https://doi.org/10.1016/j.epsl.2013.10.052
}
\examples{
sato_neutrons_low
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment