knitr::opts_chunk$set(
  fig.width=7, fig.height = 5, fig.align = 'center',
  collapse = TRUE,
  comment = "#>"
)

Introduction

This package is an extraction of the functions of the calculation software on magnetic components developed at the Rennes Archaeomagnetism Laboratory, hosted at the Geosciences-Rennes laboratory.

Installing ArMag

ArMag will run in Windows, Mac OS X or Linux. To install ArMag you first need to install R. I would also recommend installing Rstudio as a nice desktop environment for using R. Once in R you can type:

# install.packages('ArMag')

at the R command prompt to install ArMag. If you then type:

# library(ArMag)

Installing ArMag via GitHub

if (!require(devtools))
 {install.packages("devtools")}

devtools::install_github("chrono35/ArMag", force = TRUE)
library("ArMag") #, lib.loc="/Library/Frameworks/R.framework/Versions/3.5/Resources/library")

It will load in all the ArMag functions.

Manage file

Loading Rennes' AM file

You need two functions, the first one reads the information, corresponding to the headers of each sample, the second one reads the measurements of each sample.

file.AM <- "../examples/14039C.AMP"

mes <- NULL
mes.info <- read.AM.info (file.AM)
mes <- read.AM.mesures(file.AM)

Empty file generation

Function used before making the measurements. Warning, this function overwrites the existing file

file.AM <- "../examples/test.txt"
list.ech <- c("1T",   "17T",  "35T",  "47T",  "50T",  "59T",  "83T",  "87T",  "89T",  "94T",  "100T", "102T", "103T" )
genere.AMD(file.AM, list.ech)

Calculation and visualisation of measurements

Plot of NRN values

A simple, R command allows to select the steps with the value 0, corresponding to step 0N0

select <- NULL
select <- mes[mes$step.value== 0,]
lambert(select, inc.lim = c(0,90))

mcFadden statistic on NRN value

Example of the calculation of the mcFadden statistic on the selected samples

stat.mcFadden(select)

Extraction of measurements corresponding to a sample using its name

mes.ech <- NULL
mes.ech <- extract.mesures.specimen.name("3P2", mes)

Zijderveld plot

par(pty="s") # force une figure carré
zijderveld1(mes.ech$X, mes.ech$Y, mes.ech$Z) 
par(mfrow = c(1,2), pty="m", cex.lab = 0.5, cex.axis = 0.6) # separated into 2 columns and restored a maximum size figure
# cex.lab set the text size of the steps
zijderveld1(mes.ech, legend.pos = "topright")
zijderveld2(mes.ech, pt.names = NULL)

Plot the schmitt-Lambert projection

Each function using different parameters

lambert.XYZ.specimen(mes.ech)
# remove anisotropîe step
mes.ech.ssAni<-remove.step(mes.ech)
lambert.ID.specimen(mes.ech.ssAni)

Demagnetizing and partial component

mes.sel2 <- extract.mesures.specimen.name("1P1", mes)
mes.sel3 <- extract.mesures.specimen.name("16P1", mes)
demag(mes.sel2, step.J0 = NULL)
demag(mes, step.J0 = 0, pt.col = rainbow(length(mes.info$name)))
demag(rbind(mes.sel2, mes.sel3), normalize = TRUE)

partial.component(mes.sel2$X, mes.sel2$Y, mes.sel2$Z)

Synthetic view of a sample

The zijderveld1.T1T2 and zijderveld2.T1T2 functions remove the anisotropy steps by default

par(mfrow = c(2, 2), cex.lab = 0.7, cex.axis = .7, cex = 0.7, cex.main = 1, cex.sub = 0.1,
    mai = c(0.5, 0.5, 0.7, 0.3), oma = c(0, 1, 1, 1))#, pty ="s" )
zijderveld1.T1T2(mes.sel2)
zijderveld2.T1T2(mes.sel2)

# removal of anisotropy steps
mes.sel2 <- remove.step(mes.sel2, verbose = FALSE) 
lambert(mes.sel2, inc.lim = c(0, 90))
demag(mes.sel2, step.J0 = NULL)

Arai - intensity plot

file.INT <- "../examples/INT_example.AMD"

mesINT <- NULL
mesINT <- read.AM.mesures(file.INT)
mesINT.info <- read.AM.info (file.INT)
mes.sel<- extract.mesures.specimen.name("40001B_11B1", mesINT)
# reference 
# Coe 1978 : DOI: 10.1029/JB083iB04p01740
# Prévost et Al. 1985 DOI: 10.1029/JB090iB12p10417
par(pty="s", "xaxp")
relative = FALSE
verbose = TRUE
show.plot = TRUE
vol=10.8
TH = 60
aim.coef = 1E-10*1E6/vol #1E6
show.step.value = FALSE
R.mark = 'R'  # Positive pTRM
V.mark = 'V'  # Negative pTRM
P.mark = 'P'  # pTRM check
L.mark = "L"  # sLow cooling 
Q.mark = "Q"  # Quick cooling
pt.col = "blue"
loop.col = "forestgreen"
step.J0 = "20N0" # ou NULL

begin.step.value = 0
end.step.value = 700

par(pty="s", "xaxp")
arai(mes.sel, begin.step.value = 250, end.step.value = 700, aim.coef = 1E-10*1E6/vol)

Astronomical calculation

Sun azimuth

sun.azimuth (10, 11, 2019, 11, 19, seconde=0, 48, longmin=0, longsec=0, 45, latmin=0, latsec=0)

igrf13syn

This is a synthesis routine for the 13th generation IGRF as agreed in December 2019 by IAGA Working Group V-MOD. It is valid 1900.0 to 2025.0 inclusive. Values for dates from 1945.0 to 2015.0 inclusive are definitive, otherwise they are non-definitive. Reference:

Thébault, E., Finlay, C.C., Beggan, C.D. et al. International Geomagnetic Reference Field: the 12th generation. Earth Planet Sp 67, 79 (2015). https://doi.org/10.1186/s40623-015-0228-9

to compare online http://www.geomag.bgs.ac.uk/data_service/models_compass/igrf_calc.html

isv <- 0 #0=Main ou 1=Variation
date <- 1910
itype <- 1 # geodetic (spheroid) alt from the sea
alt <- 30 # in km
lat <- 50
colat <- 90 - lat
elong <- -10

igrf13syn(isv=isv, date=date, itype=itype , alt=alt, colat= colat, elong=elong)


chrono35/ArMag documentation built on June 19, 2024, 6:38 p.m.