Documented functions with links to source

Program to plot parameters from segmented helices

class segmentplot.SegmentPlotPar[source]

Class to initiate default dictionary with input parameters including help and range values and status dictionary

Methods

define_parameters_and_their_properties

define_program_states

set_inp_spring_path

set_interactive_vs_batch_mode

set_quantities_to_be_plotted

set_set_size

define_parameters_and_their_properties()[source]
define_program_states()[source]
set_inp_spring_path(feature_set)[source]
set_quantities_to_be_plotted(feature_set)[source]
set_interactive_vs_batch_mode(feature_set)[source]
set_set_size(feature_set)[source]
class segmentplot.SegmentPlotPrepare(parset=None)[source]
  • Class that holds functions for examining segments from micrographs

  • __init__ Function to interpret multi-input parameters

Methods

get_labels_according_to_quantities(set_size, …)

>>> from spring.segment2d.segmentplot import SegmentPlot

check_class_model_values_and_raise_error

check_class_values_and_raise_error

check_ctf_values_and_raise_error

check_layerline_values_and_raise_error

check_segmenting_values_and_raise_error

filter_segments_by_helix_and_micrograph_criteria

generate_set_id_label_for_plot_and_filename

get_plot_set

get_quantities_per_set

get_segment_ids_according_to_set_size

get_specified_quantities

get_subset_if_selected

prepare_helix_and_coordinates

prepare_log_string

check_class_values_and_raise_error(quantities, y_plot)[source]
check_class_model_values_and_raise_error(quantities, y_plot)[source]
check_ctf_values_and_raise_error(quantities, y_plot)[source]
check_layerline_values_and_raise_error(quantities, y_plot)[source]
check_segmenting_values_and_raise_error(quantities, y_plot)[source]
get_subset_if_selected(plot_sets, attr_selection, attr_in_or_exclude, attr_entries, attr_id)[source]
get_plot_set(set_size, obj)[source]
filter_segments_by_helix_and_micrograph_criteria(session, obj)[source]
prepare_helix_and_coordinates(set_size, quantities)[source]
get_labels_according_to_quantities(set_size, quantities)[source]
>>> from spring.segment2d.segmentplot import SegmentPlot
>>> SegmentPlot().get_labels_according_to_quantities('helix', 'coordinates') 
['Stack_id', 'X-Coordinate (Angstrom)', 'Y-Coordinate (Angstrom)', 'Picked X-Coordinate (Angstrom)', 
'Picked Y-Coordinate (Angstrom)']
>>> SegmentPlot().get_labels_according_to_quantities('helix', 'curvature') 
['Stack_id', 'Distance Along Helix (Angstrom)', 'Curvature', 'Selected Curvature']
>>> SegmentPlot().get_labels_according_to_quantities('data_set', 'curvature') 
['Stack_id', 'Curvature', 'Selected Curvature']
>>> SegmentPlot().get_labels_according_to_quantities('micrograph', 'astigmatism') 
['Stack_id', 'Astigmatism (Angstrom)', 'Selected Astigmatism (Angstrom)']
get_segment_ids_according_to_set_size(session, set_size, each_plot_set)[source]
generate_set_id_label_for_plot_and_filename(set_size, each_plot_set)[source]
get_specified_quantities(each_plot_set_string, set_size, quantities, xy_quantities, each_helix_stack_ids, each_helix_segments, overlapping_segments)[source]
prepare_log_string(labels, xy_quantities)[source]
get_quantities_per_set(spring_path, quantities)[source]
class segmentplot.SegmentPlotVisualize(parset=None)[source]

Methods

determine_position_of_point_within_frame(…)

>>> from spring.segment2d.segmentplot import SegmentPlot

get_labels_according_to_quantities(set_size, …)

>>> from spring.segment2d.segmentplot import SegmentPlot

add_avg_and_stdev_for_label

add_legend_at_best_location

add_stack_ids_to_upper_x_axis

check_class_model_values_and_raise_error

check_class_values_and_raise_error

check_ctf_values_and_raise_error

check_layerline_values_and_raise_error

check_segmenting_values_and_raise_error

choose_subplot_according_to_dimension

filter_segments_by_helix_and_micrograph_criteria

generate_set_id_label_for_plot_and_filename

get_plot_set

get_quantities_per_set

get_segment_ids_according_to_set_size

get_specified_quantities

get_subset_if_selected

make_distance_plot_including_histogram

plot_data_on_figure

plot_distance_along_y

plot_distance_along_y_including_local_average

plot_xy_coordinates

plot_y_histogram

prepare_helix_and_coordinates

prepare_log_string

print_progress_statement_if_interactive

set_legend_and_xlabel

