Exemple #1
0
    def __init__(self, *args, **kw):
        super(BrowserModel, self).__init__(*args, **kw)

        prefid = 'pychron.browser'
        bind_preference(self, 'load_selection_enabled',
                        '{}.load_selection_enabled'.format(prefid))
        bind_preference(self, 'auto_load_database',
                        '{}.auto_load_database'.format(prefid))
    def _setup_dashboard_client(self):
        client = self.dashboard_client
        bind_preference(client, 'host', 'pychron.dashboard.host')
        bind_preference(client, 'port', 'pychron.dashboard.port')

        client.connect()
        client.load_configuration()
        client.listen()
    def _use_syslogger_changed(self):
        if self.use_syslogger:
            from pychron.experiment.sys_log import SysLogger

            prefid = 'pychron.syslogger'
            self.syslogger = SysLogger()
            for attr in ('username', 'password', 'host'):
                bind_preference(self.syslogger, attr, '{}.{}'.format(prefid, attr))
Exemple #4
0
    def console_bind_preferences(self, prefid):
        from pychron.core.ui.preference_binding import color_bind_preference, bind_preference

        color_bind_preference(self, 'console_bgcolor',
                              '{}.bgcolor'.format(prefid))
        color_bind_preference(self, 'console_default_color',
                              '{}.textcolor'.format(prefid))
        bind_preference(self, 'console_fontsize', '{}.fontsize'.format(prefid))
    def _setup_dashboard_client(self):
        client = self.dashboard_client
        bind_preference(client, 'host', 'pychron.dashboard.host')
        bind_preference(client, 'port', 'pychron.dashboard.port')

        client.connect()
        client.load_configuration()
        client.listen()
 def _status_monitor_default(self):
     sm = StatusMonitor()
     prefid = 'pychron.extraction_line'
     bind_preference(sm, 'state_freq', '{}.valve_state_frequency'.format(prefid))
     bind_preference(sm, 'checksum_freq', '{}.checksum_frequency'.format(prefid))
     bind_preference(sm, 'lock_freq', '{}.valve_lock_frequency'.format(prefid))
     bind_preference(sm, 'owner_freq', '{}.valve_owner_frequency'.format(prefid))
     bind_preference(sm, 'update_period', '{}.update_period'.format(prefid))
     return sm
Exemple #7
0
    def _setup_dashboard(self):
        self.dashboard_client = client = self.application.get_service('pychron.dashboard.client.DashboardClient')
        if client:
            client.on_trait_change(self._handle_dashboard, 'values:value')
            bind_preference(client, 'host', 'pychron.dashboard.client.host')
            bind_preference(client, 'port', 'pychron.dashboard.client.port')

            client.connect()
            client.load_configuration()
            client.listen()
    def _setup_dashboard(self):
        self.dashboard_client = client = self.application.get_service("pychron.dashboard.client.DashboardClient")
        if client:
            client.on_trait_change(self._handle_dashboard, "values:value")
            bind_preference(client, "host", "pychron.dashboard.client.host")
            bind_preference(client, "port", "pychron.dashboard.client.port")

            client.connect()
            client.load_configuration()
            client.listen()
Exemple #9
0
 def _status_monitor_default(self):
     sm = StatusMonitor()
     prefid = 'pychron.extraction_line'
     bind_preference(sm, 'state_freq',
                     '{}.valve_state_frequency'.format(prefid))
     bind_preference(sm, 'checksum_freq',
                     '{}.checksum_frequency'.format(prefid))
     bind_preference(sm, 'lock_freq',
                     '{}.valve_lock_frequency'.format(prefid))
     bind_preference(sm, 'owner_freq',
                     '{}.valve_owner_frequency'.format(prefid))
     bind_preference(sm, 'update_period', '{}.update_period'.format(prefid))
     return sm
