sas.sascalc.shape2sas package¶
Submodules¶
sas.sascalc.shape2sas.Shape2SAS module¶
- class sas.sascalc.shape2sas.Shape2SAS.ModelPointDistribution(x: ndarray, y: ndarray, z: ndarray, p: ndarray, volume_total: float)¶
Bases:
objectPoint distribution of a model
- __annotations__ = {'p': <class 'numpy.ndarray'>, 'volume_total': <class 'float'>, 'x': <class 'numpy.ndarray'>, 'y': <class 'numpy.ndarray'>, 'z': <class 'numpy.ndarray'>}¶
- __dataclass_fields__ = {'p': Field(name='p',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'volume_total': Field(name='volume_total',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'x': Field(name='x',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'y': Field(name='y',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'z': Field(name='z',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'x': <class 'numpy.ndarray'>, 'y': <class 'numpy.ndarray'>, 'z': <class 'numpy.ndarray'>, 'p': <class 'numpy.ndarray'>, 'volume_total': <class 'float'>}, '__doc__': 'Point distribution of a model', '__dict__': <attribute '__dict__' of 'ModelPointDistribution' objects>, '__weakref__': <attribute '__weakref__' of 'ModelPointDistribution' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'x': Field(name='x',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'y': Field(name='y',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'z': Field(name='z',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'p': Field(name='p',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'volume_total': Field(name='volume_total',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function ModelPointDistribution.__init__>, '__repr__': <function ModelPointDistribution.__repr__>, '__eq__': <function ModelPointDistribution.__eq__>, '__hash__': None, '__match_args__': ('x', 'y', 'z', 'p', 'volume_total')})¶
- __doc__ = 'Point distribution of a model'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(x: ndarray, y: ndarray, z: ndarray, p: ndarray, volume_total: float) None¶
- __match_args__ = ('x', 'y', 'z', 'p', 'volume_total')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- p: ndarray¶
- volume_total: float¶
- x: ndarray¶
- y: ndarray¶
- z: ndarray¶
- class sas.sascalc.shape2sas.Shape2SAS.ModelProfile(subunits: list[str] = <factory>, p_s: list[float] = <factory>, dimensions: list[list[float]] = <factory>, com: list[list[float]] = <factory>, rotation_points: list[list[float]] = <factory>, rotation: list[list[float]] = <factory>, exclude_overlap: bool | None = <factory>)¶
Bases:
objectClass containing parameters for creating a particle
NOTE: Default values create a sphere with a radius of 50 Å at the origin.
- __annotations__ = {'com': list[list[float]], 'dimensions': list[list[float]], 'exclude_overlap': bool | None, 'p_s': list[float], 'rotation': list[list[float]], 'rotation_points': list[list[float]], 'subunits': list[str]}¶
- __dataclass_fields__ = {'com': Field(name='com',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'dimensions': Field(name='dimensions',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'exclude_overlap': Field(name='exclude_overlap',type=bool | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'p_s': Field(name='p_s',type=list[float],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'rotation': Field(name='rotation',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'rotation_points': Field(name='rotation_points',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'subunits': Field(name='subunits',type=list[str],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'subunits': list[str], 'p_s': list[float], 'dimensions': list[list[float]], 'com': list[list[float]], 'rotation_points': list[list[float]], 'rotation': list[list[float]], 'exclude_overlap': bool | None}, '__doc__': 'Class containing parameters for\n creating a particle\n\n NOTE: Default values create a sphere with a\n radius of 50 Å at the origin.\n ', '__dict__': <attribute '__dict__' of 'ModelProfile' objects>, '__weakref__': <attribute '__weakref__' of 'ModelProfile' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'subunits': Field(name='subunits',type=list[str],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'p_s': Field(name='p_s',type=list[float],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'dimensions': Field(name='dimensions',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'com': Field(name='com',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'rotation_points': Field(name='rotation_points',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'rotation': Field(name='rotation',type=list[list[float]],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'exclude_overlap': Field(name='exclude_overlap',type=bool | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelProfile.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function ModelProfile.__init__>, '__repr__': <function ModelProfile.__repr__>, '__eq__': <function ModelProfile.__eq__>, '__hash__': None, '__match_args__': ('subunits', 'p_s', 'dimensions', 'com', 'rotation_points', 'rotation', 'exclude_overlap')})¶
- __doc__ = 'Class containing parameters for\n creating a particle\n\n NOTE: Default values create a sphere with a\n radius of 50 Å at the origin.\n '¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(subunits: list[str] = <factory>, p_s: list[float] = <factory>, dimensions: list[list[float]] = <factory>, com: list[list[float]] = <factory>, rotation_points: list[list[float]] = <factory>, rotation: list[list[float]] = <factory>, exclude_overlap: bool | None = <factory>) None¶
- __match_args__ = ('subunits', 'p_s', 'dimensions', 'com', 'rotation_points', 'rotation', 'exclude_overlap')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- com: list[list[float]]¶
- dimensions: list[list[float]]¶
- exclude_overlap: bool | None¶
- p_s: list[float]¶
- rotation: list[list[float]]¶
- rotation_points: list[list[float]]¶
- subunits: list[str]¶
- class sas.sascalc.shape2sas.Shape2SAS.ModelSystem(PointDistribution: ~sas.sascalc.shape2sas.Shape2SAS.ModelPointDistribution, Stype: str = <factory>, par: list[float] = <factory>, polydispersity: float = <factory>, conc: float = <factory>, sigma_r: float = <factory>)¶
Bases:
objectClass containing parameters for the system
- PointDistribution: ModelPointDistribution¶
- Stype: str¶
- __annotations__ = {'PointDistribution': <class 'sas.sascalc.shape2sas.Shape2SAS.ModelPointDistribution'>, 'Stype': <class 'str'>, 'conc': <class 'float'>, 'par': list[float], 'polydispersity': <class 'float'>, 'sigma_r': <class 'float'>}¶
- __dataclass_fields__ = {'PointDistribution': Field(name='PointDistribution',type=<class 'sas.sascalc.shape2sas.Shape2SAS.ModelPointDistribution'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'Stype': Field(name='Stype',type=<class 'str'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'conc': Field(name='conc',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'par': Field(name='par',type=list[float],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'polydispersity': Field(name='polydispersity',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'sigma_r': Field(name='sigma_r',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'PointDistribution': <class 'sas.sascalc.shape2sas.Shape2SAS.ModelPointDistribution'>, 'Stype': <class 'str'>, 'par': list[float], 'polydispersity': <class 'float'>, 'conc': <class 'float'>, 'sigma_r': <class 'float'>}, '__doc__': 'Class containing parameters for\n the system', '__dict__': <attribute '__dict__' of 'ModelSystem' objects>, '__weakref__': <attribute '__weakref__' of 'ModelSystem' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'PointDistribution': Field(name='PointDistribution',type=<class 'sas.sascalc.shape2sas.Shape2SAS.ModelPointDistribution'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'Stype': Field(name='Stype',type=<class 'str'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'par': Field(name='par',type=list[float],default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'polydispersity': Field(name='polydispersity',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'conc': Field(name='conc',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'sigma_r': Field(name='sigma_r',type=<class 'float'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<function ModelSystem.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function ModelSystem.__init__>, '__repr__': <function ModelSystem.__repr__>, '__eq__': <function ModelSystem.__eq__>, '__hash__': None, '__match_args__': ('PointDistribution', 'Stype', 'par', 'polydispersity', 'conc', 'sigma_r')})¶
- __doc__ = 'Class containing parameters for\n the system'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(PointDistribution: ~sas.sascalc.shape2sas.Shape2SAS.ModelPointDistribution, Stype: str = <factory>, par: list[float] = <factory>, polydispersity: float = <factory>, conc: float = <factory>, sigma_r: float = <factory>) None¶
- __match_args__ = ('PointDistribution', 'Stype', 'par', 'polydispersity', 'conc', 'sigma_r')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- conc: float¶
- par: list[float]¶
- polydispersity: float¶
- sigma_r: float¶
- class sas.sascalc.shape2sas.Shape2SAS.SimulateScattering(q: ~numpy.ndarray, I0: ~numpy.ndarray, I: ~numpy.ndarray, exposure: float | None = <factory>)¶
Bases:
objectClass containing parameters for simulating scattering
- I: ndarray¶
- I0: ndarray¶
- __annotations__ = {'I': <class 'numpy.ndarray'>, 'I0': <class 'numpy.ndarray'>, 'exposure': float | None, 'q': <class 'numpy.ndarray'>}¶
- __dataclass_fields__ = {'I': Field(name='I',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I0': Field(name='I0',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'exposure': Field(name='exposure',type=float | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulateScattering.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'q': Field(name='q',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'q': <class 'numpy.ndarray'>, 'I0': <class 'numpy.ndarray'>, 'I': <class 'numpy.ndarray'>, 'exposure': float | None}, '__doc__': 'Class containing parameters for\n simulating scattering', '__dict__': <attribute '__dict__' of 'SimulateScattering' objects>, '__weakref__': <attribute '__weakref__' of 'SimulateScattering' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'q': Field(name='q',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I0': Field(name='I0',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I': Field(name='I',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'exposure': Field(name='exposure',type=float | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulateScattering.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function SimulateScattering.__init__>, '__repr__': <function SimulateScattering.__repr__>, '__eq__': <function SimulateScattering.__eq__>, '__hash__': None, '__match_args__': ('q', 'I0', 'I', 'exposure')})¶
- __doc__ = 'Class containing parameters for\n simulating scattering'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(q: ~numpy.ndarray, I0: ~numpy.ndarray, I: ~numpy.ndarray, exposure: float | None = <factory>) None¶
- __match_args__ = ('q', 'I0', 'I', 'exposure')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- exposure: float | None¶
- q: ndarray¶
- class sas.sascalc.shape2sas.Shape2SAS.SimulatedScattering(I_sim: ndarray, q: ndarray, I_err: ndarray)¶
Bases:
objectClass containing parameters for simulated scattering
- I_err: ndarray¶
- I_sim: ndarray¶
- __annotations__ = {'I_err': <class 'numpy.ndarray'>, 'I_sim': <class 'numpy.ndarray'>, 'q': <class 'numpy.ndarray'>}¶
- __dataclass_fields__ = {'I_err': Field(name='I_err',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I_sim': Field(name='I_sim',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'q': Field(name='q',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'I_sim': <class 'numpy.ndarray'>, 'q': <class 'numpy.ndarray'>, 'I_err': <class 'numpy.ndarray'>}, '__doc__': 'Class containing parameters for\n simulated scattering', '__dict__': <attribute '__dict__' of 'SimulatedScattering' objects>, '__weakref__': <attribute '__weakref__' of 'SimulatedScattering' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'I_sim': Field(name='I_sim',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'q': Field(name='q',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I_err': Field(name='I_err',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function SimulatedScattering.__init__>, '__repr__': <function SimulatedScattering.__repr__>, '__eq__': <function SimulatedScattering.__eq__>, '__hash__': None, '__match_args__': ('I_sim', 'q', 'I_err')})¶
- __doc__ = 'Class containing parameters for\n simulated scattering'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(I_sim: ndarray, q: ndarray, I_err: ndarray) None¶
- __match_args__ = ('I_sim', 'q', 'I_err')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- q: ndarray¶
- class sas.sascalc.shape2sas.Shape2SAS.SimulationParameters(q: ~numpy.ndarray | None = <factory>, prpoints: int | None = <factory>, Npoints: int | None = <factory>, model_name: list[str] | None = <factory>)¶
Bases:
objectClass containing parameters for the simulation itself
- Npoints: int | None¶
- __annotations__ = {'Npoints': int | None, 'model_name': list[str] | None, 'prpoints': int | None, 'q': numpy.ndarray | None}¶
- __dataclass_fields__ = {'Npoints': Field(name='Npoints',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'model_name': Field(name='model_name',type=list[str] | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'prpoints': Field(name='prpoints',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'q': Field(name='q',type=numpy.ndarray | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'q': numpy.ndarray | None, 'prpoints': int | None, 'Npoints': int | None, 'model_name': list[str] | None}, '__doc__': 'Class containing parameters for\n the simulation itself', '__dict__': <attribute '__dict__' of 'SimulationParameters' objects>, '__weakref__': <attribute '__weakref__' of 'SimulationParameters' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'q': Field(name='q',type=numpy.ndarray | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'prpoints': Field(name='prpoints',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'Npoints': Field(name='Npoints',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'model_name': Field(name='model_name',type=list[str] | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<function SimulationParameters.<lambda>>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function SimulationParameters.__init__>, '__repr__': <function SimulationParameters.__repr__>, '__eq__': <function SimulationParameters.__eq__>, '__hash__': None, '__match_args__': ('q', 'prpoints', 'Npoints', 'model_name')})¶
- __doc__ = 'Class containing parameters for\n the simulation itself'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(q: ~numpy.ndarray | None = <factory>, prpoints: int | None = <factory>, Npoints: int | None = <factory>, model_name: list[str] | None = <factory>) None¶
- __match_args__ = ('q', 'prpoints', 'Npoints', 'model_name')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- model_name: list[str] | None¶
- prpoints: int | None¶
- q: ndarray | None¶
- class sas.sascalc.shape2sas.Shape2SAS.TheoreticalScattering(q: ndarray, I0: ndarray, I: ndarray, S_eff: ndarray, r: ndarray, pr: ndarray, pr_norm: ndarray)¶
Bases:
objectClass containing parameters for theoretical scattering
- I: ndarray¶
- I0: ndarray¶
- S_eff: ndarray¶
- __annotations__ = {'I': <class 'numpy.ndarray'>, 'I0': <class 'numpy.ndarray'>, 'S_eff': <class 'numpy.ndarray'>, 'pr': <class 'numpy.ndarray'>, 'pr_norm': <class 'numpy.ndarray'>, 'q': <class 'numpy.ndarray'>, 'r': <class 'numpy.ndarray'>}¶
- __dataclass_fields__ = {'I': Field(name='I',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I0': Field(name='I0',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'S_eff': Field(name='S_eff',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'pr': Field(name='pr',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'pr_norm': Field(name='pr_norm',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'q': Field(name='q',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'r': Field(name='r',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'q': <class 'numpy.ndarray'>, 'I0': <class 'numpy.ndarray'>, 'I': <class 'numpy.ndarray'>, 'S_eff': <class 'numpy.ndarray'>, 'r': <class 'numpy.ndarray'>, 'pr': <class 'numpy.ndarray'>, 'pr_norm': <class 'numpy.ndarray'>}, '__doc__': 'Class containing parameters for\n theoretical scattering', '__dict__': <attribute '__dict__' of 'TheoreticalScattering' objects>, '__weakref__': <attribute '__weakref__' of 'TheoreticalScattering' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'q': Field(name='q',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I0': Field(name='I0',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'I': Field(name='I',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'S_eff': Field(name='S_eff',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'r': Field(name='r',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'pr': Field(name='pr',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'pr_norm': Field(name='pr_norm',type=<class 'numpy.ndarray'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function TheoreticalScattering.__init__>, '__repr__': <function TheoreticalScattering.__repr__>, '__eq__': <function TheoreticalScattering.__eq__>, '__hash__': None, '__match_args__': ('q', 'I0', 'I', 'S_eff', 'r', 'pr', 'pr_norm')})¶
- __doc__ = 'Class containing parameters for\n theoretical scattering'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(q: ndarray, I0: ndarray, I: ndarray, S_eff: ndarray, r: ndarray, pr: ndarray, pr_norm: ndarray) None¶
- __match_args__ = ('q', 'I0', 'I', 'S_eff', 'r', 'pr', 'pr_norm')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- pr: ndarray¶
- pr_norm: ndarray¶
- q: ndarray¶
- r: ndarray¶
- class sas.sascalc.shape2sas.Shape2SAS.TheoreticalScatteringCalculation(System: ModelSystem, Calculation: SimulationParameters)¶
Bases:
objectClass containing parameters for simulating scattering for a given model system
- Calculation: SimulationParameters¶
- System: ModelSystem¶
- __annotations__ = {'Calculation': <class 'sas.sascalc.shape2sas.Shape2SAS.SimulationParameters'>, 'System': <class 'sas.sascalc.shape2sas.Shape2SAS.ModelSystem'>}¶
- __dataclass_fields__ = {'Calculation': Field(name='Calculation',type=<class 'sas.sascalc.shape2sas.Shape2SAS.SimulationParameters'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'System': Field(name='System',type=<class 'sas.sascalc.shape2sas.Shape2SAS.ModelSystem'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}¶
- __dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False)¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.Shape2SAS', '__annotations__': {'System': <class 'sas.sascalc.shape2sas.Shape2SAS.ModelSystem'>, 'Calculation': <class 'sas.sascalc.shape2sas.Shape2SAS.SimulationParameters'>}, '__doc__': 'Class containing parameters for simulating\n scattering for a given model system', '__dict__': <attribute '__dict__' of 'TheoreticalScatteringCalculation' objects>, '__weakref__': <attribute '__weakref__' of 'TheoreticalScatteringCalculation' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False), '__dataclass_fields__': {'System': Field(name='System',type=<class 'sas.sascalc.shape2sas.Shape2SAS.ModelSystem'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD), 'Calculation': Field(name='Calculation',type=<class 'sas.sascalc.shape2sas.Shape2SAS.SimulationParameters'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,_field_type=_FIELD)}, '__init__': <function TheoreticalScatteringCalculation.__init__>, '__repr__': <function TheoreticalScatteringCalculation.__repr__>, '__eq__': <function TheoreticalScatteringCalculation.__eq__>, '__hash__': None, '__match_args__': ('System', 'Calculation')})¶
- __doc__ = 'Class containing parameters for simulating\n scattering for a given model system'¶
- __eq__(other)¶
Return self==value.
- __hash__ = None¶
- __init__(System: ModelSystem, Calculation: SimulationParameters) None¶
- __match_args__ = ('System', 'Calculation')¶
- __module__ = 'sas.sascalc.shape2sas.Shape2SAS'¶
- __repr__()¶
Return repr(self).
- __weakref__¶
list of weak references to the object
- sas.sascalc.shape2sas.Shape2SAS.getPointDistribution(prof: ModelProfile, Npoints)¶
Generate points for a given model profile.
- sas.sascalc.shape2sas.Shape2SAS.getSimulatedScattering(scalc: SimulateScattering) SimulatedScattering¶
Simulate scattering for a given theoretical scattering.
- sas.sascalc.shape2sas.Shape2SAS.getTheoreticalScattering(scalc: TheoreticalScatteringCalculation) TheoreticalScattering¶
Calculate theoretical scattering for a given model profile.
sas.sascalc.shape2sas.helpfunctions module¶
- class sas.sascalc.shape2sas.helpfunctions.Aggregation(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, par: list[float])¶
Bases:
StructureDecouplingApprox- __doc__ = None¶
- __init__(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, par: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- calc_S_aggr() ndarray¶
calculates fractal aggregate structure factor with dimensionality 2
S_{2,D=2} in Larsen et al 2020, https://doi.org/10.1107/S1600576720006500
input q : Naggr : number of particles per aggregate Reff : effective radius of one particle
output S_aggr :
- structure_eff(Pq: ndarray) ndarray¶
Return effective structure factor for aggregation
- class sas.sascalc.shape2sas.helpfunctions.Cube(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Cube.__init__>, 'getVolume': <function Cube.getVolume>, 'getPointDistribution': <function Cube.getPointDistribution>, 'checkOverlap': <function Cube.checkOverlap>, '__dict__': <attribute '__dict__' of 'Cube' objects>, '__weakref__': <attribute '__weakref__' of 'Cube' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a cube
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a cube
- getVolume() float¶
Returns the volume of a cube
- class sas.sascalc.shape2sas.helpfunctions.Cuboid(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Cuboid.__init__>, 'getVolume': <function Cuboid.getVolume>, 'getPointDistribution': <function Cuboid.getPointDistribution>, 'checkOverlap': <function Cuboid.checkOverlap>, '__dict__': <attribute '__dict__' of 'Cuboid' objects>, '__weakref__': <attribute '__weakref__' of 'Cuboid' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a Cuboid
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a cuboid
- getVolume() float¶
Returns the volume of a cuboid
- class sas.sascalc.shape2sas.helpfunctions.Cylinder(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Cylinder.__init__>, 'getVolume': <function Cylinder.getVolume>, 'getPointDistribution': <function Cylinder.getPointDistribution>, 'checkOverlap': <function Cylinder.checkOverlap>, '__dict__': <attribute '__dict__' of 'Cylinder' objects>, '__weakref__': <attribute '__weakref__' of 'Cylinder' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a cylinder
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a cylinder
- getVolume() float¶
Returns the volume of a cylinder
- class sas.sascalc.shape2sas.helpfunctions.CylinderRing(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function CylinderRing.__init__>, 'getVolume': <function CylinderRing.getVolume>, 'getPointDistribution': <function CylinderRing.getPointDistribution>, 'checkOverlap': <function CylinderRing.checkOverlap>, '__dict__': <attribute '__dict__' of 'CylinderRing' objects>, '__weakref__': <attribute '__weakref__' of 'CylinderRing' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a cylinder ring
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a cylinder ring
- getVolume() float¶
Returns the volume of a cylinder ring
- class sas.sascalc.shape2sas.helpfunctions.Disc(dimensions: list[float])¶
Bases:
EllipticalCylinder- __doc__ = None¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- class sas.sascalc.shape2sas.helpfunctions.DiscRing(dimensions: list[float])¶
Bases:
CylinderRing- __annotations__ = {}¶
- __doc__ = None¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- class sas.sascalc.shape2sas.helpfunctions.Ellipsoid(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Ellipsoid.__init__>, 'getVolume': <function Ellipsoid.getVolume>, 'getPointDistribution': <function Ellipsoid.getPointDistribution>, 'checkOverlap': <function Ellipsoid.checkOverlap>, '__dict__': <attribute '__dict__' of 'Ellipsoid' objects>, '__weakref__': <attribute '__weakref__' of 'Ellipsoid' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
check for points within a ellipsoid
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of an ellipsoid
- getVolume() float¶
Returns the volume of an ellipsoid
- class sas.sascalc.shape2sas.helpfunctions.EllipticalCylinder(dimensions: list[float])¶
Bases:
object- __annotations__ = {}¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function EllipticalCylinder.__init__>, 'getVolume': <function EllipticalCylinder.getVolume>, 'getPointDistribution': <function EllipticalCylinder.getPointDistribution>, 'checkOverlap': <function EllipticalCylinder.checkOverlap>, '__dict__': <attribute '__dict__' of 'EllipticalCylinder' objects>, '__weakref__': <attribute '__weakref__' of 'EllipticalCylinder' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a Elliptical cylinder
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of an elliptical cylinder
- getVolume() float¶
Returns the volume of an elliptical cylinder
- class sas.sascalc.shape2sas.helpfunctions.GenerateAllPoints(Npoints: int, com: list[list[float]], subunits: list[list[float]], dimensions: list[list[float]], rotation: list[list[float]], rotation_point: list[float], p: list[float], exclude_overlap: bool)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function GenerateAllPoints.__init__>, 'setAvailableSubunits': <function GenerateAllPoints.setAvailableSubunits>, 'getSubunitClass': <function GenerateAllPoints.getSubunitClass>, 'onAppendingPoints': <staticmethod(<function GenerateAllPoints.onAppendingPoints>)>, 'onCheckOverlap': <staticmethod(<function GenerateAllPoints.onCheckOverlap>)>, 'onGeneratingAllPointsSeparately': <function GenerateAllPoints.onGeneratingAllPointsSeparately>, 'onGeneratingAllPoints': <function GenerateAllPoints.onGeneratingAllPoints>, '__dict__': <attribute '__dict__' of 'GenerateAllPoints' objects>, '__weakref__': <attribute '__weakref__' of 'GenerateAllPoints' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(Npoints: int, com: list[list[float]], subunits: list[list[float]], dimensions: list[list[float]], rotation: list[list[float]], rotation_point: list[float], p: list[float], exclude_overlap: bool)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- getSubunitClass(key: str)¶
- static onAppendingPoints(x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, x_add: ndarray, y_add: ndarray, z_add: ndarray, p_add: ndarray) tuple[ndarray, ndarray, ndarray, ndarray]¶
append new points to vectors of point coordinates
- static onCheckOverlap(x: ndarray, y: ndarray, z: ndarray, p: ndarray, rotation: list[float], rotation_point: list[float], com: list[float], subunitClass: object, dimensions: list[float])¶
check for overlap with previous subunits. if overlap, the point is removed
- onGeneratingAllPoints() tuple[ndarray, ndarray, ndarray, ndarray, float]¶
Generating points for all subunits from each built model
- onGeneratingAllPointsSeparately() tuple[ndarray, ndarray, ndarray]¶
Generating points for all subunits from each built model, but save them separately in their own list
- setAvailableSubunits()¶
Returns the available subunits
- class sas.sascalc.shape2sas.helpfunctions.GeneratePoints(com: list[float], subunitClass: object, dimensions: list[float], rotation: list[float], rotation_point: list[float], Npoints: int)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function GeneratePoints.__init__>, 'onGeneratingPoints': <function GeneratePoints.onGeneratingPoints>, 'onTransformingPoints': <function GeneratePoints.onTransformingPoints>, '__dict__': <attribute '__dict__' of 'GeneratePoints' objects>, '__weakref__': <attribute '__weakref__' of 'GeneratePoints' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(com: list[float], subunitClass: object, dimensions: list[float], rotation: list[float], rotation_point: list[float], Npoints: int)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- onGeneratingPoints() tuple[ndarray, ndarray, ndarray]¶
Generates the points
- onTransformingPoints(x: ndarray, y: ndarray, z: ndarray) tuple[ndarray, ndarray, ndarray]¶
Transforms the points
- class sas.sascalc.shape2sas.helpfunctions.HardSphereStructure(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, par: list[float])¶
Bases:
StructureDecouplingApprox- __annotations__ = {}¶
- __doc__ = None¶
- __init__(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, par: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- static calc_G(A: ndarray, eta: float) ndarray¶
calculate G in the hard-sphere potential
input A : 2*R*q q : momentum transfer R : hard-sphere radius eta: volume fraction
output: G
- calc_S_HS() ndarray¶
calculate the hard-sphere structure factor calls function calc_G()
input q : momentum transfer eta : volume fraction R : estimation of the hard-sphere radius
output S_HS : hard-sphere structure factor
- structure_eff(Pq: ndarray) ndarray¶
- class sas.sascalc.shape2sas.helpfunctions.HollowCube(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function HollowCube.__init__>, 'getVolume': <function HollowCube.getVolume>, 'getPointDistribution': <function HollowCube.getPointDistribution>, 'checkOverlap': <function HollowCube.checkOverlap>, '__dict__': <attribute '__dict__' of 'HollowCube' objects>, '__weakref__': <attribute '__weakref__' of 'HollowCube' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a hollow cube
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a hollow cube
- getVolume() float¶
Returns the volume of a hollow cube
- class sas.sascalc.shape2sas.helpfunctions.HollowSphere(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function HollowSphere.__init__>, 'getVolume': <function HollowSphere.getVolume>, 'getPointDistribution': <function HollowSphere.getPointDistribution>, 'checkOverlap': <function HollowSphere.checkOverlap>, '__dict__': <attribute '__dict__' of 'HollowSphere' objects>, '__weakref__': <attribute '__weakref__' of 'HollowSphere' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a hollow sphere
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a hollow sphere
- getVolume() float¶
Returns the volume of a hollow sphere
- class sas.sascalc.shape2sas.helpfunctions.IExperimental(q: ndarray, I0: ndarray, I: ndarray, exposure: float)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function IExperimental.__init__>, 'simulate_data': <function IExperimental.simulate_data>, 'save_Iexperimental': <function IExperimental.save_Iexperimental>, '__dict__': <attribute '__dict__' of 'IExperimental' objects>, '__weakref__': <attribute '__weakref__' of 'IExperimental' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(q: ndarray, I0: ndarray, I: ndarray, exposure: float)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- save_Iexperimental(Isim: ndarray, sigma: ndarray, Model: str)¶
- simulate_data() tuple[ndarray, ndarray]¶
Simulate SAXS data using calculated scattering and empirical expression for sigma
input q,I : calculated scattering, normalized I0 : forward scattering #noise : relative noise (scales the simulated sigmas by a factor) exposure : exposure (in arbitrary units) - affects the noise level of data
output sigma : simulated noise Isim : simulated data
data is also written to a file
- class sas.sascalc.shape2sas.helpfunctions.ITheoretical(q: ndarray)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function ITheoretical.__init__>, 'calc_Pq': <function ITheoretical.calc_Pq>, 'calc_Iq': <function ITheoretical.calc_Iq>, 'save_I': <function ITheoretical.save_I>, '__dict__': <attribute '__dict__' of 'ITheoretical' objects>, '__weakref__': <attribute '__weakref__' of 'ITheoretical' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(q: ndarray)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- calc_Iq(Pq: ndarray, S_eff: ndarray, sigma_r: float) ndarray¶
calculates intensity
- calc_Pq(r: ndarray, pr: ndarray, conc: float, volume_total: float) tuple[ndarray, ndarray]¶
calculate form factor, P(q), and forward scattering, I(0), using pair distribution, p(r)
- save_I(I: ndarray, Model: str)¶
Save theoretical intensity to file
- class sas.sascalc.shape2sas.helpfunctions.NoStructure(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, par: Any)¶
Bases:
StructureDecouplingApprox- __annotations__ = {}¶
- __doc__ = None¶
- __init__(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, par: Any)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- structure_eff(Pq: Any) ndarray¶
Return effective structure factor for no structure
- class sas.sascalc.shape2sas.helpfunctions.Qsampling¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', 'onQsampling': <function Qsampling.onQsampling>, 'onUserSampledQ': <function Qsampling.onUserSampledQ>, 'qMethodsNames': <function Qsampling.qMethodsNames>, 'qMethodsInput': <function Qsampling.qMethodsInput>, '__dict__': <attribute '__dict__' of 'Qsampling' objects>, '__weakref__': <attribute '__weakref__' of 'Qsampling' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- onQsampling(qmax: float, Nq: int) ndarray¶
Returns uniform q sampling
- onUserSampledQ() ndarray¶
Returns user sampled q
- qMethodsInput()¶
- qMethodsNames()¶
- class sas.sascalc.shape2sas.helpfunctions.Rotation(x_add: ndarray, y_add: ndarray, z_add: ndarray, alpha: float, beta: float, gam: float, rotp_x: float, rotp_y: float, rotp_z: float)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Rotation.__init__>, 'onRotatingPoints': <function Rotation.onRotatingPoints>, '__dict__': <attribute '__dict__' of 'Rotation' objects>, '__weakref__': <attribute '__weakref__' of 'Rotation' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(x_add: ndarray, y_add: ndarray, z_add: ndarray, alpha: float, beta: float, gam: float, rotp_x: float, rotp_y: float, rotp_z: float)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- onRotatingPoints() tuple[ndarray, ndarray, ndarray]¶
Simple Euler rotation
- class sas.sascalc.shape2sas.helpfunctions.Sphere(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Sphere.__init__>, 'getVolume': <function Sphere.getVolume>, 'getPointDistribution': <function Sphere.getPointDistribution>, 'checkOverlap': <function Sphere.checkOverlap>, '__dict__': <attribute '__dict__' of 'Sphere' objects>, '__weakref__': <attribute '__weakref__' of 'Sphere' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a sphere
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a sphere
- getVolume() float¶
Returns the volume of a sphere
- class sas.sascalc.shape2sas.helpfunctions.StructureDecouplingApprox(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray)¶
Bases:
object- __annotations__ = {}¶
- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function StructureDecouplingApprox.__init__>, 'calc_com_dist': <function StructureDecouplingApprox.calc_com_dist>, 'calc_A00': <function StructureDecouplingApprox.calc_A00>, 'decoupling_approx': <function StructureDecouplingApprox.decoupling_approx>, '__dict__': <attribute '__dict__' of 'StructureDecouplingApprox' objects>, '__weakref__': <attribute '__weakref__' of 'StructureDecouplingApprox' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- calc_A00() ndarray¶
calc zeroth order sph harm, for decoupling approximation
- calc_com_dist() ndarray¶
calc contrast-weighted com distance
- decoupling_approx(Pq: ndarray, S: ndarray) ndarray¶
modify structure factor with the decoupling approximation for combining structure factors with non-spherical (or polydisperse) particles
see, for example, Larsen et al 2020: https://doi.org/10.1107/S1600576720006500 and refs therein
input q x,y,z,p : coordinates and contrasts Pq : form factor S : structure factor
output S_eff : effective structure factor, after applying decoupl. approx
- class sas.sascalc.shape2sas.helpfunctions.StructureFactor(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, Stype: str, par: list[float] | None)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function StructureFactor.__init__>, 'setAvailableStructureFactors': <function StructureFactor.setAvailableStructureFactors>, 'getStructureFactorClass': <function StructureFactor.getStructureFactorClass>, 'getparname': <staticmethod(<function StructureFactor.getparname>)>, 'save_S': <staticmethod(<function StructureFactor.save_S>)>, '__dict__': <attribute '__dict__' of 'StructureFactor' objects>, '__weakref__': <attribute '__weakref__' of 'StructureFactor' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(q: ndarray, x_new: ndarray, y_new: ndarray, z_new: ndarray, p_new: ndarray, Stype: str, par: list[float] | None)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- getStructureFactorClass()¶
Return chosen structure factor
- static getparname(name: str) list[str]¶
Return the name of the parameters
- static save_S(q: ndarray, S_eff: ndarray, Model: str)¶
save S to file
- setAvailableStructureFactors()¶
Available structure factors
- class sas.sascalc.shape2sas.helpfunctions.Superellipsoid(dimensions: list[float])¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Superellipsoid.__init__>, 'beta': <staticmethod(<function Superellipsoid.beta>)>, 'getVolume': <function Superellipsoid.getVolume>, 'getPointDistribution': <function Superellipsoid.getPointDistribution>, 'checkOverlap': <function Superellipsoid.checkOverlap>, '__dict__': <attribute '__dict__' of 'Superellipsoid' objects>, '__weakref__': <attribute '__weakref__' of 'Superellipsoid' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(dimensions: list[float])¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- static beta(a, b) float¶
beta function
- checkOverlap(x_eff: ndarray, y_eff: ndarray, z_eff: ndarray) ndarray¶
Check for points within a superellipsoid
- getPointDistribution(Npoints: int) tuple[ndarray, ndarray, ndarray]¶
Returns the point distribution of a superellipsoid
- getVolume() float¶
Returns the volume of a superellipsoid
- class sas.sascalc.shape2sas.helpfunctions.Translation(x_add: ndarray, y_add: ndarray, z_add: ndarray, com_x: float, com_y: float, com_z: float)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function Translation.__init__>, 'onTranslatingPoints': <function Translation.onTranslatingPoints>, '__dict__': <attribute '__dict__' of 'Translation' objects>, '__weakref__': <attribute '__weakref__' of 'Translation' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(x_add: ndarray, y_add: ndarray, z_add: ndarray, com_x: float, com_y: float, com_z: float)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- onTranslatingPoints() tuple[ndarray, ndarray, ndarray]¶
Translates points
- class sas.sascalc.shape2sas.helpfunctions.WeightedPairDistribution(x: ndarray, y: ndarray, z: ndarray, p: ndarray)¶
Bases:
object- __dict__ = mappingproxy({'__module__': 'sas.sascalc.shape2sas.helpfunctions', '__init__': <function WeightedPairDistribution.__init__>, 'calc_dist': <staticmethod(<function WeightedPairDistribution.calc_dist>)>, 'calc_all_dist': <function WeightedPairDistribution.calc_all_dist>, 'calc_all_contrasts': <function WeightedPairDistribution.calc_all_contrasts>, 'generate_histogram': <staticmethod(<function WeightedPairDistribution.generate_histogram>)>, 'calc_Rg': <staticmethod(<function WeightedPairDistribution.calc_Rg>)>, 'calc_hr': <function WeightedPairDistribution.calc_hr>, 'calc_pr': <function WeightedPairDistribution.calc_pr>, 'save_pr': <staticmethod(<function WeightedPairDistribution.save_pr>)>, '__dict__': <attribute '__dict__' of 'WeightedPairDistribution' objects>, '__weakref__': <attribute '__weakref__' of 'WeightedPairDistribution' objects>, '__doc__': None, '__annotations__': {}})¶
- __doc__ = None¶
- __init__(x: ndarray, y: ndarray, z: ndarray, p: ndarray)¶
- __module__ = 'sas.sascalc.shape2sas.helpfunctions'¶
- __weakref__¶
list of weak references to the object
- static calc_Rg(r: ndarray, pr: ndarray) float¶
calculate Rg from r and p(r)
- calc_all_contrasts() ndarray¶
calculate all pairwise contrast products of p: all contrasts
- calc_all_dist() ndarray¶
calculate all pairwise distances calls calc_dist() for each set of coordinates: x,y,z does a square sum of coordinates convert from matrix to
- static calc_dist(x: ndarray) ndarray¶
calculate all distances between points in an array
- calc_hr(dist: ndarray, Nbins: int, contrast: ndarray, polydispersity: float) tuple[ndarray, ndarray]¶
calculate h(r) h(r) is the contrast-weighted histogram of distances, including self-terms (dist = 0)
input: dist : all pairwise distances contrast : all pair-wise contrast products polydispersity: relative polydispersity, float
output: hr : pair distance distribution function
- calc_pr(Nbins: int, polydispersity: float) tuple[ndarray, ndarray, ndarray]¶
calculate p(r) p(r) is the contrast-weighted histogram of distances, without the self-terms (dist = 0)
input: dist : all pairwise distances contrast : all pair-wise contrast products polydispersity: boolian, True or False
output: pr : pair distance distribution function
- static generate_histogram(dist: ndarray, contrast: ndarray, r_max: float, Nbins: int) tuple[ndarray, ndarray]¶
make histogram of point pairs, h(r), binned after pair-distances, r used for calculating scattering (fast Debye)
input dist : all pairwise distances Nbins : number of bins in h(r) contrast : contrast of points r_max : max distance to include in histogram
output r : distances of bins histo : histogram, weighted by contrast
- static save_pr(Nbins: int, r: ndarray, pr_norm: ndarray, Model: str)¶
save p(r) to textfile
- sas.sascalc.shape2sas.helpfunctions.check_unique(A_list: list[float]) bool¶
if all elements in a list are unique then return True, else return False
- sas.sascalc.shape2sas.helpfunctions.generate_pdb(x_list: list[ndarray], y_list: list[ndarray], z_list: list[ndarray], p_list: list[ndarray], Model_list: list[str]) None¶
Generates a visualisation file in PDB format with the simulated points (coordinates) and contrasts ONLY FOR VISUALIZATION! Each bead is represented as a dummy atom Carbon, C : positive contrast Hydrogen, H : zero contrast Oxygen, O : negateive contrast information of accurate contrasts not included, only sign IMPORTANT: IT WILL NOT GIVE THE CORRECT RESULTS IF SCATTERING IS CACLLUATED FROM THIS MODEL WITH E.G. CRYSOL, PEPSI-SAXS, FOXS, CAPP OR THE LIKE!
- sas.sascalc.shape2sas.helpfunctions.get_max_dimension(x_list: ndarray, y_list: ndarray, z_list: ndarray) float¶
find max dimensions of n models used for determining plot limits
- sas.sascalc.shape2sas.helpfunctions.plot_2D(x_list: ndarray, y_list: ndarray, z_list: ndarray, p_list: ndarray, Models: ndarray, high_res: bool) None¶
plot 2D-projections of generated points (shapes) using matplotlib: positive contrast in red (Model 1) or blue (Model 2) or yellow (Model 3) or green (Model 4) zero contrast in grey negative contrast in black
input (x_list,y_list,z_list) : coordinates of simulated points p_list : excess scattering length densities (contrast) of simulated points Model : Model number
output plot : points<Model>.png
- sas.sascalc.shape2sas.helpfunctions.plot_results(q: ndarray, r_list: list[ndarray], pr_list: list[ndarray], I_list: list[ndarray], Isim_list: list[ndarray], sigma_list: list[ndarray], S_list: list[ndarray], names: list[str], scales: list[float], xscale_log: bool, high_res: bool) None¶
plot results for all models, using matplotlib: - p(r) - calculated formfactor, P(r) on log-log or log-lin scale - simulated noisy data on log-log or log-lin scale
- sas.sascalc.shape2sas.helpfunctions.sinc(x) ndarray¶
function for calculating sinc = sin(x)/x numpy.sinc is defined as sinc(x) = sin(pi*x)/(pi*x)