sas.models package

Subpackages

Submodules

sas.models.AddComponent module

Provide base functionality for all model components

author:Mathieu Doucet / UTK
contact:mathieu.doucet@nist.gov
class sas.models.AddComponent.AddComponent(base=None, other=None)[source]

Bases: sas.models.BaseComponent.BaseComponent

Basic model component for Addition Provides basic arithmetics

getParam(name)[source]

Set the value of a model parameter

Parameters:name – name of the parameter
Returns:value of the parameter
getParamList()[source]

Return a list of all available parameters for the model

run(x=0)[source]

Evaluate each part of the component and sum the results

Parameters:x – input parameter
Returns:value of the model at x
runXY(x=0)[source]

Evaluate each part of the component and sum the results

Parameters:x – input parameter
Returns:value of the model at x
setParam(name, value)[source]

Set the value of a model parameter

Parameters:
  • name – name of parameter to set
  • value – value to give the paramter

sas.models.BCCrystalModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/bcc.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.BCCrystalModel.BCCrystalModel(multfactor=1)[source]

Bases: CBCCrystalModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a BCCrystalModel model. This file was auto-generated from src/sas/models/include/bcc.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • dnn = 220.0 [A]
  • d_factor = 0.06
  • radius = 40.0 [A]
  • sldSph = 3e-06 [1/A^(2)]
  • sldSolv = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • theta = 0.0 [deg]
  • phi = 0.0 [deg]
  • psi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.BCCrystalModel.create_BCCrystalModel()[source]

Create a model instance

sas.models.BEPolyelectrolyte module

Provide F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2) *(q^(2)-(12*h*C/b^(2))) BEPolyelectrolyte as a BaseComponent model

