cytoflowgui.workflow.views.view_base¶
- class cytoflowgui.workflow.views.view_base.IWorkflowView(adaptee, default=<class 'traits.adaptation.adaptation_error.AdaptationError'>)[source]¶
Bases:
cytoflow.views.i_view.IViewAn interface that extends a
cytoflowview with functions required for GUI support.In addition to implementing the interface below, another common thing to do in the derived class is to override traits of the underlying class in order to add metadata that controls their handling by the workflow. Currently, relevant metadata include:
status - Holds status variables – only sent from the remote process to the local one, and doesn’t re-plot the view. Example: the possible plot names.
transient - A temporary variable (not copied between processes or serialized).
- TODO - finish this docstring (plotfacet, plot_params, etc)
- changed¶
Used to transmit status information back from the operation to the workflow. Set its value to the name of the trait that was changed
- Type
Event
- should_plot(changed, payload)[source]¶
Should the owning WorkflowItem refresh the plot when certain things change?
changedcan be: - Changed.VIEW – the view’s parameters changed - Changed.RESULT – this WorkflowItem’s result changed - Changed.PREV_RESULT – the previous WorkflowItem’s result changed - Changed.ESTIMATE_RESULT – the results of calling “estimate” changedIf
should_plotwas called from an event handler, the event is passed in aspayload
- get_notebook_code(idx)[source]¶
Return Python code suitable for a Jupyter notebook cell that plots this view.
- Parameters
idx (integer) – The index of the
WorkflowItemthat holds this view.- Returns
The Python code that calls this module.
- Return type
string
- class cytoflowgui.workflow.views.view_base.WorkflowView[source]¶
Bases:
traits.has_traits.HasStrictTraitsDefault implementation of IWorkflowView.
Make sure this class is FIRST in the derived class’s declaration so it shows up earlier in the MRO than the base class from the
cytoflowmodule.- current_plot¶
Passed as the
current_plotkeyword to the underlyingIView.plot- Type
Any
- should_plot(changed, payload)[source]¶
Should the owning WorkflowItem refresh the plot when certain things change?
changedcan be: - Changed.VIEW – the view’s parameters changed - Changed.RESULT – this WorkflowItem’s result changed - Changed.PREV_RESULT – the previous WorkflowItem’s result changed - Changed.ESTIMATE_RESULT – the results of calling “estimate” changedIf
should_plotis called from a notification handler, the payload is the handlereventparameter.
- class cytoflowgui.workflow.views.view_base.WorkflowFacetView[source]¶
Bases:
cytoflowgui.workflow.views.view_base.WorkflowViewA
WorkflowViewthat subsets the data by a facet before plotting.- plotfacet¶
What facet should
current_plotrefer to?- Type
Str
- plot(experiment, **kwargs)[source]¶
A default
plotthat subsets by theplotfacetandcurrent_plot. If you need it to do something else, you must override this method!
- class cytoflowgui.workflow.views.view_base.WorkflowByView[source]¶
Bases:
cytoflowgui.workflow.views.view_base.WorkflowView- plot(experiment, **kwargs)[source]¶
A default
plotthat passescurrent_plotas the plot name.