determine_position_of_point_within_frame(frame_bottom_left, frame_top_right, x_quantity, y_quantity, x_lim, y_lim)[source]
>>> from spring.segment2d.segmentplot import SegmentPlot
>>> s = SegmentPlot()
>>> x_quant = np.arange(5.0)
>>> y_quant = np.arange(5.0, 10.0)
>>> s.determine_position_of_point_within_frame([0.1, 0.2], [0.9, 0.8], x_quant, y_quant, (0.0, 4.0), (5.0, 9.0)) 
(array([0.1, 0.3, 0.5, 0.7, 0.9]), array([0.2       , 0.26666667, 0.33333333, 0.4       , 0.46666667]))
add_stack_ids_to_upper_x_axis(ax1, seg_ids, x_quantity, y_quantity, labels)[source]
add_legend_at_best_location(ax1)[source]
set_legend_and_xlabel(label, ax1)[source]
plot_xy_coordinates(labels, set_id_label, xy_data, fig)[source]
add_avg_and_stdev_for_label(y_quantity)[source]
plot_y_histogram(labels, xy_data, set_size, fig)[source]
make_distance_plot_including_histogram(diag_plot, labels, seg_ids, xy_data, set_size, fig, x_quantity, y_quantity, sel_y_quantity)[source]
plot_distance_along_y_including_local_average(diag_plot, labels, seg_ids, xy_data, set_size, fig)[source]
plot_distance_along_y(diag_plot, labels, seg_ids, xy_data, set_size, fig)[source]
choose_subplot_according_to_dimension(diag_plot, labels, set_id_label, segid_xy, set_size, fig)[source]
print_progress_statement_if_interactive(xy_quantities, batch_mode)[source]
plot_data_on_figure(xy_quantities, labels)[source]
class segmentplot.SegmentPlotGui(parent: QWidget = None, flags: Union[Qt.WindowFlags, Qt.WindowType] = Qt.WindowFlags())[source]

Methods

PaintDeviceMetric

Attributes

RenderFlag

Attributes

RenderFlags(…)

acceptDrops(self)

accessibleDescription(self)

accessibleName(self)

actionEvent(self, QActionEvent)

actions(self)

activateWindow(self)

addAction(self, QAction)

addActions(self, object)

adjustSize(self)

autoFillBackground(self)

backgroundRole(self)

baseSize(self)

blockSignals(self, bool)

changeEvent(self, QEvent)

childAt(self, QPoint)

childAt(self, int, int) -> QWidget

childEvent(self, QChildEvent)

children(self)

childrenRect(self)

childrenRegion(self)

clearFocus(self)

clearMask(self)

close(self)

closeEvent(self, QCloseEvent)

colorCount(self)

connectNotify(self, QMetaMethod)

contentsMargins(self)

contentsRect(self)

contextMenuEvent(self, QContextMenuEvent)

contextMenuPolicy(self)

create(self, window, initializeWindow, …)

createWindowContainer(QWindow, parent, …)

cursor(self)

customContextMenuRequested

customContextMenuRequested(self, QPoint) [signal]

customEvent(self, QEvent)

deleteLater(self)

depth(self)

destroy(self, destroyWindow, destroySubWindows)

destroyed

destroyed(self, QObject = None) [signal]

devType(self)

devicePixelRatio(self)

devicePixelRatioF(self)

devicePixelRatioFScale()

disconnect(self)

disconnectNotify(self, QMetaMethod)

dragEnterEvent(self, QDragEnterEvent)

dragLeaveEvent(self, QDragLeaveEvent)

dragMoveEvent(self, QDragMoveEvent)

dropEvent(self, QDropEvent)

dumpObjectInfo(self)

dumpObjectTree(self)

dynamicPropertyNames(self)

effectiveWinId(self)

ensurePolished(self)

enterEvent(self, QEvent)

event(self, QEvent)

eventFilter(self, QObject, QEvent)

find(sip.voidptr)

findChild(self, type, name, options, …)