Exemple #10
0
 def _use_status_monitor_changed(self):
     if self.use_status_monitor:
         prefid = 'pychron.extraction_line'
         bind_preference(self.status_monitor, 'state_freq',
                         '{}.valve_state_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'checksum_freq',
                         '{}.checksum_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'lock_freq',
                         '{}.valve_lock_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'owner_freq',
                         '{}.valve_owner_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'update_period',
                         '{}.update_period'.format(prefid))
     else:
         if self.status_monitor.isAlive():
             self.status_monitor.stop()
 def _use_status_monitor_changed(self):
     if self.use_status_monitor:
         prefid = 'pychron.extraction_line'
         bind_preference(self.status_monitor, 'state_freq',
                         '{}.valve_state_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'checksum_freq',
                         '{}.checksum_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'lock_freq',
                         '{}.valve_lock_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'owner_freq',
                         '{}.valve_owner_frequency'.format(prefid))
         bind_preference(self.status_monitor, 'update_period',
                         '{}.update_period'.format(prefid))
     else:
         if self.status_monitor.isAlive():
             self.status_monitor.stop()
 def _bind_preferences(self):
     bind_preference(self, 'extraction_script_enabled',
                     'pychron.experiment.extraction_script_enabled')
     bind_preference(self, 'runs_enabled',
                     'pychron.experiment.runs_enabled')
     bind_preference(self, 'queue_enabled',
                     'pychron.experiment.queue_enabled')
     bind_preference(self, 'non_fatal_enabled',
                     'pychron.experiment.non_fatal_enabled')
    def bind_preferences(self):
        #notifications

        self._preference_binder('pychron.experiment',
                                ('use_notifications',
                                 'notifications_port',
                                 'automated_runs_editable'))

        #force notifier setup
        if self.use_notifications:
            self.notifier.setup(self.notifier.port)

        #sys logger
        bind_preference(self, 'use_syslogger', 'pychron.use_syslogger')
        if self.use_syslogger:
            self._use_syslogger_changed()

        color_bind_preference(self, 'bgcolor', 'pychron.experiment.bg_color')
        color_bind_preference(self, 'even_bgcolor', 'pychron.experiment.even_bg_color')
    def __init__(self, *args, **kw):
        try:
            from pychron.core.ui.preference_binding import bind_preference
            prefid = 'pychron.arar.constants'

            for attr, prefattr in (
                ('lambda_b_v', 'lambda_b'),
                ('lambda_b_e', 'lambda_b_error'),
                ('lambda_e_v', 'lambda_e'),
                ('lambda_e_e', 'lambda_e_error'),
                ('lambda_Cl36_v', 'lambda_cl36'),
                ('lambda_Cl36_e', 'lambda_cl36_error'),
                ('lambda_Ar37_v', 'lambda_ar37'),
                ('lambda_Ar37_e', 'lambda_ar37_error'),
                ('lambda_Ar39_v', 'lambda_ar39'),
                ('lambda_Ar39_e', 'lambda_ar39_error'),
                ('atm4036_v', 'ar40_ar36_atm'),
                ('atm4036_e', 'ar40_ar36_atm_error'),
                ('atm4038_v', 'ar40_ar38_atm'),
                ('atm4038_e', 'ar40_ar38_atm_error'),
                ('k3739_mode', 'ar37_ar39_mode'),
                ('k3739_v', 'ar37_ar39'),
                ('k3739_e', 'ar37_ar39_error'),
                ('atm4036_citation', 'ar40_ar36_atm_citation'),
                ('atm4038_citation', 'ar40_ar39_atm_citation'),
                ('lambda_b_citation', 'lambda_b_citation'),
                ('lambda_e_citation', 'lambda_e_citation'),
                ('lambda_Cl36_citation', 'lambda_cl36_citation'),
                ('lambda_Ar37_citation', 'lambda_ar37_citation'),
                ('lambda_Ar39_citation', 'lambda_ar39_citation'),
            ):
                bind_preference(self, attr, '{}.{}'.format(prefid, prefattr))

            for attr in ('use_irradiation_endtime', 'age_units',
                         'abundance_sensitivity',
                         'allow_negative_ca_correction'):
                bind_preference(self, attr, '{}.{}'.format(prefid, attr))

        except (AttributeError, ImportError) as e:
            pass

        super(ArArConstants, self).__init__(*args, **kw)
Exemple #15
0
 def console_bind_preferences(self, prefid):
     color_bind_preference(self, 'console_bgcolor', '{}.bgcolor'.format(prefid))
     color_bind_preference(self, 'console_default_color', '{}.textcolor'.format(prefid))
     bind_preference(self, 'console_fontsize', '{}.fontsize'.format(prefid))
Exemple #16
0
 def bind_preferences(self):
     pref_id = 'pychron.spectrometer'
     bind_preference(self, 'use_detector_safety', '{}.use_detector_safety'.format(pref_id))
     bind_preference(self, 'use_log_events', '{}.use_log_events'.format(pref_id))
     bind_preference(self, 'use_vertical_markers', '{}.use_vertical_markers'.format(pref_id))
