FitXSW MODIFICATION LOG **************************************************************************************************************************************************************************************************** General remarks: Remember to CLOSE CODE BUILDER after compilation of the Origin C file and BEFORE RUNNING THE ACTUAL PROGRAM. Otherwise the program will tremendously be slowed down or ORIGIN might even crash!!! (This is caused by a time-consuming debugging mode which is active if Code BUilder is still open - FDF routines (especially if they include loops) are just to heavy to be properly computed while debugging mode is active ...) **************************************************************************************************************************************************************************************************** Version 1.1 - 07.07.2009 - Oliver Bauer: 1) Parameter Initialisation for the Reflectivity fit has been optimized in order to speed-up the fit. 2) The fitting routines (*.FDF files) for both, the reflectivity as well as the XSW absorption data, have been refurbished such that the overall computation time is reduced by 30%. Several new options have been included: 3) The user can now decide to repeat the XSW absorption profile fit without having to repeat the reflectivity fit => differential analysis is enabled. 4) The integration stepsize for solving the convolution can now be decreased by a factor of 10 as compared to the default settings which is 0.15 eV or smaller (it depends on the experimental photon energy stepsize...). This of course costs some computation time. 5) The user can now change the start values of the fit parameters and choose the option of error weighting for both, the reflectivity curve fit as well as the XSW absoprtion profile fit, if desired. 6) The user can now extend the convolution integral if desired (default setting: +/- 2.5 eV). 7) The user is now offered a so-called "special fit model" option which allows to fit the exp. XSW absorption profile with a linear combination of two theoretical XSW profiles (two distinct adsorption heights or one distinct adsorption height plus incoherent clusters with CF = 0, respectivley), i.e. y = (1 - m_ads) * (XSW profile 1 with CF1, CP1) + m_ads * (XSW profile 2 with CF2, CP2) Version 2.0 - 08.07.2009 - Oliver Bauer: 1) The theoretical curves for both, the Reflectivity as well as the XSW absorption profile, are now convoluted with a Gaussian and the squared Monochromator reflectivity. The latter mimics the X-ray beam divergence while the earlier resembles instrumental broadening due to the substrate mosaicity, e.g. In both cases the convolution of the theoretical curve, i.e. Reflectivity or XSW absorption profile, respectively, with the squared Monochromator reflectivity is done via FFT convolution which is an Origin C global function. The subsequent convolution of the resulting, so-called "ideal" curves with the Gaussian function is done by explicitly solving the convolution integral over t where t ranges over the experimental photon energy range plus/minus some eV (default setting: +/- 2.5 ev). Version 2.1 - 17.09.2009 - Oliver Bauer: 1) The constraints for the coherent position in the XSW absorption profile fit - i.e. the fit parameters CP - is lifted: The constraint used to be 0 <= CP <= 1; now CP is let free to the fit in order to allow the fit to proceed when the coherent position is close to 0 or 1, respectively. 2) m_ads and CF_ads2 (these parameters are used in the special fit model) are both constrained to values between 0 and 1. 3) Typographs in source code are corrected which prevented the C code from being compiled in OriginPro 8 SR6. 4) The Bragg energy for the monochromator Si crystals is now taken to be equal to the calculated substrate Bragg energy whereas it used to equal the beam energy taken from the parameter file. 5) The default settings for the XSW absorption profile special fit model parameters m_ads, CF_ads2 and CP_ads2 and their respective constraints - i.e. parameter fixed (0) or free to fit (1) - are changed to: m_ads = 0.5, CF_ads2 = 0.5, CP_ads2 = 0.5, m_ads_constraint = 0.0, CF_ads2_constraint = 0.0, CP_ads2_constraint = 0.0 Version 2.2 - 11.02.2010 - Oliver Bauer: 1) The integration stepsize for solving the convolution integral is constrained to 0.10 eV (maximum) now (before: 0.15 eV); e.g. for exp. photon energy stepsizes up to 0.4 eV (before: 0.3 eV), the integration stepsize is taken to be 1/4 of that value (before: 1/2). 2) The default value for the +/- extension of the convolution interval is now a function of the displacement in energy of the exp. Reflectivity curve versus the theoretical Reflectivity curve (minimum: 2.5 eV; enlarged in steps of 2.5 eV). 3) A new option (X axis shift) is implemented into the fitting process: if requested the X axis of the theoretical XSW fitting curves/routines is shifted such that the maxima of the experimental and the theoretical curves are aligned within the exp. accuracy: max( exp. Reflectivity ) = E_Bragg(shitfed) + 0.35 eV If this option is enabled the +/- extension of the convolution interval is fixed to 2.5 eV. This option is meant to save computation time in thsoe cases where the maximum of the exp. Reflectivity is strongly shifted with respect to the theoretical preditcions. 4) A (new) rounding-error problem in the computation of the integration stepsize dt is overcome by substracting a "precision factor" = 1e-9 from the user-defined/default value for the +/- extension of the convolution interval. This is done in the ORIGIN C code as well as within the NLSF fitting routines (FDF files).