1c0b746e5SOllivier Robertoptions(digits=4) 2c0b746e5SOllivier Robertfile2 <- "etf_summary" 3c0b746e5SOllivier Robertetf <- scan(file1, list(day=0, sec=0, offset=0, stab=0)) 4c0b746e5SOllivier Robertr <- lsfit(etf$sec, etf$offset) 5c0b746e5SOllivier Robertcount<-length(etf$sec) 6c0b746e5SOllivier Robertmean<-r$coef[[1]] 7c0b746e5SOllivier Robertstd<-sqrt(var(r$residuals)) 8c0b746e5SOllivier Robertslope<-r$coef[[2]] * 1000 9c0b746e5SOllivier Robertcat("\n", file=file2 , append=TRUE, fill=FALSE, sep="") 10c0b746e5SOllivier Robertcat(file1, "\n", file=file2, append=TRUE, fill=FALSE, sep="") 11c0b746e5SOllivier Robertcat("etf1 ", count, ", T ", mean, " ns, R ", slope, " ps/s, std ", std, " us\n", file=file2, append=TRUE, fill=FALSE, sep="") 12c0b746e5SOllivier Robertstr <- paste("eps/", file1, ".eps", sep="") 13c0b746e5SOllivier Robertpostscript(str, , , , 5, pointsize=18) 14c0b746e5SOllivier Robertpar(mgp=c(1, 0, 0), tck=0.03, mar=c(2, 2, 1, 1)) 15c0b746e5SOllivier Robertplot(etf$sec, etf$offset, type="l", xlab=paste("MJD", etf$day, "Time (s)"), ylab="External Offset (ns)", ylim=c(-400, 400)) 16