Example #1
0
 def add_direct_plotter(self, plotter):
     """A plotter that lives outside the filter pipeline, intended for advanced
     use cases when plotting data during refinement."""
     plotter_stream = DataStream()
     plotter.sink.add_input_stream(plotter_stream)
     self.extra_plotters.append(plotter)
     self._extra_plots_to_streams[plotter] = plotter_stream
Example #2
0
    def create_graph(self, edges):
        dag = nx.DiGraph()
        self.edges = []
        for edge in edges:
            obj = DataStream(
                name="{}_TO_{}".format(edge[0].name, edge[1].name))
            edge[0].add_output_stream(obj)
            edge[1].add_input_stream(obj)
            self.edges.append(obj)
            dag.add_edge(edge[0].parent, edge[1].parent, object=obj)

        self.dag = dag