Exemple #17
0
    def bind_preferences(self, pref_id):
        bind_preference(self.canvas, 'show_grids', '{}.show_grids'.format(pref_id))
        self.canvas.change_grid_visibility()

        bind_preference(self.canvas, 'show_laser_position', '{}.show_laser_position'.format(pref_id))
        bind_preference(self.canvas, 'show_desired_position', '{}.show_desired_position'.format(pref_id))
        bind_preference(self.canvas, 'desired_position_color', '{}.desired_position_color'.format(pref_id),
                        factory=ColorPreferenceBinding)
        #        bind_preference(self.canvas, 'render_map', '{}.render_map'.format(pref_id))
        #

        bind_preference(self.canvas, 'crosshairs_kind', '{}.crosshairs_kind'.format(pref_id))
        for tag in ('', 'aux_'):
            for key in ('line_width', 'color', 'radius', 'offsetx', 'offsety'):
                key = '{}crosshairs_{}'.format(tag, key)
                factory = ColorPreferenceBinding if key.endswith('color') else None
                pref = '{}.{}'.format(pref_id, key)
                bind_preference(self.canvas, key, pref, factory=factory)

            # bind_preference(self.canvas, '{}crosshairs_line_width', '{}.{}crosshairs_line_width'.format(pref_id))
            # bind_preference(self.canvas, 'crosshairs_color',
            #                 '{}.crosshairs_color'.format(pref_id),
            #                 factory=ColorPreferenceBinding)
            # bind_preference(self.canvas, 'crosshairs_radius', '{}.crosshairs_radius'.format(pref_id))
            # bind_preference(self.canvas, 'crosshairs_offsetx', '{}.crosshairs_offsetx'.format(pref_id))
            # bind_preference(self.canvas, 'crosshairs_offsety', '{}.crosshairs_offsety'.format(pref_id))

        bind_preference(self.canvas, 'show_hole_label', '{}.show_hole_label'.format(pref_id))
        bind_preference(self.canvas, 'hole_label_color', '{}.hole_label_color'.format(pref_id))
        bind_preference(self.canvas, 'hole_label_size', '{}.hole_label_size'.format(pref_id))
        self.canvas.handle_hole_label_size(self.canvas.hole_label_size)

        bind_preference(self.canvas, 'scaling', '{}.scaling'.format(pref_id))
        bind_preference(self.canvas, 'show_bounds_rect',
                        '{}.show_bounds_rect'.format(pref_id))

        self.canvas.request_redraw()
Exemple #18
0
    def __init__(self, *args, **kw):
        # print 'init arar constants'
        try:
            from pychron.core.ui.preference_binding import bind_preference

            bind_preference(self, "lambda_b_v", "pychron.arar.constants.lambda_b")
            bind_preference(self, "lambda_b_e", "pychron.arar.constants.lambda_b_error")
            bind_preference(self, "lambda_e_v", "pychron.arar.constants.lambda_e")
            bind_preference(self, "lambda_e_e", "pychron.arar.constants.lambda_e_error")
            bind_preference(self, "lambda_Cl36_v", "pychron.arar.constants.lambda_Cl36")
            bind_preference(self, "lambda_Cl36_e", "pychron.arar.constants.lambda_Cl36_error")
            bind_preference(self, "lambda_Ar37_v", "pychron.arar.constants.lambda_Ar37")
            bind_preference(self, "lambda_Ar37_e", "pychron.arar.constants.lambda_Ar37_error")
            bind_preference(self, "lambda_Ar39_v", "pychron.arar.constants.lambda_Ar39")
            bind_preference(self, "lambda_Ar39_e", "pychron.arar.constants.lambda_Ar39_error")

            bind_preference(self, "atm4036_v", "pychron.arar.constants.Ar40_Ar36_atm")
            bind_preference(self, "atm_4036_e", "pychron.arar.constants.Ar40_Ar36_atm_error")
            bind_preference(self, "atm4038_v", "pychron.arar.constants.Ar40_Ar38_atm")
            bind_preference(self, "atm_4038_e", "pychron.arar.constants.Ar40_Ar38_atm_error")

            bind_preference(self, "k3739_mode", "pychron.arar.constants.Ar37_Ar39_mode")
            bind_preference(self, "k3739_v", "pychron.arar.constants.Ar37_Ar39")
            bind_preference(self, "k3739_e", "pychron.arar.constants.Ar37_Ar39_error")

            bind_preference(self, "age_units", "pychron.arar.constants.age_units")
            bind_preference(self, "abundance_sensitivity", "pychron.arar.constants.abundance_sensitivity")

            # bind_preference(self, 'ic_factors', 'pychron.spectrometer.ic_factors',
            #                 factory=ICFactorPreferenceBinding)

            prefid = "pychron.arar.constants"
            bind_preference(self, "atm4036_citation", "{}.Ar40_Ar36_atm_citation".format(prefid))
            bind_preference(self, "atm4038_citation", "{}.Ar40_Ar38_atm_citation".format(prefid))
            bind_preference(self, "lambda_b_citation", "{}.lambda_b_citation".format(prefid))
            bind_preference(self, "lambda_e_citation", "{}.lambda_e_citation".format(prefid))
            bind_preference(self, "lambda_Cl36_citation", "{}.lambda_Cl36_citation".format(prefid))
            bind_preference(self, "lambda_Ar37_citation", "{}.lambda_Ar37_citation".format(prefid))
            bind_preference(self, "lambda_Ar39_citation", "{}.lambda_Ar39_citation".format(prefid))

            bind_preference(self, "allow_negative_ca_correction", "{}.allow_negative_ca_correction".format(prefid))

        except (AttributeError, ImportError):
            pass

        super(ArArConstants, self).__init__(*args, **kw)
