mirror of
https://asciireactor.com/otho/phy-4660.git
synced 2024-11-21 18:05:05 +00:00
finished
This commit is contained in:
parent
924daeb516
commit
d7740ae326
29
accelerator/notes
Normal file
29
accelerator/notes
Normal file
@ -0,0 +1,29 @@
|
||||
notes:
|
||||
|
||||
from program Sim NRA
|
||||
|
||||
kinematic factor @ 2.000 ±0.001 MeV
|
||||
|
||||
150 degrees
|
||||
|
||||
Cu: 1885.05 ± 0.01
|
||||
Si: 1749.21 ± 0.01
|
||||
|
||||
|
||||
|
||||
can find a ratio between the lithium and flourine cross-sections
|
||||
|
||||
taking the ratio of the yields and cross-sections allows things like target thickness to drop out
|
||||
|
||||
what you're after: the yield and the cross-section are basically proportional to each other
|
||||
|
||||
in lab write-up
|
||||
|
||||
|
||||
|
||||
A big danger:
|
||||
|
||||
Flourine curve very sensitive to different in energy of about .1, so this could change your ratio greatly
|
||||
this would be a systematic error that caused an energy shift to explain wrong values
|
||||
|
||||
|
102
notes.R
Normal file
102
notes.R
Normal file
@ -0,0 +1,102 @@
|
||||
plot(y,xlab="Channel",ylab="Count",lwd=4,pch="-")
|
||||
lines(v[3]*exp(-1/2*(x-v[1])^2/v[2]^2),col=2,lwd=1.4)
|
||||
abline(v = 7813.63,col=4,lwd=1)
|
||||
axis(3,at=7813.63,"5.486 MeV")
|
||||
dev.print(pdf,"../report/calibration.pdf")
|
||||
|
||||
|
||||
Alpha Activity
|
||||
plot(data_4_2,xlab="Energy [MeV]",ylab="Count [Alpha Particles]",pch=".")
|
||||
minor.tick(nx=5,ny=2)
|
||||
abline(v = 5.631,col=2,lwd=1)
|
||||
axis(3,at=5.631,"5.6")
|
||||
abline(v = 5.323,col=2,lwd=1)
|
||||
axis(3,at=5.323,"5.3")
|
||||
dev.print(pdf,"../report/activity.pdf")
|
||||
|
||||
|
||||
|
||||
For Gaussian Fits:
|
||||
|
||||
─────────────
|
||||
|
||||
x <- seq_along(y)
|
||||
|
||||
f <- function(par)
|
||||
{
|
||||
m <- par[1]
|
||||
sd <- par[2]
|
||||
k <- par[3]
|
||||
rhat <- k * exp(-0.5 * ((x - m)/sd)^2)
|
||||
sum((y - rhat)^2)
|
||||
}
|
||||
|
||||
optim(c(15, 2, 1), f, method="BFGS", control=list(reltol=1e-9))
|
||||
|
||||
─────────────
|
||||
|
||||
I propose to use non-linear least squares for this analysis.
|
||||
|
||||
# First present the data in a data-frame
|
||||
tab <- data.frame(x=seq_along(y), y=y)
|
||||
#Apply function nls
|
||||
(res <- nls( y ~ k*exp(-1/2*(x-mu)^2/sigma^2), start=c(mu=7500,sigma=50,k=1) , data = tab))
|
||||
|
||||
And from the output, I was able to obtain the following fitted "Gaussian curve":
|
||||
|
||||
v <- summary(res)$parameters[,"Estimate"]
|
||||
plot(y~x, data=tab)
|
||||
plot(function(x) v[3]*exp(-1/2*(x-v[1])^2/v[2]^2),col=2,add=T,xlim=range(tab$x) )
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
Mirror Gumbel Distribution:
|
||||
|
||||
|
||||
(res <- nls( y ~ (1/beta)*exp((x-alpha)/beta - exp((x - alpha)/beta)), data=cal,start=c(alpha=7800,beta=1),control=list(minFactor=1/50000,maxiter=1000)))
|
||||
v <- summary(res)$parameters[,"Estimate"]
|
||||
plot(function(x) (1/v[2])*exp((x-v[1])/v[2] - exp((x - v[1])/v[2])),col=2,add=T,xlim=range(tab$x))
|
||||
|
||||
|
||||
|
||||
|
||||
──────────────────────────────────────────────────────────────────────────
|
||||
|
||||
─────────────
|
||||
|
||||
File writing
|
||||
|
||||
write(x, file = "data",
|
||||
ncolumns = if(is.character(x)) 1 else 5,
|
||||
append = FALSE, sep = " ")
|
||||
|
||||
|
||||
dev.print(pdf,'filename.pdf')
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
──────────────────────────────────────────────────────────────────────────
|
||||
|
||||
─────────────
|
||||
Axis Formatting
|
||||
|
||||
# Add minor tick marks
|
||||
library(Hmisc)
|
||||
minor.tick(nx=n, ny=n, tick.ratio=n)
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
──────────────────────────────────────────────────────────────────────────
|
||||
|
||||
─────────────
|
||||
Importing CSV
|
||||
|
Loading…
Reference in New Issue
Block a user