ebook img

SAXSFit: A program for fitting small-angle x-ray and neutron scattering data PDF

0.28 MB·
Save to my drive
Quick download
Download
Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.

Preview SAXSFit: A program for fitting small-angle x-ray and neutron scattering data

SAXSFit: A program for fitting small-angle x-ray and neutron scattering data ∗ Bridget Ingham Industrial Research Limited, P. O. Box 31-310, Lower Hutt 5040, New Zealand Haiyong Li and Emily L. Allen Department of Chemical and Materials Engineering, San Jose State University, San Jose, CA 95192, USA Michael F. Toney 9 Stanford Synchrotron Radiation Lightsource, 2575 Sand Hill Road, Menlo Park, CA 94025, USA 0 (Dated: October13, 2008) 0 SAXSFit is a computer analysis program that has been developed to assist in the fitting of 2 small-angle x-ray and neutron scattering spectra primarily from nanoparticles (nanopores). The n fitting procedure yields the pore or particle size distribution and eta parameter for one or two a size distributions (which can be log-normal, Schulz, or Gaussian). A power-law and/or constant J background can also be included. The program is written in Java so as to be stand-alone and 9 platform-independent, and is designed to be easy for novices to use, with a user-friendly graphical 2 interface. ] n I. INTRODUCTION ing multiple form factor choices and background reduc- a tion routines. While these programs provide a powerful - a analysis capability, they can be complicated to use and t Small-angle x-ray scattering (SAXS) and small-angle a some are based on commercial software. This has moti- neutron scattering (SANS) are well-established and d vated the development of a simple, easy to use analysis widely used techniques for studying inhomogeneities on . package. s length scales from near-atomic scale (1 nm) up to mi- c Inthis paper,wedescribeSAXSFit -aprogramdevel- crons (1000 nm). Recently, there has been an increasing i s emphasis and importance of nanoscale materials, due to oped to fit SAXS and SANS data for systems of parti- y cles or pores with a distribution of particle (pore) sizes. the distinct physical and chemical properties inherent in h SAXSFit is easy to use and applicable to a wide variety p these materials [1, 2]. This, together with the signifi- of materials systems. The program is most appropriate [ cantadvancesinX-rayandneutronsources,hasresulted tolowconcentrationsofparticlesorpores,duetotheap- in the dramatically increased use of SAXS and SANS 1 proximations used, but it does account for interparticle forcharacterizingnanoscalematerialsandself-assembled v scattering within the local monodisperse approximation 2 systems. Forexample,thesetechniquesareusedtoinves- [9]. TheprogramisbasedonJavaandisreadilyportable 8 tigate polymer blends, microemulsions, geological mate- withauser-friendlygraphicalinterface. Theemphasisof 7 rials,bones, cements, ceramicsand nanoparticles. These SAXSFit is to provide an easy-to-use analysis package 4 measurements are often made over a range of length 1. scales and in real time during materials processing or primarily for novices, but also of use to experts. 0 other reactions such as synthesis. However, there has 9 been less progress in SAXS and SANS data analysis, al- 0 thoughsome analysissoftwareis available. For example, II. SOFTWARE DESCRIPTION AND USE : v programsbasedonIGORProprimarilyforthereduction i andanalysisofSANSandultra-small-angleneutronscat- SAXSFit is written in Java (SDK 1.4.2) and provides X tering (USANS) are available from NIST [3]. PRINSAS a graphical user interface (Figure 1) to select and ad- r has been developed for the analysis of SANS, USANS justparametersto be usedinthe fit,changethe plotting a and SAXS data for geological samples and other porous display and range of data to be used, calculating ‘initial media [4]. PRIMUS and ATSAS 2.1 are used primarily guess’ patterns and running the fit. It uses the algo- fortheanalysisofbiologicalmacromoleculesinsolutions, rithms of a Matlab-based program [10]. The advantage but can be used for other systems such as nanoparticles ofusingJavaistoprovideastand-aloneprogramwhichis and polymers [5, 6]. FISH is another SANS and USANS platform-independent, along with having a user-friendly fitting program developed at ISIS [7]. The Indra and graphical interface. SAXSFit is also available as a Win- IrenaUSAXSdatareductionandanalysispackagedevel- dows executable. oped at APS [8] is also based on IGOR. Both of these SAXSFit can read ASCII data files (comma, space, or latter programs offer several advanced features, includ- tab delimited), with or without a non-numerical header, whichconsistoftwocolumn(q,I(q))orthree-column(q, I(q), error bars) data. Any subsequent columns in the data file are ignored. Once a data curve is successfully ∗Correspondingauthor: [email protected] imported from an input file, it is plotted in a separate 2 FIG. 1: Screen dump of theSAXSFit graphical userinterface and plot window. window and the fitting buttons are enabled. The error final parameters are also displayed on the control panel. bars are alsoplotted if the input file containsthem. The Users must be aware of the assumptions made in the plot can be manipulated by changing the q-range and modeling of the data, which uses a hard sphere model selecting whether it is log-logor linear. Initial guess and withalocalmonodisperseapproximation. Stronglyinter- fittedcurvesaredisplayedwhentheyarecalculated. The actingsystems,forexamplesystemswithahighdegreeof q-min and q-max values of the data to be fitted are also periodicity, are outside the scope of this approximation. shown as vertical lines and can be altered by changing The user is responsible for understanding the applicabil- the appropriate text boxes. Several fitting parameters ity of this approximation to their system, and ensuring are available, with the option to fit or fix their values. that the fitted results are physically meaningful. Threedistributionsofparticle/poresizesareavailable: log-normal, Schulz and Gaussian. These use the same III. MATHEMATICAL DETAILS two fitting parameters, ‘particle/pore size’ (r0) and ‘dis- persion’(σ), andaredetailed inSection IIIA. The units for the pore size are the inverse of the units of the data The small angle scattering intensity I(q) is related to (i.e. ˚A for data in ˚A−1, or nm for data in nm−1). A the scattering cross section ddΩσ(q) by secondsizedistributioncanalsobeincludedinthefit. It has been shown that the choice of distribution function dσ does not dramatically affect the final result [11, 12]. A I(q)=φ0At(∆Ω)dΩ(q) (1) constant background and/or power law Aq−B can also be included. whereφ0 istheincidentflux(numberofphotons,orneu- trons, per area per second), A is the illuminated area on Advanced options include the ability to change the the sample,t is the samplethickness and∆Ω isthe solid maximum number of iterations and the weighting of the angle subtended by a pixel in the detector [13]. data. Againthereareseveraloptions: aconstantweight- For SAXS, the scattering cross-section is calculated ing(w =1),statisticalweighting(w =1/I(q)),oruncer- from the structure factor and particle/pore size distri- tainty weighting (w = 1/∆I(q)2 - only applicable where bution from data error bars (∆I(q)) have been imported). Two output files are produced, consisting of the fit (a ∞ dσ 2 2 2 two-column ASCII file) and a log file (plain text) show- (q)=r (∆ρ) N n(r)[f(qr)] S(qr)dr (2) ing the values of the parameters at each iteration of the dΩ e Z0 fitting process, and the final result including parameter where r is the electron radius, ∆ρ is the electron den- e 2 2 uncertainties,reduced χ andgoodness offit (R value). sity contrast, N is the number density, n(r) is the num- These are described in more detail in Section IIIE. The ber fraction particle/pore size distribution (normalized 3 so that the integral over r is unity), f(qr) is the spheri- 2. Schulz distribution cal form factor, and S(qr) is the structure factor. These terms are defined in the following sections. The final equation for the intensity used by the program is exp( ZX) n(r)=ZZXZ−1 − ∞ rΓ(Z) 2 I(q)=c n(r)[f(qr)] S(qr)dr (3) Z0 where Z = σ12, X = rr0, and Γ(Z) is the Gamma func- tion, defined x R by Γ(x+1)=xΓ(x), and Γ(1)=1 where the scale factor c is a fitted parameter, equivalent ∀ ∈ [14]. The Schulz distribution is frequently used in SANS to analysis. It is physically reasonable in that it is skewed towardslargesizesandhasa shapeclosetoalog-normal c=φ0At(∆Ω)re2(∆ρ)2N (4) distribution. AsZ →∞itapproachesaGaussiandistri- bution [15]. For SANS an expression similar to Eq. 4 holds. The data are modeled using a hard-sphere model with local monodisperse approximation [9]. This model 3. Gaussian distribution assumes that the particles are spherical and locally monodisperse in size. In other words, the particle po- sitions are correlated with their size. This is a good ap- 2 proximation for systems with large polydispersity and 1 1 r r0 n(r)= exp − tthhee appaprtriocxleims aatrieonfoprrothviedemsomsteapnairntgfnuoltreinsuteltrs-cpornonveidctinedg σ√2π "−2(cid:18) σ (cid:19) # (e.g., the particle concentration is not too high) and are The Gaussian distribution is symmetric about the not spatially periodic. For porous systems (with not too mean, r0, and has variance (r0σ)2. In practise it is only high pore concentration), the ‘particle’ radius is equiva- useful for systems with low polydispersity (small σ). lent to the pore size. B. Spherical form factor, f(qr) A. Particle/pore size distribution, n(r) Thesphericalformfactorhasthefollowingform[9,16]: The user has the choice of three pore/particle size distributions, which use the same fitting parameters r0 sin(qr) cos(qr)qr (‘pore size’ radius) and σ (‘dispersion’). If two size dis- f(qr)=rπr3 − tributions are selected, the distribution function is ex- (qr)3 (cid:20) (cid:21) panded to have the form: C. Structure factor, S(qr) n(r)=(1 λ)n1(r,r0,1,σ1)+λn2(r,r0,2,σ2) − Thestructurefactorfollowsthelocalmonodisperseap- whereλisthenumberfractionoftheseconddistribution proximation (LMA) for hard spheres [9, 17], given by and r0,j and σj are the r0 and σ parameters for the jth distribution. For example, a 50:50 mixture by number fraction would have λ = 0.5. To model a situation in- S(qR )=[1+24ηG(qR )/(qR )]−1 HS HS HS volving a mixture with differing contrasts, λ would be weighted by the different contrast values. The user has where η is the dimensionless parameter eta (sometimes a choice of three distributions, as follows. referred to as the hard sphere volume fraction, hav- ing a value between 0 and 1), R is the hard sphere HS pore/particle radius, defined as R = Cr, where C re- HS 1. Log normal distribution lates the hard-sphere radius to the physical particle ra- dius [9], and G(qR ) has the form: HS 2 2 ln r G(A)=α(sinA AcosA)/A + 1 r0 1 − n(r)=exp 2 3 −2h (cid:16)σ2(cid:17)i · rσ√2π β[2AsinA+(2 A )cosA 2]/A + − − 4 2   γ( A cosA+4[(3A 6)cosA+   − − This has a maximum at r = r0exp σ2 , a mean of (A3 6A)sinA+6])/A5 − − r0exp −2σ2 , and variance r02 exp 2σ(cid:0)2 −(cid:1)exp σ2 . (cid:16) (cid:17) (cid:2) (cid:0) (cid:1) (cid:0) (cid:1)(cid:3) 4 where (12η)2 α= (1 η)4 − 2 (1+η/2) β = 6η − (1 η)4 − γ =ηα/2 When a second size distribution is included in the fit, it has the same C-parameter and η values as the first distribution. To set the structure factor to unity, one simplysetsη =0. Thisisappropriatefordilutesystems. FIG. 2: Examples of data from nanoporous silsesquioxane films, with different porogen loadings. Open symbols: raw D. Fitting routine details data. Lines: fitted curves using SAXSFit. Theprogramusesaleast-squaresfitting routinewhich follows the Levenberg-Marquardt non-linear regression method to minimize the reduced χ2. The integrals are C =(JTWJ)−1 calculated using the Romberg integration method with 210intervals. Sincetheintegral1musthavefinitebounds whereJ isthe Jacobianmatrixofpartialderivativesand on r, these are chosen based on the range of the distri- W is a diagonal matrix where W is the weighting on bution function n(r), such that n(r) < 1 10−15. The the ith data point [18]. Finally thiei reported parameter × bounds are calculated numerically as follows: uncertainties are twice the square root of the diagonals For the log-normaland Schulz distributions, the lower of C, i.e. δP =2√C . This is two standard deviations, i ii bound is r0exp( 8σ) and the upper bound r0exp(8σ). which for a Gaussian distribution of errors represents a − For the Gaussian distribution, the lower bound is the 95% confidence interval. maximum of zero or r0 8σ, and the upper bound is − r0+8σ. IV. EXAMPLES E. Statistical analysis Figure 2 shows examples of data and the fitted result for nanoporous methyl silsesquioxane films [17], formed Thereducedχ2 andR2 (goodnessoffit)fromthenon- byspin-coatingasolutionofthesilsesquioxanealongwith linear regression are reported at the end of the fitting a sacrificial polymer (‘porogen’), and then annealing to procedure. These are common statistical measures and remove the polymer and leave behind a nanoporous net- defined as follows: work. As the proportion of porogen is increased, the pores are observed to increase in size [17]. Data are shown for films with porogen loadings of 5 to 25 % with Reduced χ2 = 1 w (y F(x ))2 thebackground(frommethylsilsesquioxane)subtracted. i i i n p − A single log-normal size distribution was fitted to each, − i X the C-parameter was fixed at 1.1, η was fixed to the where n is the number of data points, p is the number porosity (as determined from the porogen loading), and of free parameters,w are the weightings, y is the input no background function was used. The results obtained i i data I(q) and F(x) is the calculated I(q). aregiveninTableIandshowanincreaseintheporesize withincreasedporogenloadings,ingoodagreementwith electron microscopy and previous results [17]. 2 R2 =1 i(yi−F(xi)) Figure 3 shows data from a nanoporous glass using a − 2 threearmstarshapedpolymerastheporogen[19],which P y F(x) i i− was found to exhibit two pore size distributions. P (cid:16) (cid:17) The parameters for the fit are as follows: where yi and F(xi) are defined above, and F(x) is the First distribution: r0 =50.5 0.5,σ=0.287 0.008. ± ± average of the F(x) values (a constant). Second distribution: r0 =15 1,σ =0.23 0.05. ± ± The parameter uncertainties are obtained by calculat- The numberfractionofthe seconddistributionwas88 ing the covariance matrix C , from 2 %, which equates to a volume of 16 5 %. The ij ± ± 5 Porogen loading 5% 10% 15% 25% Pore size radius (˚A) 18.77 ± 0.14 16.94 ± 0.06 22.42 ± 0.05 31.67 ± 0.06 Dispersion 0.305 ± 0.004 0.382 ± 0.002 0.367 ± 0.001 0.370 ± 0.001 Reducedχ2 1.105 2.117 2.913 2.023 R2 (degree of fit) 0.9771 0.9858 0.9952 0.9976 TABLE I: Fitted parameters for nanoporous silsequioxane film samples shown in Figure 2. The pore radii differ from that reported byHuangetal. [17]duetoa slightly differentform used for thelog-normal distribution. Whenplotted as afunction of radius the distributions needed to fit thedata are identical. (tested on Linux Ubuntu and Mac OS X10.4). The SAXSFit programs and user manual are available from http://www.irl.cri.nz/SAXSfiles.aspx . VI. SUMMARY SAXSFit is a useful program for fitting small angle x-ray and neutron scattering data, using a hard sphere modelwithlocalmonodisperseapproximation. SAXSFit provides an easy-to-use analysis package for novices and FIG.3: Exampleofdatafromnanoporousglass,showingtwo experts. It is stand-alone software and can be used in a poresizedistributions. Opensymbols: rawdata. Line: fitted curveusing SAXSFit. variety of software environments. Acknowledgments parameter η was the same for both distributions (η = 0.18 0.01) and the C-parameter was fixed at 1.1 for Funding was provided in part by the New Zealand both±distributions. TheR2valuewas0.9951andreduced Foundation for Research, Science and Technology under χ2 3.33. contract CO8X0409. Portions of this research were car- ried out at the Stanford Synchrotron Radiation Labora- tory,anationaluserfacilityoperatedbyStanfordUniver- V. SOFTWARE AVAILABILITY AND SYSTEM sityonbehalfoftheU.S.DepartmentofEnergy,Officeof REQUIREMENTS Basic Energy Sciences. The authors also wish to thank Benjamin Gilbert, Shirlaine Koh, and Eleanor Schofield SAXSFit is providedas a Windows executable (tested for testing and helpful suggestions for improvement,and on Windows 98, 2000 and XP), or Java .jar executable Peter Ingham for assistance with the coding. [1] P.Frazel; J. Appl. Cryst. 36 (2003) 397. irena.html [2] J.S.Pedersen;Neutrons, X-rays andLightScattering,P. [9] J. S.Pedersen; J. Appl. Cryst. 27 (1994) 595. Linder and T. Zemb (eds.), Amsterdam, North Holland [10] H. Li; Masters Project Report, Department of Chemical (2002) pp.127-144. and Materials Engineering, San Jose State University, [3] S.R. Kline; J. Appl. Cryst. 39 (2006) 895. U.S.A. [4] A.L. Hinde;J. Appl. Cryst. 37 1020. [11] E. Caponetti, M. A. Floriano, E. Di Dio and R. Triolo; [5] P. V. Konarev, V. V. Volkov, A. V. Sokolava, M. H. J. J. Appl. Cryst. 26 (1993) 612. KochandD.I.Svergun;J. Appl. Cryst. 36(2003) 1277. [12] N.Kucerka,M.A.KiselevandP.Balgavy;Eur.Biophys. [6] P.V.Konarev,M.V.Petoukhov,V.V.VolkovandD.I. J. 33 (2004) 328. Svergun;J. Appl. Cryst. 39 (2006) 277. [13] O.GlatterandO.Kratky;SmallAngleX-rayScattering. [7] R. K. Heenan; http://www.isis.rl.ac.uk/LargeScale/ Academic Press, London (1982). LOQ/FISH/FISH intro.htm [14] H. T. Lau; A Numerical Library in Java for Scientists [8] J. Ilavsky; http://usaxs.xor.aps.anl.gov/staff/ilavsky/ and Engineers. CRC Press, Boca Raton (2004). 6 [15] P.BartlettandR.H.Ottewill;J.Chem.Phys.96(1992) Phys. Lett. 81 (2002) 2232. 3306. [18] B.H.TobyandS.J.L.Billinge; ActaCryst.A60(2004) [16] D. J. Kinning and E. L. Thomas; Macromolecules 17 315. (1984) 1712. [19] J. L. Hedrick, T. Magbitang, E. F. Connor, T. Glauser, [17] E. Huang, M. F. Toney, W. Volksen, D. Mecerreyes, P. W. Volksen, C. J. Hawker, V. Y. Lee and R. D. Miller; Brock, H. C. Kim, C. J. Hawker, J. L. Hedrick, V. Y. Chem. Eur. J. 8 (2002) 3308. Lee, T. Magbitang, R. D. Miller, and L. B. Lurio; Appl.

See more

The list of books you might like

Most books are stored in the elastic cloud where traffic is expensive. For this reason, we have a limit on daily download.