Beispiel #1
0
def init_ui(data_muggler):
    """ Do the enaml import and set up of the UI

    Parameters
    ----------
    data_muggler : replay.pipeline.DataMuggler
    """
    with enaml.imports():
        from pipeline_w2d import PipelineView

    histogram_model = HistogramModel()
    c_c_combo_fitter = MultiFitController(valid_models=valid_models)
    scalar_collection = ScalarCollection()
    scalar_collection.data_muggler = data_muggler
    scalar_collection.multi_fit_controller = c_c_combo_fitter
    cs_model = CrossSectionModel(data_muggler=data_muggler,
                                 histogram_model=histogram_model)
    view = PipelineView(histogram_model=histogram_model)
    histogram_model.cmap = cs_model.cmap
    # provide the pipeline view with its attributes
    view.scalar_collection=scalar_collection
    view.multi_fit_controller = c_c_combo_fitter
    view.cs_model = cs_model
    view.start_observation = start_observation
    view.stop_observation = stop_observation
    view.clear_data = clear_datamuggler
    view.reinit_data = init_datamuggler
    cmap = cs_model.cmap
    cs_model.cmap = 'gray'
    cs_model.cmap = cmap
    return view
def init_ui(data_muggler):
    """ Do the enaml import and set up of the UI

    Parameters
    ----------
    data_muggler : replay.pipeline.DataMuggler
    """
    with enaml.imports():
        from pipeline_watching_PVs import PipelineView

    c_c_combo_fitter = MultiFitController(valid_models=valid_models)
    scalar_collection = ScalarCollection()
    scalar_collection.data_muggler = data_muggler
    scalar_collection.multi_fit_controller = c_c_combo_fitter
    view = PipelineView()
    # provide the pipeline view with its attributes
    view.scalar_collection=scalar_collection
    view.multi_fit_controller = c_c_combo_fitter
    return view
Beispiel #3
0
# p2 output -> dm2
p2.source_signal.connect(dm.append_data)


app = QtApplication()

with enaml.imports():
    from pipeline import PipelineView

img_seq = DmImgSequence(data_muggler=dm, data_name='img')
cs_model = CrossSectionModel(data_muggler=dm, name='img',
                                        sliceable_data=img_seq)
roi_model = RegionOfInterestModel(callback=roi_callback)
from replay.model.fitting_model import FitController
multi_fit_controller = MultiFitController(valid_models=valid_models)
scalar_collection = ScalarCollection(data_muggler=dm,
                                     multi_fit_controller=multi_fit_controller)
scalar_collection.scalar_models['count'].is_plotting = False
scalar_collection.scalar_models['T'].is_plotting = False
scalar_collection.scalar_models['x'].is_plotting = False
scalar_collection.scalar_models['y'].is_plotting = False
scalar_collection.fit_target = 'max'

view = PipelineView(scalar_collection=scalar_collection,
                    cs_model=cs_model,
                    roi_model=roi_model,
                    multi_fit_controller=multi_fit_controller)
view.show()
frame_source.start()

app.start()