Beispiel #1
0
    def _executor_factory(self):
        e = ExperimentExecutor(
            mode=self.mode,
            application=self.application)
        e.bind_preferences()

        return e
Beispiel #2
0
    def _executor_factory(self):
        e = ExperimentExecutor(
            mode=self.mode,
            application=self.application)
        e.bind_preferences()

        return e
Beispiel #3
0
def run():
    hp = hpy()

    globalv.experiment_debug = True
    #     t = ExperimentEditorTask()
    #     p = os.path.join(paths.experiment_dir, 'demo.txt')
    #     t._open_experiment(p)

    q = ExperimentQueue(delay_before_analyses=0, delay_between_analyses=0)
    q.automated_runs = [
        AutomatedRunSpec(labnumber='61312',
                         duration=2.0,
                         extraction_script='pause',
                         measurement_script='air',
                         mass_spectrometer='jan'),
        AutomatedRunSpec(labnumber='61312',
                         duration=2.0,
                         extraction_script='pause',
                         measurement_script='air',
                         mass_spectrometer='jan'),
        AutomatedRunSpec(labnumber='61312',
                         duration=2.0,
                         extraction_script='pause',
                         measurement_script='air',
                         mass_spectrometer='jan'),
        AutomatedRunSpec(labnumber='61312',
                         duration=2.0,
                         extraction_script='pause',
                         measurement_script='air',
                         mass_spectrometer='jan'),
        AutomatedRunSpec(labnumber='61312',
                         duration=2.0,
                         extraction_script='pause',
                         measurement_script='air',
                         mass_spectrometer='jan')
    ]

    dbman = isotope_manager_factory()
    specman = SpectrometerManager()
    specman.load()

    ex = ExperimentExecutor(
        db=dbman.db,
        spectrometer_manager=specman,
        extraction_line_manager='',
        executable=True,
    )
    ex.monitor = None
    ex.experiment_queues = [
        q,
    ]
    ex.experiment_queue = q
    hp.setrelheap()
    t = ex.execute()
    t.join()
    #     count_instances(group='sqlalchemy')

    return hp
Beispiel #4
0
    def _executor_factory(self):
        p1 = 'pychron.extraction_line.extraction_line_manager.ExtractionLineManager'
        p2 = 'pychron.spectrometer.spectrometer_manager.SpectrometerManager'
        p3 = 'pychron.spectrometer.ion_optics_manager.IonOpticsManager'
        kw = dict()
        if self.application:
            spec = self.application.get_service(p2)
            kw = dict(extraction_line_manager=self.application.get_service(p1),
                      spectrometer_manager=spec,
                      ion_optics_manager=self.application.get_service(p3), )

        if not self.unique_executor_db:
            kw['db'] = self.db
            kw['connect'] = False

        e = ExperimentExecutor(
            mode=self.mode,
            application=self.application,
            **kw
        )

        return e
Beispiel #5
0
def run():
    hp = hpy()

    globalv.experiment_debug = True
#     t = ExperimentEditorTask()
#     p = os.path.join(paths.experiment_dir, 'demo.txt')
#     t._open_experiment(p)


    q = ExperimentQueue(delay_before_analyses=0,
                        delay_between_analyses=0)
    q.automated_runs = [
                        AutomatedRunSpec(
                                         labnumber='61312',
                                         duration=2.0,
                                         extraction_script='pause',
                                         measurement_script='air',
                                         mass_spectrometer='jan'
                                         ),
                        AutomatedRunSpec(
                                         labnumber='61312',
                                         duration=2.0,
                                         extraction_script='pause',
                                         measurement_script='air',
                                         mass_spectrometer='jan'
                                         ),
                        AutomatedRunSpec(
                                         labnumber='61312',
                                         duration=2.0,
                                         extraction_script='pause',
                                         measurement_script='air',
                                         mass_spectrometer='jan'
                                         ),
                        AutomatedRunSpec(
                                         labnumber='61312',
                                         duration=2.0,
                                         extraction_script='pause',
                                         measurement_script='air',
                                         mass_spectrometer='jan'
                                         ),
                        AutomatedRunSpec(
                                         labnumber='61312',
                                         duration=2.0,
                                         extraction_script='pause',
                                         measurement_script='air',
                                         mass_spectrometer='jan'
                                         )

                        ]

    dbman = isotope_manager_factory()
    specman = ArgusSpectrometerManager()
    specman.load()

    ex = ExperimentExecutor(db=dbman.db,
                            spectrometer_manager=specman,
                            extraction_line_manager='',
                            executable=True,

                            )
    ex.monitor = None
    ex.experiment_queues = [q, ]
    ex.experiment_queue = q
    hp.setrelheap()
    t = ex.execute()
    t.join()
#     count_instances(group='sqlalchemy')

    return hp