On Wed, May 01, 2013 at 08:23:43PM -0700,
taro...@gmail.com wrote:
> Dear All,
>
> One thing that is required by PDFgetX3 is to input the composition of the
> material to be analyzed in the configuration file.
> I was wondering if this is being used to normalize the data in terms of the
> atomic form factor when generating the PDF.
Hi Taro, Yes, the chemical composition is used for evaluating the
average scattering factor that is used to normalize raw intensities.
> Also, it is mentioned in the tutorial that PDFgetX3 can handle
> multiple files in batch mode. This works if one doesn't need to
> change the configuration filed, but I'm currently looking at
> multiple compositions so I need to change the composition in the
> configuration file for each IvsQ set. Is there a rapid way to handle
> data that involves multiple compositions?
Sure, however you'd need to write some code that can determine
sample composition per each input file. Here is an example,
where input files are just named according to their compositions.
Let's assume the current directory contains 3 input files named
as In1Ga0As.chi, In0.5Ga0.5As.chi, In0Ga1As.chi. To process
them in a batch, create a configuration file pdfgetx3.cfg that
sets all constant parameters, such as qmaxinst, qmax, etc.,
and then use the following Python script:
# --------------------------------------------------------------------
from os.path import splitext
import glob
from diffpy.pdfgetx import PDFGetter, loadPDFConfig
cfg = loadPDFConfig('pdfgetx3.cfg')
pg = PDFGetter(cfg)
inputfiles = glob.glob('*.chi')
for f in inputfiles:
fbasename = splitext(f)[0]
pg.config.composition = fbasename
pg(filename=f)
pg.writeOutput(fbasename + '.gr', 'gr')
# uncomment if you also need the F(Q) output
# pg.writeOutput(fbasename + '.fq', 'fq')
# --------------------------------------------------------------------
There is a brief inline documentation for the PDFGetter class and
loadPDFConfig functions, which can be displayed using
pydoc diffpy.pdfgetx.PDFGetter
pydoc diffpy.pdfgetx.loadPDFConfig
(The pydoc program comes with Python installation on Linux and Mac;
I am not sure about Windows).
Hope this helps,
Pavol
--
Dr. Pavol Juhas
Condensed Matter Physics and Materials Science Department
building 510B
Brookhaven National Laboratory
P.O. Box 5000
Upton, NY 11973-5000