Sld Calculator

sans.calculator.sld_calculator

This module intends to compute the neutron scattering length density of a molecule.It uses methods of the periodictable package to provide easy user interface for Sld calculator applications.

class sans.calculator.sld_calculator.SldCalculator

Bases: object

Given a molecule, a density and a wavelength, this class determine scattering length density.

Example: To get the sld value and the length 1/e the following methods need to be called in this later order:

formula = "H2O"
density = 1.0
wavelength = 6.0
sld_calculator = SldCalculator()
sld_calculator.set_value(formula, density, wavelength) 
sld_real, sld_im, _ = sld_calculator.calculate_neutron_sld()
result : sld = sld_real +i sld_im

Note: set_value() and calculate_neutron_sld() methods must be called in this order prior calling calculate_length() to get the proper result.

calculate_length()
Compute the neutron 1/e length
calculate_neutron_sld()
Compute the neutron SLD for a given molecule @return sld_real : real part of the sld value @return sld_im: imaginary part of the sld value @return inc: incoherence cross section
calculate_xray_sld(element)
Get an element and compute the corresponding SLD for a given formula @param element: elementis a string of existing atom
set_value(formula, density, wavelength=6.0)
Store values into the sld calculator and compute the corresponding volume.

Table Of Contents

Previous topic

Reference

Next topic

Slit Length Calculator

This Page