mxcubecore.HardwareObjects.SampleView#
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)[source]#
Adds a shape of type <t>, with motor positions from mpos_list and screen position screen_coord.
- add_shape_from_refs(refs, t)[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
- get_snapshot(overlay=True, bw=False, return_as_array=False)[source]#
Get snapshot(s) :param overlay: Display shapes and other items on the snapshot :type overlay: bool :param bw: return grayscale image :type bw: bool :param return_as_array: return as np array :type return_as_array: bool
- 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
- save_snapshot(path, overlay=True, bw=False)[source]#
Save a snapshot to file. :param path: The filename. :type path: str :param overlay: Display shapes and other items on the snapshot :type overlay: bool :param bw: return grayscale image :type bw: bool
- 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)