gaussConvol: Gauss convolution

Description Usage Arguments Value See Also Examples

Description

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

Usage

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

Arguments

SQ

numeric vector containing function to be convoluted.

Q

numeric vector containing grid points corresponding to SQ.

Qdamp

numeric indicating standard deviation parameter for the Gaussian function.

err

numeric, relative accuracy requested.

Value

numeric vector of function values.

See Also

calcTotalScatt

Examples

 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)		   

Example output

DIM BASE 1 4 
DIM BASE 1 4 

nanop documentation built on May 2, 2019, 3:39 p.m.

Related to gaussConvol in nanop...