sas.qtgui.Perspectives.ParticleEditor package¶
Subpackages¶
- sas.qtgui.Perspectives.ParticleEditor.ParameterFunctionality package
- Submodules
- sas.qtgui.Perspectives.ParticleEditor.ParameterFunctionality.ParameterEntries module
- sas.qtgui.Perspectives.ParticleEditor.ParameterFunctionality.ParameterTable module
- sas.qtgui.Perspectives.ParticleEditor.ParameterFunctionality.ParameterTableButtons module
- sas.qtgui.Perspectives.ParticleEditor.ParameterFunctionality.ParameterTableModel module
LinkingImpossible
ParameterTableModel
ParameterTableModel.__dict__
ParameterTableModel.__doc__
ParameterTableModel.__init__()
ParameterTableModel.__module__
ParameterTableModel.__weakref__
ParameterTableModel.calculation_parameters()
ParameterTableModel.can_link()
ParameterTableModel.clean()
ParameterTableModel.magnetism_parameters
ParameterTableModel.set_link_status()
ParameterTableModel.sld_parameters
ParameterTableModel.update_from_code()
main()
- Module contents
- sas.qtgui.Perspectives.ParticleEditor.Plots package
- sas.qtgui.Perspectives.ParticleEditor.calculations package
- Submodules
- sas.qtgui.Perspectives.ParticleEditor.calculations.boundary_check module
- sas.qtgui.Perspectives.ParticleEditor.calculations.calculate module
- sas.qtgui.Perspectives.ParticleEditor.calculations.debye module
- sas.qtgui.Perspectives.ParticleEditor.calculations.debye_benchmark module
- sas.qtgui.Perspectives.ParticleEditor.calculations.fq module
- sas.qtgui.Perspectives.ParticleEditor.calculations.run_function module
- Module contents
- sas.qtgui.Perspectives.ParticleEditor.datamodel package
- Submodules
- sas.qtgui.Perspectives.ParticleEditor.datamodel.calculation module
AngularDistribution
AngularDistribution.__abstractmethods__
AngularDistribution.__dict__
AngularDistribution.__doc__
AngularDistribution.__module__
AngularDistribution.__weakref__
AngularDistribution._abc_impl
AngularDistribution.n_points
AngularDistribution.name()
AngularDistribution.parameters()
AngularDistribution.sample_points_and_weights()
MagnetismDefinition
MagnetismDefinition.__annotations__
MagnetismDefinition.__dataclass_fields__
MagnetismDefinition.__dataclass_params__
MagnetismDefinition.__dict__
MagnetismDefinition.__doc__
MagnetismDefinition.__eq__()
MagnetismDefinition.__hash__
MagnetismDefinition.__init__()
MagnetismDefinition.__match_args__
MagnetismDefinition.__module__
MagnetismDefinition.__repr__()
MagnetismDefinition.__weakref__
MagnetismDefinition.magnetism_function
MagnetismDefinition.to_cartesian_conversion
ParticleDefinition
ParticleDefinition.__annotations__
ParticleDefinition.__dataclass_fields__
ParticleDefinition.__dataclass_params__
ParticleDefinition.__dict__
ParticleDefinition.__doc__
ParticleDefinition.__eq__()
ParticleDefinition.__hash__
ParticleDefinition.__init__()
ParticleDefinition.__match_args__
ParticleDefinition.__module__
ParticleDefinition.__repr__()
ParticleDefinition.__weakref__
ParticleDefinition.magnetism
ParticleDefinition.sld
QSample
QSpaceScattering
QSpaceScattering.__annotations__
QSpaceScattering.__dataclass_fields__
QSpaceScattering.__dataclass_params__
QSpaceScattering.__dict__
QSpaceScattering.__doc__
QSpaceScattering.__eq__()
QSpaceScattering.__hash__
QSpaceScattering.__init__()
QSpaceScattering.__match_args__
QSpaceScattering.__module__
QSpaceScattering.__repr__()
QSpaceScattering.__weakref__
QSpaceScattering.abscissa
QSpaceScattering.lower_error
QSpaceScattering.ordinate
QSpaceScattering.upper_error
RealSpaceScattering
RealSpaceScattering.__annotations__
RealSpaceScattering.__dataclass_fields__
RealSpaceScattering.__dataclass_params__
RealSpaceScattering.__dict__
RealSpaceScattering.__doc__
RealSpaceScattering.__eq__()
RealSpaceScattering.__hash__
RealSpaceScattering.__init__()
RealSpaceScattering.__match_args__
RealSpaceScattering.__module__
RealSpaceScattering.__repr__()
RealSpaceScattering.__weakref__
RealSpaceScattering.abscissa
RealSpaceScattering.ordinate
SLDDefinition
SLDDefinition.__annotations__
SLDDefinition.__dataclass_fields__
SLDDefinition.__dataclass_params__
SLDDefinition.__dict__
SLDDefinition.__doc__
SLDDefinition.__eq__()
SLDDefinition.__hash__
SLDDefinition.__init__()
SLDDefinition.__match_args__
SLDDefinition.__module__
SLDDefinition.__repr__()
SLDDefinition.__weakref__
SLDDefinition.sld_function
SLDDefinition.to_cartesian_conversion
SamplingDistribution
SamplingDistribution.__annotations__
SamplingDistribution.__dataclass_fields__
SamplingDistribution.__dataclass_params__
SamplingDistribution.__dict__
SamplingDistribution.__doc__
SamplingDistribution.__eq__()
SamplingDistribution.__hash__
SamplingDistribution.__init__()
SamplingDistribution.__match_args__
SamplingDistribution.__module__
SamplingDistribution.__repr__()
SamplingDistribution.__weakref__
SamplingDistribution.bin_edges
SamplingDistribution.counts
SamplingDistribution.name
ScatteringCalculation
ScatteringCalculation.__annotations__
ScatteringCalculation.__dataclass_fields__
ScatteringCalculation.__dataclass_params__
ScatteringCalculation.__dict__
ScatteringCalculation.__doc__
ScatteringCalculation.__eq__()
ScatteringCalculation.__hash__
ScatteringCalculation.__init__()
ScatteringCalculation.__match_args__
ScatteringCalculation.__module__
ScatteringCalculation.__repr__()
ScatteringCalculation.__weakref__
ScatteringCalculation.angular_sampling
ScatteringCalculation.bin_count
ScatteringCalculation.bounding_surface_sld_check
ScatteringCalculation.parameter_settings
ScatteringCalculation.particle_definition
ScatteringCalculation.polarisation_vector
ScatteringCalculation.q_sampling
ScatteringCalculation.sample_chunk_size_hint
ScatteringCalculation.seed
ScatteringCalculation.spatial_sampling_method
ScatteringOutput
ScatteringOutput.__annotations__
ScatteringOutput.__dataclass_fields__
ScatteringOutput.__dataclass_params__
ScatteringOutput.__dict__
ScatteringOutput.__doc__
ScatteringOutput.__eq__()
ScatteringOutput.__hash__
ScatteringOutput.__init__()
ScatteringOutput.__match_args__
ScatteringOutput.__module__
ScatteringOutput.__repr__()
ScatteringOutput.__weakref__
ScatteringOutput.calculation_time
ScatteringOutput.q_space
ScatteringOutput.seed_used
SpatialDistribution
SpatialDistribution.__abstractmethods__
SpatialDistribution.__dict__
SpatialDistribution.__doc__
SpatialDistribution.__init__()
SpatialDistribution.__module__
SpatialDistribution.__weakref__
SpatialDistribution._abc_impl
SpatialDistribution._bounding_surface_check_points()
SpatialDistribution.allows_bootstrap
SpatialDistribution.bounding_surface_check_points()
SpatialDistribution.generate()
SpatialDistribution.info
- sas.qtgui.Perspectives.ParticleEditor.datamodel.parameters module
Background
CalculationParameters
CalculationParameters.__annotations__
CalculationParameters.__doc__
CalculationParameters.__getnewargs__()
CalculationParameters.__match_args__
CalculationParameters.__module__
CalculationParameters.__new__()
CalculationParameters.__orig_bases__
CalculationParameters.__repr__()
CalculationParameters.__slots__
CalculationParameters._asdict()
CalculationParameters._field_defaults
CalculationParameters._fields
CalculationParameters._make()
CalculationParameters._replace()
CalculationParameters.background
CalculationParameters.magnetism_parameters
CalculationParameters.scale
CalculationParameters.sld_parameters
CalculationParameters.solvent_sld
FunctionParameter
MagnetismParameterContainer
MagnetismParameterContainer.__annotations__
MagnetismParameterContainer.__doc__
MagnetismParameterContainer.__getnewargs__()
MagnetismParameterContainer.__match_args__
MagnetismParameterContainer.__module__
MagnetismParameterContainer.__new__()
MagnetismParameterContainer.__orig_bases__
MagnetismParameterContainer.__repr__()
MagnetismParameterContainer.__slots__
MagnetismParameterContainer._asdict()
MagnetismParameterContainer._field_defaults
MagnetismParameterContainer._fields
MagnetismParameterContainer._make()
MagnetismParameterContainer._replace()
MagnetismParameterContainer.linked
MagnetismParameterContainer.parameter
Parameter
Scale
SolventSLD
ValueSource
- sas.qtgui.Perspectives.ParticleEditor.datamodel.types module
CoordinateSystemTransform
CoordinateSystemTransform.__abstractmethods__
CoordinateSystemTransform.__call__()
CoordinateSystemTransform.__dict__
CoordinateSystemTransform.__doc__
CoordinateSystemTransform.__init__()
CoordinateSystemTransform.__module__
CoordinateSystemTransform.__parameters__
CoordinateSystemTransform.__subclasshook__()
CoordinateSystemTransform.__weakref__
CoordinateSystemTransform._abc_impl
CoordinateSystemTransform._is_protocol
MagnetismFunction
MagnetismFunction.__abstractmethods__
MagnetismFunction.__call__()
MagnetismFunction.__dict__
MagnetismFunction.__doc__
MagnetismFunction.__init__()
MagnetismFunction.__module__
MagnetismFunction.__parameters__
MagnetismFunction.__subclasshook__()
MagnetismFunction.__weakref__
MagnetismFunction._abc_impl
MagnetismFunction._is_protocol
SLDFunction
- Module contents
- sas.qtgui.Perspectives.ParticleEditor.sampling package
- Submodules
- sas.qtgui.Perspectives.ParticleEditor.sampling.angles module
- sas.qtgui.Perspectives.ParticleEditor.sampling.chunking module
- sas.qtgui.Perspectives.ParticleEditor.sampling.geodesic module
Geodesic
Geodesic.__dict__
Geodesic.__doc__
Geodesic.__module__
Geodesic.__weakref__
Geodesic._base_edges
Geodesic._base_triangles
Geodesic._base_vertices
Geodesic._cache
Geodesic._calculate_weights()
Geodesic._rotation_matrix_to_z_vector()
Geodesic.by_divisions()
Geodesic.by_point_count()
Geodesic.minimal_divisions_for_points()
Geodesic.points_for_division_amount()
GeodesicDivisions
- sas.qtgui.Perspectives.ParticleEditor.sampling.points module
- Module contents
Submodules¶
sas.qtgui.Perspectives.ParticleEditor.AngularSamplingMethodSelector module¶
- class sas.qtgui.Perspectives.ParticleEditor.AngularSamplingMethodSelector.AngularSamplingMethodSelector(parent=None)¶
Bases:
QWidget
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.AngularSamplingMethodSelector'¶
- generate_sampler() AngularDistribution ¶
Create the angular distribution sampler spectified by the current settings
- on_update()¶
- staticMetaObject = PySide6.QtCore.QMetaObject("AngularSamplingMethodSelector" inherits "QWidget": )¶
- class sas.qtgui.Perspectives.ParticleEditor.AngularSamplingMethodSelector.ParametersForm(sampling_class: type, parent=None)¶
Bases:
QWidget
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.AngularSamplingMethodSelector'¶
- generate_sampler() AngularDistribution ¶
Generate a sampler based on the selected parameters
- staticMetaObject = PySide6.QtCore.QMetaObject("ParametersForm" inherits "QWidget": )¶
- sas.qtgui.Perspectives.ParticleEditor.AngularSamplingMethodSelector.main()¶
Show a demo
sas.qtgui.Perspectives.ParticleEditor.CodeToolBar module¶
- class sas.qtgui.Perspectives.ParticleEditor.CodeToolBar.CodeToolBar(parent=None)¶
Bases:
QWidget
,Ui_CodeToolBar
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.CodeToolBar'¶
- staticMetaObject = PySide6.QtCore.QMetaObject("CodeToolBar" inherits "QWidget": )¶
sas.qtgui.Perspectives.ParticleEditor.DesignWindow module¶
- class sas.qtgui.Perspectives.ParticleEditor.DesignWindow.DesignWindow(parent=None)¶
Bases:
QDialog
,Ui_DesignWindow
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.DesignWindow'¶
- angularDistribution() AngularDistribution ¶
Get the AngularDistribution object that represents the GUI selected orientational distribution
- codeError(text)¶
Show an error concerning input code
- codeText(text)¶
Show info about input code / code stdout
- codeWarning(text)¶
Show a warning about input code
- currentSeed()¶
- display_calculation_result(scattering_result: ScatteringOutput)¶
Update graphs and select tab
- doBuild()¶
Build functionality requested
- doScatter()¶
Scatter functionality requested
- magnetismDefinition() MagnetismDefinition | None ¶
- onFit()¶
Fit functionality requested
- onLoad()¶
- onRadiusChanged()¶
- onSave()¶
- onTimeEstimateParametersChanged()¶
Called when the number of samples changes
- parametersForCalculation() CalculationParameters ¶
- particleDefinition() ParticleDefinition ¶
Get the ParticleDefinition object that contains the SLD and magnetism functions
- polarisationVector() ndarray ¶
Get a numpy vector representing the GUI specified polarisation vector
- scatteringCalculation() ScatteringCalculation ¶
Get the ScatteringCalculation object that represents the calculation that is to be passed to the solver
- sldDefinition() SLDDefinition ¶
- spatialSampling() SpatialDistribution ¶
Calculate the spatial sampling object based on current gui settings
- staticMetaObject = PySide6.QtCore.QMetaObject("DesignWindow" inherits "QDialog": )¶
- sas.qtgui.Perspectives.ParticleEditor.DesignWindow.main()¶
Demo/testing window
- sas.qtgui.Perspectives.ParticleEditor.DesignWindow.safe_float(text: str)¶
sas.qtgui.Perspectives.ParticleEditor.FunctionViewer module¶
- class sas.qtgui.Perspectives.ParticleEditor.FunctionViewer.FunctionViewer(parent=None)¶
Bases:
QWidget
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.FunctionViewer'¶
- drawAxes(im)¶
Draw a small xyz axis on an image
- drawScale(im)¶
Draw a scalebar
- eventFilter(source, event)¶
Event filter intercept, grabs mouse drags on the images
- onDepthChanged()¶
Callback for cross section depth slider
- onDisplayTypeSelected()¶
Switch between SLD and magnetism view
- onMagPhiChanged()¶
Magnetic field phi angle changed
- onMagThetaChanged()¶
Magnetic field theta angle changed
- onRadiusChanged()¶
Draw radius changed
- setAngles(alpha_deg, beta_deg)¶
Set the viewer angles
- setSLDFunction(fun, coordinate_mapping)¶
Set the function to be plotted
- staticMetaObject = PySide6.QtCore.QMetaObject("FunctionViewer" inherits "QWidget": )¶
- updateImage(mag_only=True)¶
Update the images in the viewer
- sas.qtgui.Perspectives.ParticleEditor.FunctionViewer.cross_section_coordinates(radius: float, alpha: float, beta: float, plane_distance: float, n_points: int)¶
- sas.qtgui.Perspectives.ParticleEditor.FunctionViewer.draw_line_in_place(im, x0, y0, dx, dy, channel)¶
Simple line drawing (otherwise need to import something heavyweight)
- sas.qtgui.Perspectives.ParticleEditor.FunctionViewer.main()¶
Show a demo of the function viewer
- sas.qtgui.Perspectives.ParticleEditor.FunctionViewer.rotation_matrix(alpha: float, beta: float)¶
sas.qtgui.Perspectives.ParticleEditor.GeodesicSampleSelector module¶
- class sas.qtgui.Perspectives.ParticleEditor.GeodesicSampleSelector.GeodesicSamplingSpinBox(parent: QWidget | None = None)¶
Bases:
QSpinBox
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.GeodesicSampleSelector'¶
- getNDivisions()¶
- onEditingFinished()¶
- staticMetaObject = PySide6.QtCore.QMetaObject("GeodesicSamplingSpinBox" inherits "QSpinBox": )¶
- stepBy(self, steps: int) None ¶
- updateDisplayValue()¶
- sas.qtgui.Perspectives.ParticleEditor.GeodesicSampleSelector.main()¶
Show a demo of the spinner
sas.qtgui.Perspectives.ParticleEditor.LabelledSlider module¶
- class sas.qtgui.Perspectives.ParticleEditor.LabelledSlider.LabelledSlider(name: str, min_value: int, max_value: int, value: int, tick_interval: int = 10, name_width=10, value_width=30, value_units='°')¶
Bases:
QWidget
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.LabelledSlider'¶
- _on_value_changed()¶
- staticMetaObject = PySide6.QtCore.QMetaObject("LabelledSlider" inherits "QWidget": )¶
- value() int ¶
- property valueChanged¶
sas.qtgui.Perspectives.ParticleEditor.OutputViewer module¶
- class sas.qtgui.Perspectives.ParticleEditor.OutputViewer.OutputViewer(parent=None)¶
Bases:
QTextEdit
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None) None ¶
- __init__(self, text: str, parent: PySide6.QtWidgets.QWidget | None = None) None
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.OutputViewer'¶
- _htmlise(text)¶
- addError(text)¶
- addText(text)¶
- addWarning(text)¶
- appendAndMove(text)¶
- keyPressEvent(e)¶
Itercepted key press event
- reset()¶
- staticMetaObject = PySide6.QtCore.QMetaObject("OutputViewer" inherits "QTextEdit": )¶
- sas.qtgui.Perspectives.ParticleEditor.OutputViewer.main()¶
sas.qtgui.Perspectives.ParticleEditor.PythonViewer module¶
- class sas.qtgui.Perspectives.ParticleEditor.PythonViewer.PythonViewer(parent=None)¶
Bases:
QTextEdit
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None) None ¶
- __init__(self, text: str, parent: PySide6.QtWidgets.QWidget | None = None) None
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.PythonViewer'¶
- build_trigger¶
- insertFromMimeData(source)¶
Keep own highlighting
- keyPressEvent(e)¶
Itercepted key press event
- staticMetaObject = PySide6.QtCore.QMetaObject("PythonViewer" inherits "QTextEdit": Methods: #80 type=Signal, signature=build_trigger() )¶
- sas.qtgui.Perspectives.ParticleEditor.PythonViewer.main()¶
Demo/testing window
sas.qtgui.Perspectives.ParticleEditor.RadiusSelection module¶
- class sas.qtgui.Perspectives.ParticleEditor.RadiusSelection.RadiusSelection(text: str | None = None, parent=None)¶
Bases:
QWidget
,Ui_RadiusSelection
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.RadiusSelection'¶
- radius()¶
- staticMetaObject = PySide6.QtCore.QMetaObject("RadiusSelection" inherits "QWidget": )¶
sas.qtgui.Perspectives.ParticleEditor.SLDMagnetismOption module¶
- class sas.qtgui.Perspectives.ParticleEditor.SLDMagnetismOption.SLDMagnetismOption(parent=None)¶
Bases:
QWidget
,Ui_SLDMagnetismOption
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.SLDMagnetismOption'¶
- staticMetaObject = PySide6.QtCore.QMetaObject("SLDMagnetismOption" inherits "QWidget": )¶
sas.qtgui.Perspectives.ParticleEditor.ViewerButtons module¶
- class sas.qtgui.Perspectives.ParticleEditor.ViewerButtons.AxisButtons(set_angles_function: Callable[[float, float], None])¶
Bases:
QWidget
,Ui_AxisSelection
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.ViewerButtons'¶
- staticMetaObject = PySide6.QtCore.QMetaObject("AxisButtons" inherits "QWidget": )¶
- class sas.qtgui.Perspectives.ParticleEditor.ViewerButtons.PlaneButtons(set_angles_function: Callable[[float, float], None])¶
Bases:
QWidget
,Ui_PlaneSelection
- __doc__ = None¶
- __init__(self, parent: PySide6.QtWidgets.QWidget | None = None, f: PySide6.QtCore.Qt.WindowType = Default(Qt.WindowFlags)) None ¶
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.ViewerButtons'¶
- staticMetaObject = PySide6.QtCore.QMetaObject("PlaneButtons" inherits "QWidget": )¶
sas.qtgui.Perspectives.ParticleEditor.defaults module¶
- sas.qtgui.Perspectives.ParticleEditor.defaults.default_text = '""" \n\nHere\'s a new perspective. It calculates the scattering based on real-space description of a particle.\n\nBasically, define your SLD as a function of either cartesian or polar coordinates and click scatter\n\n def sld(x,y,z)\n def sld(r,theta,phi)\n\nThe display on the right shows your particle, both as a total projected density (top) and as a slice (bottom).\n\nThis is a minimal working system. Currently magnetism doesn\'t work, neither do extra parameters for your functions,\nnor structure factors, nor fitting, nor 2D plots. \n\nHere\'s a simple example: """\n\ndef sld_cube(x,y,z):\n """ A cube with 100Ang side length"""\n\n return rect(0.02*x)*rect(0.02*y)*rect(0.02*z)\n\n\ndef sld_sphere(r, theta, phi):\n """ Sphere r=50Ang"""\n\n return rect(0.02*r)\n\nsld = sld_sphere\n\n'¶
Press shift-return to build and update views Click scatter to show the scattering profile
- sas.qtgui.Perspectives.ParticleEditor.defaults.sld(r, theta, phi)¶
sas.qtgui.Perspectives.ParticleEditor.function_processor module¶
- exception sas.qtgui.Perspectives.ParticleEditor.function_processor.FunctionDefinitionFailed(*args)¶
Bases:
Exception
- __doc__ = None¶
- __init__(*args)¶
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.function_processor'¶
- __weakref__¶
list of weak references to the object
- sas.qtgui.Perspectives.ParticleEditor.function_processor.cartesian_converter(x, y, z)¶
Converter from calculation coordinates to function definition
For functions specified in cartesian coordinates
- sas.qtgui.Perspectives.ParticleEditor.function_processor.default_callback(string: str)¶
Just for default
- sas.qtgui.Perspectives.ParticleEditor.function_processor.main()¶
- sas.qtgui.Perspectives.ParticleEditor.function_processor.process_code(input_text: str, solvent_sld: float = 0.0, text_callback: ~typing.Callable[[str], None] = <function default_callback>, warning_callback: ~typing.Callable[[str], None] = <function default_callback>, error_callback: ~typing.Callable[[str], None] = <function default_callback>)¶
Process the code for generating functions that specify sld/magnetism
- sas.qtgui.Perspectives.ParticleEditor.function_processor.spherical_converter(x, y, z)¶
Converter from calculation coordinates to function definition
For functions specified in spherical coordinates
sas.qtgui.Perspectives.ParticleEditor.helper_functions module¶
Functions that get automatically included in the build window
- sas.qtgui.Perspectives.ParticleEditor.helper_functions.rect(x: ndarray)¶
Rectangle function, zero if mod(input) > 1, 1 otherwise
- sas.qtgui.Perspectives.ParticleEditor.helper_functions.step(x: ndarray)¶
Step function, 0 if input < 0, 1 if input >= 0
sas.qtgui.Perspectives.ParticleEditor.syntax_highlight module¶
Modified from: art1415926535/PyQt5-syntax-highlighting on github
It’s not great, should all really be implemented as a finite state machine with a stack
- class sas.qtgui.Perspectives.ParticleEditor.syntax_highlight.PythonHighlighter(document)¶
Bases:
QSyntaxHighlighter
- __doc__ = None¶
- __init__(self, parent: PySide6.QtCore.QObject) None ¶
- __init__(self, parent: PySide6.QtGui.QTextDocument) None
Initialize self. See help(type(self)) for accurate signature.
- __module__ = 'sas.qtgui.Perspectives.ParticleEditor.syntax_highlight'¶
- braces = ['\\{', '\\}', '\\(', '\\)', '\\[', '\\]']¶
- highlightBlock(text)¶
Apply syntax highlighting to the given block of text.
- keywords = ['and', 'assert', 'break', 'class', 'continue', 'def', 'del', 'elif', 'else', 'except', 'exec', 'finally', 'for', 'from', 'global', 'if', 'import', 'in', 'is', 'lambda', 'not', 'or', 'pass', 'print', 'raise', 'return', 'try', 'while', 'yield', 'None', 'True', 'False']¶
- operators = ['=', '==', '!=', '<', '<=', '>', '>=', '\\+', '-', '\\*', '/', '//', '\\%', '\\*\\*', '\\+=', '-=', '\\*=', '/=', '\\%=', '\\^', '\\|', '\\&', '\\~', '>>', '<<']¶
- special = ['sld', 'solvent_sld', 'magnetism']¶
- staticMetaObject = PySide6.QtCore.QMetaObject("PythonHighlighter" inherits "QSyntaxHighlighter": )¶
- sas.qtgui.Perspectives.ParticleEditor.syntax_highlight.format(color, style='')¶
Return a QTextCharFormat with the given attributes.
sas.qtgui.Perspectives.ParticleEditor.util module¶
- sas.qtgui.Perspectives.ParticleEditor.util.format_time_estimate(est_time_seconds)¶
Get easily understandable string for a computational time estimate
sas.qtgui.Perspectives.ParticleEditor.vectorise module¶
- sas.qtgui.Perspectives.ParticleEditor.vectorise.clean_traceback(trace: str)¶
Tracebacks from vectorise contain potentially confusing information from the vectorisation infrastructure. Clean it up and replace empty filename with something else
- sas.qtgui.Perspectives.ParticleEditor.vectorise.main()¶
- sas.qtgui.Perspectives.ParticleEditor.vectorise.vectorise_magnetism(fun: Callable, warning_callback: Callable[[str], None], *args, **kwargs)¶
Check whether a magnetism function can handle numpy arrays properly, if not, create a wrapper that that can
- sas.qtgui.Perspectives.ParticleEditor.vectorise.vectorise_sld(fun: Callable, warning_callback: Callable[[str], None], error_callback: Callable[[str], None], *args, **kwargs)¶
Check whether an SLD function can handle numpy arrays properly, if not, create a wrapper that that can