Exemple #19
0
    def bind_preferences(self):
        pref_id = 'pychron.spectrometer'
        bind_preference(self, 'use_detector_safety',
                        '{}.use_detector_safety'.format(pref_id))
        bind_preference(self, 'use_log_events',
                        '{}.use_log_events'.format(pref_id))
        bind_preference(self, 'use_vertical_markers',
                        '{}.use_vertical_markers'.format(pref_id))

        bind_preference(self, 'use_default_scan_settings', '{}.use_default_scan_settings'.format(pref_id))
        bind_preference(self, 'default_detector', '{}.default_detector'.format(pref_id))
        bind_preference(self, 'default_isotope', '{}.default_isotope'.format(pref_id))
Exemple #20
0
    def console_bind_preferences(self, prefid):
        from pychron.core.ui.preference_binding import color_bind_preference, bind_preference

        color_bind_preference(self, 'console_bgcolor', '{}.bgcolor'.format(prefid))
        color_bind_preference(self, 'console_default_color', '{}.textcolor'.format(prefid))
        bind_preference(self, 'console_fontsize', '{}.fontsize'.format(prefid))
Exemple #21
0
 def _bind_preferences(self):
     bind_preference(self, 'extraction_script_enabled', 'pychron.experiment.extraction_script_enabled')
     bind_preference(self, 'runs_enabled', 'pychron.experiment.runs_enabled')
     bind_preference(self, 'queue_enabled', 'pychron.experiment.queue_enabled')
     bind_preference(self, 'non_fatal_enabled', 'pychron.experiment.non_fatal_enabled')
Exemple #22
0
    def bind_preferences(self, pref_id):
        bind_preference(self.canvas, 'show_grids', '{}.show_grids'.format(pref_id))
        self.canvas.change_grid_visibility()

        bind_preference(self.canvas, 'show_laser_position', '{}.show_laser_position'.format(pref_id))
        bind_preference(self.canvas, 'show_desired_position', '{}.show_desired_position'.format(pref_id))
        bind_preference(self.canvas, 'desired_position_color', '{}.desired_position_color'.format(pref_id),
                        factory=ColorPreferenceBinding)
        #        bind_preference(self.canvas, 'render_map', '{}.render_map'.format(pref_id))
        #
        bind_preference(self.canvas, 'crosshairs_kind', '{}.crosshairs_kind'.format(pref_id))
        bind_preference(self.canvas, 'crosshairs_line_width', '{}.crosshairs_line_width'.format(pref_id))
        bind_preference(self.canvas, 'crosshairs_color',
                        '{}.crosshairs_color'.format(pref_id),
                        factory=ColorPreferenceBinding)
        bind_preference(self.canvas, 'crosshairs_radius', '{}.crosshairs_radius'.format(pref_id))
        bind_preference(self.canvas, 'crosshairs_offsetx', '{}.crosshairs_offsetx'.format(pref_id))
        bind_preference(self.canvas, 'crosshairs_offsety', '{}.crosshairs_offsety'.format(pref_id))

        bind_preference(self.canvas, 'show_hole_label', '{}.show_hole_label'.format(pref_id))
        bind_preference(self.canvas, 'hole_label_color', '{}.hole_label_color'.format(pref_id))
        bind_preference(self.canvas, 'hole_label_size', '{}.hole_label_size'.format(pref_id))
        self.canvas.handle_hole_label_size(self.canvas.hole_label_size)

        bind_preference(self.canvas, 'scaling', '{}.scaling'.format(pref_id))
        bind_preference(self.canvas, 'show_bounds_rect',
                        '{}.show_bounds_rect'.format(pref_id))

        self.canvas.request_redraw()
