# NOT RUN {
# First create the crystal structure (P1)
a <- 10
SG <- "P1"
x0 <- c(1,4,6.5)
Z <- c(8,26,6)
B <- c(18,20,17)
occ <- c(1,1,1)
sdata <- standardise_sdata(a,SG,x0,Z,B,occ)
lbda <- 1.7 # Close to Fe's absorption
# Miller indices (including DC (h=0) component)
hidx <- 0:10
# Now structure factors without anomalous contribution
ftmp <- strufac(hidx,sdata,lbda=lbda)
print(length(ftmp$Fmod)) # Includes DC component (h=0)
print(ftmp) # Amplitudes decrease with increasing
# resolution (Miller indices)
# Now try with anomalous contributions
ftmp <- strufac(hidx,sdata,lbda=lbda,anoflag=TRUE)
print(ftmp) # DC component is not any longer real
# }
Run the code above in your browser using DataLab