Table Of Contents

Previous topic

Overview

Next topic

Example using test1.smr data set

This Page

Command-line program for Jemian/Lake desmearing

jldesmear.api.traditional is the main program to run desmearing. It provides the same command-line interface as its FORTRAN and C predecessors. The main command-line interface is started with a Python command such as:

import jldesmear.api
jldesmear.api.traditional.command_line_interface()

traditional documentation

Iterative desmearing technique of Lake to small-angle scattering data

Credits

author:Pete R. Jemian
organization:Late-Nite(tm) Software
note:lake.py was derived from lake.c in 2009
note:lake.c was derived from the FORTRAN program Lake.FOR
note:Lake.FOR 25 May 1991
see:P.R.Jemian,; Ph.D. thesis, Northwestern University (1990).
see:J.A. Lake; ACTA CRYST 23 (1967) 191-194.

Overview

This program applies the iterative desmearing technique of Lake to small-angle scattering data. The way that the program works is that the user selects a file of data (x,y,dy) to be desmeared. If a file was not chosen, the program will end. Otherwise the user is then asked to specify the slit-length (in the units of the x-axis); the x at which to begin fitting the last data points to a power-law of x, the output file name, and the number of iterations to be run. Then the data file is opened, the data is read, and the data file is closed. The program begins iterating and shows an indicator of progress on the screen in text format.

caution:It is important to only provide smeared data (data that has not been desmeared, even partially) to this program as you will see. The iterative desmearing technique should be made to iterate with the original, smeared data and subsequent trial solutions of desmeared data.

The integration technique used by this program to smear the data is the trapezoid-rule where the step-size is chosen by the spacing of the data points themselves. A linear interpolation of the data is performed. To avoid truncation effects, a power-law extrapolation of the intensity is made for all values beyond the range of available data. This region is also integrated by the trapezoid rule. The integration covers the region from l = 0 up to l = lo. (see module smear). This technique allows the slit-length weighting function to be changed without regard to the limits of integration coded into this program.

Other deconvolution methods

These authors have presented desmearing/deconvolution methods that were considered or reviewed in the development of this work.

  • O. Glatter. ACTA CRYST 7 (1974) 147-153.
  • W.E. Blass & G.W.Halsey. (1981) “Deconvolution of Absorption Spectra.” New York City: Academic Press
  • P.A. Jansson. (1984) “Deconvolution with Applications in Spectroscopy.” New York City: Academic Press.
  • G.W.Halsey & W.E. Blass. (1984) “Deconvolution Examples” in “Deconvolution with Applications in Spectroscopy.” Ed. P.A. Jansson. (see above)

Source Code Documentation

jldesmear.api.traditional.GetInf(params)[source]

Get information about the desmearing parameters. This is designed to be independent of wavelength or radiation-type (i.e. neutrons, X rays, etc.)

Parameters:params (obj) – Desmearing parameters object
Returns:params or None
jldesmear.api.traditional.callback(dsm)[source]

this function is called after every desmearing iteration from desmear.Desmearing.traditional()

Parameters:dsm (obj) – Desmearing object
Returns:should desmearing stop?
Return type:bool
jldesmear.api.traditional.command_line_interface()[source]

SAS data desmearing, by Pete R. Jemian Based on the iterative technique of PR Jemian and JA Lake. P.R.Jemian,; Ph.D. thesis, Northwestern University (1990). J.A. Lake; ACTA CRYST 23 (1967) 191-194.

$Id$
Desmear using the same command line interface as the FORTRAN & C predecessors.
jldesmear.api.traditional.no_plotting_callback(dsm)[source]

this function is called after every desmearing iteration from desmear.Desmearing.traditional()

Parameters:dsm (obj) – Desmearing object
Returns:should desmearing stop?
Return type:bool
jldesmear.api.traditional.plot_results(q, E, C)[source]

plot the results of the desmearing

Parameters:
  • q (numpy.ndarray) – magnitude of scattering vector
  • E (numpy.ndarray) – experimental (smeared) data
  • C (numpy.ndarray) – corrected (desmeared) data