Exemplo n.º 1
0
    def test_peak_hop_save(self):
        self.measure(baseline=False)

        msi = MassSpecDatabaseImporter()
        msi.connect()
        arun = self.arun
        arun.massspec_importer = msi
        ret = arun.post_measurement_save()
        self.assertTrue(ret)
Exemplo n.º 2
0
    def test_multicollect_save(self):
        self.measure()

        msi = MassSpecDatabaseImporter()
        msi.connect()
        arun = self.arun
        arun.massspec_importer = msi
        ret = arun.post_measurement_save()
        self.assertTrue(ret)
Exemplo n.º 3
0
    def test_peak_hop_save(self):
        self.measure(baseline=False)

        msi = MassSpecDatabaseImporter()
        msi.connect()
        arun = self.arun
        arun.massspec_importer = msi
        ret = arun.post_measurement_save()
        self.assertTrue(ret)
Exemplo n.º 4
0
 def __init__(self, *args, **kw):
     '''
         destination: dict. 
             dict, required keys are (username, password, host, name)
     '''
     super(MassSpecExporter, self).__init__(*args, **kw)
     importer = MassSpecDatabaseImporter()
     self.importer = importer
Exemplo n.º 5
0
    def bind_preferences(self):

        # massspec
        prefid = 'pychron.massspec.database'
        bind_preference(self, 'massspec_enabled', '{}.enabled'.format(prefid))
        if self.massspec_enabled:
            from pychron.experiment.utilities.mass_spec_database_importer import MassSpecDatabaseImporter

            store = MassSpecDatabaseImporter()
            bind_preference(store.db, 'name', '{}.name'.format(prefid))
            bind_preference(store.db, 'host', '{}.host'.format(prefid))
            bind_preference(store.db, 'username', '{}.username'.format(prefid))
            bind_preference(store.db, 'password', '{}.password'.format(prefid))

            prefid = 'pychron.massspec.config'
            bind_preference(store, 'reference_detector_name',
                            '{}.reference_detector_name'.format(prefid))
            bind_preference(store, 'reference_isotope_name',
                            '{}.reference_isotope_name'.format(prefid))
            bind_preference(
                store, 'use_reference_detector_by_isotope',
                '{}.use_reference_detector_by_isotope'.format(prefid))

            self.stores['massspec'] = store

        # isotopedb
        prefid = 'pychron.pychron.database'
        bind_preference(self, 'isotopedb_enabled', '{}.enabled'.format(prefid))
        if self.isotopedb_enabled:
            from pychron.database.isotope_database_manager import IsotopeDatabaseManager
            store = IsotopeDatabaseManager()
            bind_preference(store.db, 'name', '{}.name'.format(prefid))
            bind_preference(store.db, 'host', '{}.host'.format(prefid))
            bind_preference(store.db, 'username', '{}.username'.format(prefid))
            bind_preference(store.db, 'password', '{}.password'.format(prefid))

            self.stores['isotopedb'] = store

        self.stores['dvc'] = self.mainstore