Example #1
0
    def setUpClass(cls):
        aspec = AutomatedRunSpec()
        aspec.mass_spectrometer = 'jan'
        aspec.labnumber = '17005'
        aspec.aliquot = 95

        a = AutomatedRun()
        a.script_info.measurement_script_name = 'unknown_peak_hop'
        s = ArgusSpectrometerManager()
        ion = IonOpticsManager(spectrometer=s.spectrometer)

        s.load(db_mol_weights=False)
        a.spectrometer_manager = s
        a.ion_optics_manager = ion
        a.isotope_group = ArArAge()
        a.isotope_group.j=ufloat(0.001, 1e-6)

        a._alive = True
        a.uuid = '12345-ABCDE'

        a.spec = aspec
        a._measured = True
        a._save_enabled = True

        cls.arun = a
Example #2
0
    def setUpClass(cls):
        aspec = AutomatedRunSpec()
        aspec.mass_spectrometer = 'jan'
        aspec.labnumber = '17005'
        aspec.aliquot = 82
        aspec.syn_extraction='test'


        a = AutomatedRun()
        a.script_info.measurement_script_name = 'unknown'
        a.script_info.extraction_script_name = 'pause'

        s = ArgusSpectrometerManager()
        ion = IonOpticsManager(spectrometer=s.spectrometer)

        s.load(db_mol_weights=False)
        a.spectrometer_manager = s
        a.ion_optics_manager = ion
        a.isotope_group = ArArAge()

        a._alive = True
        a.uuid = '12345-ABCDE'

        a.spec = aspec
        a._measured = True
        a.persister.save_enabled = True
        a.persister.datahub=dh=Datahub(bind_mainstore=False)
        dh.mainstore.db.kind='mysql'
        dh.mainstore.db.username='******'
        dh.mainstore.db.name='pychrondata_dev'
        dh.mainstore.db.password='******'
        dh.mainstore.db.connect()


        cls.arun = a
Example #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 = 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