This sensor from TPF collection
Article | |
---|---|
Collibration | |
Precision | |
Ranges | |
Renew sensors |
source("utilities_tpf.r"); sensors.p.cpx_pl_qtz_raith_1983 <- function(Cpx, Pl, Temp, ...){ Name <-paste0(Cpx$Name,"-", Pl$Name); T <- Temp; Pl <- tpf.recalc_minaral("PL",Pl); Cpx <- tpf.recalc_minaral("CPX",Cpx); Y <- Pl$Ca_pfu / (Pl$Na_pfu + Pl$K_pfu + Pl$Ca_pfu); X <- Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu; SUM1 <- Cpx$Si_pfu * 2 + Cpx$Al_c4_pfu * 3 / 2 + Cpx$Al_c6_pfu * 3 / 2 + Cpx$Cr_pfu * 3 / 2; SUM2 <- Cpx$Ti_pfu * 2 + Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu * 3 / 2 + Cpx$Mn_pfu + Cpx$Mg_pfu + Cpx$Ca_pfu + Cpx$Na_pfu / 2 + Cpx$K_pfu / 2; S <- Cpx$Si_pfu + Cpx$Al_pfu + Cpx$Cr_pfu + Cpx$Ti_pfu + Cpx$Fe_p2_pfu + Cpx$Fe_p3_pfu + Cpx$Mn_pfu + Cpx$Mg_pfu + Cpx$Ca_pfu + Cpx$Na_pfu + Cpx$K_pfu; Z <- Cpx$Al_c4_pfu + Cpx$Al_c6_pfu - 2 * Cpx$Ti_pfu - Cpx$Cr_pfu; N <- Cpx$Na_pfu; SUM <- SUM1 + SUM2; SK <- 4 / S; SUM <- SK * SUM; SO <- 12 - SUM * 2; if (SO>0.00) { Z <- (SK * Z - (SO - N * SK)) / 2; } if (SO<0.00) { Z <- (SK * Z + N * SK) / 2; } TT <- T + 273; A <- 0.25 * Y * (1 + Y)^2; KK <- log(Z / A); K <- TT * (2.9876 + 1.9872 * KK); L <- (1 - Y)^2 * (2075 + 9318 * Y); M <- 26885 * (Z * (1 - Z))^2; P <- NA; if (Z>0.01999) { P <- (5360 + K + 12864 * Z * (1 - Z) - M - L) / 0.349 / 1000; warning(" ACCURACY +/- 1 KBAR"); } if (Z<0.019999) { warning(" CANNOT BE USED FOR (AL-CR-2*TI-FE3+NA)/2 IN CPX <0.02"); } return(data.frame(Name=Name,Temp=Temp,P_calc=P,Z_calc=Z)); } sensors.p.cpx_pl_qtz_raith_1983.args <- function(){ ars <- list(); ars$minerals <- c("Cpx", "Pl"); ars$ranges <- c("Temp"); return(ars); } #sensors.p.cpx_pl_qtz_raith_1983.test <- function(){ # #}