XSWAVES MODIFICATION LOG (Former 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). Version 2.3 - 12.04.2010 - Oliver Bauer: 1) The FitXSW code is now "officially" named: ********************************************************** * XSWAVES - an XSW data evaluation routine for ORIGIN 8. * ********************************************************** XSWAVES is chosen as an abreviation for "X-ray Standing Wavefield Absorption for Vertical Element-specific Structure determination". Version number counting is continued, i.e. this is XSWAVES version 2.3. The .FDF fitting routines are renamed likewise. 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): it is given by the rounded absolute value (to 0 decimal places) of the displacement in energy - i.e. the rounded absolute value of the X axis shift - plus 2.5 eV. 3) The position in X and Y of the label object, which contains the information about the fit results and the input data in the "Fit # - Result" graph, is optimised. In X direction, it is chosen to be E_Bragg + 2.5 eV + xcG_XSWProfile_fitted now (was: E_Bragg + 2.5 eV - xcG_XSWProfile_fitted). Furthermore, the content of the label object is customised: the label now tells width (eV) and position (eV) of the Gaussian Response Function, too. 4) The print-out to the Script Window of ORIGIN is tidied up and modified. E.g. the Fit # is given as well as the time and date when the Result Graph is created. 5) XSWAVES automatically creates a Log file (i.e. a Notes Window) now which holds a one-to-one duplicate of the information that are printed to the current output window in ORIGIN (i.e. Script Window, the output log or the labtalk console) while the XSWAVES routine is running. 6) The Worksheet “Fit # - FitParameters – XSW Profile” is now updated to the user-defined start values and parameter, respectively, before the actual fit of the XSW Absortion Profile starts. 7) For reasons of unambiguity the XSW absorption profile special fit model parameters m_ads is renamed to m_ads2. 8) In the "Fit # - Result" plot the X and Y axis labels are modified to "photon energy (eV)" and "norm. Reflectivity / rel. absorption yield", respectively. 9) The user is now asked to enter a signal name for the XSW Absorption Profile. This signal name is printed to the label in the "Result" Graph and applied to the Worksheet / Graph names of the respective XSWAVES fit, e.g.: "Fit # - Signal name - Result". 10) 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.0, CP_ads2 = 0.0, m_ads_constraint = 0.0, CF_ads2_constraint = 0.0, CP_ads2_constraint = 0.0 11) A LabTalk Script File (Custom.ogs) is provided which allows the user to compile and start XSWAVES directly with th Custom Routine Button from ORIGIN's Standard Toolbar. If the Custom Routine Button is employed, it is no more necessary to pre-compile XSWAVES v*.C in Code Builder prior to use. To employ the Custom Routine Button on the user's system, two steps are necessary before first application of the Button: a) The Custom.ogs file has to be copied to the user's personal ORIGIN folder (e.g., \OriginLab\Origin8\User Files ), i.e. overwrite the existing file. b) The XSWAVES v2.3.C file has to be copied to the respective subfolder \OriginC (e.g., \OriginLab\Origin8\User Files\OriginC ). Version 2.31 - 29.10.2010 - Oliver Bauer: 1) Bug in NLSF fit parameter constraints fixed: The constraints to the individual parameters, e.g. CF, which were set within the FDF routines and which - by accident - were disregarded before, are now explicitly activated within the ORIGIN C code. 2) The Worksheets and the Graph Window which hold the exp. Reflectiviy data and the respective Fit Results are renamed such that their Long Names now contain the Fit # (and the input data file name if applicable). The Fit # is chosen to be the same as that of the successive NLSF XSW Absorption Profile Fit. 3) The "Fit #" which is given to the data sets is now a function of the ORIGIN C parameter nBatchProcessingCounter (before: nNLSFFitCounter). This is due to the new Batch Processing option in XSWAVES (see below): All fits are now given consequent numbers "Fit #" - independent of whether the belong to one data set (i.e. one single XSW experiement) or not. 4) Batch Processing mode: This all-new option allows scheduled fits to up to 999 datasets in a fully automated way, i.e. no user input is required at any time. Therefore this mode is only recommended to sophisticated users! If the Batch Processing mode is enabled a Batch Processing Parameters input file is required which defines input files and the respective fit parameters for every fit to be processnd during the XSWAVES run. An MS EXCEL template is provided which is meant to simplify the generation of such a Batch Processing Parameters input file. 5) A customised results output Worksheet - "XSWAVES -Results" - is created by XSWAVES which holds information about the most important fit parameters and results of the current XSWAVES run. 6) The position and the size of the Results object in the "Fit # - Results" Graph is optimised. Coming soon ... : 1) A detailed manual on XSWAVES which explains all its features.