Description Usage Arguments Value See Also Examples
Function to calculate the convolution of a given function with the Gaussian function
1 2 |
gaussConvol(SQ, Q, Qdamp=0.0457, err=1e-6)
|
SQ |
numeric vector containing function to be convoluted. |
Q |
numeric vector containing grid points corresponding to |
Qdamp |
numeric indicating standard deviation parameter for the Gaussian function. |
err |
numeric, relative accuracy requested. |
numeric vector of function values.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## simulate a particle
Cu <- createAtom("Cu")
part <- simPart(atoms=list(Cu), atomsShell=list(Cu), r=20,
rcore=14, latticep=4.08, latticepShell=3.89)
## calculate total scattering function
gQ <- calcTotalScatt(part, type="neutron", minQ=0.771, maxQ=18,
dQ=0.01, scatterLength=c(4.87, 7.97), sigma=c(.01, .01))
plot(gQ$Q, gQ$gQ, type="l")
## simulate instrumental resolution effect
Q <- gQ$Q
gQ <- gaussConvol(SQ=gQ$gQ, Q=gQ$Q, Qdamp=0.061, err=1e-5)
lines(Q, gQ, col=2)
|
DIM BASE 1 4
DIM BASE 1 4
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.