sas.qtgui.Perspectives.ParticleEditor.datamodel package

Submodules

sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation module

class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.AngularDistribution

Bases: ABC

Base class for angular distributions

__abstractmethods__ = frozenset({'n_points', 'name', 'parameters', 'sample_points_and_weights'})
__annotate_func__ = None
__annotations_cache__ = {}
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 70, '__doc__': 'Base class for angular distributions ', 'n_points': <property object>, 'name': <staticmethod(<function AngularDistribution.name>)>, 'parameters': <staticmethod(<function AngularDistribution.parameters>)>, 'sample_points_and_weights': <function AngularDistribution.sample_points_and_weights>, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'AngularDistribution' objects>, '__weakref__': <attribute '__weakref__' of 'AngularDistribution' objects>, '__abstractmethods__': frozenset({'sample_points_and_weights', 'name', 'parameters', 'n_points'}), '_abc_impl': <_abc._abc_data object>, '__annotations_cache__': {}})
__doc__ = 'Base class for angular distributions '
__firstlineno__ = 70
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__static_attributes__ = ()
__weakref__

list of weak references to the object

_abc_impl = <_abc._abc_data object>
abstract property n_points: int

Number of sample points

abstractmethod static name() str

Name of this distribution

abstractmethod static parameters() list[tuple[str, str, type]]

List of keyword arguments to constructor, names for GUI, and the type of value

abstractmethod sample_points_and_weights() tuple[ndarray, ndarray]

Get sample q vector directions and associated weights

class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.MagnetismDefinition(magnetism_function: MagnetismFunction, to_cartesian_conversion: CoordinateSystemTransform)

Bases: object

Definition of the magnetism vector fields

