names(mg.long)[2:10] <- paste("l", names(mg.long)[2:10], sep=".") names(mg.long)[9+2:10] <- paste("r", names(mg.long)[9+2:10], sep=".") mg.long$VP <- substring(mg.long$fn,1,3) mg.long$l.w.i <- sqrt(mg.long$l.w.h^2+mg.long$l.w.v^2) mg.long$r.w.i <- sqrt(mg.long$r.w.h^2+mg.long$r.w.v^2) mg.long$l.phi <- with(mg.long,atan2(l.w.h,l.w.v))*180/pi mg.long$r.phi <- with(mg.long,atan2(r.w.h,r.w.v))*180/pi mg.long$match.h <- with(mg.long,(l.w.h-r.w.h)^2/(l.w.h^2+r.w.h^2+0.1)) mg.long$match.v <- with(mg.long,(l.w.v-r.w.v)^2/(l.w.v^2+r.w.v^2+0.1)) #mg.good <- subset(mg.long,!(l.na|r.na|is.element(fn,bad.list)|l.t3-l.t1>99|r.t3-l.t1>99)) mg.good <- subset(mg.long,!(l.na|r.na|is.element(fn,bad.list))) mg.long.binocular <- subset(mg.long,!is.na(l.t1) & ! is.na(r.t1)) mg.good.binocular <- subset(mg.good,!is.na(l.t1) & ! is.na(r.t1)) mg.micro <- subset(mg.good.binocular,l.w.h^2+l.w.v^2+r.w.h^2+r.w.v^2 < 2) par(mfrow=c(1,3)) hist(subset(mg.micro,l.tg100>0&l.tg100<8)$l.w.h,br=33) hist(subset(mg.micro,l.tg100>7&l.tg100<15)$l.w.h,br=33) hist(subset(mg.good,abs(l.w.h)<1&l.tg100>0&l.tg100<8)$l.w.h,br=33) hist(subset(mg.good,abs(l.w.h)<1&l.tg100>14)$l.w.h,br=33) boxplot(l.w.h~VP,subset(mg.good,abs(l.w.h)<1&l.tg100>0&l.tg100<8)) plot(l.v.c~l.v.i,subset(mg.micro,l.tg100>7&l.tg100<15),pch=".",col=1+as.numeric(factor(substring(fn,1,3)))) rate.l <- unlist(lapply(ausw.liste,function(x)with(x$sakks2$sakk.l,median(c(t2,999999)-c(0,t2))))) rate.r <- unlist(lapply(ausw.liste,function(x)with(x$sakks2$sakk.r,median(c(t2,999999)-c(0,t2)))))