qsmearing

sans.models.qsmearing

class sans.models.qsmearing.QSmearer(data1D, model=None)

Bases: sans.models.qsmearing._QSmearer

Adaptor for Gaussian Q smearing class and SANS data

get_bin_range(q_min=None, q_max=None)
Parameters:
  • q_min – minimum q-value to smear
  • q_max – maximum q-value to smear
get_unsmeared_range(q_min, q_max)

Determine the range needed in unsmeared-Q to cover the smeared Q range Take 3 sigmas as the offset between smeared and unsmeared space

class sans.models.qsmearing.SlitSmearer(data1D, model=None)

Bases: sans.models.qsmearing._SlitSmearer

Adaptor for slit smearing class and SANS data

get_bin_range(q_min=None, q_max=None)
Parameters:
  • q_min – minimum q-value to smear
  • q_max – maximum q-value to smear
get_unsmeared_range(q_min, q_max)

Determine the range needed in unsmeared-Q to cover the smeared Q range

sans.models.qsmearing.get_qextrapolate(width, data_x)

Make fake data_x points extrapolated outside of the data_x points

: param width: array of std of q resolution : param 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
sans.models.qsmearing.smear_selection(data1D, model=None)

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 – sans.model instance

Table Of Contents

Previous topic

ProlateModel

Next topic

ReflAdvModel

This Page