Hi Frank I'm not 100% sure what you have been doing but I think the copying and pasting to get LVol values for particular sets of hkls can be maybe done in a more simple manner as shown below. If it's not clear then contact me off the list.

prm lor_h00 300 min .3 prm lor_0k0 300 min .3 prm lor_00l 300 min .3 prm lor_hkl 300 min .3 prm gauss_h00 300 min .3 prm gauss_0k0 300 min .3 prm gauss_00l 300 min .3 prm gauss_hkl 300 min .3 prm = 1 / IB_from_CS(gauss_h00, lor_h00); : 0 ' This is LVol prm = 0.89 / Voigt_FWHM_from_CS(gauss_h00, lor_h00); : 0 ' This is LVol_FWHM lor_fwhm = (0.1 Rad Lam / Cos(Th)) / IF And(K == 0, L == 0) THEN lor_h00 ELSE IF And(H == 0, L == 0) THEN lor_0k0 ELSE IF And(H == 0, K == 0) THEN lor_00L ELSE lor_hkl ENDIF ENDIF ENDIF ; gauss_fwhm = (0.1 Rad Lam / Cos(Th)) / IF And(K == 0, L == 0) THEN gauss_h00 ELSE IF And(H == 0, L == 0) THEN gauss_0k0 ELSE IF And(H == 0, K == 0) THEN gauss_00L ELSE gauss_hkl ENDIF ENDIF ENDIF ; Cheers Alan -----Original Message----- From: Frank Girgsdies [mailto:[EMAIL PROTECTED] Sent: Friday, 31 October 2008 11:29 PM To: Frank Girgsdies; Rietveld_l@ill.fr Subject: Re: Anisotropic peak broadening with TOPAS Dear Topas users, thanks to your helpful input, I've now come up with a (probably clumsy) solution to achieve my goal (see my original post far down below). For those who are interested, I'll explain it in relatively high detail, but before I do so, I want to make some statements to prevent unnecessary discussions. The reasoning behind my doing is the following: Investigating a large series of similar but somehow variable samples, my goal is to derive numerical parameters for each sample from its powder XRD. Using these parameters, I can compare and group samples, e.g. by making statements like "sample A and B are similar (or dissimilar) with respect to this parameter". Thus, the primary task is to "parametrize" the XRD results. Ideally, such parameters would have some physical meaning, like lattice parameters, crystallite size etc. However, this does not necessarily mean that I would interpret or trust parameters like e.g. LVol-IB on an absolute scale!!! After all, it is mainly relative trends I'm interested in. LVol-IB is is one of the parameters I get and tabulate if the peak broadening can be successfully described as isotropic size broadening. [For details on LVol-IB, see Topas (v3) Users Manual, sections 3.4.1 and 3.4.2)] If, however, the peak broadening is clearly anisotropic, applying the isotropic model gives inferior fit results. LVol-IB is still calculated, but more or less meaningless. Thus, I wanted an anisotropic fit model that BOTH (a) yields a satisfactory fit AND (b) still delivers parameters with a similar meaning as the isotropic LVol-IB. Applying a spherical harmonics function satisfied condition (a), but not (b) (maybe just due to my lack in mathematical insight). Applying Peter Stephens' code (but modified for size broadening) met condition (a) and brought me halfway to reach condition (b). As I did not find a way of "teaching" (coding) Topas to do all calculations I wanted in the launch mode, I developed a workaround to reach (b). Now in detail: The modified Stephens code I use looks like this: prm s400 29.52196`_2.88202 min 0 prm s040 40.52357`_4.10160 min 0 prm s004 6631.09739`_227.63909 min 0 prm s220 54.23582`_13.82762 prm s202 1454.83518`_489.04664 prm s022 5423.10499`_765.48349 prm mhkl = H^4 s400 + K^4 s040 + L^4 s004 + H^2 K^2 s220 + H^2 L^2 s202 + K^2 L^2 s022; lor_fwhm = (D_spacing^2 * Sqrt(Max(0,mhkl)) / 10000) / Cos(Th); Compared to Peters original code, I have changed the strain dependence "* Tan(Th)" into the size dependence "/ Cos(Th)" and re-arranged the remaining terms in that line of code. [Peter has mentioned that from the fundamental theoretical point of view, spherical harmonics might be better justified then his formula for the case of SIZE broadening. Anyway, it works for me from the practical point of view, thus I'll use it.] This rearrangement emphasizes the analogy between the isotropic case "c / Cos(Th)" (where c is valid for ALL peaks) and the anisotropic one, where c is replaced by the hkl dependent term (D_spacing^2 * Sqrt(Max(0,mhkl)) / 10000). Thus, I freely interpret this term as some sort of c(hkl), which I will use for some specific values of hkl to derive hkl dependent analogues of LVol-IB. The first step of this calculation I managed to code for Topas based on Peters equations, but for specifc hkl values: prm ch00 = (Lpa^2 * Sqrt(s400) / 10000); : 0.24382`_0.01190 prm c0k0 = (Lpb^2 * Sqrt(s040) / 10000); : 0.45185`_0.02287 prm c00l = (Lpc^2 * Sqrt(s004) / 10000); : 0.13114`_0.00225 As you can see, the "c(hkl)" term becomes very simple for the cases hkl = 100, 010 and 001. For these reflections, the "D_spacing" can be replaced with the corresponding reserved variables for the lattice parameters. Now, I want to calculate something like "LVol-IB(hkl)" from these "c(hkl)" values. I still don't know how to code this in launch mode, so I developed a workaround and switch back to GUI mode. In the GUI, I do the following: 1) I fix the lattice parameters to the values obtained after running the anisotropic fit in launch mode. 2) I deactivate the "Cry Size L" parameter on the "Structure" tab and add a Lorentzian type 1/Cos(Th) convolution on the "Additional Convolutions" tab instead. Both do the same thing, but only the latter has the input format I need. 3) I paste one of the "c(hkl)" values from the *.out file of the anisotropic refinement, e.g. the value calculated for ch00, into the "Value" box of that convolution and keep it fixed. Then I start the refinement. Since lattice parameters and peak shape are fixed, there is not much to be refined. Not surprisingly, I obtain an ugly looking fit in which only few reflections are adequately described (e.g. the h00 series in this case). 4) I use the "Capture" option to grab the calculated pattern which is then inserted as a new range. I export this range as a separate RAW file, then I delete the range again. 5) I repeat steps 3 and 4 for c0k0 and c00l. 6) I delete the additional convolution again and re-activate the "Cry Size L" parameter instead. I make sure that the check box for calculating LVol-IB is activated. 7) I replace the measured range with one of the previously exported calculated ranges and start the refinement. After convergence, I obtain the LVol-IB value for this particular crystal direction and write it down. [Of course, this fit will be a "perfect" one, which unfortunately means that the LVol-IB(hkl) parameter obtained will have an error calculated as zero.] 8) I repeat step 7 for the remaining two calculated patterns/crystal directions. Finally, I have three parameters LVol-IB(h00), LVol-IB(0k0) and LVol-IB(00l), which I freely interpret as "anisotropic equivalents" of the isotropic LVol-IB, which is exactly what I originally wanted. PLEASE NOTE: I definitely do NOT claim that these parameters have any real physical meaning. I just use them to "parametrize" sample XRDs exhibiting anisotropic size broadening. I have chosen this particular approach because I consider it intuitive (and I'm an intuitive guy). Of course, I will try in the future to see if there are correlations between these anisotropic "size" parameters and other experimental results, especially from the shape analysis of electron microscopy. I hope that my lengthy explanations are clear enough and maybe useful for some of you. Thanks again to all people who sent replies, especially to Peter Stephens! Of course, If someone could teach me how to replace my clumsy GUI workaround with some nice launch mode code, I'd really appreciate that... Cheers, Frank Frank Girgsdies wrote: > Dear Topas experts, > > this is my first email to the list, so if you would like > to know something about my background, please refer to > the "about me" section at the end of this mail. > > My question is concerning advanced modeling of anisotropic > peak broadening with Alan Coelhos program "Topas". > > I'm working on a transition metal mixed oxide phase of > orthorhombic symmetry. Composition, lattice parameters, > crystallite size etc. may vary from sample to sample. > I'm using Topas to fit the powder patterns with a > "structure phase". If the peaks exhibit more or less > homogeneous peak widths, I refine the "Cry Size L" > and/or "Cry Size G" parameters to model the peak > shapes. Thus, I can obtain the LVol-IB as a measure > for the average crystallite size. > > In some cases, however, I observe strongly anisotropic > peak broadening, with the 00l series of reflections > being much sharper then the hk0 and hkl reflections. > This observation fits nicely with the electron > microscopy results, where the crystals are needles of > high aspect ratio, the long axis being the c-axis of > the crystal (thus, I assume that the peak broadening > is dominated by the crystallite size effect, so > let us ignore the possibility of strain etc.). > In such case, I leave the GUI and switch to launch mode, > where I can successfully model the anisotropic peak > broadening with a second order spherical harmonics > function, following section 7.6.2. of the Topas (v3.0) > Technical Reference. So far, so good. > > However, since the peak width is now primarily a > function of hkl (i.e. the crystallographic direction) > instead of a function of 1/cos(theta), I lose the size > related information. Of course, I'm aware of the > fact that the LVol-IB parameter is based on the > 1/cos(theta) dependence and thus cannot be calculated > for a spherical harmonics model. > But the peaks still have a width, so it should be > possible somehow to calculate hkl-dependent size > parameters. And this is the point where I'm hoping > for some input from more experienced Topas users. > > I could imagine three directions of approach: > > A) The refined spherical harmonics functions > yields a set of coefficients. I'm not a mathematician, > so how to make use of these coefficients for my > purpose is beyond my comprehension. > I imagine the refined spherical harmonics function > as a 3-dimensional correction or scaling function, > which yields different values (scaling factors) > for different crystallographic directions. > Thus, it should be possible to calculate the > values for certain directions, e.g. 001 and 100. > I would expect that the ratio of these two values > is somehow correlated with the physically observed > aspect ratio of the crystal needles, or at least a > measure to quantify the "degree of anisotropy". > Is there a recipe to re-calculate (or output) these > values for certain hkl values from the set of > sh coefficients? > > B) As far as I understand the spherical harmonics > approach as given in the Topas manual, it REPLACES > the Cry Size approach. However, it might be possible > to COMBINE both functionalities instead. Within a > given series of reflections (e.g. 00l) the > 1/cos(theta) dependence might still be valid. > I could imagine that the spherical harmonics model > might be used as a secondary correction function > on top of a 1/cos(theta) model. > I think such approach would be analogous to the use > of spherical harmonics in a PO model, where the > reflection intensities are first calculated from > the crystal structure model and then re-scaled > with a spherical harmonics function to account for > PO. > If such an approach would be feasible, it should > be possible to extract not only relative (e.g. aspect > ratio) information as in A), but direction dependent > analogues of LVol-IB, e.g. LVol-IB(a), LVol-IB(b) > and LVol-IB(c) for an orthorhombic case. > > C) One could leave the spherical harmonics approach > and go to a user defined model, which refines different > Cry Size parameters for different crystal directions. > In my case, two parameters would probably be sufficient, > one for the c-direction, and a common one for the a- and > b-direction. > The Topas Technical Reference, section 7.6.3. gives a > similar example of a user defined peak broadening function, > depending on the value of l in hkl. > I could probably come up with an analogous solution > which has a 1/cos(theta) dependence and two parameters, > one for the 00l and one for the hk0 case. > My problem with this approach is how to treat the > mixed reflections hkl. I suppose they should be > scaled with a somehow weighted mix of the two > parameters, where the weighting depends on the > angle between the specific hkl and the c-axis. > However, I no idea how a physically reasonable > weighting scheme (and the corresponding Topas syntax) > should look like. > > So, if anyone has a suggestion how to realize one > or another approach to model anisotropic peak > broadening AND extract size-related parameters > using Topas, I'd be very grateful. > Please mention the letter of the approach (A, B, C) > you are referring to in your reply. > Thanks! > > And now, as this is my first mail to the list, > a brief introduction about myself: > I'm an inorganic chemist who became interested > in crystal structures and has picked up some > crystallography knowledge here and there. > I did my diploma in solid state chemistry, > using powder diffraction on perowskite-related > materials. > For my Ph.D. I turned to organometallic chemistry > to learn single crystal structure analysis on > molecular compounds, solving around 100 small > molecule crystal structures. > Now, I'm back to solid state chemistry and powder > diffraction in the context of heterogeneous > catalysis. Exploiting the structure solution > approach of the Topas software, I even managed to > solve two inorganic structures from powder data > (mainly by trial-and-error), thus bridging between > my current and former occupation. > I am a pragmatically oriented guy, i.e. I am a > "structure solver", not a real crystallographer, > because I lack the deep and thorough training > of a real crystallographer. My mathematical > and programming skills are just basic. > I tend to dive into such things just as deep as > necessary to achieve my goals. > I hope that you do not think by now that I am a > "I just push the button on that black box" > type of guy. I'm fully aware of the fact that > some insight into the things that go on inside > the "black box" is necessary to evaluate the > results for their physical relevance. > However, as my emphasis is on application of > XRD in chemistry and not on its fundamentals, > my insight naturally has its limitations. > > Cheers, > Frank > > ------------------------------------------ > Frank Girgsdies > Department of Inorganic Chemistry > Fritz Haber Institute (Max Planck Society) > ------------------------------------------ > >