class sas.models.BEPolyelectrolyte.BEPolyelectrolyte[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a BEPolyelectrolyte.

F(x) = K*1/(4*pi*Lb*(alpha)^(2))*(q^(2)+k2)/(1+(r02)^(2))*(q^(2)+k2) *(q^(2)-(12*h*C/b^(2)))

The model has Eight parameters:
K = Constrast factor of the polymer Lb = Bjerrum length H = virial parameter B = monomer length Cs = Concentration of monovalent salt alpha = ionazation degree C = polymer molar concentration bkd = background
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (debye value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: debye value

sas.models.BarBellModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/barbell.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.BarBellModel.BarBellModel(multfactor=1)[source]

Bases: CBarBellModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a BarBellModel model. This file was auto-generated from src/sas/models/include/barbell.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • rad_bar = 20.0 [A]
  • len_bar = 400.0 [A]
  • rad_bell = 40.0 [A]
  • sld_barbell = 1e-06 [1/A^(2)]
  • sld_solv = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • theta = 0.0 [deg]
  • phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.BarBellModel.create_BarBellModel()[source]

Create a model instance

sas.models.BaseComponent module

Provide base functionality for all model components

class sas.models.BaseComponent.BaseComponent[source]

Basic model component

Since version 0.5.0, basic operations are no longer supported.

calculate_ER()[source]

Calculate effective radius

calculate_VR()[source]

Calculate volume fraction ratio

clone()[source]

Returns a new object identical to the current object

evalDistribution(qdist)[source]

Evaluate a distribution of q-values.

  • For 1D, a numpy array is expected as input:

    evalDistribution(q)
    

    where q is a numpy array.

  • For 2D, a list of numpy arrays are expected: [qx_prime,qy_prime], where 1D arrays,

    qx_prime = [ qx[0], qx[1], qx[2], ....]
    

    and

    qy_prime = [ qy[0], qy[1], qy[2], ....] 
    

Then get

q = numpy.sqrt(qx_prime^2+qy_prime^2)

that is a qr in 1D array;

q = [q[0], q[1], q[2], ....] 
..note::
Due to 2D speed issue, no anisotropic scattering is supported for python models, thus C-models should have their own evalDistribution methods.

The method is then called the following way:

evalDistribution(q)

where q is a numpy array.

Parameters:qdist – ndarray of scalar q-values or list [qx,qy] where qx,qy are 1D ndarrays
getDispParamList()[source]

Return a list of all available parameters for the model

getParam(name)[source]

Set the value of a model parameter

Parameters:name – name of the parameter
getParamList()[source]

Return a list of all available parameters for the model

getParamListWithToken(token, member)[source]

get Param List With Token

getParamWithToken(name, token, member)[source]

get Param With Token

getProfile()[source]

Get SLD profile

: return: (z, beta) where z is a list of depth of the transition points
beta is a list of the corresponding SLD values
is_fittable(par_name)[source]

Check if a given parameter is fittable or not

Parameters:par_name – the parameter name to check
run(x)[source]

run 1d

runXY(x)[source]

run 2d

setParam(name, value)[source]

Set the value of a model parameter

Parameters:
  • name – name of the parameter
  • value – value of the parameter
setParamWithToken(name, value, token, member)[source]

set Param With Token

set_dispersion(parameter, dispersion)[source]

model dispersions

sas.models.BaseModel module

Provide base functionality for all model components

The following has changed since going from BaseComponent to BaseModel:

  • Arithmetic operation between models is no longer supported. It was found to be of little use and not very flexible.
  • Parameters are now stored as Parameter object to provide the necessary extra information like limits, units, etc...
class sas.models.BaseModel.BaseModel[source]

Bases: sas.models.ModelAdaptor.ModelAdaptor

Basic model component

calculate_ER()[source]
clone()[source]

Returns a new object identical to the current object

getParam(name)[source]

Set the value of a model parameter

Parameters:
  • name – name of the parameter
  • value – value of the parameter
getParamList()[source]

Return a list of all available parameters for the model

name = 'BaseModel'
run(x=0)[source]
runXY(x=0)[source]
setParam(name, value)[source]

Set the value of a model parameter

Parameters:
  • name – name of the parameter
  • value – value of the parameter
class sas.models.BaseModel.Parameter(name, value)[source]

Bases: object

Parameter class

name = ''
value = 0.0
class sas.models.BaseModel.ParameterProperty(name, **kw)[source]

Bases: object

Parameter property allow direct access to the parameter values

sas.models.BinaryHSModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/binaryHS.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.BinaryHSModel.BinaryHSModel(multfactor=1)[source]

Bases: CBinaryHSModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a BinaryHSModel model. This file was auto-generated from src/sas/models/include/binaryHS.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • l_radius = 100.0 [A]
  • s_radius = 25.0 [A]
  • vol_frac_ls = 0.1
  • vol_frac_ss = 0.2
  • ls_sld = 3.5e-06 [1/A^(2)]
  • ss_sld = 5e-07 [1/A^(2)]
  • solvent_sld = 6.36e-06 [1/A^(2)]
  • background = 0.001 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.BinaryHSModel.create_BinaryHSModel()[source]

Create a model instance

sas.models.BroadPeakModel module

BroadPeakModel function as a BaseComponent model

class sas.models.BroadPeakModel.BroadPeakModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a BroadPeakModel. I(q) = I(q) = scale_p/pow(qval,exponent)+scale_l/ (1.0 + pow((qval*length_l),exponent_l) )+ background

run(x=0.0)[source]

Evaluate the model

param x: input q-value (float or [float, float] as [r, theta]) return: (scattering value)

runXY(x=0.0)[source]

Evaluate the model

param x: input q-value (float or [float, float] as [qx, qy]) return: scattering value

sas.models.CSParallelepipedModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/csparallelepiped.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CSParallelepipedModel.CSParallelepipedModel(multfactor=1)[source]

Bases: CCSParallelepipedModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CSParallelepipedModel model. This file was auto-generated from src/sas/models/include/csparallelepiped.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • shortA = 35.0 [A]
  • midB = 75.0 [A]
  • longC = 400.0 [A]
  • rimA = 10.0 [A]
  • rimB = 10.0 [A]
  • rimC = 10.0 [A]
  • sld_rimA = 2e-06 [1/A^(2)]
  • sld_rimB = 4e-06 [1/A^(2)]
  • sld_rimC = 2e-06 [1/A^(2)]
  • sld_pcore = 1e-06 [1/A^(2)]
  • sld_solv = 6e-06 [1/A^(2)]
  • background = 0.06 [1/cm]
  • parallel_theta = 0.0 [deg]
  • parallel_phi = 0.0 [deg]
  • parallel_psi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CSParallelepipedModel.create_CSParallelepipedModel()[source]

Create a model instance

sas.models.CappedCylinderModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/capcyl.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CappedCylinderModel.CappedCylinderModel(multfactor=1)[source]

Bases: CCappedCylinderModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CappedCylinderModel model. This file was auto-generated from src/sas/models/include/capcyl.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • rad_cyl = 20.0 [A]
  • len_cyl = 400.0 [A]
  • rad_cap = 40.0 [A]
  • sld_capcyl = 1e-06 [1/A^(2)]
  • sld_solv = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • theta = 0.0 [deg]
  • phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CappedCylinderModel.create_CappedCylinderModel()[source]

Create a model instance

sas.models.Constant module

Provide constant function as a BaseComponent model

class sas.models.Constant.Constant[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a constant model. List of default parameters:

  • value = 1.0
clone()[source]

Return a identical copy of self

run(x=0.0)[source]

Evaluate the model @param x: unused @return: (constant value)

runXY(x=0.0)[source]

Evaluate the model @param x: unused @return: constant value

sas.models.Core2ndMomentModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/coresecondmoment.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.Core2ndMomentModel.Core2ndMomentModel(multfactor=1)[source]

Bases: CCore2ndMomentModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a Core2ndMomentModel model. This file was auto-generated from src/sas/models/include/coresecondmoment.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • density_poly = 0.7 [g/cm^(3)]
  • sld_poly = 1.5e-06 [1/A^(2)]
  • radius_core = 500.0 [A]
  • volf_cores = 0.14
  • ads_amount = 1.9 [mg/m^(2)]
  • sld_solv = 6.3e-06 [1/A^(2)]
  • second_moment = 23.0 [A]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.Core2ndMomentModel.create_Core2ndMomentModel()[source]

Create a model instance

sas.models.CoreFourShellModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/corefourshell.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CoreFourShellModel.CoreFourShellModel(multfactor=1)[source]

Bases: CCoreFourShellModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CoreFourShellModel model. This file was auto-generated from src/sas/models/include/corefourshell.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • rad_core0 = 60.0 [A]
  • sld_core0 = 6.4e-06 [1/A^(2)]
  • thick_shell1 = 10.0 [A]
  • sld_shell1 = 1e-06 [1/A^(2)]
  • thick_shell2 = 10.0 [A]
  • sld_shell2 = 2e-06 [1/A^(2)]
  • thick_shell3 = 10.0 [A]
  • sld_shell3 = 3e-06 [1/A^(2)]
  • thick_shell4 = 10.0 [A]
  • sld_shell4 = 4e-06 [1/A^(2)]
  • sld_solv = 6.4e-06 [1/A^(2)]
  • background = 0.001 [1/cm]
  • M0_sld_shell1 = 0.0 [1/A^(2)]
  • M_theta_shell1 = 0.0 [deg]
  • M_phi_shell1 = 0.0 [deg]
  • M0_sld_shell2 = 0.0 [1/A^(2)]
  • M_theta_shell2 = 0.0 [deg]
  • M_phi_shell2 = 0.0 [deg]
  • M0_sld_shell3 = 0.0 [1/A^(2)]
  • M_theta_shell3 = 0.0 [deg]
  • M_phi_shell3 = 0.0 [deg]
  • M0_sld_shell4 = 0.0 [1/A^(2)]
  • M_theta_shell4 = 0.0 [deg]
  • M_phi_shell4 = 0.0 [deg]
  • M0_sld_core0 = 0.0 [1/A^(2)]
  • M_theta_core0 = 0.0 [deg]
  • M_phi_core0 = 0.0 [deg]
  • M0_sld_solv = 0.0 [1/A^(2)]
  • M_theta_solv = 0.0 [deg]
  • M_phi_solv = 0.0 [deg]
  • Up_frac_i = 0.5 [u/(u+d)]
  • Up_frac_f = 0.5 [u/(u+d)]
  • Up_theta = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CoreFourShellModel.create_CoreFourShellModel()[source]

Create a model instance

sas.models.CoreMultiShellModel module

Core-Multi-Shell model

class sas.models.CoreMultiShellModel.CoreMultiShellModel(multfactor=1)[source]

Bases: sas.models.BaseComponent.BaseComponent

This multi-model is based on CoreFourShellModel and provides the capability of changing the number of shells between 1 and 4.

calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
evalDistribution(x=[])[source]

Evaluate the model in cartesian coordinates

: param x: input q[], or [qx[], qy[]] : return: scattering function P(q[])

getProfile()[source]

Get SLD profile

: return: (r, beta) where r is a list of radius of the transition points
beta is a list of the corresponding SLD values

: Note: This works only for func_shell# = 2.

run(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [r, theta]) : return: (DAB value)

runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: DAB value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.CoreShellBicelleModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/core_shell_bicelle.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CoreShellBicelleModel.CoreShellBicelleModel(multfactor=1)[source]

Bases: CCoreShellBicelleModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CoreShellBicelleModel model. This file was auto-generated from src/sas/models/include/core_shell_bicelle.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius = 20.0 [A]
  • scale = 1.0
  • rim_thick = 10.0 [A]
  • face_thick = 10.0 [A]
  • length = 400.0 [A]
  • core_sld = 1e-06 [1/A^(2)]
  • face_sld = 4e-06 [1/A^(2)]
  • rim_sld = 4e-06 [1/A^(2)]
  • solvent_sld = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • axis_theta = 90.0 [deg]
  • axis_phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CoreShellBicelleModel.create_CoreShellBicelleModel()[source]

Create a model instance

sas.models.CoreShellCylinderModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/core_shell_cylinder.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CoreShellCylinderModel.CoreShellCylinderModel(multfactor=1)[source]

Bases: CCoreShellCylinderModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CoreShellCylinderModel model. This file was auto-generated from src/sas/models/include/core_shell_cylinder.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius = 20.0 [A]
  • scale = 1.0
  • thickness = 10.0 [A]
  • length = 400.0 [A]
  • core_sld = 1e-06 [1/A^(2)]
  • shell_sld = 4e-06 [1/A^(2)]
  • solvent_sld = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • axis_theta = 90.0 [deg]
  • axis_phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CoreShellCylinderModel.create_CoreShellCylinderModel()[source]

Create a model instance

sas.models.CoreShellEllipsoidModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/spheroid.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CoreShellEllipsoidModel.CoreShellEllipsoidModel(multfactor=1)[source]

Bases: CCoreShellEllipsoidModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CoreShellEllipsoidModel model. This file was auto-generated from src/sas/models/include/spheroid.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • equat_core = 200.0 [A]
  • polar_core = 20.0 [A]
  • equat_shell = 250.0 [A]
  • polar_shell = 30.0 [A]
  • sld_core = 2e-06 [1/A^(2)]
  • sld_shell = 1e-06 [1/A^(2)]
  • sld_solvent = 6.3e-06 [1/A^(2)]
  • background = 0.001 [1/cm]
  • axis_theta = 0.0 [deg]
  • axis_phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CoreShellEllipsoidModel.create_CoreShellEllipsoidModel()[source]

Create a model instance

sas.models.CoreShellEllipsoidXTModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/spheroidXT.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CoreShellEllipsoidXTModel.CoreShellEllipsoidXTModel(multfactor=1)[source]

Bases: CCoreShellEllipsoidXTModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CoreShellEllipsoidXTModel model. This file was auto-generated from src/sas/models/include/spheroidXT.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 0.05
  • equat_core = 20.0 [A]
  • X_core = 3.0
  • T_shell = 30.0 [A]
  • XpolarShell = 1.0
  • sld_core = 2e-06 [1/A^(2)]
  • sld_shell = 1e-06 [1/A^(2)]
  • sld_solvent = 6.3e-06 [1/A^(2)]
  • background = 0.001 [1/cm]
  • axis_theta = 0.0 [deg]
  • axis_phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CoreShellEllipsoidXTModel.create_CoreShellEllipsoidXTModel()[source]

Create a model instance

sas.models.CoreShellModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/core_shell.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CoreShellModel.CoreShellModel(multfactor=1)[source]

Bases: CCoreShellModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CoreShellModel model. This file was auto-generated from src/sas/models/include/core_shell.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius = 60.0 [A]
  • scale = 1.0
  • thickness = 10.0 [A]
  • core_sld = 1e-06 [1/A^(2)]
  • shell_sld = 2e-06 [1/A^(2)]
  • solvent_sld = 3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • M0_sld_shell = 0.0 [1/A^(2)]
  • M_theta_shell = 0.0 [deg]
  • M_phi_shell = 0.0 [deg]
  • M0_sld_core = 0.0 [1/A^(2)]
  • M_theta_core = 0.0 [deg]
  • M_phi_core = 0.0 [deg]
  • M0_sld_solv = 0.0 [1/A^(2)]
  • M_theta_solv = 0.0 [deg]
  • M_phi_solv = 0.0 [deg]
  • Up_frac_i = 0.5 [u/(u+d)]
  • Up_frac_f = 0.5 [u/(u+d)]
  • Up_theta = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CoreShellModel.create_CoreShellModel()[source]

Create a model instance

sas.models.CorrLengthModel module

CorrLengthModel function as a BaseComponent model

class sas.models.CorrLengthModel.CorrLengthModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a CorrLengthModel. I(q) = I(q) = scale_p/pow(q,exponent)+scale_l/ (1.0 + pow((q*length_l),exponent_l) )+ background

run(x=0.0)[source]

Evaluate the model

param x: input q-value (float or [float, float] as [r, theta]) return: (scattering value)

runXY(x=0.0)[source]

Evaluate the model

param x: input q-value (float or [float, float] as [qx, qy]) return: scattering value

sas.models.Cos module

Provide cos(x) function as a BaseComponent model

class sas.models.Cos.Cos[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a cos(x) model.

clone()[source]

Return a identical copy of self

run(x=0.0)[source]

Evaluate the model @param x: input x, or [x, phi] [radian] @return: cos(x) or cos(x*cos(phi))*cos(x*cos(phi))

runXY(x=0.0)[source]

Evaluate the model @param x: input x, or [x, y] [radian] @return: cos(x) or cos(x)*cos(y)

sas.models.CylinderModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/cylinder.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.CylinderModel.CylinderModel(multfactor=1)[source]

Bases: CCylinderModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a CylinderModel model. This file was auto-generated from src/sas/models/include/cylinder.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 20.0 [A]
  • length = 400.0 [A]
  • sldCyl = 4e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • cyl_theta = 60.0 [deg]
  • cyl_phi = 60.0 [deg]
  • M0_sld_cyl = 0.0 [1/A^(2)]
  • M_theta_cyl = 0.0 [deg]
  • M_phi_cyl = 0.0 [deg]
  • M0_sld_solv = 0.0 [1/A^(2)]
  • M_theta_solv = 0.0 [deg]
  • M_phi_solv = 0.0 [deg]
  • Up_frac_i = 0.5 [u/(u+d)]
  • Up_frac_f = 0.5 [u/(u+d)]
  • Up_theta = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.CylinderModel.create_CylinderModel()[source]

Create a model instance

sas.models.DABModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/dabmodel.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.DABModel.DABModel(multfactor=1)[source]

Bases: CDABModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a DABModel model. This file was auto-generated from src/sas/models/include/dabmodel.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • length = 50.0 [A]
  • scale = 1.0
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.DABModel.create_DABModel()[source]

Create a model instance

sas.models.DebyeModel module

Provide F(x) = 2( exp(-x) + x - 1 )/x**2 with x = (q*R_g)**2

Debye function as a BaseComponent model

class sas.models.DebyeModel.DebyeModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a Debye model.

F(x) = 2( exp(-x) + x - 1 )/x**2 with x = (q*R_g)**2

The model has three parameters:
Rg = radius of gyration scale = scale factor bkd = Constant background
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (debye value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: debye value

sas.models.DiamCylFunc module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/DiamCyl.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.DiamCylFunc.DiamCylFunc(multfactor=1)[source]

Bases: CDiamCylFunc, sas.models.BaseComponent.BaseComponent

Class that evaluates a DiamCylFunc model. This file was auto-generated from src/sas/models/include/DiamCyl.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius = 20.0 A
  • length = 400.0 A
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.DiamCylFunc.create_DiamCylFunc()[source]

Create a model instance

sas.models.DiamEllipFunc module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/DiamEllip.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.DiamEllipFunc.DiamEllipFunc(multfactor=1)[source]

Bases: CDiamEllipFunc, sas.models.BaseComponent.BaseComponent

Class that evaluates a DiamEllipFunc model. This file was auto-generated from src/sas/models/include/DiamEllip.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius_a = 20.0 A
  • radius_b = 400.0 A
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.DiamEllipFunc.create_DiamEllipFunc()[source]

Create a model instance

sas.models.DisperseModel module

Wrapper for the Disperser class extension

class sas.models.DisperseModel.DisperseModel(model, paramList, sigmaList)[source]

Bases: Disperser, sas.models.BaseComponent.BaseComponent

Wrapper class for the Disperser extension Python class that takes a model and averages its output for a distribution of its parameters.

The parameters to be varied are specified at instantiation time. The distributions are Gaussian, with std deviations specified for each parameter at instantiation time.

Example:

cyl = CylinderModel()
disp = DisperseModel(cyl, ['cyl_phi'], [0.3])
disp.run([0.01, 1.57])
clone()[source]

Return a identical copy of self

getParam(name)[source]

Get the value of the given parameter :param name: parameter name

run(x=0.0)[source]

Evaluate the model :param x: input q, or [q,phi] :return: scattering function P(q)

runXY(x=0.0)[source]

Evaluate the model :param x: input q, or [q,phi] :return: scattering function P(q)

setParam(name, value)[source]

Set a parameter value :param name: parameter name

sas.models.DivComponent module

Provide base functionality for all model components @author: Mathieu Doucet / UTK @contact: mathieu.doucet@nist.gov

class sas.models.DivComponent.DivComponent(base=None, other=None)[source]

Bases: sas.models.BaseComponent.BaseComponent

Basic model component for Division Provides basic arithmetics

getParam(name)[source]

Set the value of a model parameter @param name: name of the parameter @return: value of the parameter

getParamList()[source]

Return a list of all available parameters for the model

run(x=0)[source]

Evaluate each part of the component and sum the results @param x: input parameter @return: value of the model at x

runXY(x=0)[source]

Evaluate each part of the component and sum the results @param x: input parameter @return: value of the model at x

setParam(name, value)[source]

Set the value of a model parameter @param name: name of parameter to set @param value: value to give the paramter

sas.models.EllipsoidModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/ellipsoid.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.EllipsoidModel.EllipsoidModel(multfactor=1)[source]

Bases: CEllipsoidModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a EllipsoidModel model. This file was auto-generated from src/sas/models/include/ellipsoid.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius_a = 20.0 [A]
  • scale = 1.0
  • radius_b = 400.0 [A]
  • sldEll = 4e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • axis_theta = 90.0 [deg]
  • axis_phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.EllipsoidModel.create_EllipsoidModel()[source]

Create a model instance

sas.models.EllipticalCylinderModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/elliptical_cylinder.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.EllipticalCylinderModel.EllipticalCylinderModel(multfactor=1)[source]

Bases: CEllipticalCylinderModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a EllipticalCylinderModel model. This file was auto-generated from src/sas/models/include/elliptical_cylinder.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • r_minor = 20.0 [A]
  • scale = 1.0
  • r_ratio = 1.5
  • length = 400.0 [A]
  • sldCyl = 4e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • cyl_theta = 90.0 [deg]
  • cyl_phi = 0.0 [deg]
  • cyl_psi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.EllipticalCylinderModel.create_EllipticalCylinderModel()[source]

Create a model instance

sas.models.FCCrystalModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/fcc.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.FCCrystalModel.FCCrystalModel(multfactor=1)[source]

Bases: CFCCrystalModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a FCCrystalModel model. This file was auto-generated from src/sas/models/include/fcc.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • dnn = 220.0 [A]
  • d_factor = 0.06
  • radius = 40.0 [A]
  • sldSph = 3e-06 [1/A^(2)]
  • sldSolv = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • theta = 0.0 [deg]
  • phi = 0.0 [deg]
  • psi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.FCCrystalModel.create_FCCrystalModel()[source]

Create a model instance

sas.models.FlexCylEllipXModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/flexcyl_ellipX.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.FlexCylEllipXModel.FlexCylEllipXModel(multfactor=1)[source]

Bases: CFlexCylEllipXModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a FlexCylEllipXModel model. This file was auto-generated from src/sas/models/include/flexcyl_ellipX.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • length = 1000.0 [A]
  • kuhn_length = 100.0 [A]
  • radius = 20.0 [A]
  • axis_ratio = 1.5
  • sldCyl = 1e-06 [1/A^(2)]
  • sldSolv = 6.3e-06 [1/A^(2)]
  • background = 0.0001 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.FlexCylEllipXModel.create_FlexCylEllipXModel()[source]

Create a model instance

sas.models.FlexibleCylinderModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/flexible_cylinder.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.FlexibleCylinderModel.FlexibleCylinderModel(multfactor=1)[source]

Bases: CFlexibleCylinderModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a FlexibleCylinderModel model. This file was auto-generated from src/sas/models/include/flexible_cylinder.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • length = 1000.0 [A]
  • kuhn_length = 100.0 [A]
  • radius = 20.0 [A]
  • sldCyl = 1e-06 [1/A^(2)]
  • sldSolv = 6.3e-06 [1/A^(2)]
  • background = 0.0001 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.FlexibleCylinderModel.create_FlexibleCylinderModel()[source]

Create a model instance

sas.models.FractalCoreShellModel module

Fractal Core-Shell model

class sas.models.FractalCoreShellModel.FractalCoreShellModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a FractalCoreShellModel List of default parameters: volfraction = 0.05 radius = 20.0 [A] thickness = 5.0 [A] frac_dim = 2.0 cor_length = 100 [A] core_sld = 3.5e-006 [1/A^(2)] shell_sld = 1.0e-006 [1/A^(2)] solvent_sld = 6.35e-006 [1/A^(2)] background = 0.0 [1/cm]

run(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [r, theta]) : return: (DAB value)

runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: DAB value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.FractalModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/fractal.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.FractalModel.FractalModel(multfactor=1)[source]

Bases: CFractalModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a FractalModel model. This file was auto-generated from src/sas/models/include/fractal.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius = 5.0 [A]
  • scale = 0.05
  • fractal_dim = 2.0
  • cor_length = 100.0 [A]
  • sldBlock = 2e-06 [1/A^(2)]
  • sldSolv = 6.35e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.FractalModel.create_FractalModel()[source]

Create a model instance

sas.models.FractalO_Z module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/FractalQtoN.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.FractalO_Z.FractalO_Z(multfactor=1)[source]

Bases: CFractalO_Z, sas.models.BaseComponent.BaseComponent

Class that evaluates a FractalO_Z model. This file was auto-generated from src/sas/models/include/FractalQtoN.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 10000.0
  • m_fractal = 1.8
  • cluster_rg = 3520.0
  • s_fractal = 2.5
  • primary_rg = 82.0
  • background = 0.01
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.FractalO_Z.create_FractalO_Z()[source]

Create a model instance

sas.models.FuzzySphereModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/fuzzysphere.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.FuzzySphereModel.FuzzySphereModel(multfactor=1)[source]

Bases: CFuzzySphereModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a FuzzySphereModel model. This file was auto-generated from src/sas/models/include/fuzzysphere.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • radius = 60.0 [A]
  • scale = 0.01
  • fuzziness = 10.0 [A]
  • sldSph = 1e-06 [1/A^(2)]
  • sldSolv = 3e-06 [1/A^(2)]
  • background = 0.001 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.FuzzySphereModel.create_FuzzySphereModel()[source]

Create a model instance

sas.models.GaussLorentzGelModel module

Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0) GaussLorentzGel function as a BaseComponent model

class sas.models.GaussLorentzGelModel.GaussLorentzGelModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a GaussLorentzGel model.

I(q) = scale_g*exp(- q^2*Z^2 / 2)+scale_l/(1+q^2*z^2)
  • background
List of default parameters:
scale_g = Gauss scale factor Z = Static correlation length scale_l = Lorentzian scale factor z = Dynamic correlation length background = Incoherent background
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (guinier value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: guinier value

sas.models.Gaussian module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/gaussian.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.Gaussian.Gaussian(multfactor=1)[source]

Bases: CGaussian, sas.models.BaseComponent.BaseComponent

Class that evaluates a Gaussian model. This file was auto-generated from src/sas/models/include/gaussian.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • sigma = 1.0
  • center = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.Gaussian.create_Gaussian()[source]

Create a model instance

sas.models.GelFitModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/GelFit.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.GelFitModel.GelFitModel(multfactor=1)[source]

Bases: CGelFitModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a GelFitModel model. This file was auto-generated from src/sas/models/include/GelFit.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • lScale = 3.5
  • gScale = 1.7
  • zeta = 16.0
  • radius = 104.0
  • scale = 2.0
  • background = 0.01
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.GelFitModel.create_GelFitModel()[source]

Create a model instance

sas.models.GuinierModel module

Provide I(q) = I_0 exp ( - R_g^2 q^2 / 3.0) Guinier function as a BaseComponent model

class sas.models.GuinierModel.GuinierModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a Guinier model.

I(q) = I_0 exp ( - R_g^2 q^2 / 3.0 )

List of default parameters:
I_0 = Scale R_g = Radius of gyration
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (guinier value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: guinier value

sas.models.GuinierPorodModel module

I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql
= scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql

Guinier function as a BaseComponent model

class sas.models.GuinierPorodModel.GuinierPorodModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a GuinierPorod model.

I(q) = scale/q^s* exp ( - R_g^2 q^2 / (3-s) ) for q<= ql
= scale/q^m*exp((-ql^2*Rg^2)/(3-s))*ql^(m-s) for q>=ql
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (guinier value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: guinier value

sas.models.HardsphereStructure module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/Hardsphere.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.HardsphereStructure.HardsphereStructure(multfactor=1)[source]

Bases: CHardsphereStructure, sas.models.BaseComponent.BaseComponent

Class that evaluates a HardsphereStructure model. This file was auto-generated from src/sas/models/include/Hardsphere.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • effect_radius = 50.0 [A]
  • volfraction = 0.2
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.HardsphereStructure.create_HardsphereStructure()[source]

Create a model instance

sas.models.HayterMSAStructure module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/HayterMSA.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.HayterMSAStructure.HayterMSAStructure(multfactor=1)[source]

Bases: CHayterMSAStructure, sas.models.BaseComponent.BaseComponent

Class that evaluates a HayterMSAStructure model. This file was auto-generated from src/sas/models/include/HayterMSA.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • effect_radius = 20.75 [A]
  • charge = 19.0
  • volfraction = 0.0192
  • temperature = 318.16 [K]
  • saltconc = 0.0 [M]
  • dielectconst = 71.08
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.HayterMSAStructure.create_HayterMSAStructure()[source]

Create a model instance

sas.models.HollowCylinderModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/hollow_cylinder.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.HollowCylinderModel.HollowCylinderModel(multfactor=1)[source]

Bases: CHollowCylinderModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a HollowCylinderModel model. This file was auto-generated from src/sas/models/include/hollow_cylinder.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • core_radius = 20.0 [A]
  • radius = 30.0 [A]
  • length = 400.0 [A]
  • sldCyl = 6.3e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.01 [1/cm]
  • axis_theta = 90.0 [deg]
  • axis_phi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.HollowCylinderModel.create_HollowCylinderModel()[source]

Create a model instance

sas.models.LamellarFFHGModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/lamellarFF_HG.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.LamellarFFHGModel.LamellarFFHGModel(multfactor=1)[source]

Bases: CLamellarFFHGModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a LamellarFFHGModel model. This file was auto-generated from src/sas/models/include/lamellarFF_HG.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • t_length = 15.0 [A]
  • h_thickness = 10.0 [A]
  • sld_tail = 4e-07 [1/A^(2)]
  • sld_head = 3e-06 [1/A^(2)]
  • sld_solvent = 6e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.LamellarFFHGModel.create_LamellarFFHGModel()[source]

Create a model instance

sas.models.LamellarModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/lamellar.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.LamellarModel.LamellarModel(multfactor=1)[source]

Bases: CLamellarModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a LamellarModel model. This file was auto-generated from src/sas/models/include/lamellar.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • bi_thick = 50.0 [A]
  • sld_bi = 1e-06 [1/A^(2)]
  • sld_sol = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.LamellarModel.create_LamellarModel()[source]

Create a model instance

sas.models.LamellarPCrystalModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/lamellarPC.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.LamellarPCrystalModel.LamellarPCrystalModel(multfactor=1)[source]

Bases: CLamellarPCrystalModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a LamellarPCrystalModel model. This file was auto-generated from src/sas/models/include/lamellarPC.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • thickness = 33.0 [A]
  • Nlayers = 20.0
  • spacing = 250.0 [A]
  • pd_spacing = 0.0
  • sld_layer = 1e-06 [1/A^(2)]
  • sld_solvent = 6.34e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.LamellarPCrystalModel.create_LamellarPCrystalModel()[source]

Create a model instance

sas.models.LamellarPSHGModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/lamellarPS_HG.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.LamellarPSHGModel.LamellarPSHGModel(multfactor=1)[source]

Bases: CLamellarPSHGModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a LamellarPSHGModel model. This file was auto-generated from src/sas/models/include/lamellarPS_HG.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • spacing = 40.0 [A]
  • deltaT = 10.0 [A]
  • deltaH = 2.0 [A]
  • sld_tail = 4e-07 [1/A^(2)]
  • sld_head = 2e-06 [1/A^(2)]
  • sld_solvent = 6e-06 [1/A^(2)]
  • n_plates = 30.0
  • caille = 0.001
  • background = 0.001 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.LamellarPSHGModel.create_LamellarPSHGModel()[source]

Create a model instance

sas.models.LamellarPSModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/lamellarPS.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.LamellarPSModel.LamellarPSModel(multfactor=1)[source]

Bases: CLamellarPSModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a LamellarPSModel model. This file was auto-generated from src/sas/models/include/lamellarPS.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • spacing = 400.0 [A]
  • delta = 30.0 [A]
  • sld_bi = 6.3e-06 [1/A^(2)]
  • sld_sol = 1e-06 [1/A^(2)]
  • n_plates = 20.0
  • caille = 0.1
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.LamellarPSModel.create_LamellarPSModel()[source]

Create a model instance

sas.models.LineModel module

Provide Line function (y= A + Bx) as a BaseComponent model

class sas.models.LineModel.LineModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a linear model.

f(x) = A + Bx

List of default parameters:
A = 1.0 B = 1.0
evalDistribution(qdist)[source]

Evaluate a distribution of q-values.

  • For 1D, a numpy array is expected as input:

    evalDistribution(q)

where q is a numpy array.

  • For 2D, a list of numpy arrays are expected: [qx_prime,qy_prime], where 1D arrays,
Parameters:qdist – ndarray of scalar q-values or list [qx,qy] where qx,qy are 1D ndarrays
run(x=0.0)[source]

Evaluate the model @param x: simple value @return: (Line value)

runXY(x=0.0)[source]

Evaluate the model @param x: simple value @return: Line value

sas.models.LinearPearlsModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/linearpearls.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.LinearPearlsModel.LinearPearlsModel(multfactor=1)[source]

Bases: CLinearPearlsModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a LinearPearlsModel model. This file was auto-generated from src/sas/models/include/linearpearls.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 80.0 [A]
  • edge_separation = 350.0 [A]
  • num_pearls = 3.0
  • sld_pearl = 1e-06 [1/A^(2)]
  • sld_solv = 6.3e-06 [1/A^(2)]
  • background = 0.0
  • scale = 1.0
  • radius = 80.0 [A]
  • edge_separation = 350.0 [A]
  • num_pearls = 3.0
  • sld_pearl = 1e-06 [1/A^(2)]
  • sld_solv = 6.3e-06 [1/A^(2)]
  • background = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.LinearPearlsModel.create_LinearPearlsModel()[source]

Create a model instance

sas.models.LogNormal module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/logNormal.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.LogNormal.LogNormal(multfactor=1)[source]

Bases: CLogNormal, sas.models.BaseComponent.BaseComponent

Class that evaluates a LogNormal model. This file was auto-generated from src/sas/models/include/logNormal.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • sigma = 1.0
  • center = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.LogNormal.create_LogNormal()[source]

Create a model instance

sas.models.LorentzModel module

Provide F(x) = scale/( 1 + (x*L)^2 ) + bkd Lorentz (Ornstein-Zernicke) function as a BaseComponent model

class sas.models.LorentzModel.LorentzModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a Lorentz (Ornstein-Zernicke) model.

F(x) = scale/( 1 + (x*L)^2 ) + bkd

The model has three parameters:
L = screen Length scale = scale factor bkd = incoherent background
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (Lorentz value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: Lorentz value

sas.models.Lorentzian module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/lorentzian.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.Lorentzian.Lorentzian(multfactor=1)[source]

Bases: CLorentzian, sas.models.BaseComponent.BaseComponent

Class that evaluates a Lorentzian model. This file was auto-generated from src/sas/models/include/lorentzian.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • gamma = 1.0
  • center = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.Lorentzian.create_Lorentzian()[source]

Create a model instance

sas.models.MassFractalModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/massfractal.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.MassFractalModel.MassFractalModel(multfactor=1)[source]

Bases: CMassFractalModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a MassFractalModel model. This file was auto-generated from src/sas/models/include/massfractal.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 10.0 [A]
  • mass_dim = 1.9
  • co_length = 100.0 [A]
  • background = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.MassFractalModel.create_MassFractalModel()[source]

Create a model instance

sas.models.MassSurfaceFractal module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/masssurfacefractal.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.MassSurfaceFractal.MassSurfaceFractal(multfactor=1)[source]

Bases: CMassSurfaceFractal, sas.models.BaseComponent.BaseComponent

Class that evaluates a MassSurfaceFractal model. This file was auto-generated from src/sas/models/include/masssurfacefractal.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • mass_dim = 1.8
  • surface_dim = 2.3
  • cluster_rg = 86.7 [A]
  • primary_rg = 4000.0 [A]
  • background = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.MassSurfaceFractal.create_MassSurfaceFractal()[source]

Create a model instance

sas.models.MicelleSphCoreModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/micelleSphCore.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.MicelleSphCoreModel.MicelleSphCoreModel(multfactor=1)[source]

Bases: CMicelleSphCoreModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a MicelleSphCoreModel model. This file was auto-generated from src/sas/models/include/micelleSphCore.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • ndensity = 8.94e+15 [1/cm^(3)]
  • v_core = 62624.0 [A^3]
  • v_corona = 61940.0 [A^(3)]
  • rho_solv = 6.4e-06 [1/A^(2)]
  • rho_core = 3.4e-07 [1/A^(2)]
  • rho_corona = 8e-07 [1/A^(2)]
  • radius_core = 45.0 [A]
  • radius_gyr = 20.0 [A]
  • d_penetration = 1.0
  • n_aggreg = 6.0
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.MicelleSphCoreModel.create_MicelleSphCoreModel()[source]

Create a model instance

sas.models.ModelAdaptor module

This software was developed by the University of Tennessee as part of the Distributed Data Analysis of Neutron Scattering Experiments (DANSE) project funded by the US National Science Foundation.

If you use DANSE applications to do scientific research that leads to publication, we ask that you acknowledge the use of the software with the following sentence:

“This work benefited from DANSE software developed under NSF award DMR-0520547.”

copyright 2008, University of Tennessee

class sas.models.ModelAdaptor.ModelAdaptor[source]

Bases: object

Model adaptor to provide old-style model functionality

getParamListWithToken(token, member)[source]

get Param List With Token

getParamWithToken(name, token, member)[source]

get Param With Token

setParamWithToken(name, value, token, member)[source]

set Param With Token

class sas.models.ModelAdaptor.ParameterDict(parameters)[source]

Bases: dict

Parameter dictionary used for backward compatibility between the old-style ‘params’ dictionary and the new-style ‘parameters’ dictionary.

sas.models.MulComponent module

Provide base functionality for all model components @author: Mathieu Doucet / UTK @contact: mathieu.doucet@nist.gov

class sas.models.MulComponent.MulComponent(base=None, other=None)[source]

Bases: sas.models.BaseComponent.BaseComponent

Basic model component for Multiply Provides basic arithmetics

getParam(name)[source]

Set the value of a model parameter @param name: name of the parameter @return: value of the parameter

getParamList()[source]

Return a list of all available parameters for the model

run(x=0)[source]

Evaluate each part of the component and sum the results @param x: input parameter @return: value of the model at x

runXY(x=0)[source]

Evaluate each part of the component and sum the results @param x: input parameter @return: value of the model at x

setParam(name, value)[source]

Set the value of a model parameter @param name: name of parameter to set @param value: value to give the paramter

sas.models.MultiShellModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/multishell.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.MultiShellModel.MultiShellModel(multfactor=1)[source]

Bases: CMultiShellModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a MultiShellModel model. This file was auto-generated from src/sas/models/include/multishell.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • core_radius = 60.0 [A]
  • s_thickness = 10.0 [A]
  • w_thickness = 10.0 [A]
  • core_sld = 6.4e-06 [1/A^(2)]
  • shell_sld = 4e-07 [1/A^(2)]
  • n_pairs = 2.0
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.MultiShellModel.create_MultiShellModel()[source]

Create a model instance

sas.models.MultiplicationModel module

class sas.models.MultiplicationModel.MultiplicationModel(p_model, s_model)[source]

Bases: sas.models.BaseComponent.BaseComponent

Use for P(Q)*S(Q); function call must be in the order of P(Q) and then S(Q): The model parameters are combined from both models, P(Q) and S(Q), except 1) ‘effect_radius’ of S(Q) which will be calculated from P(Q) via calculate_ER(), and 2) ‘scale’ in P model which is synchronized w/ volfraction in S then P*S is multiplied by a new param, ‘scale_factor’. The polydispersion is applicable only to P(Q), not to S(Q). Note: P(Q) refers to ‘form factor’ model while S(Q) does to ‘structure factor’.

evalDistribution(x=[])[source]

Evaluate the model in cartesian coordinates :param x: input q[], or [qx[], qy[]] :return: scattering function P(q[])

fill_description(p_model, s_model)[source]

Fill the description for P(Q)*S(Q)

getProfile()[source]

Get SLD profile of p_model if exists

: return: (r, beta) where r is a list of radius of the transition points
beta is a list of the corresponding SLD values

: Note: This works only for func_shell# = 2 (exp function).

run(x=0.0)[source]

Evaluate the model :param x: input q-value (float or [float, float] as [r, theta]) :return: (scattering function value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: scattering function value

setParam(name, value)[source]

Set the value of a model parameter

Parameters:
  • name – name of the parameter
  • value – value of the parameter
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter :param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.NoStructure module

Provide sin(x) function as a BaseComponent model

class sas.models.NoStructure.NoStructure[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a sin(x) model.

clone()[source]

Return a identical copy of self

run(x=0.0)[source]

Evaluate the model @param x: input x @return: 1

runXY(x=0.0)[source]

Evaluate the model @param x: input x, or [x, y] [radian] @return: sin(x) or sin(x)*sin(y)

sas.models.NullModel module

Provide sin(x) function as a BaseComponent model

class sas.models.NullModel.NullModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a sin(x) model.

clone()[source]

Return a identical copy of self

run(x=0.0)[source]

Evaluate the model @param x: input x @return: 1

runXY(x=0.0)[source]

Evaluate the model @param x: input x, or [x, y] [radian] @return: sin(x) or sin(x)*sin(y)

sas.models.OnionExpShellModel module

class sas.models.OnionExpShellModel.OnionExpShellModel(n_shells=1)[source]

Bases: sas.models.BaseComponent.BaseComponent

This multi-model is based on CoreMultiShellModel with exponential func shells and provides the capability of changing the number of shells between 1 and 10.

evalDistribution(x=[])[source]

Evaluate the model in cartesian coordinates

: param x: input q[], or [qx[], qy[]] : return: scattering function P(q[])

getProfile()[source]

Get SLD profile

: return: (r, beta) where r is a list of radius of the transition
points and beta is a list of the corresponding SLD values
run(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [r, theta]) : return: (I value)

runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: I value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.OnionModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/onion.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.OnionModel.OnionModel(multfactor=1)[source]

Bases: COnionModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a OnionModel model. This file was auto-generated from src/sas/models/include/onion.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • n_shells = 1.0
  • scale = 1.0
  • rad_core0 = 200.0 [A]
  • sld_core0 = 1e-06 [1/A^(2)]
  • sld_solv = 6.4e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • sld_out_shell1 = 2e-06 [1/A^(2)]
  • sld_out_shell2 = 2.5e-06 [1/A^(2)]
  • sld_out_shell3 = 3e-06 [1/A^(2)]
  • sld_out_shell4 = 3.5e-06 [1/A^(2)]
  • sld_out_shell5 = 4e-06 [1/A^(2)]
  • sld_out_shell6 = 4.5e-06 [1/A^(2)]
  • sld_out_shell7 = 5e-06 [1/A^(2)]
  • sld_out_shell8 = 5.5e-06 [1/A^(2)]
  • sld_out_shell9 = 6e-06 [1/A^(2)]
  • sld_out_shell10 = 6.2e-06 [1/A^(2)]
  • sld_in_shell1 = 1.7e-06 [1/A^(2)]
  • sld_in_shell2 = 2.2e-06 [1/A^(2)]
  • sld_in_shell3 = 2.7e-06 [1/A^(2)]
  • sld_in_shell4 = 3.2e-06 [1/A^(2)]
  • sld_in_shell5 = 3.7e-06 [1/A^(2)]
  • sld_in_shell6 = 4.2e-06 [1/A^(2)]
  • sld_in_shell7 = 4.7e-06 [1/A^(2)]
  • sld_in_shell8 = 5.2e-06 [1/A^(2)]
  • sld_in_shell9 = 5.7e-06 [1/A^(2)]
  • sld_in_shell10 = 6e-06 [1/A^(2)]
  • A_shell1 = 1.0
  • A_shell2 = 1.0
  • A_shell3 = 1.0
  • A_shell4 = 1.0
  • A_shell5 = 1.0
  • A_shell6 = 1.0
  • A_shell7 = 1.0
  • A_shell8 = 1.0
  • A_shell9 = 1.0
  • A_shell10 = 1.0
  • thick_shell1 = 50.0 [A]
  • thick_shell2 = 50.0 [A]
  • thick_shell3 = 50.0 [A]
  • thick_shell4 = 50.0 [A]
  • thick_shell5 = 50.0 [A]
  • thick_shell6 = 50.0 [A]
  • thick_shell7 = 50.0 [A]
  • thick_shell8 = 50.0 [A]
  • thick_shell9 = 50.0 [A]
  • thick_shell10 = 50.0 [A]
  • func_shell1 = 2.0
  • func_shell2 = 2.0
  • func_shell3 = 2.0
  • func_shell4 = 2.0
  • func_shell5 = 2.0
  • func_shell6 = 2.0
  • func_shell7 = 2.0
  • func_shell8 = 2.0
  • func_shell9 = 2.0
  • func_shell10 = 2.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.OnionModel.create_OnionModel()[source]

Create a model instance

sas.models.ParallelepipedModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/parallelepiped.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.ParallelepipedModel.ParallelepipedModel(multfactor=1)[source]

Bases: CParallelepipedModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a ParallelepipedModel model. This file was auto-generated from src/sas/models/include/parallelepiped.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • short_a = 35.0 [A]
  • short_b = 75.0 [A]
  • long_c = 400.0 [A]
  • sldPipe = 6.3e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • parallel_theta = 0.0 [deg]
  • parallel_phi = 0.0 [deg]
  • parallel_psi = 0.0 [deg]
  • M0_sld_pipe = 0.0 [1/A^(2)]
  • M_theta_pipe = 0.0 [deg]
  • M_phi_pipe = 0.0 [deg]
  • M0_sld_solv = 0.0 [1/A^(2)]
  • M_theta_solv = 0.0 [deg]
  • M_phi_solv = 0.0 [deg]
  • Up_frac_i = 0.5 [u/(u+d)]
  • Up_frac_f = 0.5 [u/(u+d)]
  • Up_theta = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.ParallelepipedModel.create_ParallelepipedModel()[source]

Create a model instance

sas.models.PeakGaussModel module

Model describes a Gaussian shaped peak including a flat background Provide F(q) = scale*exp( -1/2 *[(q-q0)/B]^2 )+ background PeakGaussModel function as a BaseComponent model

class sas.models.PeakGaussModel.PeakGaussModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a gaussian shaped peak.

F(q) = scale*exp( -1/2 *[(q-qo)/B]^2 )+ background

The model has three parameters:
scale = scale q0 = peak position B = standard deviation background= incoherent background
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (Peak Gaussian value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: Peak Gaussian value

sas.models.PeakLorentzModel module

Model describes a Lorentzian shaped peak including a flat background Provide F(q) = scale/(1+[(q-q0)/B]^2 ) + background PeakLorentzModel function as a BaseComponent model

class sas.models.PeakLorentzModel.PeakLorentzModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a gaussian shaped peak.

F(q) = scale/(1+[(q-q0)/B]^2 ) + background

The model has three parameters:
scale = scale q0 = peak position B = ( hwhm) half-width-halfmaximum background= incoherent background
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: Peak Lorentzian value

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: Peak Lorentzian value

sas.models.PearlNecklaceModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/pearlnecklace.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.PearlNecklaceModel.PearlNecklaceModel(multfactor=1)[source]

Bases: CPearlNecklaceModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a PearlNecklaceModel model. This file was auto-generated from src/sas/models/include/pearlnecklace.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 80.0 [A]
  • edge_separation = 350.0 [A]
  • thick_string = 2.5 [A]
  • num_pearls = 3.0
  • sld_pearl = 1e-06 [1/A^(2)]
  • sld_string = 1e-06 [1/A^(2)]
  • sld_solv = 6.3e-06 [1/A^(2)]
  • background = 0.0
  • scale = 1.0
  • radius = 80.0 [A]
  • edge_separation = 350.0 [A]
  • thick_string = 2.5 [A]
  • num_pearls = 3.0
  • sld_pearl = 1e-06 [1/A^(2)]
  • sld_string = 1e-06 [1/A^(2)]
  • sld_solv = 6.3e-06 [1/A^(2)]
  • background = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.PearlNecklaceModel.create_PearlNecklaceModel()[source]

Create a model instance

sas.models.Poly_GaussCoil module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/polygausscoil.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.Poly_GaussCoil.Poly_GaussCoil(multfactor=1)[source]

Bases: CPoly_GaussCoil, sas.models.BaseComponent.BaseComponent

Class that evaluates a Poly_GaussCoil model. This file was auto-generated from src/sas/models/include/polygausscoil.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • rg = 60.0 [A]
  • scale = 1.0
  • poly_m = 2.0 [Mw/Mn]
  • background = 0.001 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.Poly_GaussCoil.create_Poly_GaussCoil()[source]

Create a model instance

sas.models.PolymerExclVolume module

class sas.models.PolymerExclVolume.PolymerExclVolume[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a PolymerExclVolModel model. This file was auto-generated from ..c_extensionspolyexclvol.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 0.01
  • rg = 100.0 [A]
  • m = 3.0
  • background = 0.0 [1/cm]
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (guinier value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: guinier value

sas.models.PorodModel module

Provide I(q) = C/q^4, Porod function as a BaseComponent model

class sas.models.PorodModel.PorodModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a Porod model. I(q) = scale/q^4 +background

run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (porod value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: porod value

sas.models.PowerLawAbsModel module

Provide F(x) = scale* (|x|)^(-m) + bkd Power law function as a BaseComponent model

class sas.models.PowerLawAbsModel.PowerLawAbsModel[source]

Bases: sas.models.PowerLawModel.PowerLawModel

Class that evaluates a absolute Power_Law model.

F(x) = scale* (|x|)^(-m) + bkd

The model has three parameters:

  • m = power
  • scale = scale factor
  • bkd = incoherent background

sas.models.PowerLawModel module

Provide F(x) = scale* (x)^(-m) + bkd Power law function as a BaseComponent model

class sas.models.PowerLawModel.PowerLawModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a Power_Law model.

F(x) = scale* (x)^(-m) + bkd

The model has three parameters:
m = power scale = scale factor bkd = incoherent background
run(x=0.0)[source]

Evaluate the model :param x: input q-value (float or [float, float] as [r, theta]) :return: (PowerLaw value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: PowerLaw value

sas.models.PringlesModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/pringles.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.PringlesModel.PringlesModel(multfactor=1)[source]

Bases: CPringlesModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a PringlesModel model. This file was auto-generated from src/sas/models/include/pringles.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 60.0 [A]
  • thickness = 10.0 [A]
  • alpha = 0.001 [rad]
  • beta = 0.02 [rad]
  • sld_pringle = 1e-06 [A^(-2)]
  • sld_solvent = 6.35e-06 [A^(-2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.PringlesModel.create_PringlesModel()[source]

Create a model instance

sas.models.RPA10Model module

class sas.models.RPA10Model.RPA10Model(multfactor=1)[source]

Bases: sas.models.BaseComponent.BaseComponent

This multi-model is based on Parratt formalism and provides the capability of changing the number of layers between 0 and 10.

calculate_ER()[source]
evalDistribution(x=[])[source]

Evaluate the model in cartesian coordinates

: param x: input q[], or [qx[], qy[]] : return: scattering function P(q[])

getProfile()[source]

Get SLD profile

: return: None, No SLD profile supporting for this model

run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: scattering function value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.RPAModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/rpa.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.RPAModel.RPAModel(multfactor=1)[source]

Bases: CRPAModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a RPAModel model. This file was auto-generated from src/sas/models/include/rpa.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • lcase_n = 0.0
  • ba = 5.0
  • bb = 5.0
  • bc = 5.0
  • bd = 5.0
  • Kab = -0.0004
  • Kac = -0.0004
  • Kad = -0.0004
  • Kbc = -0.0004
  • Kbd = -0.0004
  • Kcd = -0.0004
  • scale = 1.0
  • background = 0.0 [1/cm]
  • Na = 1000.0
  • Phia = 0.25
  • va = 100.0
  • La = 1e-12
  • Nb = 1000.0
  • Phib = 0.25
  • vb = 100.0
  • Lb = 1e-12
  • Nc = 1000.0
  • Phic = 0.25
  • vc = 100.0
  • Lc = 1e-12
  • Nd = 1000.0
  • Phid = 0.25
  • vd = 100.0
  • Ld = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.RPAModel.create_RPAModel()[source]

Create a model instance

sas.models.RaspBerryModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/raspberry.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.RaspBerryModel.RaspBerryModel(multfactor=1)[source]

Bases: CRaspBerryModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a RaspBerryModel model. This file was auto-generated from src/sas/models/include/raspberry.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • volf_Lsph = 0.05
  • radius_Lsph = 5000.0 [A]
  • sld_Lsph = -4e-07 [1/A^(2)]
  • volf_Ssph = 0.005
  • radius_Ssph = 100.0 [A]
  • surfrac_Ssph = 0.4
  • sld_Ssph = 3.5e-06 [1/A^(2)]
  • delta_Ssph = 0.0
  • sld_solv = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.RaspBerryModel.create_RaspBerryModel()[source]

Create a model instance

sas.models.RectangularHollowPrismInfThinWallsModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/RectangularHollowPrismInfThinWalls.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.RectangularHollowPrismInfThinWallsModel.RectangularHollowPrismInfThinWallsModel(multfactor=1)[source]

Bases: CRectangularHollowPrismInfThinWallsModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a RectangularHollowPrismInfThinWallsModel model. This file was auto-generated from src/sas/models/include/RectangularHollowPrismInfThinWalls.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • short_side = 35.0 [A]
  • b2a_ratio = 1.0 [adim]
  • c2a_ratio = 1.0 [adim]
  • sldPipe = 6.3e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.RectangularHollowPrismInfThinWallsModel.create_RectangularHollowPrismInfThinWallsModel()[source]

Create a model instance

sas.models.RectangularHollowPrismModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/RectangularHollowPrism.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.RectangularHollowPrismModel.RectangularHollowPrismModel(multfactor=1)[source]

Bases: CRectangularHollowPrismModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a RectangularHollowPrismModel model. This file was auto-generated from src/sas/models/include/RectangularHollowPrism.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • short_side = 35.0 [A]
  • b2a_ratio = 1.0 [adim]
  • c2a_ratio = 1.0 [adim]
  • thickness = 1.0 [A]
  • sldPipe = 6.3e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.RectangularHollowPrismModel.create_RectangularHollowPrismModel()[source]

Create a model instance

sas.models.RectangularPrismModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/RectangularPrism.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.RectangularPrismModel.RectangularPrismModel(multfactor=1)[source]

Bases: CRectangularPrismModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a RectangularPrismModel model. This file was auto-generated from src/sas/models/include/RectangularPrism.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • short_side = 35.0 [A]
  • b2a_ratio = 1.0 [adim]
  • c2a_ratio = 1.0 [adim]
  • sldPipe = 6.3e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.RectangularPrismModel.create_RectangularPrismModel()[source]

Create a model instance

sas.models.ReflAdvModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/refl_adv.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.ReflAdvModel.ReflAdvModel(multfactor=1)[source]

Bases: CReflAdvModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a ReflAdvModel model. This file was auto-generated from src/sas/models/include/refl_adv.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • n_layers = 1.0
  • scale = 1.0
  • thick_inter0 = 50.0 [A]
  • func_inter0 = 0.0
  • sld_bottom0 = 2.07e-06 [1/A^(2)]
  • sld_medium = 1e-06 [1/A^(2)]
  • background = 0.0
  • sld_flat1 = 4e-06 [1/A^(2)]
  • sld_flat2 = 3.5e-06 [1/A^(2)]
  • sld_flat3 = 4e-06 [1/A^(2)]
  • sld_flat4 = 3.5e-06 [1/A^(2)]
  • sld_flat5 = 4e-06 [1/A^(2)]
  • sld_flat6 = 3.5e-06 [1/A^(2)]
  • sld_flat7 = 4e-06 [1/A^(2)]
  • sld_flat8 = 3.5e-06 [1/A^(2)]
  • sld_flat9 = 4e-06 [1/A^(2)]
  • sld_flat10 = 3.5e-06 [1/A^(2)]
  • thick_inter1 = 50.0 [A]
  • thick_inter2 = 50.0 [A]
  • thick_inter3 = 50.0 [A]
  • thick_inter4 = 50.0 [A]
  • thick_inter5 = 50.0 [A]
  • thick_inter6 = 50.0 [A]
  • thick_inter7 = 50.0 [A]
  • thick_inter8 = 50.0 [A]
  • thick_inter9 = 50.0 [A]
  • thick_inter10 = 50.0 [A]
  • thick_flat1 = 100.0 [A]
  • thick_flat2 = 100.0 [A]
  • thick_flat3 = 100.0 [A]
  • thick_flat4 = 100.0 [A]
  • thick_flat5 = 100.0 [A]
  • thick_flat6 = 100.0 [A]
  • thick_flat7 = 100.0 [A]
  • thick_flat8 = 100.0 [A]
  • thick_flat9 = 100.0 [A]
  • thick_flat10 = 100.0 [A]
  • func_inter1 = 0.0
  • func_inter2 = 0.0
  • func_inter3 = 0.0
  • func_inter4 = 0.0
  • func_inter5 = 0.0
  • func_inter6 = 0.0
  • func_inter7 = 0.0
  • func_inter8 = 0.0
  • func_inter9 = 0.0
  • func_inter10 = 0.0
  • sldIM_flat1 = 0.0 [1/A^(2)]
  • sldIM_flat2 = 0.0 [1/A^(2)]
  • sldIM_flat3 = 0.0 [1/A^(2)]
  • sldIM_flat4 = 0.0 [1/A^(2)]
  • sldIM_flat5 = 0.0 [1/A^(2)]
  • sldIM_flat6 = 0.0 [1/A^(2)]
  • sldIM_flat7 = 0.0 [1/A^(2)]
  • sldIM_flat8 = 0.0 [1/A^(2)]
  • sldIM_flat9 = 0.0 [1/A^(2)]
  • sldIM_flat10 = 0.0 [1/A^(2)]
  • nu_inter1 = 2.5
  • nu_inter2 = 2.5
  • nu_inter3 = 2.5
  • nu_inter4 = 2.5
  • nu_inter5 = 2.5
  • nu_inter6 = 2.5
  • nu_inter7 = 2.5
  • nu_inter8 = 2.5
  • nu_inter9 = 2.5
  • nu_inter10 = 2.5
  • sldIM_sub0 = 0.0
  • sldIM_medium = 0.0
  • npts_inter = 21.0
  • nu_inter0 = 2.5
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.ReflAdvModel.create_ReflAdvModel()[source]

Create a model instance

sas.models.ReflModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/refl.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.ReflModel.ReflModel(multfactor=1)[source]

Bases: CReflModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a ReflModel model. This file was auto-generated from src/sas/models/include/refl.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • n_layers = 1.0
  • scale = 1.0
  • thick_inter0 = 1.0 [A]
  • func_inter0 = 0.0
  • sld_bottom0 = 2.07e-06 [1/A^(2)]
  • sld_medium = 1e-06 [1/A^(2)]
  • background = 0.0
  • sld_flat1 = 4e-06 [1/A^(2)]
  • sld_flat2 = 3.5e-06 [1/A^(2)]
  • sld_flat3 = 4e-06 [1/A^(2)]
  • sld_flat4 = 3.5e-06 [1/A^(2)]
  • sld_flat5 = 4e-06 [1/A^(2)]
  • sld_flat6 = 3.5e-06 [1/A^(2)]
  • sld_flat7 = 4e-06 [1/A^(2)]
  • sld_flat8 = 3.5e-06 [1/A^(2)]
  • sld_flat9 = 4e-06 [1/A^(2)]
  • sld_flat10 = 3.5e-06 [1/A^(2)]
  • thick_inter1 = 1.0 [A]
  • thick_inter2 = 1.0 [A]
  • thick_inter3 = 1.0 [A]
  • thick_inter4 = 1.0 [A]
  • thick_inter5 = 1.0 [A]
  • thick_inter6 = 1.0 [A]
  • thick_inter7 = 1.0 [A]
  • thick_inter8 = 1.0 [A]
  • thick_inter9 = 1.0 [A]
  • thick_inter10 = 1.0 [A]
  • thick_flat1 = 10.0 [A]
  • thick_flat2 = 100.0 [A]
  • thick_flat3 = 100.0 [A]
  • thick_flat4 = 100.0 [A]
  • thick_flat5 = 100.0 [A]
  • thick_flat6 = 100.0 [A]
  • thick_flat7 = 100.0 [A]
  • thick_flat8 = 100.0 [A]
  • thick_flat9 = 100.0 [A]
  • thick_flat10 = 100.0 [A]
  • func_inter1 = 0.0
  • func_inter2 = 0.0
  • func_inter3 = 0.0
  • func_inter4 = 0.0
  • func_inter5 = 0.0
  • func_inter6 = 0.0
  • func_inter7 = 0.0
  • func_inter8 = 0.0
  • func_inter9 = 0.0
  • func_inter10 = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.ReflModel.create_ReflModel()[source]

Create a model instance

sas.models.ReflectivityIIModel module

class sas.models.ReflectivityIIModel.ReflectivityIIModel(multfactor=1)[source]

Bases: sas.models.BaseComponent.BaseComponent

This multi-model is based on Parratt formalism and provides the capability of changing the number of layers between 0 and 10.

calculate_ER()[source]
evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

: param x: input q[], or [qx[], qy[]] : return: scattering function P(q[])

getProfile()[source]

Get SLD profile

: return: (z, beta) where z is a list of depth of the transition points
beta is a list of the corresponding SLD values
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: scattering function value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.ReflectivityModel module

class sas.models.ReflectivityModel.ReflectivityModel(multfactor=1)[source]

Bases: sas.models.BaseComponent.BaseComponent

This multi-model is based on Parratt formalism and provides the capability of changing the number of layers between 0 and 10.

calculate_ER()[source]
evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

: param x: input q[], or [qx[], qy[]] : return: scattering function P(q[])

getProfile()[source]

Get SLD profile

: return: (z, beta) where z is a list of depth of the transition points
beta is a list of the corresponding SLD values
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: scattering function value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.SCCrystalModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/sc.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.SCCrystalModel.SCCrystalModel(multfactor=1)[source]

Bases: CSCCrystalModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a SCCrystalModel model. This file was auto-generated from src/sas/models/include/sc.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • dnn = 220.0 [A]
  • d_factor = 0.06
  • radius = 40.0 [A]
  • sldSph = 3e-06 [1/A^(2)]
  • sldSolv = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • theta = 0.0 [deg]
  • phi = 0.0 [deg]
  • psi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.SCCrystalModel.create_SCCrystalModel()[source]

Create a model instance

sas.models.SLDCalFunc module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/sld_cal.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.SLDCalFunc.SLDCalFunc(multfactor=1)[source]

Bases: CSLDCalFunc, sas.models.BaseComponent.BaseComponent

Class that evaluates a SLDCalFunc model. This file was auto-generated from src/sas/models/include/sld_cal.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • fun_type = 0.0
  • npts_inter = 21.0
  • shell_num = 0.0
  • nu_inter = 2.5
  • sld_left = 0.0 [1/A^(2)]
  • sld_right = 0.0 [1/A^(2)]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.SLDCalFunc.create_SLDCalFunc()[source]

Create a model instance

sas.models.Schulz module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/schulz.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.Schulz.Schulz(multfactor=1)[source]

Bases: CSchulz, sas.models.BaseComponent.BaseComponent

Class that evaluates a Schulz model. This file was auto-generated from src/sas/models/include/schulz.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • sigma = 1.0
  • center = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.Schulz.create_Schulz()[source]

Create a model instance

sas.models.Sin module

Provide sin(x) function as a BaseComponent model

class sas.models.Sin.Sin[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a sin(x) model.

clone()[source]

Return a identical copy of self

run(x=0.0)[source]

Evaluate the model @param x: input x, or [x, phi] [radian] @return: sin(x) or sin(x*cos(phi))*sin(x*sin(phi))

runXY(x=0.0)[source]

Evaluate the model @param x: input x, or [x, y] [radian] @return: sin(x) or sin(x)*sin(y)

sas.models.SphereModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/sphere.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.SphereModel.SphereModel(multfactor=1)[source]

Bases: CSphereModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a SphereModel model. This file was auto-generated from src/sas/models/include/sphere.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 60.0 [A]
  • sldSph = 2e-06 [1/A^(2)]
  • sldSolv = 1e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • M0_sld_sph = 0.0 [1/A^(2)]
  • M_theta_sph = 0.0 [deg]
  • M_phi_sph = 0.0 [deg]
  • M0_sld_solv = 0.0 [1/A^(2)]
  • M_theta_solv = 0.0 [deg]
  • M_phi_solv = 0.0 [deg]
  • Up_frac_i = 0.5 [u/(u+d)]
  • Up_frac_f = 0.5 [u/(u+d)]
  • Up_theta = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.SphereModel.create_SphereModel()[source]

Create a model instance

sas.models.SphereSLDModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/spheresld.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.SphereSLDModel.SphereSLDModel(multfactor=1)[source]

Bases: CSphereSLDModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a SphereSLDModel model. This file was auto-generated from src/sas/models/include/spheresld.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • n_shells = 1.0
  • scale = 1.0
  • thick_inter0 = 50.0 [A]
  • func_inter0 = 0.0
  • sld_core0 = 2.07e-06 [1/A^(2)]
  • sld_solv = 1e-06 [1/A^(2)]
  • background = 0.0
  • sld_flat1 = 4e-06 [1/A^(2)]
  • sld_flat2 = 3.5e-06 [1/A^(2)]
  • sld_flat3 = 4e-06 [1/A^(2)]
  • sld_flat4 = 3.5e-06 [1/A^(2)]
  • sld_flat5 = 4e-06 [1/A^(2)]
  • sld_flat6 = 3.5e-06 [1/A^(2)]
  • sld_flat7 = 4e-06 [1/A^(2)]
  • sld_flat8 = 3.5e-06 [1/A^(2)]
  • sld_flat9 = 4e-06 [1/A^(2)]
  • sld_flat10 = 3.5e-06 [1/A^(2)]
  • thick_inter1 = 50.0 [A]
  • thick_inter2 = 50.0 [A]
  • thick_inter3 = 50.0 [A]
  • thick_inter4 = 50.0 [A]
  • thick_inter5 = 50.0 [A]
  • thick_inter6 = 50.0 [A]
  • thick_inter7 = 50.0 [A]
  • thick_inter8 = 50.0 [A]
  • thick_inter9 = 50.0 [A]
  • thick_inter10 = 50.0 [A]
  • thick_flat1 = 100.0 [A]
  • thick_flat2 = 100.0 [A]
  • thick_flat3 = 100.0 [A]
  • thick_flat4 = 100.0 [A]
  • thick_flat5 = 100.0 [A]
  • thick_flat6 = 100.0 [A]
  • thick_flat7 = 100.0 [A]
  • thick_flat8 = 100.0 [A]
  • thick_flat9 = 100.0 [A]
  • thick_flat10 = 100.0 [A]
  • func_inter1 = 0.0
  • func_inter2 = 0.0
  • func_inter3 = 0.0
  • func_inter4 = 0.0
  • func_inter5 = 0.0
  • func_inter6 = 0.0
  • func_inter7 = 0.0
  • func_inter8 = 0.0
  • func_inter9 = 0.0
  • func_inter10 = 0.0
  • nu_inter1 = 2.5
  • nu_inter2 = 2.5
  • nu_inter3 = 2.5
  • nu_inter4 = 2.5
  • nu_inter5 = 2.5
  • nu_inter6 = 2.5
  • nu_inter7 = 2.5
  • nu_inter8 = 2.5
  • nu_inter9 = 2.5
  • nu_inter10 = 2.5
  • npts_inter = 35.0
  • nu_inter0 = 2.5
  • rad_core0 = 50.0 [A]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.SphereSLDModel.create_SphereSLDModel()[source]

Create a model instance

sas.models.SphericalSLDModel module

Spherical SLD model

class sas.models.SphericalSLDModel.SphericalSLDModel(multfactor=1)[source]

Bases: sas.models.BaseComponent.BaseComponent

This multi-model is based on Parratt formalism and provides the capability of changing the number of layers between 0 and 10.

calculate_ER()[source]
evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

: param x: input q[], or [qx[], qy[]] : return: scattering function P(q[])

getProfile()[source]

Get SLD profile

: return: (z, beta) where z is a list of depth of the transition points
beta is a list of the corresponding SLD values
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: scattering function value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.SquareWellStructure module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/SquareWell.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.SquareWellStructure.SquareWellStructure(multfactor=1)[source]

Bases: CSquareWellStructure, sas.models.BaseComponent.BaseComponent

Class that evaluates a SquareWellStructure model. This file was auto-generated from src/sas/models/include/SquareWell.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • effect_radius = 50.0 [A]
  • volfraction = 0.04
  • welldepth = 1.5 [kT]
  • wellwidth = 1.2
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.SquareWellStructure.create_SquareWellStructure()[source]

Create a model instance

sas.models.StackedDisksModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/stacked_disks.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.StackedDisksModel.StackedDisksModel(multfactor=1)[source]

Bases: CStackedDisksModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a StackedDisksModel model. This file was auto-generated from src/sas/models/include/stacked_disks.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 0.01
  • core_thick = 10.0 [A]
  • radius = 3000.0 [A]
  • layer_thick = 15.0 [A]
  • core_sld = 4e-06 [1/A^(2)]
  • layer_sld = -4e-07 [1/A^(2)]
  • solvent_sld = 5e-06 [1/A^(2)]
  • n_stacking = 1.0
  • sigma_d = 0.0
  • background = 0.001 [1/cm]
  • axis_theta = 0.0 [rad]
  • axis_phi = 0.0 [rad]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.StackedDisksModel.create_StackedDisksModel()[source]

Create a model instance

sas.models.StarPolymer module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/starpolymer.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.StarPolymer.StarPolymer(multfactor=1)[source]

Bases: CStarPolymer, sas.models.BaseComponent.BaseComponent

Class that evaluates a StarPolymer model. This file was auto-generated from src/sas/models/include/starpolymer.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • arms = 3.0
  • R2 = 100.0 [A]
  • scale = 1.0
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.StarPolymer.create_StarPolymer()[source]

Create a model instance

sas.models.StickyHSStructure module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/StickyHS.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.StickyHSStructure.StickyHSStructure(multfactor=1)[source]

Bases: CStickyHSStructure, sas.models.BaseComponent.BaseComponent

Class that evaluates a StickyHSStructure model. This file was auto-generated from src/sas/models/include/StickyHS.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • effect_radius = 50.0 [A]
  • volfraction = 0.1
  • perturb = 0.05
  • stickiness = 0.2
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.StickyHSStructure.create_StickyHSStructure()[source]

Create a model instance

sas.models.SubComponent module

Provide base functionality for all model components @author: Mathieu Doucet / UTK @contact: mathieu.doucet@nist.gov

class sas.models.SubComponent.SubComponent(base=None, other=None)[source]

Bases: sas.models.BaseComponent.BaseComponent

Basic model component for Subtraction Provides basic arithmetics

getParam(name)[source]

Set the value of a model parameter @param name: name of the parameter @return: value of the parameter

getParamList()[source]

Return a list of all available parameters for the model

run(x=0)[source]

Evaluate each part of the component and sum the results @param x: input parameter @return: value of the model at x

runXY(x=0)[source]

Evaluate each part of the component and sum the results @param x: input parameter @return: value of the model at x

setParam(name, value)[source]

Set the value of a model parameter @param name: name of parameter to set @param value: value to give the paramter

sas.models.SurfaceFractalModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/surfacefractal.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.SurfaceFractalModel.SurfaceFractalModel(multfactor=1)[source]

Bases: CSurfaceFractalModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a SurfaceFractalModel model. This file was auto-generated from src/sas/models/include/surfacefractal.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 10.0 [A]
  • surface_dim = 2.0
  • co_length = 500.0 [A]
  • background = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.SurfaceFractalModel.create_SurfaceFractalModel()[source]

Create a model instance

sas.models.TeubnerStreyModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/teubner_strey.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.TeubnerStreyModel.TeubnerStreyModel(multfactor=1)[source]

Bases: CTeubnerStreyModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a TeubnerStreyModel model. This file was auto-generated from src/sas/models/include/teubner_strey.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 0.1
  • c1 = -30.0
  • c2 = 5000.0
  • background = 0.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.TeubnerStreyModel.create_TeubnerStreyModel()[source]

Create a model instance

sas.models.TriaxialEllipsoidModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/triaxial_ellipsoid.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.TriaxialEllipsoidModel.TriaxialEllipsoidModel(multfactor=1)[source]

Bases: CTriaxialEllipsoidModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a TriaxialEllipsoidModel model. This file was auto-generated from src/sas/models/include/triaxial_ellipsoid.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • semi_axisA = 35.0 [A]
  • semi_axisB = 100.0 [A]
  • semi_axisC = 400.0 [A]
  • sldEll = 1e-06 [1/A^(2)]
  • sldSolv = 6.3e-06 [1/A^(2)]
  • background = 0.0 [1/cm]
  • axis_theta = 57.325 [deg]
  • axis_phi = 57.325 [deg]
  • axis_psi = 0.0 [deg]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.TriaxialEllipsoidModel.create_TriaxialEllipsoidModel()[source]

Create a model instance

sas.models.TwoLorentzianModel module

TwoLorentzianModel function as a BaseComponent model

class sas.models.TwoLorentzianModel.TwoLorentzianModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a TwoLorentzianModel. I(q) = II(q) = scale_1/(1.0 + pow((q*length_1),exponent_1)) + scale_2/(1.0 + pow((q*length_2),exponent_2) )+ background

run(x=0.0)[source]

Evaluate the model

param x: input q-value (float or [float, float] as [r, theta]) return: (scattering value)

runXY(x=0.0)[source]

Evaluate the model

param x: input q-value (float or [float, float] as [qx, qy]) return: scattering value

sas.models.TwoPowerLawModel module

Provide I(q) = A*pow(qval,-1.0*m1) for q<=qc
=scale*pow(qval,-1.0*m2) for q>qc

TwoPowerLaw function as a BaseComponent model

class sas.models.TwoPowerLawModel.TwoPowerLawModel[source]

Bases: sas.models.BaseComponent.BaseComponent

Class that evaluates a TwoPowerLawModel.

I(q) = coef_A*pow(qval,-1.0*power1) for q<=qc
=C*pow(qval,-1.0*power2) for q>qc

where C=coef_A*pow(qc,-1.0*power1)/pow(qc,-1.0*power2).

List of default parameters:

  • coef_A = coefficient
  • power1 = (-) Power @ low Q
  • power2 = (-) Power @ high Q
  • qc = crossover Q-value
  • background = incoherent background
run(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [r, theta]) @return: (guinier value)

runXY(x=0.0)[source]

Evaluate the model @param x: input q-value (float or [float, float] as [qx, qy]) @return: guinier value

sas.models.TwoYukawaModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/TwoYukawa.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.TwoYukawaModel.TwoYukawaModel(multfactor=1)[source]

Bases: CTwoYukawaModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a TwoYukawaModel model. This file was auto-generated from src/sas/models/include/TwoYukawa.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • volfraction = 0.2
  • effect_radius = 50.0 [A]
  • scale_K1 = 6.0
  • decayConst_Z1 = 10.0
  • scale_K2 = -1.0
  • decayConst_Z2 = 2.0
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.TwoYukawaModel.create_TwoYukawaModel()[source]

Create a model instance

sas.models.UnifiedPowerRgModel module

class sas.models.UnifiedPowerRgModel.UnifiedPowerRgModel(multfactor=1)[source]

Bases: sas.models.BaseComponent.BaseComponent

This model is based on Exponential/Power-law fit method developed by G. Beaucage

calculate_ER()[source]
getProfile()[source]

Get SLD profile

: return: None, No SLD profile supporting for this model

run(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [r, theta]) : return: (DAB value)

runXY(x=0.0)[source]

Evaluate the model

: param x: input q-value (float or [float, float] as [qx, qy]) : return: DAB value

setParam(name, value)[source]

Set the value of a model parameter

: param name: name of the parameter : param value: value of the parameter

set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

: param parameter: name of the parameter [string] :dispersion: dispersion object of type DispersionModel

sas.models.VesicleModel module

Provide functionality for a C extension model

Warning

THIS FILE WAS GENERATED BY WRAPPERGENERATOR.PY DO NOT MODIFY THIS FILE, MODIFY src/sas/models/include/vesicle.h AND RE-RUN THE GENERATOR SCRIPT

class sas.models.VesicleModel.VesicleModel(multfactor=1)[source]

Bases: CVesicleModel, sas.models.BaseComponent.BaseComponent

Class that evaluates a VesicleModel model. This file was auto-generated from src/sas/models/include/vesicle.h. Refer to that file and the structure it contains for details of the model.

List of default parameters:

  • scale = 1.0
  • radius = 100.0 [A]
  • thickness = 30.0 [A]
  • solv_sld = 6.36e-06 [1/A^(2)]
  • shell_sld = 5e-07 [1/A^(2)]
  • background = 0.0 [1/cm]
calculate_ER()[source]

Calculate the effective radius for P(q)*S(q)

Returns:the value of the effective radius
calculate_VR()[source]

Calculate the volf ratio for P(q)*S(q)

Returns:the value of the volf ratio
clone()[source]

Return a identical copy of self

evalDistribution(x)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q[], or [qx[], qy[]]
Returns:scattering function P(q[])
run(x=0.0)[source]

Evaluate the model

Parameters:x – input q, or [q,phi]
Returns:scattering function P(q)
runXY(x=0.0)[source]

Evaluate the model in cartesian coordinates

Parameters:x – input q, or [qx, qy]
Returns:scattering function P(q)
set_dispersion(parameter, dispersion)[source]

Set the dispersion object for a model parameter

Parameters:
  • parameter – name of the parameter [string]
  • dispersion – dispersion object of type DispersionModel
sas.models.VesicleModel.create_VesicleModel()[source]

Create a model instance

sas.models.dispersion_models module

Class definitions for python dispersion model for model parameters. These classes are bridges to the C++ dispersion object.

The ArrayDispersion class takes in numpy arrays only.

Usage: These classes can be used to set the dispersion model of a SAS model parameter:

cyl = CylinderModel() cyl.set_dispersion(‘radius’, GaussianDispersion())

After the dispersion model is set, you can access it’s parameter through the dispersion dictionary:

cyl.dispersion[‘radius’][‘width’] = 5.0
TODO:For backward compatibility, the model parameters are still kept in a dictionary. The next iteration of refactoring work should involve moving away from value-based parameters to object-based parameter. We want to store parameters as objects so that we can unify the ‘params’ and ‘dispersion’ dictionaries into a single dictionary of parameter objects that hold the complete information about the parameter (units, limits, dispersion model, etc...).
class sas.models.dispersion_models.ArrayDispersion[source]

Bases: sas.models.dispersion_models.DispersionModel

Python bridge class for a dispersion model based on arrays. The user has to set a weight distribution that will be used in the averaging the model parameter it is applied to.

set_weights(values, weights)[source]

Set the weights of an array dispersion Only accept numpy arrays.

Parameters:
  • values – numpy array of values
  • weights – numpy array of weights for each value entry
class sas.models.dispersion_models.DispersionModel[source]

Python bridge class for a basic dispersion model class with a constant parameter value distribution

set_weights(values, weights)[source]

Set the weights of an array dispersion

class sas.models.dispersion_models.GaussianDispersion[source]

Bases: sas.models.dispersion_models.DispersionModel

Python bridge class for a dispersion model based on a Gaussian distribution.

set_weights(values, weights)[source]

Set the weights of an array dispersion

class sas.models.dispersion_models.LogNormalDispersion[source]

Bases: sas.models.dispersion_models.DispersionModel

Python bridge class for a dispersion model based on a Log Normal distribution.

set_weights(values, weights)[source]

Set the weights of an array dispersion

class sas.models.dispersion_models.RectangleDispersion[source]

Bases: sas.models.dispersion_models.DispersionModel

Python bridge class for a dispersion model based on a Gaussian distribution.

set_weights(values, weights)[source]

Set the weights of an array dispersion

class sas.models.dispersion_models.SchulzDispersion[source]

Bases: sas.models.dispersion_models.DispersionModel

Python bridge class for a dispersion model based on a Schulz distribution.

set_weights(values, weights)[source]

Set the weights of an array dispersion

sas.models.pluginmodel module

class sas.models.pluginmodel.Model1DPlugin(name='Plugin Model')[source]

Bases: sas.models.BaseComponent.BaseComponent

function(x)[source]

Function to be implemented by the plug-in writer

run(x=0.0)[source]

Evaluate the model

Parameters:x – input x, or [x, phi] [radian]
Returns:function value
runXY(x=0.0)[source]

Evaluate the model

Parameters:x – input x, or [x, y]
Returns:function value
set_details()[source]

Set default details

sas.models.qsmearing module

Handle Q smearing

class sas.models.qsmearing.QSmearer(data1D, model=None)[source]

Bases: sas.models.qsmearing._QSmearer

Adaptor for Gaussian Q smearing class and SAS data

class sas.models.qsmearing.SlitSmearer(data1D, model=None)[source]

Bases: sas.models.qsmearing._SlitSmearer

Adaptor for slit smearing class and SAS data

sas.models.qsmearing.get_qextrapolate(width, data_x)[source]

Make fake data_x points extrapolated outside of the data_x points

Parameters:
  • width – array of std of q resolution
  • Data1D.x – Data1D.x array
Return new_width, data_x_ext:
 

extrapolated width array and x array

Assumption1:

data_x is ordered from lower q to higher q

Assumption2:

len(data) = len(width)

Assumption3:

the distance between the data points is more compact than the size of width

Todo1:

Make sure that the assumptions are correct for Data1D

Todo2:

This fixes the edge problem in Qsmearer but still needs to make smearer interface

sas.models.qsmearing.smear_selection(data1D, model=None)[source]

Creates the right type of smearer according to the data.

The canSAS format has a rule that either slit smearing data OR resolution smearing data is available.

For the present purpose, we choose the one that has none-zero data. If both slit and resolution smearing arrays are filled with good data (which should not happen), then we choose the resolution smearing data.

Parameters:
  • data1D – Data1D object
  • model – sas.model instance

sas.models.smearing_2d module

#This software was developed by the University of Tennessee as part of the #Distributed Data Analysis of Neutron Scattering Experiments (DANSE) #project funded by the US National Science Foundation. #See the license text in license.txt

class sas.models.smearing_2d.Smearer2D(data=None, model=None, index=None, limit=3.0, accuracy='Low', coords='polar', engine='c')[source]

Gaussian Q smearing class for SAS 2d data

get_data()[source]

Get qx_data, qy_data, dqx_data,dqy_data, and calculate phi_data=arctan(qx_data/qy_data)

get_value()[source]

Over sampling of r_nbins times phi_nbins, calculate Gaussian weights, then find smeared intensity

set_accuracy(accuracy='Low')[source]

Set accuracy.

Parameters:accuracy – string
set_data(data=None)[source]

Set data.

Parameters:data – DataLoader.Data_info type
set_index(index=None)[source]

Set index.

Parameters:index – 1d arrays
set_model(model=None)[source]

Set model.

Parameters:model – sas.models instance
set_smearer(smearer=True)[source]

Set whether or not smearer will be used

Parameters:smearer – smear object

Module contents

1D Modeling for SAS

sas.models.data_files()[source]

Return the data files associated with media.

The format is a list of (directory, [files...]) pairs which can be used directly in setup(...,data_files=...) for setup.py.

sas.models.get_data_path(media)[source]

Table Of Contents

Previous topic

sas.invariant package

Next topic

sas.perspectives package

This Page