Learn R Programming

nanop (version 2.0-1)

gaussConvol: Gauss convolution

Description

Function to calculate the convolution of a given function with the Gaussian function

Usage

gaussConvol(SQ, Q, Qdamp=0.0457, err=1e-6)

Arguments

Value

numeric vector of function values.

Rdversion

1.1

See Also

calcTotalScatt

Examples

Run this code
## 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)

Run the code above in your browser using DataLab