last update: 05/01/2017

QC datafiles

datafile - 2015 (15 min) [05/07 11:30 - 12/31 23:45]

datafile - 2016 (15 min) [01/01 00:00 - 04/27 08:15]

datafile - 2016 (1 min) [05/04 15:39 - 12/31 23:59]

datafile - 2017 (1min) [01/01 00:00 - ]

In [208]:
library(chron)
library(zoo)

options(repr.plot.width=8, repr.plot.height=4)

dat1=read.table(file="gammaQC_2015_15min.txt",header=FALSE) 
dat2=read.table(file="gammaQC_2016_15min.txt",header=FALSE) 
dat3=read.table(file="gammaQC_2016_1min.txt",header=FALSE) 
dat4=read.table(file="gammaQC_2017_1min.txt",header=FALSE) 

# Conversion to DOY
dayno1=julian(dat1$V2,dat1$V3,dat1$V1,origin=c(1,1,2015))+1
dayno2=julian(dat2$V2,dat2$V3,dat2$V1,origin=c(1,1,2016))+1
dayno3=julian(dat3$V2,dat3$V3,dat3$V1,origin=c(1,1,2016))+1
dayno4=julian(dat4$V2,dat4$V3,dat4$V1,origin=c(1,1,2017))+1

# fractional day
fday1=dayno1+(dat1$V4/24)+(dat1$V5/(24*60))
fday2=dayno2+(dat2$V4/24)+(dat2$V5/(24*60))
fday3=dayno3+(dat3$V4/24)+(dat3$V5/(24*60))
fday4=dayno4+(dat4$V4/24)+(dat4$V5/(24*60))

# fractional year
time1=2015+((fday1-1)/365)
time2=2016+((fday2-1)/366)
time3=2016+((fday3-1)/366)
time4=2017+((fday4-1)/365)

timeAll=c(time1,time2,time3, time4)
gammaAll=c(dat1$V6,dat2$V6,dat3$V6, dat4$V6)

Data records

2015 (15 min)

In [182]:
plot(time1,dat1$V6,type="b",pch=20,xlab="",ylab="counts (cpm)")

2016 (15 min)

In [183]:
plot(time2,dat2$V6,type="b",pch=20,xlab="",ylab="counts (cpm)")

2016 (1 min)

In [184]:
plot(time3,dat3$V6,type="b",pch=20,xlab="",ylab="counts (cpm)")

2017 (1min)

In [209]:
plot(time4,dat4$V6,type="b",pch=20,xlab="",ylab="counts (cpm)")

All

In [228]:
plot(timeAll,gammaAll,type="l",xlab="",ylab="counts (cpm)")

Aggregation to 15 min

In [186]:
gamma1m=zoo(dat3$V6[502:347541],order.by=time3[502:347541])

# complete days
times.y=rep(as.numeric(as.vector(years(seq.dates("05/05/2016","12/31/2016",by="days")))),60*24)
times.m=rep(as.numeric(months(seq.dates("05/05/2016","12/31/2016",by="days"))),each=60*24)
d=as.numeric(days(seq.dates("05/05/2016","12/31/2016",by="days")))
times.d=rep(d,each=60*24)
times.hours=rep(rep(seq(0,23,1),each=60),length(d))
times.minutes=rep(rep(c(0,15,30,45),each=15),24*length(d))

dayno=julian(times.m,times.d,times.y,origin=c(1,1,2016))+1
fday=dayno+(times.hours/24)+(times.minutes/(24*60))
time0=2016+((fday-1)/366)

gamma15m=aggregate(gamma1m,by=time0,FUN=mean, na.rm=TRUE)

plot(gamma1m,type="l",xlab="",ylab="counts (cpm)")
lines(gamma15m,col=2)

All - 15 min

In [202]:
x=c(time1,time2,time(gamma15m))
xx=cbind(x,c(dat1$V6,dat2$V6,as.vector(gamma15m)))
y=c(1,round(diff(x)*365.25*24*4))
z=rep(x,times=(y))
ind=which(diff(z)==0)
z[which(diff(z)==0)]=NA
zz=rep(xx[,2],times=(y))
zz[ind]=NA

tm=seq(x[1],x[57300],length=length(zz))

gammaAll15minutes=zoo(zz,order.by=tm)

plot(gammaAll15minutes, type="b",pch=20,xlab="",ylab="counts (cpm)")