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.IView
An interface that extends a
cytoflow
view 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?
changed
can 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_plot
was 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
WorkflowItem
that 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.HasStrictTraits
Default 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
cytoflow
module.- current_plot¶
Passed as the
current_plot
keyword to the underlyingIView.plot
- Type
Any
- should_plot(changed, payload)[source]¶
Should the owning WorkflowItem refresh the plot when certain things change?
changed
can 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_plot
is called from a notification handler, the payload is the handlerevent
parameter.
- class cytoflowgui.workflow.views.view_base.WorkflowFacetView[source]¶
Bases:
cytoflowgui.workflow.views.view_base.WorkflowView
A
WorkflowView
that subsets the data by a facet before plotting.- plotfacet¶
What facet should
current_plot
refer to?- Type
Str
- plot(experiment, **kwargs)[source]¶
A default
plot
that subsets by theplotfacet
andcurrent_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
plot
that passescurrent_plot
as the plot name.