Skip to content
Snippets Groups Projects
Commit 4bbf02a9 authored by Thomas Bock's avatar Thomas Bock :speech_balloon:
Browse files

fm3 cdgs in Pa

parent d1ef6dce
No related branches found
No related tags found
No related merge requests found
......@@ -24,9 +24,10 @@ cdb <- cdbIni()
## cdb$id <- "cal-2018-ce3-kk-75003_0004"
## cdb$id <- "cal-2018-ce3-ik-0089_0004" # F <- 4043
## cdb$id <- "cal-2018-ce3-kk-75003_0004"
##cdb$id <- "cal-2018-ce3-kk-75085_0001"
cdb$id <- "cal-2019-ce3-kk-75037_0001"
cdb$id <- "cal-2019-ce3-kk-75012_0001"
## cdb$id <- "cal-2018-ce3-kk-75085_0001"
## cdb$id <- "cal-2019-ce3-kk-75037_0001"
## cdb$id <- "cal-2019-ce3-kk-75012_0001"
cdb$id <- "cal-2019-ce3-kk-75041_0001"
#cdb$DBName <- "vl_db"
cdb$DBName <- "vl_db"
......@@ -107,7 +108,5 @@ if(!FALSE){
getConstVal(doc$Calibration$Analysis, "relative")
getConstVal(doc$Calibration$Analysis, "gauge_sens")
getConstVal(doc$Calibration$Analysis$Values$Pressure, "cal")
getConstVal(doc$Calibration$Analysis$Values$Pressure, "fill")
getConstVal(doc$Calibration$Analysis$Values$Temperature, "Tpbox")
getConstVal(doc$Calibration$Analysis$Values$Temperature, "Tfm3")
getConstVal(doc$Calibration$Analysis$Values$Conductance, "cnom")
mean(getConstVal(doc$Calibration$Analysis$Values$Temperature, "Tuhv") -273.15)
sd(getConstVal(doc$Calibration$Analysis$Values$Temperature, "Tuhv") -273.15)
......@@ -22,7 +22,8 @@ pUnit <- "mbar"
## cdb$id <- "cal-2018-ce3-kk-75026_0002" ##
## cdb$id <- "cal-2019-ce3-kk-75036_0002" ##
## cdb$id <- "cal-2019-ce3-kk-75037_0002" ##
cdb$id <- "cal-2019-ce3-kk-75012_0002" ##
## cdb$id <- "cal-2019-ce3-kk-75012_0002" ##
cdb$id <- "cal-2019-ce3-kk-75041_0002" ##
sigma.F13 <- 1.11
doc <- cdbGetDoc(cdb)$res
......
checkUncertRange <- function(uncertIList, referenceList, globalRange=NA){
referenceVal <- getConstVal(NA,NA,referenceList)
## gri: global range index
......@@ -10,11 +10,17 @@ checkUncertRange <- function(uncertIList, referenceList, globalRange=NA){
if((length(globalRange$From) > 0) &
(length(globalRange$To) > 0) &
(length(globalRange$RangeUnit) > 0)){
if(globalRange$RangeUnit == referenceList$Unit){
if(globalRange$RangeUnit == "Pa"){
globalFrom <- as.double(globalRange$From)/100
globalTo <- as.double(globalRange$To)/100
globalRange$RangeUnit <-"mbar"
}else{
globalFrom <- as.double(globalRange$From)
globalTo <- as.double(globalRange$To)
}
if(globalRange$RangeUnit == referenceList$Unit){
gri <- which((referenceVal >= globalFrom) &
(referenceVal <= globalTo))
}else{
......@@ -56,11 +62,19 @@ checkUncertRange <- function(uncertIList, referenceList, globalRange=NA){
if((length(uncertIList$From) > 0) &
(length(uncertIList$To) > 0) &
(length(uncertIList$RangeUnit) > 0)){
if(uncertIList$RangeUnit == "Pa"){
uncertIFrom <- as.double(uncertIList$From)/100
uncertITo <- as.double(uncertIList$To)/100
uncertIList$RangeUnit <- "mbar"
}else{
uncertIFrom <- as.double(uncertIList$From)
uncertITo <- as.double(uncertIList$To)
}
if((uncertIList$RangeUnit == referenceList$Unit)){
## die vorliegende Unsicherheit hat eine range
uncertIFrom <- as.double(uncertIList$From)
uncertITo <- as.double(uncertIList$To)
lri <- which((referenceVal > uncertIFrom) &
(referenceVal < uncertITo) )
......
......@@ -45,6 +45,20 @@ quadrSumContrib <- function( currentCalObj, refQuantityList, uncertRes, msg ){
toString(idx))
}## unit==mbar
##------------------------------
if(uncertIList$Unit =="Pa"){
## (u_i/pfill)^2
varianzI <- (getConstVal(NA,NA,uncertIList)/100/getConstVal(NA,NA,refQuantityList)[idx])^2
msg <- paste(msg,
"use",
uncertIList$Type,
"/ ",
refQuantityList$Type,
" in ",
uncertIList$Unit,
" for point(s) ",
toString(idx))
}## unit==mbar
##------------------------------
if(uncertIList$Unit =="K"){
## (u_i/pfill)^2
......
......@@ -75,13 +75,46 @@ results <- function(ccc){
td.rese <- rep(NA, noOfP)
td.rescf <- rep(NA, noOfP)
td.pcal <- unlist(pcal)
td.ute <- unlist(ute)
td.utcf <- unlist(utcf)
td.rese <- unlist(rese)
td.rescf <- unlist(rescf)
td.pind <- unlist(pind)
td.pindcorr <- unlist(pindcorr)
## ## Zieldrücke einzeln durchgehen
## for(i in 1:noOfP){
## i.out <- NULL
## i.take <- which(pcal > (p.target[i] *(1 - maxdev)) &
## pcal < (p.target[i] *(1 + maxdev)))
## msg <- paste(msg,"; For target pressure:",p.target[i],
## "I take the points:", toString(i.take))
##
## if(length(i.take) > 1){
## ## ut ist schon k=2, eswerden alle Punkte genommen,
## ## bei dem e.delta kleiner als 3-sigma ist
## ## wobei e.delte die Abweichung vom Reverenzwert ist
## e.delta <- abs(result[i.take] - revV)
## # i.out <- which(e.delta > mean(ut[i.take])/k*3)
## #
## # if(length(i.out) > 0){
## # i.take <- i.take[-i.out]
## # msg <- paste(msg, "from these I skip the points: ",
## # toString(i.take[i.out]))
## # }
## }
## td.pcal[i] <- unlist(mean(pcal[i.take]))
## td.ute[i] <- unlist(mean(ute[i.take]))
## td.utcf[i] <- unlist(mean(utcf[i.take]))
## td.rese[i] <- unlist(mean(rese[i.take]))
## td.rescf[i] <- unlist(mean(rescf[i.take]))
## td.pind[i] <- unlist(mean(pind[i.take]))
## td.pindcorr[i] <- unlist(mean(pindcorr[i.take]))
## } #for
td.pcal <- unlist(pcal)
td.ute <- unlist(ute)
td.utcf <- unlist(utcf)
td.rese <- unlist(rese)
td.rescf <- unlist(rescf)
td.pind <- unlist(pind)
td.pindcorr <- unlist(pindcorr)
PCAL$Value <- formatC(td.pcal, digits=3, format="E")
PIND$Value <- formatC(td.pind, digits=2, format="E")
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment