Example #1
0
    def edit_queue_conditionals(self):
        if self.has_active_editor():
            from pychron.experiment.conditional.conditionals_edit_view import edit_conditionals

            dnames = None
            spec = self.application.get_service(
                'pychron.spectrometer.base_spectrometer_manager.BaseSpectrometerManager')
            if spec:
                dnames = spec.spectrometer.detector_names

            edit_conditionals(self.manager.experiment_factory.queue_factory.queue_conditionals_name,
                              detectors=dnames)
    def perform(self, event):
        task = event.task
        if hasattr(task, 'edit_queue_conditionals'):
            task.edit_queue_conditionals()
        else:
            from pychron.experiment.conditional.conditionals_edit_view import edit_conditionals

            dnames = None
            spec = task.application.get_service(
                'pychron.spectrometer.base_spectrometer_manager.BaseSpectrometerManager')
            if spec:
                dnames = spec.spectrometer.detector_names

            edit_conditionals(None, detectors=dnames, app=task.application)
Example #3
0
    def edit_queue_conditionals(self):
        if self.has_active_editor():
            from pychron.experiment.conditional.conditionals_edit_view import edit_conditionals

            dnames = None
            spec = self.application.get_service(
                'pychron.spectrometer.base_spectrometer_manager.BaseSpectrometerManager'
            )
            if spec:
                dnames = spec.spectrometer.detector_names

            edit_conditionals(self.manager.experiment_factory.queue_factory.
                              queue_conditionals_name,
                              detectors=dnames)
Example #4
0
    def perform(self, event):
        from pychron.experiment.conditional.conditionals_edit_view import edit_conditionals

        task = event.task
        dnames = None
        spec = task.application.get_service(
            'pychron.spectrometer.base_spectrometer_manager.BaseSpectrometerManager')
        if spec:
            dnames = spec.spectrometer.detector_names

        p = get_path(paths.spectrometer_dir, '.*conditionals', ('.yaml','.yml'))
        if p:
            edit_conditionals(p, detectors=dnames, app=task.application)
        else:
            warning(None, 'No system conditionals file at {}'.format(p))
    def perform(self, event):
        task = event.task
        if hasattr(task, 'edit_queue_conditionals'):
            # edit the current queue's conditionals
            task.edit_queue_conditionals()
        else:
            # choose a conditionals file to edit
            from pychron.experiment.conditional.conditionals_edit_view import edit_conditionals

            dnames = None
            spec = task.application.get_service(
                'pychron.spectrometer.base_spectrometer_manager.BaseSpectrometerManager'
            )
            if spec:
                dnames = spec.spectrometer.detector_names

            edit_conditionals(None, detectors=dnames, app=task.application)
Example #6
0
 def _test_fired(self):
     edit_conditionals('normal', save_as=False)
Example #7
0
 def _test_fired(self):
     edit_conditionals('normal', save_as=False)