mxcubecore.HardwareObjects.SampleView#
Functions
|
Classes
|
|
|
|
|
|
|
|
|
Base class for shapes. |
|
- class mxcubecore.HardwareObjects.SampleView.SampleView(name)[source]#
Bases:
AbstractSampleView
- add_shape(shape)[source]#
Add the shape <shape> to the dictionary of handled shapes.
- Parameters:
param (shape) – Shape to add.
type (shape) – Shape object.
- add_shape_from_mpos(mpos_list, screen_coord, t, state: Literal['HIDDEN', 'SAVED', 'TMP'] = 'SAVED', user_state: Literal['HIDDEN', 'SAVED', 'TMP'] = 'SAVED')[source]#
Adds a shape of type <t>, with motor positions from mpos_list and screen position screen_coord.
- Parameters:
- Returns:
(Shape) Shape of type <t>
- add_shape_from_refs(refs, t, state: Literal['HIDDEN', 'SAVED', 'TMP'] = 'SAVED', user_state: Literal['HIDDEN', 'SAVED', 'TMP'] = 'SAVED')[source]#
Adds a shape of type <t>, taking motor positions and screen positions from reference points in refs.
- de_select_shape(sid)[source]#
De-select the shape with id <sid>.
- Parameters:
sid (str) – The id of the shape to de-select.
- get_grid()[source]#
Get the first of the selected grids, (the one that was selected first in a sequence of select operations)
- Returns:
The first selected grid as a dictionary
- Return type:
(dict)
- get_grids()[source]#
Get all Grids currently handled.
- Returns:
(list[Grid]) All lines currently handled
- get_lines()[source]#
Get all Lines currently handled.
- Returns:
(list[Line]) All lines currently handled
- get_points()[source]#
Get all Points currently handled.
- Returns:
(list[Point]) All points currently handled
- get_selected_shapes()[source]#
Get all selected shapes.
- Returns:
(list[Shape]) List fot selected Shapes
- get_shape(sid)[source]#
Get Shape with id <sid>.
- Parameters:
sid (str) – id of Shape to retrieve
- Returns:
(Shape) All the shapes
- inc_used_for_collection(cpos)[source]#
Increase counter that keepts on collect made on this shape, shape with associated CenteredPosition cpos
- Parameters:
cpos (CenteredPosition) – CenteredPosition of shape
- is_selected(sid)[source]#
Check if Shape with <sid> is selected.
- Returns:
(Boolean) True if Shape with <sid> is selected False otherwise
- select_shape(sid)[source]#
Select the shape <shape>.
- Parameters:
sid (str) – Id of the shape to select.
- select_shape_with_cpos(cpos)[source]#
Selects shape with the assocaitaed centerd posotion <cpos>
- Parameters:
cpos (CenteredPosition) –
- set_grid_data(sid, result_data, data_file_path)[source]#
Sets grid rsult data for a shape with the specified id.
- Parameters:
- Returns:
None
- Raises:
AttributeError – If no shape with the specified id exists.
- property shapes#
Get shapes dict. :returns: Shapes hardware object. :rtype: (AbstractShapes)