Exemple #23
0
    def __init__(self, *args, **kw):
        #print 'init arar constants'
        try:
            bind_preference(self, 'lambda_b_v', 'pychron.arar.constants.lambda_b')
            bind_preference(self, 'lambda_b_e', 'pychron.arar.constants.lambda_b_error')
            bind_preference(self, 'lambda_e_v', 'pychron.arar.constants.lambda_e')
            bind_preference(self, 'lambda_e_e', 'pychron.arar.constants.lambda_e_error')
            bind_preference(self, 'lambda_Cl36_v', 'pychron.arar.constants.lambda_Cl36')
            bind_preference(self, 'lambda_Cl36_e', 'pychron.arar.constants.lambda_Cl36_error')
            bind_preference(self, 'lambda_Ar37_v', 'pychron.arar.constants.lambda_Ar37')
            bind_preference(self, 'lambda_Ar37_e', 'pychron.arar.constants.lambda_Ar37_error')
            bind_preference(self, 'lambda_Ar39_v', 'pychron.arar.constants.lambda_Ar39')
            bind_preference(self, 'lambda_Ar39_e', 'pychron.arar.constants.lambda_Ar39_error')

            bind_preference(self, 'atm4036_v', 'pychron.arar.constants.Ar40_Ar36_atm')
            bind_preference(self, 'atm_4036_e', 'pychron.arar.constants.Ar40_Ar36_atm_error')
            bind_preference(self, 'atm4038_v', 'pychron.arar.constants.Ar40_Ar38_atm')
            bind_preference(self, 'atm_4038_e', 'pychron.arar.constants.Ar40_Ar38_atm_error')

            bind_preference(self, 'k3739_mode', 'pychron.arar.constants.Ar37_Ar39_mode')
            bind_preference(self, 'k3739_v', 'pychron.arar.constants.Ar37_Ar39')
            bind_preference(self, 'k3739_e', 'pychron.arar.constants.Ar37_Ar39_error')

            bind_preference(self, 'age_units', 'pychron.arar.constants.age_units')
            bind_preference(self, 'abundance_sensitivity', 'pychron.arar.constants.abundance_sensitivity')

            # bind_preference(self, 'ic_factors', 'pychron.spectrometer.ic_factors',
            #                 factory=ICFactorPreferenceBinding)

            prefid = 'pychron.arar.constants'
            bind_preference(self, 'atm4036_citation', '{}.Ar40_Ar36_atm_citation'.format(prefid))
            bind_preference(self, 'atm4038_citation', '{}.Ar40_Ar38_atm_citation'.format(prefid))
            bind_preference(self, 'lambda_b_citation', '{}.lambda_b_citation'.format(prefid))
            bind_preference(self, 'lambda_e_citation', '{}.lambda_e_citation'.format(prefid))
            bind_preference(self, 'lambda_Cl36_citation', '{}.lambda_Cl36_citation'.format(prefid))
            bind_preference(self, 'lambda_Ar37_citation', '{}.lambda_Ar37_citation'.format(prefid))
            bind_preference(self, 'lambda_Ar39_citation', '{}.lambda_Ar39_citation'.format(prefid))

        except Exception, e:
            print 'arar_constants ', e
            import traceback
            traceback.print_exc()
Exemple #24
0
    def activated(self):
        self.load_projects()
        bind_preference(self.search_criteria, 'recent_hours', 'pychron.processing.recent_hours')

        self.load_browser_selection()
    def bind_preferences(self):
        super(ExperimentExecutor, self).bind_preferences()

        prefid = 'pychron.database'

        bind_preference(self.massspec_importer.db, 'name', '{}.massspec_dbname'.format(prefid))
        bind_preference(self.massspec_importer.db, 'host', '{}.massspec_host'.format(prefid))
        bind_preference(self.massspec_importer.db, 'username', '{}.massspec_username'.format(prefid))
        bind_preference(self.massspec_importer.db, 'password', '{}.massspec_password'.format(prefid))

        prefid = 'pychron.experiment'
        #auto save
        bind_preference(self, 'use_auto_save',
                        '{}.use_auto_save'.format(prefid))
        bind_preference(self, 'auto_save_delay',
                        '{}.auto_save_delay'.format(prefid))

        #colors
        color_bind_preference(self, 'signal_color',
                              '{}.signal_color'.format(prefid))
        color_bind_preference(self, 'sniff_color',
                              '{}.sniff_color'.format(prefid))
        color_bind_preference(self, 'baseline_color',
                              '{}.baseline_color'.format(prefid))
Exemple #26
0
    def bind_preferences(self, pref_id):
        bind_preference(self.canvas, 'show_grids', '{}.show_grids'.format(pref_id))
        bind_preference(self.canvas, 'show_laser_position', '{}.show_laser_position'.format(pref_id))
        bind_preference(self.canvas, 'show_desired_position', '{}.show_laser_position'.format(pref_id))
        bind_preference(self.canvas, 'desired_position_color', '{}.desired_position_color'.format(pref_id),
                        factory=ColorPreferenceBinding)
        #        bind_preference(self.canvas, 'render_map', '{}.render_map'.format(pref_id))
        #
        bind_preference(self.canvas, 'crosshairs_kind', '{}.crosshairs_kind'.format(pref_id))
        bind_preference(self.canvas, 'crosshairs_color',
                        '{}.crosshairs_color'.format(pref_id),
                        factory=ColorPreferenceBinding)
        bind_preference(self.canvas, 'crosshairs_radius', '{}.crosshairs_radius'.format(pref_id))
        bind_preference(self.canvas, 'crosshairs_offsetx', '{}.crosshairs_offsetx'.format(pref_id))
        bind_preference(self.canvas, 'crosshairs_offsety', '{}.crosshairs_offsety'.format(pref_id))
        #
        bind_preference(self.canvas, 'scaling', '{}.scaling'.format(pref_id))
        #
        #        bind_preference(self.tray_calibration_manager, 'style', '{}.calibration_style'.format(pref_id))
        bind_preference(self.canvas, 'show_bounds_rect',
                        '{}.show_bounds_rect'.format(pref_id))

        self.canvas.request_redraw()
 def bind_preferences(self):
     super(ClientExtractionLineManager, self).bind_preferences()
     bind_preference(self, 'use_status_monitor', 'pychron.extraction_line.use_status_monitor')
Exemple #28
0
    def __init__(self, *args, **kw):
        try:
            from pychron.core.ui.preference_binding import bind_preference
            bind_preference(self, 'lambda_b_v', 'pychron.arar.constants.lambda_b')
            bind_preference(self, 'lambda_b_e', 'pychron.arar.constants.lambda_b_error')
            bind_preference(self, 'lambda_e_v', 'pychron.arar.constants.lambda_e')
            bind_preference(self, 'lambda_e_e', 'pychron.arar.constants.lambda_e_error')
            bind_preference(self, 'lambda_Cl36_v', 'pychron.arar.constants.lambda_Cl36')
            bind_preference(self, 'lambda_Cl36_e', 'pychron.arar.constants.lambda_Cl36_error')
            bind_preference(self, 'lambda_Ar37_v', 'pychron.arar.constants.lambda_Ar37')
            bind_preference(self, 'lambda_Ar37_e', 'pychron.arar.constants.lambda_Ar37_error')
            bind_preference(self, 'lambda_Ar39_v', 'pychron.arar.constants.lambda_Ar39')
            bind_preference(self, 'lambda_Ar39_e', 'pychron.arar.constants.lambda_Ar39_error')

            bind_preference(self, 'atm4036_v', 'pychron.arar.constants.ar40_ar36_atm')
            bind_preference(self, 'atm4036_e', 'pychron.arar.constants.ar40_ar36_atm_error')
            bind_preference(self, 'atm4038_v', 'pychron.arar.constants.ar40_ar38_atm')
            bind_preference(self, 'atm4038_e', 'pychron.arar.constants.ar40_ar38_atm_error')

            bind_preference(self, 'k3739_mode', 'pychron.arar.constants.ar37_ar39_mode')
            bind_preference(self, 'k3739_v', 'pychron.arar.constants.ar37_ar39')
            bind_preference(self, 'k3739_e', 'pychron.arar.constants.ar37_ar39_error')
            bind_preference(self, 'age_units', 'pychron.arar.constants.age_units')
            bind_preference(self, 'abundance_sensitivity', 'pychron.arar.constants.abundance_sensitivity')

            # bind_preference(self, 'ic_factors', 'pychron.spectrometer.ic_factors',
            #                 factory=ICFactorPreferenceBinding)

            prefid = 'pychron.arar.constants'
            bind_preference(self, 'atm4036_citation', '{}.ar40_ar36_atm_citation'.format(prefid))
            bind_preference(self, 'atm4038_citation', '{}.ar40_ar38_atm_citation'.format(prefid))
            bind_preference(self, 'lambda_b_citation', '{}.lambda_b_citation'.format(prefid))
            bind_preference(self, 'lambda_e_citation', '{}.lambda_e_citation'.format(prefid))
            bind_preference(self, 'lambda_Cl36_citation', '{}.lambda_Cl36_citation'.format(prefid))
            bind_preference(self, 'lambda_Ar37_citation', '{}.lambda_Ar37_citation'.format(prefid))
            bind_preference(self, 'lambda_Ar39_citation', '{}.lambda_Ar39_citation'.format(prefid))

            bind_preference(self, 'allow_negative_ca_correction', '{}.allow_negative_ca_correction'.format(prefid))

        except (AttributeError, ImportError) as e:
            pass

        super(ArArConstants, self).__init__(*args, **kw)
Exemple #29
0
    def __init__(self, *args, **kw):
        super(BrowserModel, self).__init__(*args, **kw)

        prefid = 'pychron.browser'
        bind_preference(self, 'load_selection_enabled', '{}.load_selection_enabled'.format(prefid))
        bind_preference(self, 'auto_load_database', '{}.auto_load_database'.format(prefid))
Exemple #30
0
    def __init__(self, *args, **kw):
        #print 'init arar constants'
        try:
            from pychron.core.ui.preference_binding import bind_preference
            bind_preference(self, 'lambda_b_v',
                            'pychron.arar.constants.lambda_b')
            bind_preference(self, 'lambda_b_e',
                            'pychron.arar.constants.lambda_b_error')
            bind_preference(self, 'lambda_e_v',
                            'pychron.arar.constants.lambda_e')
            bind_preference(self, 'lambda_e_e',
                            'pychron.arar.constants.lambda_e_error')
            bind_preference(self, 'lambda_Cl36_v',
                            'pychron.arar.constants.lambda_Cl36')
            bind_preference(self, 'lambda_Cl36_e',
                            'pychron.arar.constants.lambda_Cl36_error')
            bind_preference(self, 'lambda_Ar37_v',
                            'pychron.arar.constants.lambda_Ar37')
            bind_preference(self, 'lambda_Ar37_e',
                            'pychron.arar.constants.lambda_Ar37_error')
            bind_preference(self, 'lambda_Ar39_v',
                            'pychron.arar.constants.lambda_Ar39')
            bind_preference(self, 'lambda_Ar39_e',
                            'pychron.arar.constants.lambda_Ar39_error')

            bind_preference(self, 'atm4036_v',
                            'pychron.arar.constants.Ar40_Ar36_atm')
            bind_preference(self, 'atm_4036_e',
                            'pychron.arar.constants.Ar40_Ar36_atm_error')
            bind_preference(self, 'atm4038_v',
                            'pychron.arar.constants.Ar40_Ar38_atm')
            bind_preference(self, 'atm_4038_e',
                            'pychron.arar.constants.Ar40_Ar38_atm_error')

            bind_preference(self, 'k3739_mode',
                            'pychron.arar.constants.Ar37_Ar39_mode')
            bind_preference(self, 'k3739_v',
                            'pychron.arar.constants.Ar37_Ar39')
            bind_preference(self, 'k3739_e',
                            'pychron.arar.constants.Ar37_Ar39_error')

            bind_preference(self, 'age_units',
                            'pychron.arar.constants.age_units')
            bind_preference(self, 'abundance_sensitivity',
                            'pychron.arar.constants.abundance_sensitivity')

            # bind_preference(self, 'ic_factors', 'pychron.spectrometer.ic_factors',
            #                 factory=ICFactorPreferenceBinding)

            prefid = 'pychron.arar.constants'
            bind_preference(self, 'atm4036_citation',
                            '{}.Ar40_Ar36_atm_citation'.format(prefid))
            bind_preference(self, 'atm4038_citation',
                            '{}.Ar40_Ar38_atm_citation'.format(prefid))
            bind_preference(self, 'lambda_b_citation',
                            '{}.lambda_b_citation'.format(prefid))
            bind_preference(self, 'lambda_e_citation',
                            '{}.lambda_e_citation'.format(prefid))
            bind_preference(self, 'lambda_Cl36_citation',
                            '{}.lambda_Cl36_citation'.format(prefid))
            bind_preference(self, 'lambda_Ar37_citation',
                            '{}.lambda_Ar37_citation'.format(prefid))
            bind_preference(self, 'lambda_Ar39_citation',
                            '{}.lambda_Ar39_citation'.format(prefid))

            bind_preference(self, 'allow_negative_ca_correction',
                            '{}.allow_negative_ca_correction'.format(prefid))

        except (AttributeError, ImportError):
            pass

        super(ArArConstants, self).__init__(*args, **kw)
