Skip to content
Snippets Groups Projects
Commit cc4ee699 authored by wactbprot's avatar wactbprot
Browse files

start analysis

parent 78a10aa0
No related branches found
No related tags found
No related merge requests found
.couchapprc 100755 → 100644
{
"env": {
"default": {
"db": "http://localhost:5984/vaclab_db"
"db": "http://localhost:5984/sz_mc"
}
}
}
[
"^db/.*",
"^docs/.*",
"^plots/.*",
"^sim/.*",
]
/.project
File added
File added
File added
File added
library(R4CouchDB)
dd <- cdbIni()
dd$id <- "f481e565fd252673c6a6e7b6b8003f05"
dd$DBName <- "vaclab_db"
dd <- cdbGetDoc(dd)
......@@ -13,12 +13,12 @@ for( k in 1:100){
dyn = 1.6e-3, # Dynamikbereich des SZ
p = list(
fill = 44.6, # mbar
randSdRel = randSdRel ),#
randSdRel = 5e-3 ),#
m = list(
mean = -1.8e-3),# mbar/s
t = list(
between = 5.0, # s
randSdRel = 0) #
randSdRel = 5e-3) #
)
### -------------------------------------------------------
......@@ -33,9 +33,10 @@ for( k in 1:100){
d$p$upper <- d$p$meanSz + d$p$D / 2
d$p$lower <- d$p$meanSz - d$p$D / 2
d$t$d <- d$p$d / d$m$sz
d$t$randSd <- abs(d$t$d * d$t$randSdRel)
d$t$randSd <- abs(d$t$d * d$M* d$t$randSdRel)
d$p$randSd <- abs(d$p$D * d$p$randSdRel)
## neue knstliche SZs
......
library(R4CouchDB)
library(ggplot2)
cdb <- cdbIni()
cdb$DBName <- "sz_mc"
cdb$design <- "theoLw"
cdb$view <- "t_rand_off"
res <- cdbGetView(cdb)$res$rows
x <- NULL
y <- NULL
for(i in 1:length(res)){
x <- append(x,res[[i]]$value$pRandSdRel)
y <- append(y,res[[i]]$value$DeltaSdRel
)
}
pt.df <- data.frame(x = x,y = y)
ggplot(pt.df) +
geom_point(aes(x = x, y = y), color='black') +
scale_x_log10() +
scale_y_log10() +
xlab("sd(p) relativ") +
ylab("sd(Delta t) relativ") +
ggtitle("Dt0 vs sd(p)/Dt0 (sd(t)=0)")
### ------------------------------------------
cdb$view <- "p_rand_off"
res <- cdbGetView(cdb)$res$rows
x <- NULL
y <- NULL
for(i in 1:length(res)){
x <- append(x,res[[i]]$value$tRandSdRel)
y <- append(y,res[[i]]$value$DeltaSdRel
)
}
pt.df <- data.frame(x = x,y = y)
ggplot(pt.df) +
geom_point(aes(x = x, y = y), color='black') +
scale_x_log10() +
scale_y_log10() +
xlab("sd(t) relativ") +
ylab("sd(Delta t) relativ") +
ggtitle("Dt0 vs sd(t)/Dt0 (sd(p)=0)")
### ------------------------------------------
cdb$view <- "t-p_rand_5E-3"
res <- cdbGetView(cdb)$res$rows
x <- NULL
y <- NULL
for(i in 1:length(res)){
#x <- append(x,res[[i]]$value$tRandSdRel)
x <- 1:length(res)
y <- append(y,res[[i]]$value$DeltaSdRel
)
}
pt.df <- data.frame(x = x,y = y)
ggplot(pt.df) +
geom_point(aes(x = x, y = y), color='black') +
xlab("No.") +
ylab("sd(Delta t) relativ") +
ggtitle("Dt0 vs [sd(t) = sd(p) = 5E-3]")
function(doc) {
emit(null, {"pRandSdRel":doc.p.randSdRel,
"tRandSdRel":doc.t.randSdRel,
"DeltaMean":doc.t.DeltaMean,
"DeltaSdRel":doc.t.DeltaSdRel
});
}
function(doc) {
if(doc.p.randSdRel < 1e-6){
emit(null, {"pRandSdRel":doc.p.randSdRel,
"tRandSdRel":doc.t.randSdRel,
"DeltaMean":doc.t.DeltaMean,
"DeltaSdRel":doc.t.DeltaSdRel
}
);
}
}
function(doc) {
if(doc.t.randSdRel > 4.9e-3 && doc.p.randSdRel > 4.9e-3 &&
doc.t.randSdRel < 5.1e-3 && doc.p.randSdRel < 5.1e-3){
emit(null, {"pRandSdRel":doc.p.randSdRel,
"tRandSdRel":doc.t.randSdRel,
"DeltaMean":doc.t.DeltaMean,
"DeltaSdRel":doc.t.DeltaSdRel
}
);
}
}
function(doc) {
if(doc.t.randSdRel < 1e-6){
emit(null, {"pRandSdRel":doc.p.randSdRel,
"tRandSdRel":doc.t.randSdRel,
"DeltaMean":doc.t.DeltaMean,
"DeltaSdRel":doc.t.DeltaSdRel
}
);
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment