Example #1
0
    def _make_component(self, klass, ans, plot_options):
        model = self.figure_model
        if model is None:
            model = klass()
            self.figure_model = model

        model.trait_set(plot_options=plot_options,
                        titles=self.titles,
                        analyses=ans)

        container = self.figure_container
        if not container:
            container = FigureContainer(model=model)
            self.figure_container = container

        container.refresh()
        return model, container.component
Example #2
0
    def _make_component(self, klass, ans, plot_options):
        model = self.figure_model
        if model is None:
            model = klass()
            self.figure_model = model

        model.trait_set(plot_options=plot_options,
                        titles=self.titles,
                        analyses=ans)

        container = self.figure_container
        if not container:
            container = FigureContainer(model=model)
            self.figure_container = container

        container.refresh()
        return model, container.component
Example #3
0
    def get_component(self, ans, plotter_options):
        if plotter_options is None:
            pom = self.plotter_options_manager_klass()
            plotter_options = pom.plotter_options

        model = self.model_klass(plot_options=plotter_options)
        model.analyses = ans
        iv = FigureContainer(model=model)

        return model, iv.component
Example #4
0
    def get_component(self, ans, plotter_options):
        if plotter_options is None:
            pom = SpectrumOptionsManager()
            plotter_options = pom.plotter_options

        from pychron.processing.plotters.spectrum.spectrum_model import SpectrumModel

        model = SpectrumModel(plot_options=plotter_options)
        model.analyses = ans
        iv = FigureContainer(model=model)
        #self._model = model
        return model, iv.component
Example #5
0
    def get_component(self, ans, plotter_options):
        #         print plotter_options
        if plotter_options is None:
            pom = self.plotter_options_manager_klass()
            plotter_options = pom.plotter_options

        #         ref = ans[0]
        #         plotter_options.load_aux_plots(ref)
        #             plotter_options.load_fits(ref)

        model = self.model_klass(plot_options=plotter_options)
        model.analyses = ans
        iv = FigureContainer(model=model)

        return model, iv.component
Example #6
0
    def get_component(self, ans, plotter_options):

        if plotter_options is None:
            pom = InverseIsochronOptionsManager()
            plotter_options = pom.plotter_options

        from pychron.processing.plotters.isochron.isochron_model \
            import InverseIsochronModel

        model = InverseIsochronModel(plot_options=plotter_options)
        model.analyses = ans
        iv = FigureContainer(model=model)

        #force are refresh
        model.refresh()

        return model, iv.component
Example #7
0
    def get_component(self, ans, plotter_options):
        # meta = None
        # if self.figure_model:
        #     meta = self.figure_model.dump_metadata()

        if plotter_options is None:
            pom = IdeogramOptionsManager()
            plotter_options = pom.plotter_options

        from pychron.processing.plotters.ideogram.ideogram_model import IdeogramModel

        model = IdeogramModel(plot_options=plotter_options)
        model.analyses = ans
        iv = FigureContainer(model=model)

        # if meta:
        #     model.load_metadata(meta)

        return model, iv.component
Example #8
0
    def get_component(self, ans, *args, **kw):

        # if plotter_options is None:
        #     pom = IdeogramOptionsManager()
        #     plotter_options = pom.plotter_options

        model = self.figure_model
        if not model:
            model = CompositeModel()
            # from pychron.processing.plotters.ideogram.ideogram_model import IdeogramModel
            #
            # model = IdeogramModel(plot_options=plotter_options,
            #                       titles=self.titles)

        model.trait_set(
            plot_options=self.plotter_options_manager.plotter_options,
            titles=self.titles,
            analyses=ans)

        iv = FigureContainer(model=model)
        component = iv.component

        return model, component