__annotate_func__()
__annotations_cache__ = {'magnetism_function': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.MagnetismFunction'>, 'to_cartesian_conversion': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>}
__dataclass_fields__ = {'magnetism_function': Field(name='magnetism_function',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.MagnetismFunction'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'to_cartesian_conversion': Field(name='to_cartesian_conversion',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 101, '__doc__': 'Definition of the magnetism vector fields', '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'MagnetismDefinition' objects>, '__weakref__': <attribute '__weakref__' of 'MagnetismDefinition' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'magnetism_function': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.MagnetismFunction'>, 'to_cartesian_conversion': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>}, '__dataclass_fields__': {'magnetism_function': Field(name='magnetism_function',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.MagnetismFunction'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'to_cartesian_conversion': Field(name='to_cartesian_conversion',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function MagnetismDefinition.__init__>, '__repr__': <function MagnetismDefinition.__repr__>, '__eq__': <function MagnetismDefinition.__eq__>, '__match_args__': ('magnetism_function', 'to_cartesian_conversion'), '__annotate_func__': None})
__doc__ = 'Definition of the magnetism vector fields'
__eq__(other)

Return self==value.

__firstlineno__ = 101
__hash__ = None
__init__(magnetism_function: MagnetismFunction, to_cartesian_conversion: CoordinateSystemTransform) None
__match_args__ = ('magnetism_function', 'to_cartesian_conversion')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

magnetism_function: MagnetismFunction
to_cartesian_conversion: CoordinateSystemTransform
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.ParticleDefinition(sld: SLDDefinition, magnetism: MagnetismDefinition | None)

Bases: object

Object containing the functions that define a particle

__annotate_func__()
__annotations_cache__ = {'magnetism': sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.MagnetismDefinition | None, 'sld': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SLDDefinition'>}
__dataclass_fields__ = {'magnetism': Field(name='magnetism',type=sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.MagnetismDefinition | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'sld': Field(name='sld',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SLDDefinition'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 108, '__doc__': 'Object containing the functions that define a particle', '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'ParticleDefinition' objects>, '__weakref__': <attribute '__weakref__' of 'ParticleDefinition' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'sld': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SLDDefinition'>, 'magnetism': sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.MagnetismDefinition | None}, '__dataclass_fields__': {'sld': Field(name='sld',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SLDDefinition'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'magnetism': Field(name='magnetism',type=sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.MagnetismDefinition | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function ParticleDefinition.__init__>, '__repr__': <function ParticleDefinition.__repr__>, '__eq__': <function ParticleDefinition.__eq__>, '__match_args__': ('sld', 'magnetism'), '__annotate_func__': None})
__doc__ = 'Object containing the functions that define a particle'
__eq__(other)

Return self==value.

__firstlineno__ = 108
__hash__ = None
__init__(sld: SLDDefinition, magnetism: MagnetismDefinition | None) None
__match_args__ = ('sld', 'magnetism')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

magnetism: MagnetismDefinition | None
sld: SLDDefinition
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample(start, end, n_points, is_log)

Bases: object

Representation of Q Space sampling

__annotate_func__ = None
__annotations_cache__ = {}
__call__()

Call self as a function.

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 15, '__doc__': 'Representation of Q Space sampling ', '__init__': <function QSample.__init__>, '__repr__': <function QSample.__repr__>, '__call__': <function QSample.__call__>, '__static_attributes__': ('end', 'is_log', 'n_points', 'start'), '__dict__': <attribute '__dict__' of 'QSample' objects>, '__weakref__': <attribute '__weakref__' of 'QSample' objects>, '__annotations_cache__': {}})
__doc__ = 'Representation of Q Space sampling '
__firstlineno__ = 15
__init__(start, end, n_points, is_log)
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__repr__()

Return repr(self).

__static_attributes__ = ('end', 'is_log', 'n_points', 'start')
__weakref__

list of weak references to the object

class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering(abscissa: sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample, ordinate: numpy.ndarray, upper_error: numpy.ndarray | None = None, lower_error: numpy.ndarray | None = None)

Bases: object

__annotate_func__()
__annotations_cache__ = {'abscissa': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>, 'lower_error': numpy.ndarray | None, 'ordinate': <class 'numpy.ndarray'>, 'upper_error': numpy.ndarray | None}
__dataclass_fields__ = {'abscissa': Field(name='abscissa',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'lower_error': Field(name='lower_error',type=numpy.ndarray | None,default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'ordinate': Field(name='ordinate',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,doc=None,_field_type=_FIELD), 'upper_error': Field(name='upper_error',type=numpy.ndarray | None,default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 136, 'upper_error': None, 'lower_error': None, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'QSpaceScattering' objects>, '__weakref__': <attribute '__weakref__' of 'QSpaceScattering' objects>, '__doc__': 'QSpaceScattering(abscissa: sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample, ordinate: numpy.ndarray, upper_error: numpy.ndarray | None = None, lower_error: numpy.ndarray | None = None)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'abscissa': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>, 'ordinate': <class 'numpy.ndarray'>, 'upper_error': numpy.ndarray | None, 'lower_error': numpy.ndarray | None}, '__dataclass_fields__': {'abscissa': Field(name='abscissa',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'ordinate': Field(name='ordinate',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,doc=None,_field_type=_FIELD), 'upper_error': Field(name='upper_error',type=numpy.ndarray | None,default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'lower_error': Field(name='lower_error',type=numpy.ndarray | None,default=None,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function QSpaceScattering.__init__>, '__repr__': <function QSpaceScattering.__repr__>, '__eq__': <function QSpaceScattering.__eq__>, '__match_args__': ('abscissa', 'ordinate', 'upper_error', 'lower_error'), '__annotate_func__': None})
__doc__ = 'QSpaceScattering(abscissa: sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample, ordinate: numpy.ndarray, upper_error: numpy.ndarray | None = None, lower_error: numpy.ndarray | None = None)'
__eq__(other)

Return self==value.

__firstlineno__ = 136
__hash__ = None
__init__(abscissa: QSample, ordinate: ndarray, upper_error: ndarray | None = None, lower_error: ndarray | None = None) None
__match_args__ = ('abscissa', 'ordinate', 'upper_error', 'lower_error')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

abscissa: QSample
lower_error: ndarray | None = None
ordinate: ndarray
upper_error: ndarray | None = None
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.RealSpaceScattering(abscissa: numpy.ndarray, ordinate: numpy.ndarray)

Bases: object

__annotate_func__()
__annotations_cache__ = {'abscissa': <class 'numpy.ndarray'>, 'ordinate': <class 'numpy.ndarray'>}
__dataclass_fields__ = {'abscissa': Field(name='abscissa',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,doc=None,_field_type=_FIELD), 'ordinate': Field(name='ordinate',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,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 143, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'RealSpaceScattering' objects>, '__weakref__': <attribute '__weakref__' of 'RealSpaceScattering' objects>, '__doc__': 'RealSpaceScattering(abscissa: numpy.ndarray, ordinate: numpy.ndarray)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'abscissa': <class 'numpy.ndarray'>, 'ordinate': <class 'numpy.ndarray'>}, '__dataclass_fields__': {'abscissa': Field(name='abscissa',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,doc=None,_field_type=_FIELD), 'ordinate': Field(name='ordinate',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,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function RealSpaceScattering.__init__>, '__repr__': <function RealSpaceScattering.__repr__>, '__eq__': <function RealSpaceScattering.__eq__>, '__match_args__': ('abscissa', 'ordinate'), '__annotate_func__': None})
__doc__ = 'RealSpaceScattering(abscissa: numpy.ndarray, ordinate: numpy.ndarray)'
__eq__(other)

Return self==value.

__firstlineno__ = 143
__hash__ = None
__init__(abscissa: ndarray, ordinate: ndarray) None
__match_args__ = ('abscissa', 'ordinate')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

abscissa: ndarray
ordinate: ndarray
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SLDDefinition(sld_function: SLDFunction, to_cartesian_conversion: CoordinateSystemTransform)

Bases: object

Definition of the SLD scalar field

__annotate_func__()
__annotations_cache__ = {'sld_function': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.SLDFunction'>, 'to_cartesian_conversion': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>}
__dataclass_fields__ = {'sld_function': Field(name='sld_function',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.SLDFunction'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'to_cartesian_conversion': Field(name='to_cartesian_conversion',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 94, '__doc__': 'Definition of the SLD scalar field', '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'SLDDefinition' objects>, '__weakref__': <attribute '__weakref__' of 'SLDDefinition' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'sld_function': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.SLDFunction'>, 'to_cartesian_conversion': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>}, '__dataclass_fields__': {'sld_function': Field(name='sld_function',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.SLDFunction'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'to_cartesian_conversion': Field(name='to_cartesian_conversion',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function SLDDefinition.__init__>, '__repr__': <function SLDDefinition.__repr__>, '__eq__': <function SLDDefinition.__eq__>, '__match_args__': ('sld_function', 'to_cartesian_conversion'), '__annotate_func__': None})
__doc__ = 'Definition of the SLD scalar field'
__eq__(other)

Return self==value.

__firstlineno__ = 94
__hash__ = None
__init__(sld_function: SLDFunction, to_cartesian_conversion: CoordinateSystemTransform) None
__match_args__ = ('sld_function', 'to_cartesian_conversion')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

sld_function: SLDFunction
to_cartesian_conversion: CoordinateSystemTransform
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SamplingDistribution(name: str, bin_edges: numpy.ndarray, counts: numpy.ndarray)

Bases: object

__annotate_func__()
__annotations_cache__ = {'bin_edges': <class 'numpy.ndarray'>, 'counts': <class 'numpy.ndarray'>, 'name': <class 'str'>}
__dataclass_fields__ = {'bin_edges': Field(name='bin_edges',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,doc=None,_field_type=_FIELD), 'counts': Field(name='counts',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,doc=None,_field_type=_FIELD), 'name': Field(name='name',type=<class 'str'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 130, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'SamplingDistribution' objects>, '__weakref__': <attribute '__weakref__' of 'SamplingDistribution' objects>, '__doc__': 'SamplingDistribution(name: str, bin_edges: numpy.ndarray, counts: numpy.ndarray)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'name': <class 'str'>, 'bin_edges': <class 'numpy.ndarray'>, 'counts': <class 'numpy.ndarray'>}, '__dataclass_fields__': {'name': Field(name='name',type=<class 'str'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'bin_edges': Field(name='bin_edges',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,doc=None,_field_type=_FIELD), 'counts': Field(name='counts',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,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function SamplingDistribution.__init__>, '__repr__': <function SamplingDistribution.__repr__>, '__eq__': <function SamplingDistribution.__eq__>, '__match_args__': ('name', 'bin_edges', 'counts'), '__annotate_func__': None})
__doc__ = 'SamplingDistribution(name: str, bin_edges: numpy.ndarray, counts: numpy.ndarray)'
__eq__(other)

Return self==value.

__firstlineno__ = 130
__hash__ = None
__init__(name: str, bin_edges: ndarray, counts: ndarray) None
__match_args__ = ('name', 'bin_edges', 'counts')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

bin_edges: ndarray
counts: ndarray
name: str
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.ScatteringCalculation(q_sampling: QSample, angular_sampling: AngularDistribution, spatial_sampling_method: SpatialDistribution, particle_definition: ParticleDefinition, parameter_settings: CalculationParameters, polarisation_vector: ndarray | None, seed: int | None, bounding_surface_sld_check: bool, sample_chunk_size_hint: int = 100000)

Bases: object

Specification for a scattering calculation

__annotate_func__()
__annotations_cache__ = {'angular_sampling': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.AngularDistribution'>, 'bounding_surface_sld_check': <class 'bool'>, 'parameter_settings': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.CalculationParameters'>, 'particle_definition': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.ParticleDefinition'>, 'polarisation_vector': numpy.ndarray | None, 'q_sampling': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>, 'sample_chunk_size_hint': <class 'int'>, 'seed': int | None, 'spatial_sampling_method': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SpatialDistribution'>}
__dataclass_fields__ = {'angular_sampling': Field(name='angular_sampling',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.AngularDistribution'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'bounding_surface_sld_check': Field(name='bounding_surface_sld_check',type=<class 'bool'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'parameter_settings': Field(name='parameter_settings',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.CalculationParameters'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'particle_definition': Field(name='particle_definition',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.ParticleDefinition'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'polarisation_vector': Field(name='polarisation_vector',type=numpy.ndarray | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'q_sampling': Field(name='q_sampling',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'sample_chunk_size_hint': Field(name='sample_chunk_size_hint',type=<class 'int'>,default=100000,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'seed': Field(name='seed',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'spatial_sampling_method': Field(name='spatial_sampling_method',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SpatialDistribution'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 115, '__doc__': 'Specification for a scattering calculation ', 'bin_count': 1000, 'sample_chunk_size_hint': 100000, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'ScatteringCalculation' objects>, '__weakref__': <attribute '__weakref__' of 'ScatteringCalculation' objects>, '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'q_sampling': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>, 'angular_sampling': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.AngularDistribution'>, 'spatial_sampling_method': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SpatialDistribution'>, 'particle_definition': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.ParticleDefinition'>, 'parameter_settings': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.CalculationParameters'>, 'polarisation_vector': numpy.ndarray | None, 'seed': int | None, 'bounding_surface_sld_check': <class 'bool'>, 'sample_chunk_size_hint': <class 'int'>}, '__dataclass_fields__': {'q_sampling': Field(name='q_sampling',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSample'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'angular_sampling': Field(name='angular_sampling',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.AngularDistribution'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'spatial_sampling_method': Field(name='spatial_sampling_method',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SpatialDistribution'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'particle_definition': Field(name='particle_definition',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.ParticleDefinition'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'parameter_settings': Field(name='parameter_settings',type=<class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.CalculationParameters'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'polarisation_vector': Field(name='polarisation_vector',type=numpy.ndarray | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'seed': Field(name='seed',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'bounding_surface_sld_check': Field(name='bounding_surface_sld_check',type=<class 'bool'>,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'sample_chunk_size_hint': Field(name='sample_chunk_size_hint',type=<class 'int'>,default=100000,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function ScatteringCalculation.__init__>, '__repr__': <function ScatteringCalculation.__repr__>, '__eq__': <function ScatteringCalculation.__eq__>, '__match_args__': ('q_sampling', 'angular_sampling', 'spatial_sampling_method', 'particle_definition', 'parameter_settings', 'polarisation_vector', 'seed', 'bounding_surface_sld_check', 'sample_chunk_size_hint'), '__annotate_func__': None})
__doc__ = 'Specification for a scattering calculation '
__eq__(other)

Return self==value.

__firstlineno__ = 115
__hash__ = None
__init__(q_sampling: QSample, angular_sampling: AngularDistribution, spatial_sampling_method: SpatialDistribution, particle_definition: ParticleDefinition, parameter_settings: CalculationParameters, polarisation_vector: ndarray | None, seed: int | None, bounding_surface_sld_check: bool, sample_chunk_size_hint: int = 100000) None
__match_args__ = ('q_sampling', 'angular_sampling', 'spatial_sampling_method', 'particle_definition', 'parameter_settings', 'polarisation_vector', 'seed', 'bounding_surface_sld_check', 'sample_chunk_size_hint')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

angular_sampling: AngularDistribution
bin_count = 1000
bounding_surface_sld_check: bool
parameter_settings: CalculationParameters
particle_definition: ParticleDefinition
polarisation_vector: ndarray | None
q_sampling: QSample
sample_chunk_size_hint: int = 100000
seed: int | None
spatial_sampling_method: SpatialDistribution
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.ScatteringOutput(q_space: sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering | None, calculation_time: float, seed_used: int | None)

Bases: object

__annotate_func__()
__annotations_cache__ = {'calculation_time': <class 'float'>, 'q_space': sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering | None, 'seed_used': int | None}
__dataclass_fields__ = {'calculation_time': Field(name='calculation_time',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,doc=None,_field_type=_FIELD), 'q_space': Field(name='q_space',type=sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'seed_used': Field(name='seed_used',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}
__dataclass_params__ = _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False)
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 149, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'ScatteringOutput' objects>, '__weakref__': <attribute '__weakref__' of 'ScatteringOutput' objects>, '__doc__': 'ScatteringOutput(q_space: sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering | None, calculation_time: float, seed_used: int | None)', '__dataclass_params__': _DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=False,match_args=True,kw_only=False,slots=False,weakref_slot=False), '__annotations_cache__': {'q_space': sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering | None, 'calculation_time': <class 'float'>, 'seed_used': int | None}, '__dataclass_fields__': {'q_space': Field(name='q_space',type=sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD), 'calculation_time': Field(name='calculation_time',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,doc=None,_field_type=_FIELD), 'seed_used': Field(name='seed_used',type=int | None,default=<dataclasses._MISSING_TYPE object>,default_factory=<dataclasses._MISSING_TYPE object>,init=True,repr=True,hash=None,compare=True,metadata=mappingproxy({}),kw_only=False,doc=None,_field_type=_FIELD)}, '__replace__': <function _replace>, '__hash__': None, '__init__': <function ScatteringOutput.__init__>, '__repr__': <function ScatteringOutput.__repr__>, '__eq__': <function ScatteringOutput.__eq__>, '__match_args__': ('q_space', 'calculation_time', 'seed_used'), '__annotate_func__': None})
__doc__ = 'ScatteringOutput(q_space: sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.QSpaceScattering | None, calculation_time: float, seed_used: int | None)'
__eq__(other)

Return self==value.

__firstlineno__ = 149
__hash__ = None
__init__(q_space: QSpaceScattering | None, calculation_time: float, seed_used: int | None) None
__match_args__ = ('q_space', 'calculation_time', 'seed_used')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__replace__(**changes)
__repr__()

Return repr(self).

__static_attributes__ = ()
__weakref__

list of weak references to the object

calculation_time: float
q_space: QSpaceScattering | None
seed_used: int | None
class sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation.SpatialDistribution(radius: float, n_points: int, n_desired_points)

Bases: ABC

Base class for point generators

Batches need to be usable for bootstrapping, the run needs to be split into n_bootstrap sections, and the output saved for each section, so that it can be rebuilt in different combinations to establish a variance.

__abstractmethods__ = frozenset({'_bounding_surface_check_points', 'generate'})
__annotate_func__ = None
__annotations_cache__ = {}
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation', '__firstlineno__': 35, '__doc__': 'Base class for point generators\n\nBatches need to be usable for bootstrapping, the run needs to be split into\nn_bootstrap sections, and the output saved for each section, so that it can\nbe rebuilt in different combinations to establish a variance.\n', '__init__': <function SpatialDistribution.__init__>, 'allows_bootstrap': <property object>, 'info': <property object>, 'generate': <function SpatialDistribution.generate>, '_bounding_surface_check_points': <function SpatialDistribution._bounding_surface_check_points>, 'bounding_surface_check_points': <function SpatialDistribution.bounding_surface_check_points>, '__static_attributes__': ('n_desired_points', 'n_points', 'radius'), '__dict__': <attribute '__dict__' of 'SpatialDistribution' objects>, '__weakref__': <attribute '__weakref__' of 'SpatialDistribution' objects>, '__abstractmethods__': frozenset({'_bounding_surface_check_points', 'generate'}), '_abc_impl': <_abc._abc_data object>, '__annotations_cache__': {}})
__doc__ = 'Base class for point generators\n\nBatches need to be usable for bootstrapping, the run needs to be split into\nn_bootstrap sections, and the output saved for each section, so that it can\nbe rebuilt in different combinations to establish a variance.\n'
__firstlineno__ = 35
__init__(radius: float, n_points: int, n_desired_points)
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation'
__static_attributes__ = ('n_desired_points', 'n_points', 'radius')
__weakref__

list of weak references to the object

_abc_impl = <_abc._abc_data object>
abstractmethod _bounding_surface_check_points() ndarray

Points used to check that the SLD/magnetism vector are zero outside the sample space

property allows_bootstrap: bool
bounding_surface_check_points() tuple[ndarray, ndarray, ndarray]
abstractmethod generate(start_index: int, end_index: int) tuple[ndarray, ndarray, ndarray]

Generate points from start_index up to end_index

property info: str

Information to be displayed in the settings window next to the point number input

sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters module

class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.Background

Bases: Parameter

Parameter representing the background intensity, always present

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = 'Parameter representing the background intensity, always present'
__firstlineno__ = 69
__init__()
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'
__static_attributes__ = ()
class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.CalculationParameters(solvent_sld: float, background: float, scale: float, sld_parameters: dict, magnetism_parameters: dict)

Bases: NamedTuple

Object containing the parameters for a simulation

__annotate_func__()
__annotations_cache__ = {'background': <class 'float'>, 'magnetism_parameters': <class 'dict'>, 'scale': <class 'float'>, 'sld_parameters': <class 'dict'>, 'solvent_sld': <class 'float'>}
__classdictcell__ = <cell at 0x7f887a80ef50: dict object>
__doc__ = 'Object containing the parameters for a simulation'
__firstlineno__ = 87
__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__match_args__ = ('solvent_sld', 'background', 'scale', 'sld_parameters', 'magnetism_parameters')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'
static __new__(_cls, solvent_sld: float, background: float, scale: float, sld_parameters: dict, magnetism_parameters: dict)

Create new instance of CalculationParameters(solvent_sld, background, scale, sld_parameters, magnetism_parameters)

__orig_bases__ = (<function NamedTuple>,)
__replace__(**kwds)

Return a new CalculationParameters object replacing specified fields with new values

__repr__()

Return a nicely formatted representation string

__slots__ = ()
__static_attributes__ = ()
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('solvent_sld', 'background', 'scale', 'sld_parameters', 'magnetism_parameters')
classmethod _make(iterable)

Make a new CalculationParameters object from a sequence or iterable

_replace(**kwds)

Return a new CalculationParameters object replacing specified fields with new values

background: float

Alias for field number 1

magnetism_parameters: dict

Alias for field number 4

scale: float

Alias for field number 2

sld_parameters: dict

Alias for field number 3

solvent_sld: float

Alias for field number 0

class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.FunctionParameter(name: str, value: float, in_use: bool, set_by: ValueSource)

Bases: Parameter

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = None
__firstlineno__ = 32
__init__(name: str, value: float, in_use: bool, set_by: ValueSource)

Representation of an input parameter to the sld

The set_by variable describes what the last thing to set it was, this allows it to be updated in a sensible way - it should only have its value changed by the code if it was set by the code, or if it has been set to a default value because nothing specified it.

__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'
__repr__()

Return repr(self).

__static_attributes__ = ('_in_use', 'set_by')
property in_use
is_function_parameter = True
class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.MagnetismParameterContainer(parameter: FunctionParameter, linked: bool)

Bases: NamedTuple

Entry describing a magnetism parameter, keeps track of whether it should be linked to an SLD parameter

__annotate_func__()
__annotations_cache__ = {'linked': <class 'bool'>, 'parameter': <class 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.FunctionParameter'>}
__classdictcell__ = <cell at 0x7f887a80ea70: dict object>
__doc__ = 'Entry describing a magnetism parameter, keeps track of whether it should be linked to an SLD parameter'
__firstlineno__ = 81
__getnewargs__()

Return self as a plain tuple. Used by copy and pickle.

__match_args__ = ('parameter', 'linked')
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'
static __new__(_cls, parameter: FunctionParameter, linked: bool)

Create new instance of MagnetismParameterContainer(parameter, linked)

__orig_bases__ = (<function NamedTuple>,)
__replace__(**kwds)

Return a new MagnetismParameterContainer object replacing specified fields with new values

__repr__()

Return a nicely formatted representation string

__slots__ = ()
__static_attributes__ = ()
_asdict()

Return a new dict which maps field names to their values.

_field_defaults = {}
_fields = ('parameter', 'linked')
classmethod _make(iterable)

Make a new MagnetismParameterContainer object from a sequence or iterable

_replace(**kwds)

Return a new MagnetismParameterContainer object replacing specified fields with new values

linked: bool

Alias for field number 1

parameter: FunctionParameter

Alias for field number 0

class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.Parameter(name: str, value: float)

Bases: object

Base class for parameter descriptions

__annotate_func__ = None
__annotations_cache__ = {}
__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters', '__firstlineno__': 12, '__doc__': 'Base class for parameter descriptions ', 'is_function_parameter': False, '__init__': <function Parameter.__init__>, 'in_use': <property object>, '__repr__': <function Parameter.__repr__>, '__static_attributes__': ('name', 'value'), '__dict__': <attribute '__dict__' of 'Parameter' objects>, '__weakref__': <attribute '__weakref__' of 'Parameter' objects>, '__annotations_cache__': {}})
__doc__ = 'Base class for parameter descriptions '
__firstlineno__ = 12
__init__(name: str, value: float)
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'
__repr__()

Return repr(self).

__static_attributes__ = ('name', 'value')
__weakref__

list of weak references to the object

property in_use
is_function_parameter = False
class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.Scale

Bases: Parameter

Parameter representing the scaling, always present

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = 'Parameter representing the scaling, always present'
__firstlineno__ = 75
__init__()
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'
__static_attributes__ = ()
class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.SolventSLD

Bases: Parameter

Parameter representing the solvent SLD, always present

__annotate_func__ = None
__annotations_cache__ = {}
__doc__ = 'Parameter representing the solvent SLD, always present'
__firstlineno__ = 63
__init__()
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'
__static_attributes__ = ()
class sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters.ValueSource(*values)

Bases: Enum

Item that decribes where the current parameter came from

CODE = 1
DEFAULT = 0
FIT = 3
MANUAL = 2
__doc__ = 'Item that decribes where the current parameter came from'
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters'

sas.qtgui.Perspectives.ParticleEditor.datamodel.types module

class sas.qtgui.Perspectives.ParticleEditor.datamodel.types.CoordinateSystemTransform(*args, **kwargs)

Bases: Protocol

Type of functions that can represent a coordinate transform

__abstractmethods__ = frozenset({})
__annotate_func__ = None
__annotations_cache__ = {}
__call__(x: ndarray, y: ndarray, z: ndarray) tuple[ndarray, ndarray, ndarray]

Call self as a function.

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types', '__firstlineno__': 20, '__doc__': 'Type of functions that can represent a coordinate transform', '__call__': <function CoordinateSystemTransform.__call__>, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'CoordinateSystemTransform' objects>, '__weakref__': <attribute '__weakref__' of 'CoordinateSystemTransform' objects>, '__parameters__': (), '_is_protocol': True, '__subclasshook__': <classmethod(<function _proto_hook>)>, '__init__': <function _no_init_or_replace_init>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '__annotations_cache__': {}, '__protocol_attrs__': {'__call__'}})
__doc__ = 'Type of functions that can represent a coordinate transform'
__firstlineno__ = 20
__init__(*args, **kwargs)
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types'
__parameters__ = ()
__protocol_attrs__ = {'__call__'}
__static_attributes__ = ()
classmethod __subclasshook__(other)

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object

_abc_impl = <_abc._abc_data object>
_is_protocol = True
class sas.qtgui.Perspectives.ParticleEditor.datamodel.types.MagnetismFunction(*args, **kwargs)

Bases: Protocol

Type of functions that can represent magnetism profiles

__abstractmethods__ = frozenset({})
__annotate_func__ = None
__annotations_cache__ = {}
__call__(a: ndarray, b: ndarray, c: ndarray, **kwargs: float) tuple[ndarray, ndarray, ndarray]

Call self as a function.

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types', '__firstlineno__': 14, '__doc__': 'Type of functions that can represent magnetism profiles', '__call__': <function MagnetismFunction.__call__>, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'MagnetismFunction' objects>, '__weakref__': <attribute '__weakref__' of 'MagnetismFunction' objects>, '__parameters__': (), '_is_protocol': True, '__subclasshook__': <classmethod(<function _proto_hook>)>, '__init__': <function _no_init_or_replace_init>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '__annotations_cache__': {}, '__protocol_attrs__': {'__call__'}})
__doc__ = 'Type of functions that can represent magnetism profiles'
__firstlineno__ = 14
__init__(*args, **kwargs)
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types'
__parameters__ = ()
__protocol_attrs__ = {'__call__'}
__static_attributes__ = ()
classmethod __subclasshook__(other)

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object

_abc_impl = <_abc._abc_data object>
_is_protocol = True
class sas.qtgui.Perspectives.ParticleEditor.datamodel.types.SLDFunction(*args, **kwargs)

Bases: Protocol

Type of functions that can represent SLD profiles

__abstractmethods__ = frozenset({})
__annotate_func__ = None
__annotations_cache__ = {}
__call__(a: ndarray, b: ndarray, c: ndarray, **kwargs: float) ndarray

Call self as a function.

__dict__ = mappingproxy({'__module__': 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types', '__firstlineno__': 9, '__doc__': 'Type of functions that can represent SLD profiles', '__call__': <function SLDFunction.__call__>, '__static_attributes__': (), '__dict__': <attribute '__dict__' of 'SLDFunction' objects>, '__weakref__': <attribute '__weakref__' of 'SLDFunction' objects>, '__parameters__': (), '_is_protocol': True, '__subclasshook__': <classmethod(<function _proto_hook>)>, '__init__': <function _no_init_or_replace_init>, '__abstractmethods__': frozenset(), '_abc_impl': <_abc._abc_data object>, '__annotations_cache__': {}, '__protocol_attrs__': {'__call__'}})
__doc__ = 'Type of functions that can represent SLD profiles'
__firstlineno__ = 9
__init__(*args, **kwargs)
__module__ = 'sas.qtgui.Perspectives.ParticleEditor.datamodel.types'
__parameters__ = ()
__protocol_attrs__ = {'__call__'}
__static_attributes__ = ()
classmethod __subclasshook__(other)

Abstract classes can override this to customize issubclass().

This is invoked early on by abc.ABCMeta.__subclasscheck__(). It should return True, False or NotImplemented. If it returns NotImplemented, the normal algorithm is used. Otherwise, it overrides the normal algorithm (and the outcome is cached).

__weakref__

list of weak references to the object

_abc_impl = <_abc._abc_data object>
_is_protocol = True

Module contents