LineModel

sans.models.LineModel

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

class sans.models.LineModel.LineModel

Bases: sans.models.BaseComponent.BaseComponent

Class that evaluates a linear model.

f(x) = A + Bx

List of default parameters:
A = 1.0 B = 1.0
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,
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: simple value @return: (Line value)

runXY()

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

setParam()

Set the value of a model parameter

Parameters:
  • name – name of the parameter
  • value – value of the parameter
setParamWithToken()

Table Of Contents

Previous topic

LamellarPSModel

Next topic

LogNormal

This Page