Title: | Rigorous Data Reduction and Error Propagation of Ar40 / Ar39 Data |
---|---|
Description: | Processes noble gas mass spectrometer data to determine the isotopic composition of argon (comprised of Ar36, Ar37, Ar38, Ar39 and Ar40) released from neutron-irradiated potassium-bearing minerals. Then uses these compositions to calculate precise and accurate geochronological ages for multiple samples as well as the covariances between them. Error propagation is done in matrix form, which jointly treats all samples and all isotopes simultaneously at every step of the data reduction process. Includes methods for regression of the time-resolved mass spectrometer signals to t=0 ('time zero') for both single- and multi-collector instruments, blank correction, mass fractionation correction, detector intercalibration, decay corrections, interference corrections, interpolation of the irradiation parameter between neutron fluence monitors, and (weighted mean) age calculation. All operations are performed on the logs of the ratios between the different argon isotopes so as to properly treat them as 'compositional data', sensu Aitchison [1986, The Statistics of Compositional Data, Chapman and Hall]. |
Authors: | Pieter Vermeesch [aut, cre] |
Maintainer: | Pieter Vermeesch <[email protected]> |
License: | GPL-2 |
Version: | 1.0 |
Built: | 2024-11-17 06:25:31 UTC |
Source: | https://github.com/pvermees/ararredux |
Calculate the arithmetic mean of some logratio data
average(x, i = NULL, newlabel = NULL)
average(x, i = NULL, newlabel = NULL)
x |
an object of class |
i |
(optional) vector of sample indices |
newlabel |
(optional) string with the new label to be assigned to the averaged values |
an object of the same class as x
data(Melbourne) K <- average(Melbourne$X,grep("K:",Melbourne$X$labels),newlabel="K-glass") plotcorr(K)
data(Melbourne) K <- average(Melbourne$X,grep("K:",Melbourne$X$labels),newlabel="K-glass") plotcorr(K)
This function is useful for grouping a number of replicate air shots or calibration experiments
averagebyday(x, newlabel)
averagebyday(x, newlabel)
x |
an object of class |
newlabel |
a string with the new label that should be given to the average |
an object of the same class as x
dfile <- system.file("Calibration.csv",package="ArArRedux") dlabels <- c("H1","AX","L1","L2") md <- loaddata(dfile,dlabels,PH=TRUE) ld <- fitlogratios(blankcorr(md)) d <- averagebyday(ld,"DCAL") plotcorr(d)
dfile <- system.file("Calibration.csv",package="ArArRedux") dlabels <- c("H1","AX","L1","L2") md <- loaddata(dfile,dlabels,PH=TRUE) ld <- fitlogratios(blankcorr(md)) d <- averagebyday(ld,"DCAL") plotcorr(d)
Applies a blank correction to some time-resolved mass spectrometer data
blankcorr(x, ...) ## Default S3 method: blankcorr(x, ...) ## S3 method for class 'timeresolved' blankcorr(x, blanklabel = NULL, prefix = "", ...) ## S3 method for class 'PHdata' blankcorr(x, blanklabel = NULL, prefix = "", ...)
blankcorr(x, ...) ## Default S3 method: blankcorr(x, ...) ## S3 method for class 'timeresolved' blankcorr(x, blanklabel = NULL, prefix = "", ...) ## S3 method for class 'PHdata' blankcorr(x, blanklabel = NULL, prefix = "", ...)
x |
an object of class |
... |
other arguments |
blanklabel |
as string denoting the prefix of the blanks |
prefix |
a string to be prepended to the non-blanks |
an object of class blankcorrected
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") m <- loaddata(samplefile,masses) # samples and J-standards blanklabel <- "EXB#" l <- fitlogratios(blankcorr(m,blanklabel),"Ar40") plotcorr(l)
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") m <- loaddata(samplefile,masses) # samples and J-standards blanklabel <- "EXB#" l <- fitlogratios(blankcorr(m,blanklabel),"Ar40") plotcorr(l)
blankcorrected
classAn object class containing blank-corrected mass spectrometry data
Extends the class classes timeresolved
and
PHdata
by adding an additional list item
blankindices
containg the index of the nearest
blank. fitlogratios
uses this information to group
the samples during regression to 'time zero'.
Apply the detector calibration for multicollector data
calibration(X, clabel)
calibration(X, clabel)
X |
an object of class |
clabel |
the label of the detector calibration data |
an object of class redux
data(Melbourne) C <- calibration(Melbourne$X,"DCAL") plotcorr(C)
data(Melbourne) C <- calibration(Melbourne$X,"DCAL") plotcorr(C)
Apply the interference correction for the Cl-decay products
clcorrection(X, irr)
clcorrection(X, irr)
X |
an object of class |
irr |
the irradiation schedule |
an object of class redux
data(Melbourne) Cl <- clcorrection(Melbourne$X,Melbourne$irr) plotcorr(Cl)
data(Melbourne) Cl <- clcorrection(Melbourne$X,Melbourne$irr) plotcorr(Cl)
Recursively concatenates a list of logratio data into one big dataset
concat(lrlist)
concat(lrlist)
lrlist |
an object of the same class as x
containing the
merged dataset
samplefile <- system.file("Samples.csv",package="ArArRedux") kfile <- system.file("K-glass.csv",package="ArArRedux") cafile <- system.file("Ca-salt.csv",package="ArArRedux") dfile <- system.file("Calibration.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") blanklabel <- "EXB#" Jpos <- c(3,15) dlabels <- c("H1","AX","L1","L2") m <- loaddata(samplefile,masses) # samples and J-standards mk <- loaddata(kfile,masses) # K-interference data mca <- loaddata(cafile,masses) # Ca interference data md <- loaddata(dfile,dlabels,PH=TRUE) # detector intercalibrations # form and fit logratios l <- fitlogratios(blankcorr(m,blanklabel),"Ar40") lk <- fitlogratios(blankcorr(mk,blanklabel,"K:"),"Ar40") k <- getmasses(lk,"Ar39","Ar40") # subset on the relevant isotopes lca <- fitlogratios(blankcorr(mca,blanklabel,"Ca:"),"Ar37") ca <- getmasses(lca,c("Ar36","Ar39"),c("Ar37","Ar37")) # subset ld <- fitlogratios(blankcorr(md)) d <- averagebyday(ld,"DCAL") # merge all data (except air shots) into one big logratio structure X <- newredux(concat(list(l,k,ca,d)),Jpos) data(Melbourne) if (isTRUE(all.equal(Melbourne$X,X))) { print("We just reconstructed the built-in dataset Melbourne$X")}
samplefile <- system.file("Samples.csv",package="ArArRedux") kfile <- system.file("K-glass.csv",package="ArArRedux") cafile <- system.file("Ca-salt.csv",package="ArArRedux") dfile <- system.file("Calibration.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") blanklabel <- "EXB#" Jpos <- c(3,15) dlabels <- c("H1","AX","L1","L2") m <- loaddata(samplefile,masses) # samples and J-standards mk <- loaddata(kfile,masses) # K-interference data mca <- loaddata(cafile,masses) # Ca interference data md <- loaddata(dfile,dlabels,PH=TRUE) # detector intercalibrations # form and fit logratios l <- fitlogratios(blankcorr(m,blanklabel),"Ar40") lk <- fitlogratios(blankcorr(mk,blanklabel,"K:"),"Ar40") k <- getmasses(lk,"Ar39","Ar40") # subset on the relevant isotopes lca <- fitlogratios(blankcorr(mca,blanklabel,"Ca:"),"Ar37") ca <- getmasses(lca,c("Ar36","Ar39"),c("Ar37","Ar37")) # subset ld <- fitlogratios(blankcorr(md)) d <- averagebyday(ld,"DCAL") # merge all data (except air shots) into one big logratio structure X <- newredux(concat(list(l,k,ca,d)),Jpos) data(Melbourne) if (isTRUE(all.equal(Melbourne$X,X))) { print("We just reconstructed the built-in dataset Melbourne$X")}
Correct for radioactive decay of neutron-induced 37Ar and 39Ar occurred since irradiation
decaycorrection(X, irr, isotope)
decaycorrection(X, irr, isotope)
X |
an objects of class |
irr |
the irradiation schedule |
isotope |
a string denoting the isotope that needs correcting |
an object of class redux
data(Melbourne) C <- calibration(Melbourne$X,"DCAL") A <- massfractionation(C,Melbourne$fract) D9 <- decaycorrection(A,Melbourne$irr,"Ar39") plotcorr(D9)
data(Melbourne) C <- calibration(Melbourne$X,"DCAL") A <- massfractionation(C,Melbourne$fract) D9 <- decaycorrection(A,Melbourne$irr,"Ar39") plotcorr(D9)
This function extrapolates time resolved mass spectrometer data to
t=0. When fed with multicollector data, it forms the ratios of the
raw signals, forms their logs and performs linear regression to t=0
When fed with single collector data, the function first takes their
logs and extrapolates them to t=0 before taking ratios, unless
denmass
=NULL, in which case the logs of the raw signals are
extrapolated.
fitlogratios(x, ...) ## Default S3 method: fitlogratios(x, ...) ## S3 method for class 'timeresolved' fitlogratios(x, denmass, ...) ## S3 method for class 'PHdata' fitlogratios(x, denmass = NULL, ...)
fitlogratios(x, ...) ## Default S3 method: fitlogratios(x, ...) ## S3 method for class 'timeresolved' fitlogratios(x, denmass, ...) ## S3 method for class 'PHdata' fitlogratios(x, denmass = NULL, ...)
x |
an object of class |
... |
further arguments (see below) |
denmass |
a string denoting the denominator isotope |
an object of class logratios
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") m <- loaddata(samplefile,masses) # samples and J-standards blanklabel <- "EXB#" l <- fitlogratios(blankcorr(m,blanklabel),"Ar40") plotcorr(l)
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") m <- loaddata(samplefile,masses) # samples and J-standards blanklabel <- "EXB#" l <- fitlogratios(blankcorr(m,blanklabel),"Ar40") plotcorr(l)
Compares the measured 40Ar/36Ar ratio of an air shot on a given detector with the atmospheric ratio.
fractionation(fname, detector, MS = "ARGUS-VI", PH = FALSE)
fractionation(fname, detector, MS = "ARGUS-VI", PH = FALSE)
fname |
a .csv file with the air shot data |
detector |
the name of the ion detector |
MS |
the type of mass spectrometer |
PH |
TRUE if the data were recorded in 'peak hopping' mode, FALSE if recorded in multicollector mode. |
an object of class logratios
data(Melbourne) fd37file <- system.file("AirL2.csv",package="ArArRedux") fd40file <- system.file("AirH1.csv",package="ArArRedux") fract <- list(fractionation(fd37file,"L2",PH=TRUE), fractionation(fd40file,"H1",PH=FALSE)) if (isTRUE(all.equal(Melbourne$fract,fract))){ print("We just re-created the fractionation correction for the Melbourne dataset") }
data(Melbourne) fd37file <- system.file("AirL2.csv",package="ArArRedux") fd40file <- system.file("AirH1.csv",package="ArArRedux") fract <- list(fractionation(fd37file,"L2",PH=TRUE), fractionation(fd40file,"H1",PH=FALSE)) if (isTRUE(all.equal(Melbourne$fract,fract))){ print("We just re-created the fractionation correction for the Melbourne dataset") }
Calculate the 40Ar*/39ArK-ratios of interference corrected logratio intercept data
get4039(X, irr)
get4039(X, irr)
X |
an object of class |
irr |
the irradiation schedule |
an object of class link{redux}
containing the
40Ar*/39ArK-ratios as intercepts
and its covariance matrix
as covmat
data(Melbourne) R <- get4039(Melbourne$X,Melbourne$irr) plotcorr(R)
data(Melbourne) R <- get4039(Melbourne$X,Melbourne$irr) plotcorr(R)
Calculate 40Ar/39Ar ages from a vector of 40Ar/39Ar-ratios and J-factors
getages(RJ)
getages(RJ)
RJ |
an object of class |
an object of class results
containing the
ages and their covariance matrix
data(Melbourne) R <- get4039(Melbourne$X,Melbourne$irr) J <- getJfactors(R) ages <- getages(J) plotcorr(ages)
data(Melbourne) R <- get4039(Melbourne$X,Melbourne$irr) J <- getJfactors(R) ages <- getages(J) plotcorr(ages)
Interpolate the irradiation parameters for the samples given the 40Ar*/39ArK ratios of the samples and fluence monitors
getJfactors(R)
getJfactors(R)
R |
a vector of 40Ar*/39ArK ratios |
an object of class redux
containing, as
intercepts
, the 40Ar*/39ArK ratios of the samples, the
interpolated J-factors, and the 40K decay constant; and as
covmat
: the covariance matrix. All other class properties
are inherited from R
.
data(Melbourne) R <- get4039(Melbourne$X,Melbourne$irr) J <- getJfactors(R) plotcorr(J)
data(Melbourne) R <- get4039(Melbourne$X,Melbourne$irr) J <- getJfactors(R) plotcorr(J)
Extracts the intercepts, covariance matrix, etc. of a selection of isotopes from a larger dataset
getmasses(x, ...) ## Default S3 method: getmasses(x, ...) ## S3 method for class 'timeresolved' getmasses(x, mass, invert = FALSE, ...) ## S3 method for class 'logratios' getmasses(x, num, den, invert = FALSE, ...) ## S3 method for class 'redux' getmasses(x, num, den, invert = FALSE, ...)
getmasses(x, ...) ## Default S3 method: getmasses(x, ...) ## S3 method for class 'timeresolved' getmasses(x, mass, invert = FALSE, ...) ## S3 method for class 'logratios' getmasses(x, num, den, invert = FALSE, ...) ## S3 method for class 'redux' getmasses(x, num, den, invert = FALSE, ...)
x |
an object of class |
... |
other arguments |
mass |
a vector of strings denoting the masses of interest |
invert |
boolean parameter indicating whether the selection should be inverted (default = FALSE) |
num |
vector of strings indicating the numerator isotopes |
den |
vector of string indicating the denominator isotopes |
an object of the same class as x
kfile <- system.file("K-glass.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") mk <- loaddata(kfile,masses) lk <- fitlogratios(blankcorr(mk,"EXB#","K:"),"Ar40") k <- getmasses(lk,"Ar39","Ar40") # subset of the relevant isotopes plotcorr(k)
kfile <- system.file("K-glass.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") mk <- loaddata(kfile,masses) lk <- fitlogratios(blankcorr(mk,"EXB#","K:"),"Ar40") k <- getmasses(lk,"Ar39","Ar40") # subset of the relevant isotopes plotcorr(k)
create a new object of class logratios
containing
the interferences from neutron reactions on Ca and K
interference(intercepts, covmat, num, den, irr, label)
interference(intercepts, covmat, num, den, irr, label)
intercepts |
a vector with logratios |
covmat |
the covariance matrix of the logratios |
num |
a vector of strings marking the numerator isotopes of
|
den |
a vector of strings marking the denominator isotopes of
|
irr |
an object of class |
label |
a string with a name which can be used to identify the interference data in subsequent calculations |
an object of class logratios
samplefile <- system.file("Samples.csv",package="ArArRedux") irrfile <- system.file("irradiations.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") X <- read(samplefile,masses,blabel="EXB#",Jpos=c(3,15)) irr <- loadirradiations(irrfile) # assume log(36Ar/37Ar) = log(39Ar/37Ar) = 1 in co-irradiate Ca-salt # with variances of 0.0001 and zero covariances ca <- interference(intercepts=c(1,1), covmat=matrix(c(0.001,0,0,0.001),nrow=2), num=c("Ar39","Ar36"),den=c("Ar37","Ar37"), irr=X$irr[1],label="Ca-salt") # assume log(39Ar/40Ar) = 4.637788 in co-irradiate K-glass # with variance 7.9817e-4 k <- interference(intercepts=4.637788,covmat=7.9817e-4, num="Ar39",den="Ar40",irr=X$irr[1], label="K-glass") ages <- process(X,irr,ca=ca,k=k) summary(ages)
samplefile <- system.file("Samples.csv",package="ArArRedux") irrfile <- system.file("irradiations.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") X <- read(samplefile,masses,blabel="EXB#",Jpos=c(3,15)) irr <- loadirradiations(irrfile) # assume log(36Ar/37Ar) = log(39Ar/37Ar) = 1 in co-irradiate Ca-salt # with variances of 0.0001 and zero covariances ca <- interference(intercepts=c(1,1), covmat=matrix(c(0.001,0,0,0.001),nrow=2), num=c("Ar39","Ar36"),den=c("Ar37","Ar37"), irr=X$irr[1],label="Ca-salt") # assume log(39Ar/40Ar) = 4.637788 in co-irradiate K-glass # with variance 7.9817e-4 k <- interference(intercepts=4.637788,covmat=7.9817e-4, num="Ar39",den="Ar40",irr=X$irr[1], label="K-glass") ages <- process(X,irr,ca=ca,k=k) summary(ages)
Loads a .csv file with raw mass spectrometer data
loaddata(fname, masses, MS = "ARGUS-VI", PH = FALSE)
loaddata(fname, masses, MS = "ARGUS-VI", PH = FALSE)
fname |
the file name, must end with .csv |
masses |
a vector of strings denoting the order of the isotopes listed in the table |
MS |
the type of mass spectrometer |
PH |
a boolean indicating whether the data are to be treated as multicollector (PH=FALSE) or 'peak hopping' (PH=TRUE) data. The default is PH=FALSE. |
if PH=FALSE: an object of class timeresolved
if PH=TRUE: an object of class PHdata
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") m <- loaddata(samplefile,masses) # samples and J-standards plot(m,"MD2-1a","Ar40")
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") m <- loaddata(samplefile,masses) # samples and J-standards plot(m,"MD2-1a","Ar40")
Loads a .csv file with the schedule of a multi-stage neutron irradiation
loadirradiations(fname)
loadirradiations(fname)
fname |
file name (in .csv format) |
a list of irradiations, where each irradiation is a named list containing:
tin
: vector with the start times of irradiations tout
: vector with the end times of irradiations P
: vector with the power of the irradiations
irrfile <- system.file("irradiations.csv",package="ArArRedux") irr <- loadirradiations(irrfile) str(irr)
irrfile <- system.file("irradiations.csv",package="ArArRedux") irr <- loadirradiations(irrfile) str(irr)
logratios
classAn object class containing logratio intercepts
A list with the following items:
labels
: a vector of strings denoting the names of the runsnum
: a vector of strings denoting the numerator isotopesden
: a vector of strings denoting the denominator isotopesintercepts
: a vector of logratio intercepts or valuescovmat
: the covariance matrix of intercepts
irr
: a vector of strings denoting the irradiation runspos
: a vector of integers with the positions in the
irradiation stack thedate
: a vector containing the acquisition dates and timesnlr
: a vector with the number of logratios per run
Applies the fractionation obtained from air shot data by
fractionation
to the denominator detector in order to
correct it for the mass difference between the numerator and
denominator isotopes.
massfractionation(X, fract)
massfractionation(X, fract)
X |
an object of class |
fract |
a list with fractionation data for Ar37, Ar39 and Ar40 |
an object of class redux
data(Melbourne) C <- calibration(Melbourne$X,"DCAL") A <- massfractionation(C,Melbourne$fract) plotcorr(A)
data(Melbourne) C <- calibration(Melbourne$X,"DCAL") A <- massfractionation(C,Melbourne$fract) plotcorr(A)
Contains all the relevant information needed for the data reduction some ARGUS-IV data from the University of Melbourne
David Philips [email protected]
data(Melbourne) plotcorr(Melbourne$X)
data(Melbourne) plotcorr(Melbourne$X)
redux
objectInitialises a new redux
object by packing a
logratios
dataset together with all the parameters
needed for age calculation
newredux(X, Jpos, detectors = list(Ar36 = "H1", Ar37 = "L2", Ar38 = "L1", Ar39 = "AX", Ar40 = "H1"))
newredux(X, Jpos, detectors = list(Ar36 = "H1", Ar37 = "L2", Ar38 = "L1", Ar39 = "AX", Ar40 = "H1"))
X |
an object of class |
Jpos |
a vector of integers denoting the positions of the fluence monitors in the irradiation stack |
detectors |
a list of strings denoting the detectors for each argon isotope |
an object of class redux
This function is used to query and modify the half lives, standard
ages etc. associated with an object of class redux
param(X, ...)
param(X, ...)
X |
an object of class |
... |
any combination of the parameters given below |
param
grants access to the following parameters:
l0
: 40K decay constant (default value = 5.5492e-4 Ma-1,
Renne et al. [2010])sl0
: standard error of the 40K decay constant (default value
= 0.0047e-4 Ma-1)l7
: 37Ar decay constant (default value = 7.2438 yr-1, Renne
and Norman [2001])sl7
: standard error of the 37Ar decay constant (default
value = 0.0083 yr-1)l9
: 39Ar decay constant (0.002577 yr-1 Stoenner et
al. [1965])sl9
: standard error of the 39Ar decay constant (0.000014
yr-1)l6
: 36Cl decay constant (default value = 2301.3e-9 yr-1)sl6
: standard error of the 36Cl decay constant (default
value = 7.6e-9 yr-1pcl
: (36Cl/38Cl)-production rate (default value = 252.7 for
OSTR reactor, Renne et al. [2008])spcl
: standard error of the (36Cl/38Cl)-production rate
(default value = 1.8)ts
: age of the fluence monitor (default = 28.201 Myr for the
Fish Canyon Tuff, Kuiper et al. [2008])sts
: standard error of the fluence monitor age (default
value = 0.023 Myr)air
: atmospheric 40Ar/36Ar ratio (default value = 298.56,
Lee et al. [2006])sair
: standard error of the atmospheric 40Ar/36Ar ratio
(default value = 0.155)
returns the modified redux
object OR the
current parameter values if no optional arguments are supplied.
data(Melbourne) param(Melbourne$X)$air Y <- param(Melbourne$X,air=295.5) param(Y)$air
data(Melbourne) param(Melbourne$X)$air Y <- param(Melbourne$X,air=295.5) param(Y)$air
PHdata
classAn object class containing time resolved 'peak-hopping' mass spectrometry data
A list with the following items:
masses
: a vector of strings denoting the isotopes monitored in each runsignals
: a list with objects of class timeresolved
, each corresponding
to a detector (i.e. length(signals
)==1 for single collector instruments).
Plots the raw signal of a given isotope against time.
## S3 method for class 'timeresolved' plot(x, label, mass, ...) ## S3 method for class 'PHdata' plot(x, label, mass, ...)
## S3 method for class 'timeresolved' plot(x, label, mass, ...) ## S3 method for class 'PHdata' plot(x, label, mass, ...)
x |
an object of class |
label |
a string with the name of the run |
mass |
a string indicating the isotope of interest |
... |
optional parameters |
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") mMC <- loaddata(samplefile,masses) plot(mMC,"MD2-1a","Ar40") mPH <- loaddata(samplefile,masses,PH=TRUE) plot(mPH,"MD2-1a","Ar40")
samplefile <- system.file("Samples.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") mMC <- loaddata(samplefile,masses) plot(mMC,"MD2-1a","Ar40") mPH <- loaddata(samplefile,masses,PH=TRUE) plot(mPH,"MD2-1a","Ar40")
Converts the covariance matrix to a correlation matrix and plots this is a coloured image for visual inspection.
plotcorr(X)
plotcorr(X)
X |
a data structure (list) containing an item called ‘covmat’ (covariance matrix) |
data(Melbourne) plotcorr(Melbourne$X)
data(Melbourne) plotcorr(Melbourne$X)
Performs detector calibration, mass fractionation correction, decay corrections, interference corrections, interpolates J-factors and calculates ages.
process(X, irr, fract = NULL, ca = NULL, k = NULL)
process(X, irr, fract = NULL, ca = NULL, k = NULL)
X |
an object of class |
irr |
the irradiation schedule |
fract |
list with air shot data (one item per denominator isotope) |
ca |
an object of class |
k |
an object of class |
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) summary(ages)
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) summary(ages)
Reads raw mass spectrometer data and parses it into a
redux
format for further processing.
read(xfile, masses, blabel, Jpos, kfile = NULL, cafile = NULL, dfile = NULL, dlabels = NULL, MS = "ARGUS-VI")
read(xfile, masses, blabel, Jpos, kfile = NULL, cafile = NULL, dfile = NULL, dlabels = NULL, MS = "ARGUS-VI")
xfile |
a .csv file with samples and fluence monitor data |
masses |
a list which specifies the order in which the isotopes are recorded by the mass spectrometer |
blabel |
a prefix string denoting the blanks |
Jpos |
a vector of integers denoting the positions of the fluence monitors in the irradiation stack |
kfile |
a .csv file with the K-interference monitor data (optional) |
cafile |
a .csv file with the Ca-interference monitor data (optional) |
dfile |
a .csv file with the detector calibration data (optional) |
dlabels |
a list which specifies the names of the detectors and the order in which they were recorded by the mass spectrometer |
MS |
a string denoting the type of mass spectrometer. At the moment only the ARGUS-IV is listed. Please contact the author to add other file formats to Ar-Ar_Redux. |
an object of class redux
.
samplefile <- system.file("Samples.csv",package="ArArRedux") kfile <- system.file("K-glass.csv",package="ArArRedux") cafile <- system.file("Ca-salt.csv",package="ArArRedux") dfile <- system.file("Calibration.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") dlabels <- c("H1","AX","L1","L2") X <- read(samplefile,masses,blabel="EXB#",Jpos=c(3,15), kfile,cafile,dfile,dlabels) plotcorr(X)
samplefile <- system.file("Samples.csv",package="ArArRedux") kfile <- system.file("K-glass.csv",package="ArArRedux") cafile <- system.file("Ca-salt.csv",package="ArArRedux") dfile <- system.file("Calibration.csv",package="ArArRedux") masses <- c("Ar37","Ar38","Ar39","Ar40","Ar36") dlabels <- c("H1","AX","L1","L2") X <- read(samplefile,masses,blabel="EXB#",Jpos=c(3,15), kfile,cafile,dfile,dlabels) plotcorr(X)
redux
classAn object class that is used throughout Ar-Ar_Redux
A list with the following items:
labels
: a vector of strings denoting the names of the runsnum
: a vector of strings denoting the numerator isotopesden
: a vector of strings denoting the denominator isotopesintercepts
: a vector of logratio intercepts or valuescovmat
: the covariance matrix of intercepts
irr
: a vector of strings denoting the irradiation runspos
: a vector of integers with the positions in the
irradiation stack thedate
: a vector containing the acquisition dates and timesnlr
: a vector with the number of logratios per runparam
: a list of global parameters
param
ArArRedux
data to IsoplotR
Creates a data object compatible with the IsoplotR
package
redux2isoplotr(x, irr, fract = NULL, ca = NULL, k = NULL, format = 1, file = NULL)
redux2isoplotr(x, irr, fract = NULL, ca = NULL, k = NULL, format = 1, file = NULL)
x |
an object of class |
irr |
the irradiation schedule |
fract |
list with air shot data (one item per denominator isotope) |
ca |
an object of class |
k |
an object of class |
format |
input format for
(other formats will be added later) |
file |
optional ( |
an object of class ArAr
, i.e. a table with the
following columns: 'Ar4036'
, 'errAr4036'
,
'Ar3936'
, 'errAr3936'
, 'Ar4039'
, and
'errAr4039'
data(Melbourne) print(redux2isoplotr(Melbourne$X,Melbourne$irr))
data(Melbourne) print(redux2isoplotr(Melbourne$X,Melbourne$irr))
results
classA list with the following items:
labels
: a vector of strings denoting the names of the runsintercepts
: a vector of agescovmat
: the covariance matrix of intercepts
thedate
: a vector containing the acquisition dates and times
Extracts those intercepts, covariances etc. that match a given list of indices or labels.
## S3 method for class 'timeresolved' subset(x, i = NULL, labels = NULL, invert = FALSE, include.J = FALSE, ...) ## S3 method for class 'logratios' subset(x, i = NULL, labels = NULL, invert = FALSE, include.J = FALSE, ...) ## S3 method for class 'redux' subset(x, i = NULL, labels = NULL, invert = FALSE, include.J = FALSE, ...) ## S3 method for class 'results' subset(x, i = NULL, labels = NULL, invert = FALSE, ...)
## S3 method for class 'timeresolved' subset(x, i = NULL, labels = NULL, invert = FALSE, include.J = FALSE, ...) ## S3 method for class 'logratios' subset(x, i = NULL, labels = NULL, invert = FALSE, include.J = FALSE, ...) ## S3 method for class 'redux' subset(x, i = NULL, labels = NULL, invert = FALSE, include.J = FALSE, ...) ## S3 method for class 'results' subset(x, i = NULL, labels = NULL, invert = FALSE, ...)
x |
an object of class |
i |
a vector with indices of the selected runs |
labels |
a string or a vector of strings with sample names |
invert |
boolean flag indicating whether the selection should be inverted, i.e. whether the selected indices or labels should be removed rather than retained |
include.J |
if |
... |
other arguments |
an object of the same class as x
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) MD <- subset(ages,labels=c("MD2-1","MD2-2","MD2-3","MD2-4","MD2-5")) plotcorr(MD)
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) MD <- subset(ages,labels=c("MD2-1","MD2-2","MD2-3","MD2-4","MD2-5")) plotcorr(MD)
Plots the ages and their standard errors
## S3 method for class 'results' summary(object, ...)
## S3 method for class 'results' summary(object, ...)
object |
an objct of class |
... |
no other arguments |
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) summary(ages)[1:5,]
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) summary(ages)[1:5,]
timeresolved
classAn object class containing time resolved multi-collector mass spectrometry data
A list with the following items:
masses
: a vector of strings denoting the isotopes monitored in each runirr
: a vector of strings denoting the irradiation runspos
: a vector of integers with the positions in the
irradiation stack thedate
: a vector containing the acquisition dates and timesd
: a data tablethetime
: a matrix with the measurement times
Computes the error weighted mean and MSWD of some samples taking into covariances.
weightedmean(ages, prefix = NULL)
weightedmean(ages, prefix = NULL)
ages |
an object of class |
prefix |
is either a string with the prefix of the samples that need to be averaged, or a vector of sample names. |
a list with items:
avgt
: the weighted mean ageerr
: the standard error of avgt
MSWD
: the Mean Square of the Weighted Deviates
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) weightedmean(ages,"MD2-")
data(Melbourne) ages <- process(Melbourne$X,Melbourne$irr,Melbourne$fract) weightedmean(ages,"MD2-")