findChild(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> QObject

findChildren(self, type, name, options, …)

findChildren(self, Tuple, name: str = ‘’, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegExp, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, type, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject] findChildren(self, Tuple, QRegularExpression, options: Union[Qt.FindChildOptions, Qt.FindChildOption] = Qt.FindChildrenRecursively) -> List[QObject]

focusInEvent(self, QFocusEvent)

focusNextChild(self)

focusNextPrevChild(self, bool)

focusOutEvent(self, QFocusEvent)

focusPolicy(self)

focusPreviousChild(self)

focusProxy(self)

focusWidget(self)

font(self)

fontInfo(self)

fontMetrics(self)

foregroundRole(self)

frameGeometry(self)

frameSize(self)

geometry(self)

getContentsMargins(self)

grab(self, rectangle)

grabGesture(self, Qt.GestureType, flags, …)

grabKeyboard(self)

grabMouse(self) grabMouse(self, …)

grabShortcut(self, Union[QKeySequence, …)

graphicsEffect(self)

graphicsProxyWidget(self)

hasFocus(self)

hasHeightForWidth(self)

hasMouseTracking(self)

height(self)

heightForWidth(self, int)

heightMM(self)

hide(self)

hideEvent(self, QHideEvent)

inherits(self, str)

initPainter(self, QPainter)

inputMethodEvent(self, QInputMethodEvent)

inputMethodHints(self)

inputMethodQuery(self, Qt.InputMethodQuery)

insertAction(self, QAction, QAction)

insertActions(self, QAction, Iterable[QAction])

installEventFilter(self, QObject)

isActiveWindow(self)

isAncestorOf(self, QWidget)

isEnabled(self)

isEnabledTo(self, QWidget)

isFullScreen(self)

isHidden(self)

isLeftToRight(self)

isMaximized(self)

isMinimized(self)

isModal(self)

isRightToLeft(self)

isSignalConnected(self, QMetaMethod)

isVisible(self)

isVisibleTo(self, QWidget)

isWidgetType(self)

isWindow(self)

isWindowModified(self)

isWindowType(self)

keyPressEvent(self, QKeyEvent)

keyReleaseEvent(self, QKeyEvent)

keyboardGrabber()

killTimer(self, int)

layout(self)

layoutDirection(self)

leaveEvent(self, QEvent)

locale(self)

logicalDpiX(self)

logicalDpiY(self)

lower(self)

mapFrom(self, QWidget, QPoint)

mapFromGlobal(self, QPoint)

mapFromParent(self, QPoint)

mapTo(self, QWidget, QPoint)

mapToGlobal(self, QPoint)

mapToParent(self, QPoint)

mask(self)

maximumHeight(self)

maximumSize(self)

maximumWidth(self)

metaObject(self)

metric(self, QPaintDevice.PaintDeviceMetric)

minimumHeight(self)

minimumSize(self)

minimumSizeHint(self)

minimumWidth(self)

mouseDoubleClickEvent(self, QMouseEvent)

mouseGrabber()

mouseMoveEvent(self, QMouseEvent)

mousePressEvent(self, QMouseEvent)

mouseReleaseEvent(self, QMouseEvent)

move(self, QPoint) move(self, int, int)

moveEvent(self, QMoveEvent)

moveToThread(self, QThread)

nativeEvent(self, Union[QByteArray, bytes, …)

nativeParentWidget(self)

nextInFocusChain(self)

normalGeometry(self)

objectName(self)

objectNameChanged

objectNameChanged(self, str) [signal]

overrideWindowFlags(self, …)

overrideWindowState(self, …)

paintEngine(self)

paintEvent(self, QPaintEvent)

paintingActive(self)

palette(self)

parent(self)

parentWidget(self)

physicalDpiX(self)

physicalDpiY(self)

pos(self)

previousInFocusChain(self)

property(self, str)

pyqtConfigure(…)

Each keyword argument is either the name of a Qt property or a Qt signal.

raise_(self)

receivers(self, PYQT_SIGNAL)

rect(self)

releaseKeyboard(self)

releaseMouse(self)

releaseShortcut(self, int)

removeAction(self, QAction)

removeEventFilter(self, QObject)

render(self, QPaintDevice, targetOffset, …)

repaint(self) repaint repaint repaint(self, …)

resize(self, QSize) resize(self, int, int)

resizeEvent(self, QResizeEvent)

restoreGeometry(self, Union[QByteArray, …)

saveGeometry(self)

scroll(self, int, int) scroll(self, int, …)

sender(self)

senderSignalIndex(self)

setAcceptDrops(self, bool)

setAccessibleDescription(self, str)

setAccessibleName(self, str)

setAttribute(self, Qt.WidgetAttribute, on)

setAutoFillBackground(self, bool)

setBackgroundRole(self, QPalette.ColorRole)

setBaseSize(self, int, …)

setContentsMargins(self, int, int, int, …)

setContextMenuPolicy(self, Qt.ContextMenuPolicy)

setCursor(self, Union[QCursor, Qt.CursorShape])

setDisabled(self, bool)

setEnabled(self, bool)

setFixedHeight(self, int)

setFixedSize(self, QSize) setFixedSize(self, …)

setFixedWidth(self, int)

setFocus(self) setFocus(self, Qt.FocusReason)

setFocusPolicy(self, Qt.FocusPolicy)

setFocusProxy(self, QWidget)

setFont(self, QFont)

setForegroundRole(self, QPalette.ColorRole)

setGeometry(self, QRect) setGeometry(self, …)

setGraphicsEffect(self, QGraphicsEffect)

setHidden(self, bool)

setInputMethodHints(self, …)

setLayout(self, QLayout)

setLayoutDirection(self, Qt.LayoutDirection)

setLocale(self, QLocale)

setMask(self, QBitmap) setMask(self, QRegion)

setMaximumHeight(self, int)

setMaximumSize(self, int, …)

setMaximumWidth(self, int)

setMinimumHeight(self, int)

setMinimumSize(self, int, …)

setMinimumWidth(self, int)

setMouseTracking(self, bool)

setObjectName(self, str)

setPalette(self, QPalette)

setParent(self, QWidget) setParent(self, …)

setProperty(self, str, Any)

setShortcutAutoRepeat(self, int, enabled)

setShortcutEnabled(self, int, enabled)

setSizeIncrement(self, int, …)

setSizePolicy(self, …)

setStatusTip(self, str)

setStyle(self, QStyle)

setStyleSheet(self, str)

setTabOrder(QWidget, QWidget)

setToolTip(self, str)

setToolTipDuration(self, int)

setUpdatesEnabled(self, bool)

setVisible(self, bool)

setWhatsThis(self, str)

setWindowFilePath(self, str)

setWindowFlags(self, Union[Qt.WindowFlags, …)

setWindowIcon(self, QIcon)

setWindowIconText(self, str)

setWindowModality(self, Qt.WindowModality)

setWindowModified(self, bool)

setWindowOpacity(self, float)

setWindowRole(self, str)

setWindowState(self, Union[Qt.WindowStates, …)

setWindowTitle(self, str)

sharedPainter(self)

show(self)

showEvent(self, QShowEvent)

showFullScreen(self)

showMaximized(self)

showMinimized(self)

showNormal(self)

signalsBlocked(self)

size(self)

sizeHint(self)

sizeIncrement(self)

sizePolicy(self)

stackUnder(self, QWidget)

startTimer(self, int, timerType)

statusTip(self)

style(self)

styleSheet(self)

tabletEvent(self, QTabletEvent)

testAttribute(self, Qt.WidgetAttribute)

thread(self)

timerEvent(self, QTimerEvent)

toolTip(self)

toolTipDuration(self)

tr(self, str, disambiguation, n)

underMouse(self)

ungrabGesture(self, Qt.GestureType)

unsetCursor(self)

unsetLayoutDirection(self)

unsetLocale(self)

update(self) update update update(self, int, …)

updateGeometry(self)

updateMicroFocus(self)

updatesEnabled(self)

visibleRegion(self)

whatsThis(self)

wheelEvent(self, QWheelEvent)

width(self)

widthMM(self)

winId(self)

window(self)

windowFilePath(self)

windowFlags(self)

windowHandle(self)

windowIcon(self)

windowIconChanged

windowIconChanged(self, QIcon) [signal]

windowIconText(self)

windowIconTextChanged

windowIconTextChanged(self, str) [signal]

windowModality(self)

windowOpacity(self)

windowRole(self)

windowState(self)

windowTitle(self)

windowTitleChanged

windowTitleChanged(self, str) [signal]

windowType(self)

x(self)

y(self)

class segmentplot.SegmentPlot(parset=None)[source]

Methods

determine_position_of_point_within_frame(…)

>>> from spring.segment2d.segmentplot import SegmentPlot

get_labels_according_to_quantities(set_size, …)

>>> from spring.segment2d.segmentplot import SegmentPlot

add_avg_and_stdev_for_label

add_legend_at_best_location

add_stack_ids_to_upper_x_axis

check_class_model_values_and_raise_error

check_class_values_and_raise_error

check_ctf_values_and_raise_error

check_layerline_values_and_raise_error

check_segmenting_values_and_raise_error

choose_subplot_according_to_dimension

filter_segments_by_helix_and_micrograph_criteria

generate_set_id_label_for_plot_and_filename

get_plot_set

get_quantities_per_set

get_segment_ids_according_to_set_size

get_specified_quantities

get_subset_if_selected

launch_interactive_plot_gui

make_distance_plot_including_histogram

plot_data_on_figure

plot_desired_quantities

plot_distance_along_y

plot_distance_along_y_including_local_average

plot_xy_coordinates

plot_y_histogram

prepare_helix_and_coordinates

prepare_log_string

print_progress_statement_if_interactive

set_legend_and_xlabel

launch_interactive_plot_gui(feature_set, figures, tables, labels, hints=None)[source]
plot_desired_quantities()[source]
segmentplot.main()[source]