コード例 #1
0
ファイル: __main__.py プロジェクト: ApfeldLab/pharynx_redox
def analyze(dir, gui):
    """Analyze an experiment"""
    from pharedox import experiment

    exp = experiment.Experiment(Path(dir))
    if gui:
        from pharedox.gui.gui import App

        app = App(exp_=exp)
        app.run()
    else:
        exp.full_pipeline()
コード例 #2
0
 def test_full_experiment_run_paired_single_timepoint(self, shared_datadir):
     exp = experiment.Experiment(shared_datadir / "experiments" /
                                 "2017_02_22-HD233_SAY47")
     exp.full_pipeline()
コード例 #3
0
 def test_experiment_doesnt_loads_masks_if_they_dont_exist(
         self, mock_segment_pharynxes, shared_datadir):
     exp = experiment.Experiment(shared_datadir / "experiments" /
                                 "2017_02_22-HD233_SAY47")
     exp.segment_pharynxes()
     mock_segment_pharynxes.assert_called()
コード例 #4
0
ファイル: gui.py プロジェクト: ApfeldLab/pharynx_redox
                        self.experiment.images, r_min=0.9, r_max=1.9, i_max=1500,
                    ),
                    name="R (population-normalized)",
                )
                for wvl in self.experiment.images.wavelength.values:
                    self.viewer.add_image(
                        self.experiment.images.sel(wavelength=wvl),
                        name=wvl,
                        visible=False,
                    )

            if self.experiment.seg_images is not None:
                self.viewer.add_labels(
                    self.experiment.seg_images, name="masks",
                )


if __name__ == "__main__":

    logging.basicConfig(
        format="%(asctime)s %(levelname)s:%(message)s",
        level=logging.INFO,
        datefmt="%I:%M:%S",
    )

    exp_dir = sys.argv[1]
    exp = experiment.Experiment(Path(exp_dir))

    app = App(exp_=exp)
    app.run()