FractalCoreShellModel

sans.models.FractalCoreShellModel

class sans.models.FractalCoreShellModel.FractalCoreShellModel

Bases: sans.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]

__add__()
__div__()
__init__()
__module__ = 'sans.models.FractalCoreShellModel'
__mul__()
__str__()
Returns:string representatio
__sub__()
_clone()

Internal utility function to copy the internal data members to a fresh copy.

_fractalcore()

Define model function

return S(q): Fractal Structure

_setParamHelper()

Helper function to setParam

_set_details()

Concatenate details of the original model to create this model details

_set_dispersion()

model dispersions

_set_params()

Concatenate the parameters of the model to create this model parameters

calculate_ER()
clone()

Returns a new object identical to the current object

evalDistribution()

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()

Return a list of all available parameters for the model

getParam()

Set the value of a model parameter

Parameters:name – name of the parameter
getParamList()

Return a list of all available parameters for the model

getParamListWithToken()
getParamWithToken()
is_fittable()

Check if a given parameter is fittable or not

Parameters:par_name – the parameter name to check
run()

Evaluate the model

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

runXY()

Evaluate the model

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

setParam()

Set the value of a model parameter

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

setParamWithToken()
set_dispersion()

Set the dispersion object for a model parameter

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

Table Of Contents

Previous topic

FractalAbsModel

Next topic

FractalModel

This Page