phy-4660/accelerator/data/.Rhistory
2017-03-27 19:52:56 -04:00

513 lines
16 KiB
R

lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(2,at=189.12,"189.12")
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12)
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
?axis
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,hadj=1)
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
e")
> abline(h = 3700,col="purple",lwd=1)
> abline(v = 203.63,col="purple",lwd=1)
e")
> abline(h = 3700,col="purple",lwd=1)
> abline(v = 203.63,col="purple",lwd=1)
e")
> abline(h = 3700,col="purple",lwd=1)
> abline(v = 203.63,col="purple",lwd=1)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12)
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,vadj=1)
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
?axis
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1)
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.3)
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.3)
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(1,at=203.63,padj=1.3)
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.3,"189.12±0.6")
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(1,at=203.63,padj=1.3,"203.63±0.6")
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.5,"189.12±0.6")
axis(3,at=189.12,"0.352±0.009 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(1,at=203.63,padj=1.5,"203.63±0.6")
axis(3,at=203.63,"0.96±0.04 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
plot(data1)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.5,"189.12±0.6")
axis(3,at=189.12,"1.706±0.05 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(1,at=203.63,padj=1.5,"203.63±0.6")
axis(3,at=203.63,"1.838±0.05 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=4.5,height=3)
203.63-189.12
1.838-1.706
.132/14.51
1.706-.009*189.12
energy_coords=data1$channel*.009+.00392
energy_coords
data2$energy=energy_coords
plot(energy~count,data=data2)
plot(count~energy,data=data2)
data3$energy=energy_coords
data1$energy=energy_coords
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0))
plot(count~energy,data=data1,type='l')
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100),xlab="energy [MeV]")
plot(pnorm(50,500)
plot(pnorm(50,500))
plot(dnorm(50,50,500))
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100),xlab="energy [MeV]")
abline(v = 7.949,col="red")
abline(v = 7.949,col="red")
axis(3,at=7.949,"7.949 MeV")
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="red")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="red")
axis(3,at=7.688,"7.688 MeV")
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="red")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="red")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/rutherford.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(50,205))
lines(c(0,1023),c(7600,7600),col="blue")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/rutherford.pdf",width=4.5,height=3)
# Rutherford Overlay
plot(data2,type='l',xlim=c(50,205))
lines(c(0,1023),c(7600,7600),col="blue")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/rutherford.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(50,205))
lines(c(0,1023),c(7600,7600),col="blue")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/rutherford.pdf",width=4.5,height=3)
plot(data2,type='l',xlim=c(50,205))
plot(data2,type='line',xlim=c(50,205))
plot(data2,type=l,xlim=c(50,205))
plot(data2,type="l",xlim=c(50,205))
?plot
plot(data2,type="l",xlim=c(50,205))
plot(data2,type="l",xlim=c(50,205))
data2
q
plot(count~channel,data=data2,type='l',xlim=c(50,205))
lines(c(0,1023),c(7600,7600),col="blue")
lines(count~channel,data=data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/rutherford.pdf",width=4.5,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="red")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="red")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=4.5,height=3)
# Rutherford Overlay
plot(count~channel,data=data2,type='l',xlim=c(50,205))
lines(c(0,1023),c(7600,7600),col="blue")
lines(count~channel,data=data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/rutherford.pdf",width=6,height=3)
# calibration close-up
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.5,"189.12±0.6")
axis(3,at=189.12,"1.706±0.05 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="pudatarple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(1,at=203.63,padj=1.5,"203.63±0.6")
axis(3,at=203.63,"1.838±0.05 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=6,height=3)
# nuclear reactions
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="red")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="red")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.5,"189.12±0.6")
axis(3,at=189.12,"1.706±0.05 MeV")
lines(data3,col='red')
lines(c(0,1023),c(18500,18500),col="pudatarple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(1,at=203.63,padj=1.5,"203.63±0.6")
axis(3,at=203.63,"1.838±0.05 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=6,height=3)
plot(count~channel,data=data2,type='l',xlim=c(185,205))
lines(c(0,1023),c(7600,7600),col="blue")
abline(h = 1520,col="blue",lwd=1)
abline(v = 189.12,col="blue",lwd=1)
axis(1,at=189.12,padj=1.5,"189.12±0.6")
axis(3,at=189.12,"1.706±0.05 MeV")
lines(count~channel,data=data3,col='red')
lines(c(0,1023),c(18500,18500),col="purple")
abline(h = 3700,col="purple",lwd=1)
abline(v = 203.63,col="purple",lwd=1)
axis(1,at=203.63,padj=1.5,"203.63±0.6")
axis(3,at=203.63,"1.838±0.05 MeV")
minor.tick(nx=5,ny=2)
dev.print(pdf,"../report/calibration.pdf",width=6,height=3)
data1[7.8-7.9]
data1[energy=7.8-7.9]
data1[energy>7.8]
data1[$energy>7.8]
data1[data1$energy>7.8]
plot(count~channel,data1)
plot(count~channel,data1,xlim=c(840,870)))
plot(count~channel,data1,xlim=c(840,870))
plot(count~channel,data1,xlim=c(840,870),ylim=c(0,100))
plot(count~channel,data1,xlim=c(800,870),ylim=c(0,100))
plot(count~channel,data1,xlim=c(750,870),ylim=c(0,100))
plot(count~channel,data1,xlim=c(700,870),ylim=c(0,100))
plot(count~channel,data1,xlim=c(700,970),ylim=c(0,100))
plot(count~channel,data1,xlim=c(7800,850),ylim=c(0,100))
plot(count~channel,data1,xlim=c(780,850),ylim=c(0,100))
plot(count~channel,data1,xlim=c(780,850),ylim=c(0,100),type=l)
plot(count~channel,data1,xlim=c(780,850),ylim=c(0,100),type='l')
plot(count~channel,data1,xlim=c(780,850),ylim=c(0,100),pch='|')
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="red")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="red")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=6,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="red")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="red")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~channel,data1,xlim=c(780,850),ylim=c(0,100),pch='|')
data1
peak1_interval = c(793,800)
peak2_interval = c(838,847)
interval
seq
seq(peak2_interval)
seq(838,847(
seq(838,847)
peak2 = seq(838,847)
peak1 = seq(793,800)
peak1
data1[peak1]
data1[index==peak1]
?subset
data1[,peak1]
data1[1,peak1]
data1[1,]
data1[,]
data1[,1]
data1[,peak1]
data1[,index]
data1[,$index]
data1[,2]
data1[,1]
data1[,1==peak1]
sum
?sum
data1[$count]
data1[count]
data1["count"]
data1["count"][peak1]
data1["count",peak1
data1["count",peak1]
data1["count"]
peak1
data1
names(data1)
data1["v1"]
data1["channel"]
data1["channel","count"]
data1["channel":"count",]
data1["channel":"count"]
data1["channel","count"]
data1["channel"]
data1[c("channel","count")]
data1[5:10]
5:10
data1[c(5:10)]
data1[,c(5:10)]
data1[c(5:10),]
data1[peak1,]
data1[peak2,]
data1[0,]
data1[1,]
data1[801,]
data1[802,]
data1[801,]
peak1
peak1=793:801
data1[801,]
data1[peak1,]
peak1=793:802
data1[peak1,]
data1[peak2,]
peak2=837:849
data1[peak2,]
peak2=837:850
data1[peak2,]
peak2=836:850
data1[peak2,]
peak2=835:850
data1[peak2,]
peak2=834:850
data1[peak2,]
peak2=833:850
data1[peak2,]
?sum
data1[peak2,"energy"]
data1[peak2,"count"]
sum(data1[peak2,"count"])
sum(data1[peak1,"count"])
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="red")
abline(v = 7.7,col="blue")
abline(v = 6.9,col="blue")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="red")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
7.949-6.9
1.049/6.9
7.688-7.7
0.012/7.7
sum(data1[peak1,"count"])
sum(data1[peak2,"count"])
3.12/3
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
abline(v = 7.588,col="purple")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
abline(v = 7.58,col="purple")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
abline(v = 7.583,col="purple")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
axis(3,at=7.175,"7.175 MeV")
abline(v = 7.583,col="purple")
axis(3,at=7.583,"7.583 MeV")
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
axis(3,at=7.175,"7.175 MeV",padj=1)
abline(v = 7.583,col="purple")
axis(3,at=7.583,"7.583 MeV",padj=1)
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
axis(3,at=7.175,"7.175 MeV",padj=1.2)
abline(v = 7.583,col="purple")
axis(3,at=7.583,"7.583 MeV",padj=1.2)
axis(3,at=7.949,"7.949 MeV")
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688 MeV")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100))
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
axis(3,at=7.175,"7.175 MeV",padj=1.2)
abline(v = 7.583,col="purple")
axis(3,at=7.583,"7.583 MeV",padj=1.2)
axis(3,at=7.949,"7.949 MeV",padj=-.3)
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688 MeV",padj=-.3)
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(7.0,8.0),ylim=c(0,100),xlab="energy (MeV)")
abline(v = 7.949,col="blue")
abline(v = 7.175,col="purple")
axis(3,at=7.175,"7.175")
abline(v = 7.583,col="purple")
axis(3,at=7.583,"7.583")
axis(3,at=7.949,"7.949")
abline(v = 7.688,col="blue")
axis(3,at=7.688,"7.688")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/nuclear.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(0.5,2.5),ylim=c(0,100),xlab="energy (MeV)")
minor.tick(nx=8,ny=2)
plot(count~energy,data=data1,type='l',xlim=c(0.5,2.5),ylim=c(0,20000),xlab="energy (MeV)")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/thickness.pdf",width=6,height=3)
plot(count~energy,data=data1,type='l',xlim=c(0.5,2.5),ylim=c(0,25000),xlab="energy (MeV)")
minor.tick(nx=8,ny=2)
dev.print(pdf,"../report/thickness.pdf",width=6,height=3)
quit()