Exemple #31
0
 def bind_preferences(self):
     prefid = 'pychron.experiment'
     bind_preference(self, 'use_analysis_grouping', '{}.use_analysis_grouping'.format(prefid))
     bind_preference(self, 'grouping_threshold', '{}.grouping_threshold'.format(prefid))
     bind_preference(self, 'grouping_suffix', '{}.grouping_suffix'.format(prefid))
Exemple #32
0
 def bind_preferences(self):
     super(ClientExtractionLineManager, self).bind_preferences()
     bind_preference(self, 'use_status_monitor',
                     'pychron.extraction_line.use_status_monitor')
Exemple #33
0
    def bind_preferences(self):
        pref_id = 'pychron.spectrometer'
        bind_preference(self, 'use_detector_safety',
                        '{}.use_detector_safety'.format(pref_id))
        bind_preference(self, 'use_log_events',
                        '{}.use_log_events'.format(pref_id))
        bind_preference(self, 'use_vertical_markers',
                        '{}.use_vertical_markers'.format(pref_id))

        bind_preference(self, 'use_default_scan_settings',
                        '{}.use_default_scan_settings'.format(pref_id))
        bind_preference(self, 'default_detector',
                        '{}.default_detector'.format(pref_id))
        bind_preference(self, 'default_isotope',
                        '{}.default_isotope'.format(pref_id))
Exemple #34
0
    def activated(self):
        self.load_projects()
        bind_preference(self.search_criteria, 'recent_hours', 'pychron.processing.recent_hours')

        self.load_browser_selection()
Exemple #35
0
 def _bind_preferences(self):
     prefid = 'pychron.igsn'
     # bind_preference(self, 'url', '{}.url'.format(prefid))
     bind_preference(self, 'username', '{}.username'.format(prefid))
     bind_preference(self, 'password', '{}.password'.format(prefid))
     bind_preference(self, 'user_code', '{}.user_code'.format(prefid))
Exemple #36
0
 def _bind_preferences(self):
     prefid = 'pychron.igsn'
     bind_preference(self, 'url', '{}.url'.format(prefid))
     bind_preference(self, 'username', '{}.username'.format(prefid))
     bind_preference(self, 'password', '{}.password'.format(prefid))
     bind_preference(self, 'usercode', '{}.usercode'.format(prefid))
    def bind_preferences(self):
        super(ExperimentExecutor, self).bind_preferences()

        prefid = 'pychron.database'

        bind_preference(self.massspec_importer.db, 'name',
                        '{}.massspec_dbname'.format(prefid))
        bind_preference(self.massspec_importer.db, 'host',
                        '{}.massspec_host'.format(prefid))
        bind_preference(self.massspec_importer.db, 'username',
                        '{}.massspec_username'.format(prefid))
        bind_preference(self.massspec_importer.db, 'password',
                        '{}.massspec_password'.format(prefid))

        prefid = 'pychron.experiment'
        #auto save
        bind_preference(self, 'use_auto_save',
                        '{}.use_auto_save'.format(prefid))
        bind_preference(self, 'auto_save_delay',
                        '{}.auto_save_delay'.format(prefid))

        #colors
        color_bind_preference(self, 'signal_color',
                              '{}.signal_color'.format(prefid))
        color_bind_preference(self, 'sniff_color',
                              '{}.sniff_color'.format(prefid))
        color_bind_preference(self, 'baseline_color',
                              '{}.baseline_color'.format(prefid))